/* Les jeux de Plan B : the game's dark card colour, its cream, its yellow, and its slot dots. */
@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url(/static/fonts/montserrat-medium.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 600; font-display: swap; src: url(/static/fonts/montserrat-semibold.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(/static/fonts/montserrat-bold.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 800; font-display: swap; src: url(/static/fonts/montserrat-extrabold.woff2) format('woff2'); }

:root {
  --field: #0f2a20;
  --field-2: #173a2c;
  --line: #334a3d;
  --ink: #fbf4e9;
  --ink-2: #b3c0ae;
  --yellow: #f2a900;
  --cream: #f4eee4;
  --deep: #10241c;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font: 500 17px/1.55 Montserrat, system-ui, sans-serif;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
h2 { font-size: clamp(34px, 5vw, 60px); }
h3 { margin-bottom: 12px; font-size: 19px; font-weight: 800; letter-spacing: -0.015em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* header and footer */
.top, .foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 18px var(--gutter); }
.top { border-bottom: 1px solid var(--line); }
.top-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.top-brand img { width: 84px; height: auto; }
.top-brand span { padding-left: 14px; border-left: 1px solid var(--line); font-size: 19px; font-weight: 800; }
.top-link, .foot a { font-size: 15px; font-weight: 600; text-underline-offset: 4px; }
.foot { border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.foot a { color: var(--ink); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform 140ms ease-out, background-color 140ms ease-out; }
.btn-main { background: var(--yellow); color: var(--deep); }
.btn-line { box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 15px; }
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } }
.btn:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; transform: none !important; } }

/* shared text */
.icon { width: clamp(64px, 7vw, 88px); height: auto; border-radius: 22.5%; box-shadow: 0 0 0 1px rgb(251 244 233 / 0.14); }
.hook { margin-top: 10px; color: var(--yellow); font-size: clamp(21px, 2.3vw, 28px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.lede { margin-top: 18px; max-width: 46ch; color: var(--ink-2); font-size: clamp(17px, 1.5vw, 20px); }
.fine { margin-top: 18px; color: var(--ink-2); font-size: 15px; }
.fine a { color: var(--ink); font-weight: 700; text-underline-offset: 4px; }
.capture { display: block; width: 100%; height: auto; border-radius: clamp(10px, 1.4vw, 18px); box-shadow: 0 28px 56px -24px rgb(0 0 0 / 0.6); }

/* Header backdrop: a low sun from the right and the game's vegetables, huge and faint, as behind its
   own screen. They stay on the right, away from the text. */
.home-head, .legal-head {
  position: relative;
  z-index: 2;
  background:
    radial-gradient(110% 130% at 92% -10%, color-mix(in oklab, var(--yellow) 16%, transparent), transparent 62%),
    linear-gradient(180deg, var(--field-2), var(--field));
}
.home-head > :not(.ghosts), .legal-head > :not(.ghosts) { position: relative; z-index: 1; }
.ghosts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ghost { position: absolute; height: auto; opacity: 0.1; overflow: visible; }
.ghost-a { width: clamp(220px, 30vw, 440px); right: -5%; bottom: -24%; }
.ghost-b { width: clamp(130px, 17vw, 250px); right: 25%; top: -10%; transform: rotate(-16deg); }
.ghost-c { width: clamp(120px, 15vw, 220px); right: 40%; bottom: -16%; transform: rotate(10deg); }
@media (max-width: 760px) { .ghost-b, .ghost-c { display: none; } .ghost-a { opacity: 0.08; } }
.home-head { padding: clamp(56px, 9vw, 128px) var(--gutter) clamp(40px, 6vw, 72px); }
.home-head h1 { font-size: clamp(48px, 9vw, 128px); max-width: 12ch; }
.tiles { display: grid; gap: clamp(32px, 5vw, 64px); padding: 0 var(--gutter) clamp(56px, 8vw, 112px); }
.tile { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; padding-top: clamp(32px, 5vw, 64px); border-top: 1px solid var(--line); }
.tile h2 { margin-top: 16px; }
.tile-copy p:not(.hook) { margin-top: 14px; max-width: 42ch; color: var(--ink-2); }
.tile-shot img { width: 100%; height: auto; border-radius: clamp(10px, 1.4vw, 18px); box-shadow: 0 28px 56px -24px rgb(0 0 0 / 0.6); }
@media (min-width: 900px) { .tile { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); } }

/* a game's hero: the well on the floor of the section */
.hero { display: grid; gap: 40px; align-items: end; padding: clamp(32px, 5vw, 72px) var(--gutter) 0; overflow: clip; }
.hero-copy { align-self: center; padding-bottom: 8px; }
.hero-back { margin-bottom: 20px; font-size: 15px; font-weight: 600; }
.hero-back a { text-underline-offset: 4px; }
.hero h1 { margin-top: 16px; font-size: clamp(56px, 9vw, 120px); }
@media (min-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .hero-copy { padding-bottom: 72px; }
}

.well {
  --cell: clamp(32px, 9.4vw, 44px);
  --dot: rgb(251 244 233 / 0.16);
  position: relative;
  width: calc(var(--cell) * 7);
  height: calc(var(--cell) * 9.8);
  margin-inline: auto;
}
@media (min-width: 1000px) { .well { --cell: clamp(48px, 4.7vw, 64px); } }
.well::before {
  content: '';
  position: absolute;
  inset: calc(var(--cell) * -3) calc(var(--cell) * -5) 0;
  background-image: radial-gradient(circle at center, var(--dot) 0 calc(var(--cell) * 0.05), transparent calc(var(--cell) * 0.05 + 0.6px));
  background-size: var(--cell) var(--cell);
  background-position: left bottom;
  mask: radial-gradient(ellipse 60% 70% at 50% 72%, black 35%, transparent 100%);
  pointer-events: none;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.piece {
  position: absolute;
  left: calc(var(--x) * var(--cell));
  bottom: calc(var(--y) * var(--cell));
  width: calc(var(--w) * var(--cell));
  height: calc(var(--h) * var(--cell));
  filter: drop-shadow(0 calc(var(--cell) * 0.05) calc(var(--cell) * 0.05) rgb(0 0 0 / 0.3));
}
.cell { position: absolute; left: calc(var(--cx) * var(--cell)); bottom: calc(var(--cy) * var(--cell)); width: var(--cell); height: var(--cell); }
.cell svg { width: 100%; height: 100%; max-width: none; overflow: visible; }
.heaped { animation: drop 520ms cubic-bezier(0.55, 0, 0.9, 0.45) both; animation-delay: calc(300ms + var(--i) * 170ms); }
@keyframes drop { from { opacity: 0; transform: translateY(calc(var(--cell) * -10)); } 14% { opacity: 1; } }
.faller, .trail { animation: fade 700ms ease-out 1620ms both; }
@keyframes fade { from { opacity: 0; } }
.trail {
  position: absolute;
  left: calc((var(--col) + 0.25) * var(--cell));
  bottom: calc((var(--row) + 0.3) * var(--cell));
  width: calc(var(--cell) * 0.5);
  height: calc(var(--cell) * 3.4);
  border-radius: 0 0 calc(var(--cell) * 0.25) calc(var(--cell) * 0.25);
  background: linear-gradient(to bottom, transparent, rgb(251 244 233 / 0.22));
  filter: blur(calc(var(--cell) * 0.045));
}
.eye-ball { fill: var(--cream); }
.pupil { fill: var(--deep); }
.glint { fill: #fff; }
.gaze { transform: translate(calc(var(--gx) * 1px), calc(var(--gy) * 1px)); transition: transform 240ms ease-out; }
.eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.6s linear infinite; animation-delay: calc(2.6s + var(--i) * 0.83s); }
@keyframes blink { 0%, 95.5%, 100% { transform: none; } 97.5% { transform: scaleY(0.1); } }
@media (prefers-reduced-motion: reduce) { .heaped, .faller, .trail, .eyes { animation: none; } .gaze { transition: none; } }

/* bands */
.band { padding: clamp(56px, 8vw, 112px) var(--gutter); scroll-margin-top: 16px; background: var(--field-2); }
.band + .band { background: var(--field); }
.band.band-light { background: var(--cream); color: var(--deep); --line: #cfc8b8; --ink-2: #4c5a50; --ink: #10241c; }
.notice { margin-top: 20px; padding: 14px 18px; border-left: 3px solid var(--yellow); background: rgb(242 169 0 / 0.12); font-weight: 600; }
.shelf { display: grid; gap: 40px; margin-top: 36px; }
@media (min-width: 900px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; } }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; min-height: 84px; padding: 12px; border-bottom: 1px solid var(--line); }
.row:not(:has(.os)) { grid-template-columns: minmax(0, 1fr) auto; }
.row.is-yours { background: rgb(242 169 0 / 0.1); box-shadow: inset 3px 0 0 var(--yellow); }
.os { display: block; width: 28px; height: 28px; }
.os svg { width: 100%; height: 100%; fill: currentColor; }
.row-text { display: grid; gap: 2px; line-height: 1.3; }
.row-text strong { font-size: 18px; font-weight: 800; }
.row-text span { color: var(--ink-2); font-size: 14px; }
.row-text .yours { color: var(--yellow); font-weight: 700; }
.soon { padding: 3px 12px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge { display: inline-grid; justify-items: center; gap: 6px; border-radius: 10px; }
.badge img { width: auto; height: 40px; }
.badge.is-soon img { opacity: 0.5; filter: grayscale(1); }
.badge-note { color: var(--ink-2); font-size: 13px; font-weight: 700; }
.history { grid-column: 1 / -1; font-size: 15px; }
.history summary { width: fit-content; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.history ul { list-style: none; margin: 10px 0 4px; padding: 0; }
.history li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 8px 0; border-top: 1px solid var(--line); }
.history span { color: var(--ink-2); }
.history-link { font-weight: 700; text-underline-offset: 4px; }

/* seasons: the choice changes the picture, nothing more */
.band-light .lede { color: var(--ink-2); }
.season-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.season-tab { min-height: 44px; padding: 0 20px; border: 1.5px solid var(--line); border-radius: 999px; background: transparent; color: var(--deep); font: inherit; font-weight: 700; cursor: pointer; }
.season-tab[aria-pressed='true'] { border-color: var(--deep); background: var(--deep); color: var(--cream); }
.season-tab:focus-visible { outline-color: var(--deep); }
.season-frame { display: grid; margin-top: 20px; }
.season-frame .capture { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 220ms ease-out, visibility 220ms; }
.season-frame .capture.is-on { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .season-frame .capture { transition: none; } }

/* controls */
.keys { margin: 0; border-top: 1px solid var(--line); }
.keys div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.keys dt { font-weight: 600; }
.keys dd { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.keys kbd { min-width: 32px; padding: 4px 10px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 8px; background: var(--field-2); font: inherit; font-size: 14px; font-weight: 700; text-align: center; }

/* Each season colours the page, the moment the music reaches it. Registered so they can fade. */
@property --field { syntax: '<color>'; inherits: true; initial-value: #0f2a20; }
@property --field-2 { syntax: '<color>'; inherits: true; initial-value: #173a2c; }
@property --line { syntax: '<color>'; inherits: true; initial-value: #334a3d; }
@property --yellow { syntax: '<color>'; inherits: true; initial-value: #f2a900; }
body[data-season] { transition: --field 1.4s ease, --field-2 1.4s ease, --line 1.4s ease, --yellow 1.4s ease; }
body[data-season='0'] { --field: #0f2a20; --field-2: #173a2c; --line: #334a3d; --yellow: #b5e61d; }
body[data-season='1'] { --field: #1c2c10; --field-2: #2a3d16; --line: #4b5a2c; --yellow: #f2a900; }
body[data-season='2'] { --field: #2b170d; --field-2: #3c2214; --line: #5e3c28; --yellow: #ff8a4c; }
body[data-season='3'] { --field: #10242d; --field-2: #17333f; --line: #35505c; --yellow: #8fd3df; }
body[data-season] .band.band-light { --line: #cfc8b8; --yellow: inherit; }
@media (prefers-reduced-motion: reduce) { body[data-season] { transition: none; } }
.band-light { transition: none; }

/* The weather falls over the hero while the music plays; the heap dances on the beat. */
.hero { position: relative; }
.hero-copy, .hero .well { position: relative; z-index: 1; }
.weather { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity 900ms ease; }
.music-on .weather { opacity: 1; }
.piece { translate: 0 calc(var(--bop, 0) * var(--cell) * -0.16); }

/* The player follows the visitor along the page. */
body:has(.player) { padding-bottom: 96px; }
.player { position: fixed; z-index: 20; inset: auto 0 0; display: flex; justify-content: flex-end; padding: 0 var(--gutter) 16px; pointer-events: none; --ring: 0; }
.player-start, .player-bar { pointer-events: auto; box-shadow: 0 18px 44px -14px rgb(0 0 0 / 0.65), 0 0 0 1px var(--line); backdrop-filter: blur(14px); background: color-mix(in oklab, var(--field-2) 90%, transparent); }
.player-start { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px 0 14px; border: 0; border-radius: 999px; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.player-start svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--yellow); fill: var(--deep); }
.player-start[hidden], .player-bar[hidden] { display: none; }
.player-bar { display: grid; grid-template-columns: auto minmax(120px, 0.7fr) minmax(0, 1.6fr) auto auto; align-items: center; gap: 16px; width: 100%; padding: 10px 18px 10px 10px; border-radius: 22px; }
.player-toggle { position: relative; width: 40px; height: 40px; margin: 10px; border: 0; border-radius: 50%; background: var(--yellow); color: var(--deep); cursor: pointer; }
.player-toggle::before { content: ''; position: absolute; inset: -3px; border-radius: 50%; box-shadow: 0 0 0 2px var(--yellow); opacity: calc(0.3 + var(--ring) * 0.7); transform: scale(calc(1 + var(--ring) * 0.26)); pointer-events: none; }
.player:not(.is-playing) .player-toggle::before { opacity: 0.3; transform: none; }
.player-toggle svg { position: absolute; inset: 10px; fill: currentColor; }
.icon-pause { display: none; }
.is-playing .icon-pause { display: block; }
.is-playing .icon-play { display: none; }
.player-now { display: grid; min-width: 0; line-height: 1.25; }
.player-now strong { font-size: 18px; font-weight: 800; letter-spacing: -0.015em; }
.player-now span { overflow: hidden; color: var(--ink-2); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.player-year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.chip { position: relative; min-height: 44px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: color 300ms ease, border-color 300ms ease; }
.chip[aria-pressed='true'] { border-color: var(--yellow); color: var(--ink); }
.chip-fill { position: absolute; inset: 0; background: color-mix(in oklab, var(--yellow) 26%, transparent); transform: scaleX(var(--progress, 0)); transform-origin: left; transition: transform 250ms linear; }
.chip-name { position: relative; }
.player-mode { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.player-mode svg { width: 18px; height: 18px; fill: currentColor; }
.player-mode[aria-pressed='true'] { color: var(--ink); }
.player-volume input { display: block; width: 92px; accent-color: var(--yellow); }
.player button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (max-width: 1000px) {
  body:has(.player.is-open) { padding-bottom: 170px; }
  .player { padding: 0 10px 10px; }
  .player-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 12px; }
  .player-year { grid-column: 1 / -1; grid-row: 2; }
  .player-volume { display: none; }
  .chip { min-height: 40px; font-size: 13px; }
}

/* A policy: the storefront's template (title and icon, versions, quick sections) on the game's field. */
.legal-head { padding: clamp(32px, 5vw, 72px) var(--gutter) clamp(24px, 3vw, 40px); }
.legal-eyebrow { margin-bottom: 12px; color: var(--yellow); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.legal-title { display: flex; align-items: center; justify-content: space-between; gap: clamp(12px, 2vw, 24px); }
.legal-title h1 { max-width: 18ch; font-size: clamp(44px, 6.3vw, 81px); }
.legal-title .icon { flex: none; width: clamp(48px, 9vw, 112px); }
.legal-head .lede { max-width: 52ch; }
.legal-meta { display: grid; justify-items: start; gap: 6px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.sel-title { font-size: 15px; font-weight: 700; }
.sel { position: relative; width: min(320px, 100%); z-index: 3; }
.sel-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 64px; padding: 10px 16px; border: 1px solid var(--ink-2); border-radius: 12px; background: var(--field); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sel-btn:hover { border-color: var(--ink); }
.sel.is-open .sel-btn { border-color: var(--yellow); }
.sel-label, .sel-opt { display: grid; gap: 1px; line-height: 1.3; }
.sel-label strong, .sel-opt strong { font-weight: 600; }
.sel-label span, .sel-opt span { color: var(--ink-2); font-size: 14px; }
.sel-chev { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms ease-out; }
.sel.is-open .sel-chev { transform: rotate(180deg); }
.sel-pop { position: absolute; inset: calc(100% + 6px) 0 auto; max-height: 300px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); box-shadow: 0 18px 44px -14px rgb(0 0 0 / 0.65); }
.sel-pop[hidden] { display: none; }
.sel-opt { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.sel-opt:hover, .sel-opt:focus-visible { background: var(--field-2); outline: 0; }
.sel-opt[aria-selected='true'] { box-shadow: inset 3px 0 0 var(--yellow); }
@media (prefers-reduced-motion: reduce) { .sel-chev { transition: none; } }
.legal-archived { margin-top: 20px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); font-size: 15px; }
.legal-archived a { font-weight: 700; text-underline-offset: 4px; }
.doc-layout { display: grid; gap: 32px; padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 112px); }
.doc-toc a { display: block; padding: 8px 0 8px 16px; border-left: 1px solid var(--line); color: var(--ink-2); font-size: 14px; text-decoration: none; }
@media (hover: hover) { .doc-toc a:hover { border-left-color: var(--yellow); color: var(--ink); } }
.doc-body { max-width: 68ch; overflow-wrap: anywhere; }
.doc-body h2 { margin: 48px 0 14px; font-size: 28px; letter-spacing: -0.02em; line-height: 1.15; scroll-margin-top: 24px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p { margin: 0 0 14px; color: var(--ink-2); }
.doc-body strong, .doc-body a { color: var(--ink); }
.doc-body a { font-weight: 700; text-underline-offset: 4px; }
.doc-body code { color: var(--ink); font-size: 0.92em; }
@media (min-width: 980px) {
  .doc-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start; }
  .doc-toc { position: sticky; top: 24px; }
}
/* « confidentialité » is the title's longest word: on a phone it scales to leave the icon its room. */
@media (max-width: 480px) {
  .legal-title h1 { font-size: min(44px, calc((100vw - 110px) / 7.4)); }
}
