/* The one home page. The flying entrance (landing.css) opens it and the stage rises out of its clouds;
   below, each group of games stands on one flat ground taken from that sky: mint, sun, pool. One type
   family, three sizes below the hero, and one authored scroll moment (the stage arriving). */
@font-face{font-family:Fredoka;src:url('assets/fonts/fredoka-latin-wght-normal.woff2') format('woff2-variations'),url('assets/fonts/fredoka-latin-wght-normal.woff2') format('woff2');font-weight:300 700;font-style:normal;font-display:swap}

.one-home{
  --ink:#143a30;--ink-deep:#0d2a23;--ink-soft:#3c5d52;
  --leaf:#f2fff6;--leaf-soft:#b7d6c8;
  --grape:#5a2d91;--sun:#ffd96a;--sun-deep:#b98a2e;
  --mint:#c9f1dd;--butter:#ffe394;--pool:#c6e9f2;
  --text-heading:clamp(2.5rem,6.2vw,5.25rem);--text-title:1.5rem;--text-body:1.0625rem;
  --ease:cubic-bezier(.22,1,.36,1);
  font:400 var(--text-body)/1.5 Fredoka,ui-rounded,system-ui,sans-serif;color:var(--ink);background:var(--ink-deep);
  scroll-behavior:smooth;overflow-x:clip;
}
html:has(.one-home){scroll-behavior:smooth;scroll-padding-top:76px}
.one-home ::selection{background:var(--sun);color:var(--ink-deep)}
html:has(.one-home){scrollbar-color:var(--grape) var(--ink-deep);accent-color:var(--grape)}
.one-home h2,.one-home h3,.one-home p,.one-home ul{margin:0}
.one-home ul{padding:0;list-style:none}
.one-home img{max-width:100%}
.one-home :focus-visible{outline:3px solid var(--grape);outline-offset:3px;border-radius:12px}
.one-home .band-stage :focus-visible,.one-home .band-grownups :focus-visible,.one-home .site-foot :focus-visible{outline-color:var(--sun)}

/* Header: clear over the entrance, its own surface after. One line, wordmark strongest. */
.site-bar{position:fixed;inset:0 0 auto 0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:16px;height:68px;padding:0 max(3.5%,env(safe-area-inset-right)) 0 max(3.5%,env(safe-area-inset-left));transition:background-color .24s var(--ease),box-shadow .24s var(--ease)}
.site-brand{display:flex;align-items:center;min-height:44px;opacity:0;transform:translateY(-8px);pointer-events:none;transition:opacity .24s var(--ease),transform .24s var(--ease)}
.site-brand img{height:46px;width:auto;display:block}
.site-bar nav{display:flex;gap:6px;margin-left:auto}
.site-bar nav a{white-space:nowrap;display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:999px;font-weight:600;font-size:var(--text-body);color:var(--ink);text-shadow:0 1px 12px #e3f9df;transition:background-color .18s var(--ease),color .18s var(--ease)}
.site-bar nav a:hover{background:#ffffff8c}
.site-bar.is-solid{background:#f2fff6f2;box-shadow:0 1px 0 #143a301f,0 10px 30px #0d2a2314;backdrop-filter:blur(10px)}
.site-bar.is-solid .site-brand{opacity:1;transform:none;pointer-events:auto}
.site-bar.is-solid nav a{text-shadow:none}
.site-bar.is-solid nav a:hover{background:var(--mint)}

/* The entrance keeps its own layout; only the small print is brought up to a readable size. */
.one-home .entrance-device{font:500 13px/1.5 Fredoka,ui-rounded,system-ui,sans-serif}

/* Bands */
.band{position:relative;background:var(--surface);color:var(--on);padding:clamp(72px,10vw,150px) 0 clamp(84px,11vw,170px)}
.band-inner{width:min(1320px,92%);margin:0 auto}
.band h2{font-size:var(--text-heading);font-weight:650;line-height:.96;letter-spacing:-.035em;text-wrap:balance}
.band-head{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:24px 48px;align-items:end;margin-bottom:clamp(36px,5vw,72px)}
.band-head p{max-width:30ch;justify-self:end;font-size:var(--text-title);font-weight:500;line-height:1.3}

/* The stage overlaps the entrance, so the first game rises out of the clouds. */
.band-stage{--surface:var(--ink);--on:var(--leaf);padding-top:0;z-index:2}
.band-stage .band-inner{display:flow-root}
.band-stage .stage{margin-top:calc(-1*clamp(56px,7vw,96px))}
.band-art{--surface:var(--mint);--on:var(--ink)}
.band-art h2{color:var(--grape)}
.band-math{--surface:var(--butter);--on:#3f2d05}
.band-reading{--surface:var(--pool);--on:#0e3d45}
.band-grownups{--surface:var(--ink);--on:var(--leaf)}
.band-story{--surface:var(--ink-deep);--on:var(--leaf)}

/* The stage: one game, large. The picture runs wide; the words sit on a block of the game's own colour
   that overlaps it, and the game's friend steps out over the picture's edge. */
.stage{position:relative;display:grid;grid-template-columns:minmax(0,1fr);--tile:#d9b76e}
.stage-picture{position:relative;height:clamp(340px,56vh,640px);border-radius:36px;background:var(--tile);box-shadow:0 40px 90px #05161280}
.stage-scene{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.stage-friend{position:absolute;right:3%;bottom:-9%;height:64%;width:auto;max-width:44%;object-fit:contain}
.stage.is-plain .stage-friend{right:50%;transform:translateX(50%);height:92%;bottom:-4%}
.stage-words{position:relative;z-index:2;width:min(560px,92%);margin:-150px 0 0 clamp(16px,4%,56px);padding:clamp(24px,3vw,40px);border-radius:32px;background:var(--leaf);color:var(--ink);box-shadow:0 24px 60px #05161259}
.stage-words h2{margin-bottom:14px;color:var(--grape)}
.stage-words p{font-size:var(--text-title);font-weight:500;line-height:1.3;max-width:26ch}
.stage-words p.stage-line{font-size:var(--text-body)}
.stage-line{margin-top:6px!important;font-weight:500!important;color:var(--ink-soft)}
.stage-words .play-button{margin-top:22px}
.stage-scene,.stage-friend{transition:opacity .16s var(--ease)}
.stage.is-waiting .stage-scene,.stage.is-waiting .stage-friend{opacity:.45}
/* A change of game is quick: the picture cuts, the friend steps up, the words settle. */
.stage.is-changing .stage-friend{animation:friend-in .2s var(--ease) both}
.stage.is-changing .stage-words>*{animation:stage-in .16s var(--ease) both}
@keyframes stage-in{from{opacity:.4;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes friend-in{from{opacity:.5;transform:translateY(22px)}to{opacity:1;transform:none}}

.play-button{display:inline-flex;align-items:center;gap:16px;min-height:64px;padding:12px 34px;border-radius:999px;font-size:var(--text-title);font-weight:650;color:#2a2204;background:var(--sun);box-shadow:inset 0 2px 2px #fff9,0 5px 0 var(--sun-deep);transition:transform .16s var(--ease),box-shadow .16s var(--ease)}
.play-button svg{width:28px;height:22px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;transition:transform .16s var(--ease)}
.play-button:hover{transform:translateY(-2px);box-shadow:inset 0 2px 2px #fff9,0 7px 0 var(--sun-deep)}
.play-button:hover svg{transform:translateX(4px)}
.play-button:active{transform:translateY(3px);box-shadow:inset 0 2px 2px #fff9,0 2px 0 var(--sun-deep)}

@supports (animation-timeline:view()){
  @media (prefers-reduced-motion:no-preference){
    .stage-picture{animation:stage-arrive linear both;animation-timeline:view();animation-range:entry 0% cover 34%}
    @keyframes stage-arrive{from{transform:scale(.86) translateY(40px);border-radius:64px}to{transform:none}}
  }
}

/* Choosing: a row of pictures is the control. The chosen one wears a ring. */
.stage-choose{display:flex;align-items:center;gap:18px;margin-top:clamp(28px,4vw,48px)}
.stage-rail{display:flex;gap:12px;overflow-x:auto;padding:8px 4px;scrollbar-width:none;scroll-snap-type:x proximity;flex:1;mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent)}
.stage-rail::-webkit-scrollbar{display:none}
.stage-rail button{flex:0 0 auto;width:112px;height:72px;padding:0;border:0;border-radius:18px;overflow:hidden;background:var(--tile);cursor:pointer;scroll-snap-align:center;opacity:.62;outline:3px solid transparent;outline-offset:3px;transition:opacity .18s var(--ease),transform .18s var(--ease),outline-color .18s var(--ease)}
.stage-rail button img{width:100%;height:100%;object-fit:cover;display:block}
.stage-rail button img.is-friend{object-fit:contain;padding:6px}
.stage-rail button:hover{opacity:1;transform:translateY(-3px)}
.stage-rail button[aria-selected=true]{opacity:1;outline-color:var(--sun)}
.surprise{flex:0 0 auto;min-height:48px;padding:0 6px;border:0;background:none;color:var(--leaf);font-weight:600;font-size:var(--text-body);text-decoration:underline;text-decoration-color:var(--sun);text-decoration-thickness:3px;text-underline-offset:7px;cursor:pointer}
.surprise:hover{color:var(--sun)}

/* Tiles: a picture, a name, a line. No frame; the band's colour is the surface. Six columns, so three
   tiles fill a row, two halves fill a row, and a lead takes a row to itself. */
.tiles{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:start;gap:clamp(40px,4.5vw,72px) clamp(20px,2.6vw,40px)}
.tile{grid-column:span 2;display:flex;flex-direction:column;gap:18px;color:inherit;min-width:0;transition:transform .2s var(--ease)}
.tile-picture{position:relative;display:block;aspect-ratio:16/10;border-radius:28px;background:var(--tile);box-shadow:0 18px 40px #143a3024}
.tile-scene{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;clip-path:inset(0 round 28px);transition:transform .24s var(--ease)}
.tile-friend{position:absolute;right:2%;bottom:-11%;height:62%;width:auto;max-width:48%;object-fit:contain;filter:drop-shadow(0 12px 12px #143a3040);transition:transform .24s var(--ease)}
.tile.is-plain .tile-friend{right:50%;transform:translateX(50%);height:96%;bottom:-6%;max-width:80%}
.tile-words{display:flex;flex-direction:column;gap:4px}
.tile-title{font-size:var(--text-title);font-weight:650;line-height:1.15;letter-spacing:-.02em}
.tile-copy{display:none;font-weight:450;max-width:36ch}
.tile-line{font-weight:500;opacity:.72}
a.tile:hover{transform:translateY(-2px)}
a.tile:hover .tile-scene{transform:scale(1.03)}
a.tile:hover .tile-friend{transform:translateY(-6px)}
a.tile.is-plain:hover .tile-friend{transform:translateX(50%) translateY(-6px)}
.tile.is-locked .tile-picture{filter:grayscale(1);opacity:.6}
.tile.is-locked .tile-copy:not(:empty){display:block}

.tile.half-three{grid-column:span 3}
.tile.half-three .tile-picture{aspect-ratio:16/9}
/* A lead takes the whole row: the picture across four columns, the words beside it. */
.tile.lead-three{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:end}
.tile.lead-three .tile-picture{grid-column:span 4;aspect-ratio:16/8.4}
.tile.lead-three .tile-words{grid-column:span 2;gap:10px;padding-bottom:8px}
.tile.lead-three .tile-copy{display:block;font-size:var(--text-title);font-weight:500;line-height:1.3}

/* Grown-ups */
.grownups{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:clamp(36px,6vw,96px);align-items:start}
.grownups-note p{margin-top:28px;max-width:52ch;color:var(--leaf-soft)}
.grownups-note h2{max-width:11ch}
.text-link{display:inline-flex;align-items:center;min-height:44px;margin-top:18px;font-weight:600;color:var(--sun);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:6px}
.text-link:hover{color:#fff}
.grownups-skills h3{font-size:var(--text-title);font-weight:650;color:var(--sun);margin-bottom:14px}
.grownups-skills li{padding:13px 0;border-top:1px solid #f2fff626;color:var(--leaf-soft);font-size:var(--text-body)}
.grownups-skills li{display:grid;grid-template-columns:11.5em minmax(0,1fr);gap:4px 16px}
.grownups-skills li strong{color:var(--leaf);font-weight:600}

/* The story is written on the wall above the makers' shelf. */
.band-story{--surface:#e6f2ec;--on:var(--ink);padding-bottom:0;overflow:hidden}
.story{position:relative;z-index:1}
.story h2{max-width:13ch;color:var(--grape)}
.story p{margin-top:22px;max-width:52ch}
.story .play-button{margin-top:30px}
.story-shelf{display:block;width:100%;height:clamp(240px,40vw,600px);margin-top:clamp(-120px,-9vw,-30px);object-fit:cover;object-position:50% 100%;mask-image:linear-gradient(transparent,#000 42%)}

/* Footer */
.site-foot{background:var(--ink-deep);color:var(--leaf-soft);padding:clamp(48px,6vw,84px) 0 36px;border-top:1px solid #f2fff61f}
.foot-grid{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr));gap:36px}
.foot-line{max-width:24ch;color:var(--leaf);font-weight:600}
.site-foot h2{font-size:var(--text-body);font-weight:650;color:var(--leaf);margin:0 0 6px}
.site-foot nav{display:flex;flex-direction:column}
.site-foot nav a,.foot-end a{display:inline-flex;align-items:center;min-height:40px;font-size:var(--text-body)}
.site-foot a:hover{color:var(--sun)}
.foot-end{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:44px;font-size:var(--text-body)}
.fly-up{display:inline-flex;align-items:center;gap:14px;min-height:64px;color:var(--leaf);font-weight:600}
.fly-up img{width:132px;height:auto;display:block;transition:transform .24s var(--ease)}
.fly-up:hover img{transform:translateY(-6px)}
.fly-up.is-flying img{animation:fly-off .9s var(--ease) both}
@keyframes fly-off{to{transform:translate(-40vw,-70vh) scale(1.6);opacity:0}}

@media (max-width:1000px){
  .tile,.tile.half-three{grid-column:span 3}
  .tile.half-three .tile-picture{aspect-ratio:16/10}
  .tile.lead-three{grid-column:span 3;display:flex;align-items:stretch}
  .tile.lead-three .tile-picture{aspect-ratio:16/10}
  .tile.lead-three .tile-copy{display:none}
  .tile.lead-three .tile-words{gap:4px;padding-bottom:0}
  .tile.lead-two{grid-column:1/-1}
  .tile.lead-two .tile-picture{aspect-ratio:16/8}
  .band-head{grid-template-columns:1fr}
  .band-head p{justify-self:start}
  .grownups{grid-template-columns:1fr}
  .foot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .foot-line{grid-column:1/-1}
}
@media (max-width:640px){
  .site-bar{height:58px}
  .site-brand img{height:34px}
  .site-bar nav{gap:0}
  .site-bar nav a{padding:0 8px;font-size:1rem}
  html:has(.one-home){scroll-padding-top:62px}
  .stage-picture{height:auto;aspect-ratio:4/3.3;border-radius:26px}
  .stage-friend{height:52%;bottom:-6%}
  .stage-words{width:auto;margin:-56px 10px 0;border-radius:26px}
  .stage-choose{flex-direction:column;align-items:stretch;gap:6px}
  .stage-rail button{width:92px;height:60px}
  .surprise{align-self:flex-start}
  .tiles{gap:36px}
  .tile,.tile.half-three,.tile.lead-three,.tile.lead-two{grid-column:1/-1}
  .tile .tile-picture,.tile.lead-two .tile-picture{aspect-ratio:16/10;border-radius:22px}
  .tile-scene{clip-path:inset(0 round 22px)}
  .stage-words .play-button,.story .play-button{width:100%;justify-content:center}
  .grownups-skills li{grid-template-columns:1fr}
  .foot-grid{grid-template-columns:1fr 1fr}
  .foot-end{flex-direction:column;align-items:flex-start;gap:4px}
}
@media (prefers-reduced-motion:reduce){
  html:has(.one-home){scroll-behavior:auto}
  .one-home *{animation:none!important;transition:none!important}
}
