html{background:#0d1714}   /* (on html only, so the embers' layer behind the page still shows through body) */

@font-face{font-family:'Alegreya SC';font-weight:700;font-display:swap;src:url(../fonts/AlegreyaSC-700.woff2) format('woff2')}
@font-face{font-family:'Alegreya SC';font-weight:800;font-display:swap;src:url(../fonts/AlegreyaSC-800.woff2) format('woff2')}
@font-face{font-family:'Alegreya Sans';font-weight:400;font-display:swap;src:url(../fonts/AlegreyaSans-400.woff2) format('woff2')}
@font-face{font-family:'Alegreya Sans';font-weight:500;font-display:swap;src:url(../fonts/AlegreyaSans-500.woff2) format('woff2')}
@font-face{font-family:'Alegreya Sans';font-weight:700;font-display:swap;src:url(../fonts/AlegreyaSans-700.woff2) format('woff2')}
@font-face{font-family:'Alegreya Sans';font-weight:800;font-display:swap;src:url(../fonts/AlegreyaSans-800.woff2) format('woff2')}

:root{
  color-scheme:dark;
  --ground:#0d1714; --ground-2:#12201b; --panel:#15241f; --panel-2:#1b2e27; --line:#2f4a42; --line-gold:#6b5a2a;
  --ink:#efe9dc; --ink-2:#d9d2c3; --ink-3:#a8a192;
  --gold:#e9b949; --gold-hi:#f5d273; --gold-pale:#ffe39a; --gold-deep:#d39a35; --gold-ink:#2a1a06;
  --heart:#e0413a; --ember:#e8742a;
  --display:'Alegreya SC','Palatino Linotype','Book Antiqua',Palatino,Georgia,serif;
  --body:'Alegreya Sans','Segoe UI',system-ui,sans-serif;
  --ease-out:cubic-bezier(.16,1,.3,1); --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --gutter:clamp(16px,4vw,64px);
}
*,*::before,*::after{box-sizing:border-box}
html{overflow-x:clip;scrollbar-color:var(--line) var(--ground);-webkit-text-size-adjust:100%}
body{margin:0;color:var(--ink);font:400 18px/1.55 var(--body);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
::selection{background:rgba(233,185,73,.32);color:#fff}
img{max-width:100%;height:auto;display:block}
a{color:var(--gold-hi);text-underline-offset:.18em;text-decoration-thickness:1px}
a:hover{color:var(--gold-pale)}
:focus-visible{outline:2px solid var(--gold-pale);outline-offset:3px;border-radius:6px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Display headings in the game logo's gold (sampled from art/logo.png): straw-gold at the top of each letter running to
   amber at the foot, crisp edges with a tight dark-brown shadow under them, and a soft drop. The gradient repeats per line (1lh), so a two-line heading
   matches the logo on both lines. Browsers without gradient text keep the plain gold colour. (Jordy, 19 Nov) */
@supports ((-webkit-background-clip:text) or (background-clip:text)){
  .logo-gold[class],.doc section h2{color:transparent;
    background:linear-gradient(180deg,#f4dc80 12%,#ecc546 36%,#dca626 58%,#c88d16 80%,#b87d10 100%) 0 0/100% 1lh repeat-y;
    -webkit-background-clip:text;background-clip:text;
    text-shadow:none;filter:drop-shadow(0 1px 1px rgba(60,30,2,.75)) drop-shadow(0 5px 14px rgba(0,0,0,.5))}
  /* (no text-stroke: browsers paint it over the letter's edge, which reads as a brushed rim, not crisp) */
}
.icon{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ---------- top bar ---------- */
.bar{position:relative;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:18px var(--gutter);max-width:1440px;margin:0 auto}
.bar .mark{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--gold-hi)}
.bar .mark img:first-child{width:40px;height:40px;border-radius:10px;box-shadow:0 0 0 2px var(--gold-deep),0 4px 10px rgba(0,0,0,.4)}
.bar .mark .wordmark{width:auto;height:clamp(26px,3vw,36px);filter:drop-shadow(0 3px 6px rgba(0,0,0,.5))}
.bar nav{display:flex;align-items:center;gap:clamp(12px,2.4vw,30px);font-size:16px}
.bar nav a{color:var(--ink-2);text-decoration:none}
.bar nav a:hover{color:var(--gold-pale)}
.lang{display:inline-flex;border:1px solid var(--line-gold);border-radius:999px;padding:2px;background:rgba(13,23,20,.6)}
.lang button{all:unset;cursor:pointer;font:700 14px/1 var(--body);letter-spacing:.04em;color:var(--ink-3);padding:7px 11px;border-radius:999px}
.lang button[aria-pressed="true"]{background:var(--gold);color:var(--gold-ink)}
.lang button:focus-visible{outline:2px solid var(--gold-pale);outline-offset:2px}

/* ---------- buttons ---------- */
.btn-play{display:inline-flex;align-items:center;gap:12px;text-decoration:none;cursor:pointer;border:0;
  background:linear-gradient(#ffe39a,#d39a35);color:var(--gold-ink);font:800 20px/1 var(--body);
  padding:17px 28px 17px 20px;border-radius:999px;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.55),inset 0 -3px 0 rgba(120,70,10,.45),0 10px 24px rgba(0,0,0,.45);
  transition:transform .2s var(--ease-out),box-shadow .2s var(--ease-out)}
.btn-play:hover,.btn-play:focus,.btn-play:active{color:var(--gold-ink)}
/* (hover lift only with a real mouse: on touchscreens :hover sticks after a tap) */
@media (hover:hover){.btn-play:hover{color:var(--gold-ink);transform:translateY(-2px);box-shadow:inset 0 2px 0 rgba(255,255,255,.55),inset 0 -3px 0 rgba(120,70,10,.45),0 14px 30px rgba(0,0,0,.5)}}
.btn-play:active{transform:scale(.97)}
.btn-play .disc{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--gold-ink);color:var(--gold-pale)}
.btn-play .disc svg{width:14px;height:14px;fill:currentColor;stroke:none;margin-left:2px}
/* the big download button: two lines (what + where), the game's go-pulse ring and a gold sheen (Jordy, 19 Nov) */
.btn-play{position:relative}
.btn-play.big{padding:13px 30px 13px 14px;gap:14px}
.btn-play.big .disc{width:42px;height:42px}
.btn-play.big .disc svg{width:18px;height:18px}
.btn-play .lbl{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:3px}
.btn-play .lbl b{font:800 23px/1 var(--body)}
.btn-play .lbl small{font:700 14px/1.1 var(--body);opacity:.78}
.btn-play.go::before{content:"";position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;opacity:0;
  box-shadow:0 0 0 2px rgba(255,214,120,.75),0 0 14px rgba(233,185,73,.45)}
.btn-play.go::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(105deg,transparent 42%,rgba(255,255,255,.6) 50%,transparent 58%) 160% 0/260% 100% no-repeat;opacity:0}
@media (prefers-reduced-motion:no-preference){
  .btn-play.go::before{animation:gopulse 3.2s ease-out infinite}            /* (the game's .go-pulse ring) */
  .btn-play.go::after{animation:sheen 6s ease-in-out 1.2s infinite}
  @keyframes gopulse{0%{opacity:.7;transform:scale(1)}60%,100%{opacity:0;transform:scale(1.04,1.22)}}
  @keyframes sheen{0%{opacity:1;background-position:160% 0}14%{opacity:1;background-position:-60% 0}15%,100%{opacity:0}}
}

/* the Play pill that follows the visitor once the first button has scrolled away (hidden while another Play button
   is in view); a full-width bar on phones */
.sticky-play{position:fixed;z-index:21;right:max(24px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));transform:translateY(150%);
  opacity:0;pointer-events:none;transition:transform .45s var(--ease-out),opacity .3s;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.55),inset 0 -3px 0 rgba(120,70,10,.45),0 14px 34px rgba(0,0,0,.6)}
.sticky-play.show{transform:none;opacity:1;pointer-events:auto}
@media (hover:hover){.sticky-play.show:hover{transform:translateY(-2px)}}
.sticky-play .appic{width:42px;height:42px;border-radius:11px;box-shadow:0 0 0 2px var(--gold-ink)}
@media (max-width:560px){
  /* (lifted clear of iPhone Safari's floating bottom bar, like the scroll cue) */
  .sticky-play{left:12px;right:12px;bottom:calc(env(safe-area-inset-bottom) + 14px);transform:translateY(150%);justify-content:center}
  .sticky-play.show,.sticky-play.show:hover{transform:none}
}
.btn-ghost{display:inline-flex;align-items:center;gap:10px;cursor:pointer;font:700 17px/1 var(--body);color:var(--ink);
  background:var(--panel-2);border:1px solid var(--line);padding:14px 20px;border-radius:999px;text-decoration:none;
  transition:background .2s,border-color .2s}
.btn-ghost:hover{background:#22382f;border-color:var(--gold-deep);color:var(--ink)}
.fineprint{display:flex;flex-wrap:wrap;gap:6px 14px;margin:14px 0 0;padding:0;list-style:none;font-size:15px;color:var(--ink-3)}
.fineprint li{display:flex;align-items:center;gap:6px}
.fineprint .icon{width:17px;height:17px;color:var(--gold)}

/* ---------- footer ---------- */
.foot{border-top:1px solid var(--line);margin-top:0;padding:28px var(--gutter) max(36px,env(safe-area-inset-bottom));
  display:flex;flex-wrap:wrap;gap:12px 28px;justify-content:space-between;align-items:center;color:var(--ink-3);font-size:15px;
  max-width:1440px;margin-inline:auto}
.foot nav{display:flex;flex-wrap:wrap;gap:8px 22px}
.foot a{color:var(--ink-2)}

/* (no scroll fade-ins: the motion on these pages is the stones settling once and the game's embers) */

/* ---------- painted pills (Jordy, 20 Nov): the game's own painted pill plates (painted UI, extracted to img/ui by
   tools/extract_game_art.py) instead of CSS gradients and bevels. As in the game the round end caps keep their shape:
   the caps are drawn --cap wide (about half the button's height for the gold pill, 0.39x for the dark one) and the
   middle stretches. Gold pill: 66 67 66 67 fill; dark pill: 66 51 66 51 fill (the game's slices). ---------- */
.btn-play{background:none;border:0 solid transparent;--cap:26px;
  border-image:url(../img/ui/pill-gold.webp) 66 67 66 67 fill / 50% var(--cap) / 0 stretch;
  box-shadow:0 4px 10px rgba(0,0,0,.45)}
.btn-play.big,.sticky-play{--cap:34px}
@media (hover:hover){.btn-play:hover{box-shadow:0 8px 18px rgba(0,0,0,.5);filter:brightness(1.05)}}
.btn-play:active{filter:brightness(.9)}
.sticky-play{box-shadow:0 10px 26px rgba(0,0,0,.6)}
.btn-ghost{background:none;border:0 solid transparent;--cap:18px;
  border-image:url(../img/ui/pill-dark.webp) 66 51 66 51 fill / 50% var(--cap) / 0 stretch;box-shadow:0 3px 6px rgba(0,0,0,.35)}
.btn-ghost:hover{background:none;filter:brightness(1.15)}
.btn-ghost:active{filter:brightness(.9)}
.lang{background:none;border:0 solid transparent;padding:3px 5px;
  border-image:url(../img/ui/pill-dark.webp) 66 51 66 51 fill / 50% 14px / 0 stretch}
.lang button[aria-pressed="true"]{background:none;color:var(--gold-ink);
  border-image:url(../img/ui/pill-gold.webp) 66 67 66 67 fill / 50% 14px / 0 stretch}
