/* ══════════════════════════════════════════════════════════════════════
   GILI — home.css · landing page only (index.html)
   One island day, top to bottom: day lagoon → shallow water → sunset →
   night ocean → paper → rising water (what's new) → day again.

   Rules of the house
   · nothing is sized by viewport height (no vh / svh): blocks are as tall as their content
   · everything is visible at rest; motion is decoration and stops with prefers-reduced-motion
   · tilts are for ≥ 641px only; phones get straight edges
   · colours come from the tokens in site.css
   · video never rides with the first load: a clip carries preload="none" and a poster of its own
     size; the silent loop is started by site.js while it is on screen, the trailer by the visitor
   · pictures are never cut:
       – a creature file is a finished sticker (white edge + a transparent margin baked in,
         tools/img/cutouts.mjs), so no CSS filter draws around it;
       – no ancestor of a creature clips (the one exception is the underwater scene, where the
         three fish sit well inside the frame);
       – nothing is laid over a game capture: its whole frame stays visible;
       – the only filter left is the logo's navy outline, and it stays inside the logo file's
         own margin. WebKit (every iPhone browser) cuts a filter off at the element's box.
   ══════════════════════════════════════════════════════════════════════ */

:root{
  --sec-pad:clamp(3.25rem,8vw,6rem);
}

/* Bungee wherever it appears on this page (single weight, capitals only).
   .board h3 and the buttons are already covered in site.css. */
.chip,.eyebrow,.pop,.slab,.hero h1,.shout,.ticker__track li,.step__num,
.pcard__name,.pcard__q{
  font-family:var(--display);
  font-weight:400;
  font-synthesis:none;
  text-transform:uppercase;
}

/* ── Small parts ────────────────────────────────────────────────────── */

/* Sticker type: white Bungee with a hard navy outline, extruded straight down.
   Built from un-blurred text-shadows only, so it never thins the letters. */
.pop{
  --o:max(.04em,2px);
  --ink:var(--navy);
  color:var(--white);
  text-shadow:
    var(--o) 0 0 var(--ink), calc(var(--o) * -1) 0 0 var(--ink),
    0 var(--o) 0 var(--ink), 0 calc(var(--o) * -1) 0 var(--ink),
    var(--o) var(--o) 0 var(--ink), calc(var(--o) * -1) var(--o) 0 var(--ink),
    var(--o) calc(var(--o) * -1) 0 var(--ink), calc(var(--o) * -1) calc(var(--o) * -1) 0 var(--ink),
    0 calc(var(--o) * 2) 0 var(--ink), var(--o) calc(var(--o) * 2) 0 var(--ink), calc(var(--o) * -1) calc(var(--o) * 2) 0 var(--ink),
    0 calc(var(--o) * 3) 0 var(--ink), var(--o) calc(var(--o) * 3) 0 var(--ink), calc(var(--o) * -1) calc(var(--o) * 3) 0 var(--ink),
    0 calc(var(--o) * 4) 0 var(--ink), var(--o) calc(var(--o) * 4) 0 var(--ink), calc(var(--o) * -1) calc(var(--o) * 4) 0 var(--ink);
}
.pop--sun{color:var(--sun);--ink:var(--abyss)}          /* yellow type: dark water only */

h2.pop{
  margin:0 0 1.1rem;
  font-size:clamp(1.9rem,6.2vw,3.6rem);
  line-height:1;letter-spacing:.01em;
  text-wrap:balance;
}

/* a heading as a game-board title: for light backgrounds, where white sticker type would wash out */
.slab{
  display:inline-block;margin:0;
  padding:.5em .7em .42em;border-radius:16px;
  background:var(--navy);color:var(--sun);
  border:4px solid var(--abyss);
  box-shadow:0 8px 0 var(--abyss);
  font-size:clamp(1.45rem,4.4vw,2.75rem);line-height:1.06;letter-spacing:.01em;   /* one line from 544px up */
}
@media (max-width:33.99rem){
  .slab{max-width:calc(11.3em + 8px)}            /* phones: two lines, the board no wider than the longer one */
}

.eyebrow{
  display:inline-block;margin:0 0 1rem;
  padding:.55em .85em .5em;border-radius:8px;
  background:var(--navy);color:var(--sun);
  font-size:.78rem;line-height:1;letter-spacing:.08em;
}

.sec__intro{
  margin:0;max-width:34rem;
  font-size:clamp(1.1rem,1rem + .5vw,1.25rem);line-height:1.5;font-weight:500;
}

/* the star between two ticker phrases (the symbol is a bare path: its colour is set here) */
.star{flex:none;width:.9em;height:.9em;fill:var(--coral)}

/* icons from the sprite (they carry their own stroke settings and use currentColor) */
.ico{display:block;width:3rem;height:3rem;color:var(--sun)}

/* The white logo on bright water gets a hard navy outline and a drop. They are drawn by the browser
   so that the logo file stays exactly as supplied. --lw is the logo's width: the outline (0.9 %) and
   the drop (2.2 %) are sized from it, so at every size they land inside the file's transparent margin
   (3.2 % left / right, 5.6 % top / bottom of the width — tools/img/build_brand.mjs). Never give this
   class a width that is not var(--lw), and never raise the two shares without widening the file. */
.logopop{
  --lo:calc(var(--lw) * .009);
  --ld:calc(var(--lw) * .022);
  display:block;width:var(--lw);height:auto;
  filter:
    drop-shadow(var(--lo) 0 0 var(--navy)) drop-shadow(calc(var(--lo) * -1) 0 0 var(--navy))
    drop-shadow(0 var(--lo) 0 var(--navy)) drop-shadow(0 calc(var(--lo) * -1) 0 var(--navy))
    drop-shadow(0 var(--ld) 0 var(--navy));
}

/* a navy "screen" holding a game capture — the capture is shown whole, at its own proportions.
   The capture may be a clip: its width / height attributes and the ratio below keep its box before
   the poster arrives, so nothing moves when it does. */
.screen{
  position:relative;margin:0;
  background:var(--navy);
  border:5px solid var(--navy);border-radius:20px;
  box-shadow:0 10px 0 var(--abyss);
}
.screen img,.screen video{display:block;width:100%;height:auto;border-radius:14px}
.screen video{aspect-ratio:16 / 9;background:var(--navy)}

/* A designed underwater scene inside the screen frame (#game): water, shafts of light, bubbles and
   three cut-outs at different depths. Pure CSS + the partner art — a finished picture, not a slot.
   It is the one place where a creature has a clipping ancestor (the frame); the three fish are placed
   so that even at the far end of their drift the visible art stays inside it. */
.reef{
  position:relative;overflow:hidden;
  aspect-ratio:16 / 9;border-radius:14px;
  background:
    radial-gradient(ellipse 75% 70% at 28% 0%,rgb(var(--sky-rgb) / .6),rgb(var(--sky-rgb) / 0) 100%),
    linear-gradient(180deg,var(--lagoon-deep) 0%,var(--ocean) 52%,var(--navy) 100%);
}
.reef__ray{                                      /* soft light from the surface: gradients + a mask, no filter */
  position:absolute;top:-8%;left:var(--x);
  width:var(--w);height:125%;
  background:linear-gradient(90deg,
    rgb(var(--white-rgb) / 0) 0%,rgb(var(--white-rgb) / var(--a)) 38%,
    rgb(var(--white-rgb) / var(--a)) 62%,rgb(var(--white-rgb) / 0) 100%);
  -webkit-mask-image:linear-gradient(180deg,rgb(var(--abyss-rgb)) 0%,rgb(var(--abyss-rgb) / 0) 85%);
  mask-image:linear-gradient(180deg,rgb(var(--abyss-rgb)) 0%,rgb(var(--abyss-rgb) / 0) 85%);
  transform:skewX(-20deg);transform-origin:top;
}
.reef__ray:nth-child(1){--x:8%;--w:17%;--a:.3}
.reef__ray:nth-child(2){--x:31%;--w:13%;--a:.22}
.reef__ray:nth-child(3){--x:50%;--w:20%;--a:.26}
.reef__ray:nth-child(4){--x:78%;--w:12%;--a:.16}
.reef .bubbles{z-index:1}
.reef .bubbles i:nth-child(5){--x:76%}           /* spread the six lanes over the whole scene */
.reef .bubbles i:nth-child(6){--x:91%}
.reef__fish{position:absolute;z-index:2;left:var(--x);top:var(--y);width:var(--w)}
.reef__fish img{display:block;width:100%;height:auto}
.reef__fish--flip img{transform:scaleX(-1)}      /* the art faces right; these two swim into the page */
.reef__fish--a{--x:3%;--y:7.5%;--w:58%}          /* near: the big one */
.reef__fish--b{--x:57.5%;--y:32%;--w:38%}        /* middle distance */
.reef__fish--c{--x:13.5%;--y:59.5%;--w:24.5%}    /* deep: small, with its lure glowing */
.reef__fish--c::before{
  content:"";position:absolute;z-index:-1;
  top:18%;right:-7%;width:38%;aspect-ratio:1;border-radius:50%;
  background:radial-gradient(circle,rgb(var(--sun-rgb) / .6),rgb(var(--sun-rgb) / 0) 70%);
}
@supports not (aspect-ratio:1){                  /* iOS 14 and older: give the two picture areas their height */
  .reef{padding-top:56.25%}
  .pcard__art{padding-top:66.667%}
}
@keyframes swim{
  from{transform:translate(0,0)}
  to{transform:translate(var(--dx,-10px),var(--dy,4px))}
}
@keyframes shimmer{
  from{opacity:.6}
  to{opacity:1}
}

/* a paper photo frame — the photo is shown whole, at its own proportions */
.polaroid{
  position:relative;margin:0;
  padding:10px 10px 2.6rem;
  background:var(--white);
  border:4px solid var(--navy);border-radius:10px;
  box-shadow:0 8px 0 var(--navy);
}
.polaroid img{display:block;width:100%;height:auto;border-radius:4px}

/* Creature stickers. The white edge and a transparent margin (about 5.5 % of the longer side) are
   part of the file, so there is no filter here: the picture always ends well inside its own box,
   even tilted (tools/img/cutouts.mjs). A tilt, a slow bob — that is all CSS adds. */
.sticker{
  --tilt:0deg;
  --flip:1;
  --bob:6px;
  display:block;
  transform:rotate(var(--tilt)) scaleX(var(--flip));
  pointer-events:none;
}
/* The art faces right. A sticker on the right-hand side of a block is mirrored so it looks back
   into the page. (Creatures only — the logo is never mirrored.) */
.sticker--flip{--flip:-1}
.sticker img{display:block;width:100%;height:auto}
@keyframes bob{
  from{transform:translateY(var(--bob)) rotate(var(--tilt)) scaleX(var(--flip))}
  to{transform:translateY(calc(var(--bob) * -1)) rotate(var(--tilt)) scaleX(var(--flip))}
}
/* a sticker that straddles the bottom edge of its section (sections do not clip) */
.sticker--edge{
  position:absolute;z-index:3;
  right:max(var(--gutter),calc(50% - 35rem));
  bottom:calc(var(--wave-h) * -.25 - 1.6rem);
  width:clamp(8.5rem,21vw,15.5rem);
}
.sticker--left{right:auto;left:max(var(--gutter),calc(50% - 35rem))}
.sticker--e{width:clamp(7.5rem,19vw,14rem)}     /* the tall one: a size down, clear of the last row of cards */

/* data-pending in the markup marks a picture that is still a stand-in. It is for the checks only:
   nothing is ever drawn for it. */

/* ══ 1 · HERO — day lagoon ════════════════════════════════════════════ */
.hero{
  position:relative;
  padding:clamp(1.75rem,4.5vw,3.25rem) 0 clamp(2.75rem,6vw,4.5rem);
  background:linear-gradient(180deg,var(--sky) 0%,var(--lagoon) 62%);
}
.hero__grid{display:grid;grid-template-columns:minmax(0,1fr);align-items:center}
/* One column (phones, small tablets): the copy wrapper dissolves so the picture can sit right
   after the headline. The sticky top bar keeps PLAY FREE in reach, so the first screen can show
   the game. From 48rem up it is two columns again (see the media query below). */
.hero__copy{display:contents}
.hero__visual{order:1}
.hero .lede{order:2}
.hero .cta{order:3}

.chips{display:flex;flex-wrap:wrap;gap:.4rem;margin:0;padding:0;list-style:none}
.chip{
  padding:.55em .7em .5em;border-radius:999px;
  background:var(--navy);color:var(--sand);
  font-size:.7rem;line-height:1;letter-spacing:.03em;white-space:nowrap;
}
.chip--sun{background:var(--sun);color:var(--navy);box-shadow:inset 0 0 0 2px var(--navy)}

.hero h1{
  display:flex;flex-direction:column;align-items:flex-start;gap:.2em;
  margin:1rem 0 1.6rem;
  font-size:clamp(2.75rem,14.2vw,6rem);      /* "HANG OUT." + its board must fit one line at 320px */
  line-height:.92;letter-spacing:.005em;
}
.hero h1 span{white-space:nowrap}              /* each sentence is one line, whatever font is showing */
.h1__b{                                         /* the second sentence is a game-board title */
  padding:.1em .18em;border-radius:.14em;
  background:var(--navy);color:var(--sun);
  box-shadow:0 .09em 0 var(--abyss);
}

.lede{
  margin:0;max-width:38rem;
  font-size:clamp(1.1rem,1rem + .6vw,1.3rem);line-height:1.5;font-weight:500;
}

.cta{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.55rem .7rem;margin-top:1.6rem}

/* The picture, three rows — nothing sits on the capture:
     logo + tagline | the showpiece creature   ·   the capture   ·   our line | a small creature */
.hero__visual{min-width:0;max-width:38rem;margin:0 0 1.75rem}
.hero__top{
  --lw:clamp(8.5rem,43vw,18rem);               /* the logo's width (see .logopop) */
  position:relative;z-index:2;
  display:flex;align-items:flex-end;
}
.hero__brand{
  flex:none;width:var(--lw);
  margin:0 0 .45rem calc(var(--lw) * -.032);   /* the logo's letters, not its margin, line up with the capture */
}
.hero__tagline{
  display:inline-block;
  margin:calc(var(--lw) * -.012) 0 0 calc(var(--lw) * .032);
  padding:.35em .75em;border-radius:8px;
  background:var(--navy);color:var(--sand);
  font-size:clamp(.85rem,.78rem + .3vw,.95rem);line-height:1.2;font-weight:600;text-wrap:balance;
}
/* The big creature takes the rest of the row and stands on the capture's frame: its box dips 4 % of
   its width under the row (the file's bottom margin is 5.7 %), so the art ends just above the frame
   and, at the low point of its bob, touches the navy border — never the picture. */
.hero__top .sticker{
  --bob:5px;
  flex:1 1 0;min-width:0;
  margin:0 0 calc((100% - var(--lw)) * -.04) -.4rem;
}
.hero__base{position:relative;z-index:2;display:flex;align-items:flex-start;gap:.6rem}
.shout{                                         /* our own line, on a yellow sticker board under the capture */
  flex:0 1 auto;max-width:calc(10.6em + 8px);   /* two lines: YES, YOU CAN / RIDE THE FISH. */
  margin:.3rem 0 0;padding:.7em .9em .62em;
  background:var(--sun);color:var(--navy);
  border:4px solid var(--navy);border-radius:18px;
  box-shadow:0 6px 0 var(--navy);
  font-size:clamp(1rem,.85rem + .8vw,1.4rem);line-height:1.12;letter-spacing:.01em;
}
.hero__base .sticker{
  --bob:5px;
  flex:none;width:32%;max-width:10.5rem;
  margin:.3rem 0 0 auto;
}

@media (max-width:30rem){
  .cta .btn{flex:1 1 100%}
}
@media (min-width:48rem){                        /* tablets upright and wider: copy | picture */
  .hero__grid{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:clamp(2.25rem,5vw,3.5rem)}
  .hero__copy{display:block;min-width:0}
  .hero h1{font-size:clamp(3.25rem,7.4vw,6rem)}      /* the widest line must fit the copy column */
  .hero .lede{max-width:34rem}
  .hero__visual{order:0;justify-self:end;width:100%;max-width:34rem;margin:0}
  .hero__top{--lw:clamp(8.5rem,18vw,14.5rem)}
  .shout{font-size:clamp(1rem,2.1vw,1.4rem)}
}

/* ══ 2 · TICKER — what you do in GILI, on a navy band ═════════════════ */
.ticker{
  position:relative;overflow:hidden;
  background:var(--navy);
  border-top:4px solid var(--abyss);border-bottom:4px solid var(--abyss);
  --focus:var(--sun);
}
.ticker__view{display:flex;overflow:hidden}
.ticker__track{
  flex:none;display:flex;align-items:center;gap:1.4rem;
  margin:0;padding:.95rem 1.4rem .95rem 0;list-style:none;
  animation:ticker 38s linear infinite;
}
.ticker__track li{
  display:flex;align-items:center;gap:1.4rem;
  font-size:clamp(1rem,.92rem + .4vw,1.2rem);line-height:1.15;letter-spacing:.02em;white-space:nowrap;
  color:var(--sun);
}
@keyframes ticker{to{transform:translateX(-100%)}}
.ticker:hover .ticker__track,.ticker.is-paused .ticker__track{animation-play-state:paused}

.ticker__pause{
  position:absolute;top:0;right:0;bottom:0;z-index:2;
  display:grid;place-items:center;
  width:48px;padding:0;border:0;border-left:4px solid var(--abyss);
  background:var(--navy);color:var(--sun);
  cursor:pointer;
}
.ticker__pause:focus-visible{outline-offset:-6px}
.ticker__pause svg{width:20px;height:20px}
.ticker__pause .i-play,.ticker__pause[aria-pressed="true"] .i-pause{display:none}
.ticker__pause[aria-pressed="true"] .i-play{display:block}

/* no motion wanted (or no JS — the same rules sit in <noscript> in the page): a plain wrapping row */
@media (prefers-reduced-motion:reduce){
  .ticker__view{display:block}
  .ticker__track{flex-wrap:wrap;justify-content:center;gap:.6rem 1.4rem;padding:1rem var(--gutter);animation:none}
  .ticker__track li{white-space:normal;text-align:center}
  .ticker__track[aria-hidden="true"],.ticker__pause{display:none}
}

/* ══ Sections 3–7: shared scaffolding ═════════════════════════════════ */
.sec{
  position:relative;
  padding:var(--sec-pad) 0 calc(var(--sec-pad) + var(--wave-h));
  background:var(--top);
}
.sec__head{margin-bottom:clamp(2rem,4.5vw,3rem)}
.split{display:grid;grid-template-columns:minmax(0,1fr);gap:2rem 3rem;align-items:center}
.split > *{min-width:0}
@media (min-width:46rem){                        /* a head whose lines are short can split earlier (tablets) */
  .split--early{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}
}
@media (min-width:56rem){
  .split{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}
  .split > :last-child{justify-self:end;width:100%}
  .sec__head .screen{max-width:34rem}
  .split h2.pop{font-size:clamp(1.9rem,4.6vw,3.6rem)}   /* in a half-width column the longest line still fits */
}

/* ══ 3 · #game — shallow water ════════════════════════════════════════ */
.sec--game{
  --top:var(--lagoon);
  background:linear-gradient(180deg,var(--lagoon) 0%,var(--lagoon) 35%,var(--lagoon-deep) 100%);
}

.steps{
  display:grid;grid-template-columns:minmax(0,1fr);gap:2.75rem 1.25rem;
  margin:0;padding:1.35rem 0 0;list-style:none;       /* top room for the number tags */
}
.step{position:relative;isolation:isolate;padding-top:2.3rem}
.step__num{                                      /* yellow number tag pinned over the top edge */
  position:absolute;top:-1.4rem;left:.9rem;
  padding:.24em .42em .18em;border-radius:12px;
  background:var(--sun);color:var(--navy);
  border:4px solid var(--abyss);
  box-shadow:0 5px 0 var(--abyss);
  font-size:1.9rem;line-height:1;
}
.step__head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.55rem}
.step__head h3{margin:0;font-size:1.3rem}
.step .ico{width:2.75rem;height:2.75rem}
.step .step__mark{display:none}                  /* a large faint copy of the icon fills the short boards */
@media (min-width:38rem){
  .step .step__mark{
    display:block;position:absolute;z-index:-1;right:.9rem;bottom:.8rem;
    width:5.5rem;height:5.5rem;color:var(--lagoon);opacity:.2;   /* reads as a soft emboss on the navy */
  }
}

.nightchip{
  display:inline-flex;align-items:center;gap:.6rem;
  margin:2rem 0 0;padding:.65rem 1.15rem .65rem .85rem;border-radius:999px;
  background:var(--navy);color:var(--sand);
  box-shadow:0 5px 0 var(--abyss);
  font-size:1rem;line-height:1.3;font-weight:600;text-wrap:balance;
}
.nightchip .ico{width:1.6rem;height:1.6rem}

/* the trailer: one more navy screen, in a row of its own. It stays straight at every width — once
   pressed it carries YouTube's own controls. Before that it is our poster + a play button (a link to
   the video on YouTube); site.js swaps in the youtube-nocookie.com player on the click, in the same
   16:9 box, so nothing moves. */
.trailer{max-width:46rem;margin:clamp(2rem,5vw,3rem) auto 0}
.yt{position:relative;display:block;border-radius:14px;color:var(--navy);-webkit-tap-highlight-color:transparent}
.yt img{aspect-ratio:16 / 9}
.yt__play{
  position:absolute;left:50%;top:50%;
  display:flex;align-items:center;justify-content:center;
  width:clamp(64px,14%,92px);aspect-ratio:1;
  border-radius:50%;
  background:var(--sun);
  box-shadow:0 0 0 4px var(--navy),0 6px 0 4px var(--navy);
  transform:translate(-50%,-50%);
  transition:transform .12s ease;
}
.yt__play svg{width:46%;height:46%;margin-left:8%;fill:currentColor}
@media (hover:hover){
  .yt:hover .yt__play{transform:translate(-50%,-50%) scale(1.08)}
}
.yt:active .yt__play{transform:translate(-50%,-50%) scale(.96)}
.yt:focus-visible{outline-offset:4px}
.trailer iframe{display:block;width:100%;height:auto;aspect-ratio:16 / 9;border:0;border-radius:14px;background:var(--navy)}
@media (prefers-reduced-motion:reduce){
  .yt__play{transition:none}
}

@media (min-width:38rem){
  .steps{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:76rem){
  .steps{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* ══ 4 · #island — sunset ═════════════════════════════════════════════ */
.sec--island{
  --top:var(--sunset-a);
  background:linear-gradient(180deg,var(--sunset-a) 0%,var(--sunset-b) 52%,var(--dusk) 100%);
}
/* the photo, with the sun going down BEHIND its corner (nothing is laid over the photo) */
.sunphoto{position:relative;z-index:0;max-width:34rem;margin-left:auto;margin-right:auto}   /* centred when it has a row to itself */
.sunphoto::before{
  content:"";position:absolute;z-index:-1;
  top:-2.25rem;right:-.5rem;
  width:clamp(7rem,22vw,10.5rem);aspect-ratio:1;border-radius:50%;
  background:var(--sun);
}
.sec--island h2.pop{font-size:clamp(2.2rem,8vw,4.5rem);line-height:.98}
@media (min-width:56rem){
  .sec--island .split h2.pop{font-size:clamp(2.2rem,5.8vw,4.5rem)}
}

.tiles{
  display:grid;grid-template-columns:minmax(0,1fr);gap:1.6rem 1.25rem;
  margin:0;padding:0;list-style:none;
}
.tile{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.65rem .9rem;align-items:center;align-content:start}
.tile h3{margin:0;font-size:1.08rem}          /* "FIST BUMP = FRIENDS" stays on one line at 360px */
.tile p{grid-column:1 / -1}

@media (min-width:38rem){
  .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:62rem){
  .tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* ══ 5 · #partners — night ocean ══════════════════════════════════════ */
.sec--partners{
  --top:var(--ocean);
  --focus:var(--sun);
  color:var(--sand);
  background:
    radial-gradient(ellipse 28rem 18rem at 84% 24rem,rgb(var(--sky-rgb) / .2),rgb(var(--sky-rgb) / 0) 100%),
    radial-gradient(ellipse 24rem 20rem at 6% 62%,rgb(var(--lagoon-rgb) / .16),rgb(var(--lagoon-rgb) / 0) 100%),
    linear-gradient(180deg,var(--ocean) 0%,var(--navy) 55%,var(--abyss) 100%);
}
.sec--partners > .container{position:relative;z-index:1}
.sec--partners .eyebrow{background:var(--sun);color:var(--navy)}
.sec--partners h2.pop{margin-bottom:0}
.sec--partners .split h2.pop{font-size:clamp(1.9rem,5.4vw,3.6rem)}   /* "HATCH THEM." on one line in half a tablet */
.sec--partners h2 span{display:block}
.sec--partners .sec__intro{                      /* the intro owns the right-hand column: larger, on a sun rule */
  max-width:31rem;
  padding:.15rem 0 .15rem 1.1rem;border-left:6px solid var(--sun);
  font-size:clamp(1.15rem,1rem + .7vw,1.4rem);line-height:1.45;
}

/* rising bubbles: each <i> is a full-height lane that slides up by its own height */
.bubbles{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;pointer-events:none}
.sec--partners > .bubbles{                       /* fade them out before they reach the heading and intro */
  -webkit-mask-image:linear-gradient(180deg,rgb(var(--abyss-rgb) / 0) 0,rgb(var(--abyss-rgb) / 0) 26rem,rgb(var(--abyss-rgb)) 36rem);
  mask-image:linear-gradient(180deg,rgb(var(--abyss-rgb) / 0) 0,rgb(var(--abyss-rgb) / 0) 26rem,rgb(var(--abyss-rgb)) 36rem);
}
.bubbles i{
  position:absolute;top:0;left:var(--x,50%);
  width:0;height:100%;
  transform:translateY(100%);
  animation:rise var(--t,22s) linear infinite;
  animation-delay:var(--delay,0s);
}
.bubbles i::before{
  content:"";position:absolute;top:0;left:0;
  width:var(--s,14px);height:var(--s,14px);border-radius:50%;
  border:2px solid rgb(var(--sky-rgb) / .5);
  background:rgb(var(--white-rgb) / .07);
}
@keyframes rise{
  from{transform:translateY(100%)}
  to{transform:translateY(-4%)}
}
.bubbles i:nth-child(1){--x:5%;--s:10px;--t:26s;--delay:-4s;--rest:78%}
.bubbles i:nth-child(2){--x:14%;--s:18px;--t:19s;--delay:-11s;--rest:52%}
.bubbles i:nth-child(3){--x:27%;--s:8px;--t:31s;--delay:-20s;--rest:25%}
.bubbles i:nth-child(4){--x:39%;--s:14px;--t:23s;--delay:-2s;--rest:86%}
.bubbles i:nth-child(5){--x:52%;--s:22px;--t:17s;--delay:-9s;--rest:60%}
.bubbles i:nth-child(6){--x:63%;--s:9px;--t:29s;--delay:-16s;--rest:30%}
.bubbles i:nth-child(7){--x:74%;--s:16px;--t:21s;--delay:-6s;--rest:70%}
.bubbles i:nth-child(8){--x:86%;--s:11px;--t:27s;--delay:-23s;--rest:44%}
.bubbles i:nth-child(9){--x:94%;--s:20px;--t:18s;--delay:-13s;--rest:18%}

.pgrid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem .75rem;
  margin:0;padding:0;list-style:none;
}
.pcard{                                          /* no overflow:hidden — the card never clips its creature */
  display:flex;flex-direction:column;
  background:var(--navy);
  border:4px solid var(--abyss);border-radius:18px;
  box-shadow:0 8px 0 var(--abyss);
}
.pcard__art{
  position:relative;
  aspect-ratio:3 / 2;
  border-radius:14px 14px 0 0;                   /* the card's inner corners */
  background:radial-gradient(circle at 50% 46%,var(--lagoon-deep) 0%,var(--ocean) 48%,var(--navy) 100%);
}
/* The picture is shown whole (contain) inside a box that keeps 8 % of the art area free on every side;
   the file adds its own transparent margin inside that. The white edge is in the file. */
.pcard__art img{
  position:absolute;top:8%;left:8%;width:84%;height:84%;
  object-fit:contain;
  transition:transform .2s ease;
}
.pcard__name{
  margin:0;padding:.6rem .4rem .55rem;
  border-top:4px solid var(--abyss);border-radius:0 0 14px 14px;
  background:var(--navy);color:var(--sun);
  font-size:.82rem;line-height:1.1;letter-spacing:.02em;text-align:center;
}
.pcard--more{
  justify-content:center;align-items:center;
  background:rgb(var(--abyss-rgb) / .45);
  border:4px dashed var(--lagoon);
  box-shadow:none;
}
.pcard--more .pcard__name{border-top:0;background:none}
.pcard__q{font-size:clamp(3rem,2.2rem + 4vw,4.75rem);line-height:1;color:var(--lagoon)}

@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .pcard:hover .pcard__art img{transform:scale(1.06) rotate(-3deg)}   /* still inside the art area */
}
@media (min-width:35rem){
  .pgrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:1.25rem 1rem}
  .pcard--more{grid-column:span 2}
}
@media (min-width:60rem){
  .pgrid{grid-template-columns:repeat(5,minmax(0,1fr))}
}

/* ══ 6 · #know — paper ════════════════════════════════════════════════ */
.sec--know{
  --top:var(--paper);
  background:linear-gradient(180deg,var(--paper) 0%,var(--sand) 100%);
}
.know3{display:grid;grid-template-columns:minmax(0,1fr);gap:1.75rem 1.5rem}
.know{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:flex-start;padding:1.4rem 1.4rem 1.6rem}
.know .ico{margin-bottom:.85rem}
.know h3{margin-bottom:.5rem;font-size:1.25rem;text-wrap:balance}
.know p:not(:last-child){margin-bottom:1.2rem}
.know .btn{margin-top:auto;padding-left:1rem;padding-right:1rem;font-size:.92rem;text-wrap:balance}   /* sits on the board's floor */
.know .know__mark{display:none}                  /* a large faint copy of the icon: only where a board is taller than its text */

@media (min-width:40rem) and (max-width:59.99rem){
  .know3{grid-template-columns:repeat(2,minmax(0,1fr))}
  /* tablets: two boards side by side, the parents' board across the row — icon · text · button */
  .know:last-child{
    grid-column:1 / -1;
    display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:0 1.25rem;align-items:center;
  }
  .know:last-child .ico{grid-column:1;grid-row:1 / span 2;margin:0}
  .know:last-child h3{grid-column:2;grid-row:1;align-self:end}
  .know:last-child p{grid-column:2;grid-row:2;align-self:start}
  .know:last-child p{margin-bottom:0}
  .know:last-child .btn{grid-column:3;grid-row:1 / span 2;max-width:12.5rem;margin-top:3px}
}
@media (min-width:60rem){
  .know3{grid-template-columns:repeat(3,minmax(0,1fr))}
  /* three in a row are as tall as the one with the button: the other two get their icon as a soft emboss */
  .know .know__mark{
    display:block;position:absolute;z-index:-1;right:1rem;bottom:.9rem;
    width:5rem;height:5rem;margin:0;color:var(--lagoon);opacity:.2;
  }
}
@media (min-width:75rem){
  .know h3{font-size:1.45rem}
}

/* ══ 7 · #news — rising water · What's new (tools/whats_new.py writes the markup) ══ */
.sec--news{
  --top:var(--ocean);
  --focus:var(--sun);
  color:var(--white);
  background:                                    /* rising from the deep back towards the day lagoon below */
    radial-gradient(ellipse 26rem 16rem at 88% 18%,rgb(var(--sky-rgb) / .14),rgb(var(--sky-rgb) / 0) 100%),
    linear-gradient(180deg,var(--ocean) 0%,var(--ocean) 40%,var(--lagoon-deep) 100%);
}
.sec--news .eyebrow{background:var(--sun);color:var(--navy)}
.sec--news h2.pop{margin-bottom:0}
.sec--news .split h2.pop{font-size:clamp(1.9rem,5.4vw,3.6rem)}   /* the same size as #partners in half a tablet */
.sec--news .sec__intro{font-weight:600;overflow-wrap:break-word}
.news__board{padding:1.4rem 1.25rem 1.5rem}
.news__list{
  margin:0;padding:0;list-style:none;
  display:grid;grid-template-columns:minmax(0,1fr);gap:.85rem 2.5rem;
}
.news__list li{
  position:relative;min-width:0;
  padding-left:1.35rem;
  line-height:1.5;overflow-wrap:break-word;
}
.news__list li::before{                          /* a sun square for a bullet, like the boards' title colour */
  content:"";position:absolute;left:0;top:.5em;
  width:.55em;height:.55em;border-radius:3px;
  background:var(--sun);transform:rotate(45deg);
}
.news__list strong{color:var(--sun);font-weight:700}
.news__more{margin:1.25rem 0 0}
.news__more a{                                   /* the way to the whole note (updates.html) */
  display:inline-flex;align-items:center;gap:.4em;min-height:44px;
  color:var(--sun);font-weight:700;
  text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;
}
.news__more a:hover{color:var(--white)}
@media (min-width:60rem){
  .news__board{padding:1.75rem 2rem 2rem}
  .news__list{grid-template-columns:repeat(3,minmax(0,1fr))}   /* the home page shows the first three points */
}

/* ══ 8 · Final call — day again ═══════════════════════════════════════ */
.sec--final{
  --top:var(--lagoon);
  background:linear-gradient(180deg,var(--lagoon) 0%,var(--sky) 100%);
}
.final__grid{display:grid;grid-template-columns:minmax(0,1fr);gap:2.75rem 3.5rem;align-items:center}
.final__grid > *{min-width:0}
.final__logo{
  --lw:clamp(11rem,58vw,15.5rem);               /* the logo's width (see .logopop) */
  margin:0 0 .9rem calc(var(--lw) * -.032);
}
.sec--final h2.pop{margin-bottom:.9rem}
@media (min-width:60rem){
  .sec--final h2.pop{font-size:clamp(1.9rem,5.2vw,3.6rem)}
}
.final__sub{margin:0;font-size:clamp(1.15rem,1rem + .7vw,1.4rem);line-height:1.4;font-weight:600}
.dboard{
  display:grid;grid-template-columns:auto minmax(0,1fr);gap:.3rem 1rem;align-items:start;
  margin-top:1.9rem;
}
.dboard__mark{
  grid-row:1 / span 2;
  display:grid;place-items:center;
  width:3rem;height:3rem;border-radius:12px;
  background:var(--discord);color:var(--white);
}
.dboard__mark svg{width:1.85rem;height:1.4rem}
.dboard [data-fact]{color:var(--sun);font-weight:700}
.board .dboard__small{grid-column:2;margin-top:.35rem;font-size:.85rem;opacity:.8}

/* The photo with a creature sitting on top of its frame. --pw is the creature's width; the room above
   the frame is sized from it so that the art ends 6px inside the frame's top (the frame is 14px of
   border + paper there): on the frame, never on the photo — also at both ends of its 5px bob. */
.final__visual{
  --pw:clamp(6.5rem,26vw,9.5rem);
  position:relative;max-width:30rem;margin:0 auto;   /* centred when it has a row to itself */
  padding-top:calc(var(--pw) * .9075 - 6px);
}
.final__visual .sticker{
  --bob:5px;
  position:absolute;z-index:2;top:0;right:7%;
  width:var(--pw);
}

@media (min-width:60rem){
  .final__grid{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)}
  .final__visual{justify-self:end;width:100%;margin:0}
}

/* ══ Tilts — ≥ 641px only ═════════════════════════════════════════════
   A picture and what stands on it or hangs under it tilt together, as one object, so their
   distances stay what the rules above say. */
@media (min-width:40.0625rem){
  .eyebrow{transform:rotate(-2deg)}
  .h1__b{transform:rotate(-1.5deg)}
  .hero__visual{transform:rotate(2deg)}
  .hero__top .sticker{margin-bottom:calc((100% - var(--lw)) * -.025)}   /* tilted, its lowest point sits lower */
  .shout{transform:rotate(-1.5deg);transform-origin:0 0}                 /* pivots on its top-left corner */
  .sec--game .sec__head .screen{transform:rotate(-2deg)}                 /* the designed scene, not the trailer */
  .step__num{transform:rotate(-4deg)}
  .step:nth-child(even) .step__num{transform:rotate(3deg)}
  .sunphoto{transform:rotate(3deg)}
  .sunphoto::before{top:-3rem;right:-2rem}
  .slab{transform:rotate(-1.5deg)}
  .final__visual{transform:rotate(-3deg)}

  .sticker--a{--tilt:4deg}
  .sticker--b{--tilt:6deg}
  .sticker--c{--tilt:-8deg}
  .sticker--d{--tilt:5deg}
  .sticker--e{--tilt:-5deg}
  .sticker--f{--tilt:8deg}
  .sticker--g{--tilt:-5deg}
}

/* ══ Motion — only if the visitor has not asked for less ═══════════════ */
@media (prefers-reduced-motion:no-preference){
  .sticker{animation:bob 2.6s ease-in-out infinite alternate}
  .sticker--b{animation-duration:2.2s;animation-delay:-1.1s}
  .sticker--c{animation-duration:3s;animation-delay:-.6s}
  .sticker--d{animation-duration:2.4s;animation-delay:-1.8s}
  .sticker--e{animation-duration:2.8s;animation-delay:-.3s}
  .sticker--f{animation-duration:2.3s;animation-delay:-1.4s}
  .sticker--g{animation-duration:2.9s;animation-delay:-.9s}
  .reef__fish{animation:swim 8s ease-in-out infinite alternate}
  .reef__fish--a{--dx:-12px;--dy:5px}
  .reef__fish--b{--dx:-8px;--dy:-6px;animation-duration:6.5s;animation-delay:-2s}
  .reef__fish--c{--dx:6px;--dy:-4px;animation-duration:9.5s;animation-delay:-4s}
  .reef__ray{animation:shimmer 6s ease-in-out infinite alternate}
  .reef__ray:nth-child(2n){animation-duration:8s;animation-delay:-3s}
}
@media (prefers-reduced-motion:reduce){
  .bubbles{display:none}
  .reef .bubbles{display:block}                  /* the scene keeps its bubbles, standing still */
  .reef .bubbles i{animation:none;transform:translateY(var(--rest,50%))}
}
