/* ============ Fonts ============
   P22 Mackinac Pro and Ode come from Adobe Fonts (web project "Rollplay Studio", kit ciu0loz),
   loaded in base.njk. Shadows Into Light is free and self-hosted (see /fonts/LICENSES.md). */
@font-face { font-family: "Shadows Into Light"; src: url("/fonts/shadows-into-light.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --gold: #7a6a1c;
  --gold-dark: #5f5215;
  --ink: #000;
  --grey: #6e6e6e;
  --pale: #c2c2c2;
  --serif: "p22-mackinac-pro", Georgia, "Times New Roman", serif;
  --thin: "ode", Georgia, serif;
  --pencil: "Shadows Into Light", "Segoe Print", "Bradley Hand", cursive;
  --sans: "Wix Madefor Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1000px;
  --gutter: clamp(20px, 5vw, 48px);
  --torn: url("/img/torn-mask.svg");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--serif); color: var(--ink); background: #fff; line-height: 1.6; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.h-gold { font-weight: 700; font-size: 32px; line-height: 1.3; color: var(--gold); margin-bottom: 12px; }
.h-gold-md { font-weight: 500; font-size: 28px; line-height: 1.3; color: var(--gold); margin: 1em 0 .4em; }
.h-gold-sm { color: var(--gold); font-size: 18px; text-align: center; }
.lead { font-size: 20px; line-height: 1.6; }
p:not(.lead) { font-size: 16px; }
.pencil { font-family: var(--pencil); font-size: 21px; letter-spacing: .02em; }

/* ============ Header / footer ============ */
.site-header { position: sticky; top: 0; z-index: 50; height: 66px; background: #fff; display: flex; align-items: center; padding-inline: clamp(20px, 10vw, 104px); }
.site-logo img { width: 145px; height: auto; }

.site-footer { background: #000; color: #fff; padding: 22px var(--gutter); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.site-footer .hearthworks img { width: 197px; }
.site-footer nav { display: flex; gap: 20px; font-size: 13px; }
.site-footer nav a { color: #9a9a9a; text-decoration: none; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; }

/* ============ Torn paper edges ============ */
/* A white torn strip laid over the bottom of a section */
.torn-overlay { position: absolute; left: -1%; right: -1%; bottom: -1px; width: 102%; max-width: none; height: auto; z-index: 4; pointer-events: none; }
/* Sections whose own edge is torn (masking the section itself) */
.torn-top, .torn-both { position: relative; }
.torn-top::before, .torn-both::before, .torn-both::after, .torn-bottom-black::after {
  content: ""; position: absolute; left: 0; right: 0; height: 50px; z-index: 3; pointer-events: none;
  background: #fff; -webkit-mask: var(--torn) center / 100% 100% no-repeat; mask: var(--torn) center / 100% 100% no-repeat;
}
.torn-top::before, .torn-both::before { top: -1px; transform: rotate(180deg); }
.torn-both::after { bottom: -1px; }
.torn-bottom-black::after { bottom: -1px; background: #000; }
/* Trailer: edges squashed to 75% height so they stay off the subtitles */
.trailer.torn-both::before, .trailer.torn-both::after { height: 37.5px; }

/* ============ Hero ============ */
.hero { --tag: clamp(44px, 8.4vw, 82px); position: relative; height: max(640px, calc(100svh - 66px)); min-height: 640px; overflow: hidden; background: #000; color: #fff; text-align: center; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: translateY(calc(var(--p, 0) * var(--hh) * .45)) scale(1.06); filter: blur(calc(var(--p, 0) * 8px)); }
/* Scroll effect: as the hero scrolls away the cast zooms in, the words soften, and the forest drifts up more slowly */
.ks-link, .tagline, .subtag { filter: blur(calc(var(--p, 0) * 7px)); opacity: calc(1 - var(--p, 0) * .55); }
.hero-bg, .hero-cast img, .ks-link, .tagline, .subtag { will-change: transform, filter; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,0) 45%, rgba(0,0,0,.25)); pointer-events: none; }
.hero-top { position: relative; padding-top: clamp(28px, 4vh, 48px); }
.ks-link { display: inline-block; text-decoration: none; }
/* Letter-spacing adds space after the last letter, which pushes centered lines left; the negative
   right margin takes it back so each line is optically centered. */
.coming { display: block; font-size: 14px; letter-spacing: .2em; margin-right: -.2em; margin-bottom: 2px; }
.ks-link img { height: calc(var(--tag) * .35); width: auto; margin-inline: auto; }
.tagline { font-family: var(--thin); font-weight: 300; text-transform: uppercase; letter-spacing: .2em; line-height: 1.2;
  font-size: var(--tag); margin-top: .25em; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.tagline span { display: block; margin-right: -.2em; }
@media (min-width: 600px) {
  .hero { --tag: clamp(26px, 4.6vw, 72px); }
  .tagline span { display: inline-block; margin-inline: .12em -.08em; }
}
.subtag { font-size: clamp(16px, 2.7vw, 26px); letter-spacing: .19em; margin-right: -.19em; margin-top: .5em; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.hero { --hh: max(640px, calc(100svh - 66px));
  /* --lt (leopard top) and --lh (leopard height) are measured by site.js; these are fallbacks */
  --lt: 300px; --lh: calc((var(--hh) - var(--lt)) / .77); }
.hero-top { z-index: 1; }
.hero-cast { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-cast img { position: absolute; width: auto; max-width: none; }
/* All three keep the art's native relative scale (same pixels-per-inch as the source files):
   tortoise = 817/1152 and bat = 847/1152 of the leopard's height. Everyone's knees sit on the
   hero's bottom edge (knee height in each image: leopard 77%, tortoise 86%, bat 79%).
   The side characters are placed by their faces (tortoise face at 39% of its width, bat at 64%)
   and their faces are kept inside the viewport on narrow screens. */
.hero { --th: calc(var(--lh) * .7092); --tw: calc(var(--lh) * .2743);
        --bh: calc(var(--lh) * .7352); --bw: calc(var(--lh) * .6753); }
/* Characters rise with the page at the normal scroll rate while growing outward from the center of
   their own face. */
.cast-leopard { top: var(--lt); height: var(--lh); left: 50%; transform-origin: 43% 8%;
  transform: translateX(-50%) scale(calc(1 + var(--p, 0) * 1.1)); }
.cast-tortoise { height: var(--th); top: calc(var(--g, var(--hh)) - var(--th) * .86);
  left: calc(max(50% - var(--lh) * .30, var(--lh) * .06) - var(--tw) * .39); transform-origin: 39% 47%;
  transform: translate(calc(var(--p, 0) * -20vw), 0) scale(calc(1 + var(--p, 0) * .18)); }
.cast-bat { height: var(--bh); top: calc(var(--g, var(--hh)) - var(--bh) * .79);
  left: calc(min(50% + var(--lh) * .34, 100% - var(--lh) * .05) - var(--bw) * .64); transform-origin: 64% 21%;
  transform: translate(calc(var(--p, 0) * 20vw), 0) scale(calc(1 + var(--p, 0) * .18)); }
.hero-signup { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); bottom: clamp(60px, 9vh, 110px); width: min(360px, 90vw); }
.hero-protect { font-size: clamp(24px, 3.4vw, 38px); letter-spacing: .15em; line-height: 1.25; margin-bottom: 18px; text-shadow: 0 1px 12px rgba(0,0,0,.6); }

/* ============ Signup form (sends to Substack) ============ */
.signup { display: flex; flex-direction: column; align-items: center; gap: 24px; font-family: var(--sans); }
.signup input, .signup button { font: inherit; font-size: .9rem; border: 0; }
.signup input { width: 100%; max-width: 340px; padding: 12px 14px; border-radius: 4px; color: #444; background: rgba(255,255,255,.9); }
.signup input::placeholder { color: #999; }
.signup button { padding: 12px 32px; border-radius: 99px; font-weight: 300; color: #444; background: rgba(255,255,255,.8); cursor: pointer; transition: background-color .15s, color .15s; }
.signup button:hover:not(:disabled) { color: #fff; background: rgba(11,11,11,.8); }
.signup button:disabled { opacity: .6; cursor: default; }
.signup-status { min-height: 1.4em; margin: -12px 0 0; font-size: .85rem; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.signup-status.error { color: #ffd6d6; }

/* ============ Welcome ============ */
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 64px); align-items: start; padding-block: 90px 60px; }
.welcome-text { position: relative; }
.welcome .d20 { width: 102px; margin: 10px 0 0 auto; }
.d20 img { width: 100%; transform: rotate(-8deg); }
.welcome-art { width: 100%; margin-top: 10px; }
/* Scroll-scrubbed (--wp, 0 to 1, set in site.js): the crocodile and rabbit rise from far below into place, and the text blocks start
   spaced well apart and draw together into their normal spacing. Reduced-motion visitors get the final layout. */
.welcome { overflow-x: visible; overflow-y: clip; }
.welcome-art { transform: translateY(calc((1 - var(--wp, 1)) * 62%)); will-change: transform; }
.welcome-text > :nth-child(1) { transform: translateY(calc((1 - var(--wp, 1)) * -150px)); }
.welcome-text > :nth-child(2) { transform: translateY(calc((1 - var(--wp, 1)) * -75px)); }
.welcome-text > :nth-child(4) { transform: translateY(calc((1 - var(--wp, 1)) * 75px)); }
.welcome-text > :nth-child(5) { transform: translateY(calc((1 - var(--wp, 1)) * 150px)); }

/* ============ Trailer ============ */
.trailer { background: #000; line-height: 0; }
.trailer video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.trailer { position: relative; }
.trailer-play { position: absolute; z-index: 4; left: 50%; top: 50%; translate: -50% -50%; width: clamp(72px, 12vw, 150px); aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 4px 18px rgba(0,0,0,.45)); transition: scale .2s ease, opacity .25s ease; }
.trailer-play svg { display: block; width: 100%; height: 100%; }
.trailer-play circle { fill: rgba(255,255,255,.92); }
.trailer-play path { fill: #1d1d1d; transform: translateX(3px); }
.trailer-play:hover, .trailer-play:focus-visible { scale: 1.08; }
.trailer-play.is-hidden { opacity: 0; pointer-events: none; }

/* ============ The game ============ */
.the-game { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 80px); align-items: center; padding-block: 90px 110px; }
.game-book { width: 100%; }
.the-game-title { font-family: var(--thin); font-weight: 300; text-transform: uppercase; color: var(--pale); text-align: center; line-height: 1; margin-bottom: 40px; letter-spacing: .1em; }
.the-game-title .the { display: block; font-size: 24px; }
.the-game-title .game { display: block; font-size: 58px; }

/* ============ Protect ============ */
.protect { position: relative; overflow: hidden; background: #000; color: #fff; text-align: center; padding: clamp(110px, 14vw, 170px) var(--gutter) clamp(120px, 14vw, 180px); }
.protect-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; transform: scale(calc(1.3 + var(--z, 0) * .35)); filter: brightness(.62) saturate(.9); will-change: transform; }
.protect-inner { position: relative; z-index: 2; max-width: 720px; margin-inline: auto; }
.protect h2 { font-weight: 800; font-size: clamp(48px, 9.5vw, 96px); line-height: 1.2; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.protect-note { font-weight: 500; font-size: 16px; margin: 14px 0 22px; }
.prefer { font-weight: 800; font-size: 20px !important; margin: 52px 0 14px; }
.btn-outline-light { display: inline-block; font-family: var(--sans); font-size: 14px; color: #fff; text-decoration: none; border: 1px solid #fff; border-radius: 6px; padding: 10px 14px; transition: background-color .15s, color .15s; }
.btn-outline-light:hover { background: #fff; color: #000; }

/* ============ Socials ============ */
.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-block: 130px 160px; text-align: center; }
.social { display: flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; color: var(--grey); font-family: var(--pencil); font-size: 21px; }
.social img { width: 150px; height: 144px; object-fit: contain; transition: transform .2s; }
.social:hover img { transform: scale(1.05) rotate(-2deg); }
.social:hover span { text-decoration: underline; }

/* ============ Less / more pairs ============ */
.pairs { padding-block: 0 50px; }
.pairs-track { position: relative; height: 150px; width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.pair { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; opacity: 0; transition: opacity .8s; }
.pair.is-active { opacity: 1; }
.pair-box { background: var(--gold); color: #fff; font-weight: 500; font-size: clamp(18px, 2.8vw, 28px); line-height: 1.3; text-align: center; height: 140px; display: flex; align-items: center; justify-content: center; padding: 0 22px; }
.amp { font-weight: 500; font-size: 42px; color: var(--gold); }

/* ============ Species ============ */
.species { position: relative; overflow: hidden; color: #fff; background: var(--gold) url("/img/texture-olive.webp") 0 0 / 300px 300px repeat; padding-top: 90px; }
.species p.species-intro { text-align: center; font-weight: 500; font-size: clamp(20px, 2.8vw, 28px); line-height: 1.3; max-width: 640px; margin-bottom: 64px; }
/* The cast stands in an overlapping pyramid (panda in front, elephant and flamingo behind, alligator and axolotl at the edges).
   Each one slides in from outside the frame, scrubbed by scrolling (--sp goes 0 to 1, set in site.js), and carries its name along. */
.species-row { position: relative; width: min(100%, 1400px); aspect-ratio: 100 / 57; margin-inline: auto; clip-path: inset(-12% -50vw 0 -50vw); }
.sp { position: absolute; bottom: var(--b, 2%); left: var(--l); width: var(--w); z-index: var(--z, 1);
  transform: translate(calc((1 - var(--sp, 1)) * var(--ox, 0px)), calc((1 - var(--sp, 1)) * var(--oy, 0px))); will-change: transform; }
.sp img { display: block; width: 100%; height: auto; }
.sp .pencil { position: absolute; left: var(--nx, 50%); top: var(--ty, 0%); translate: -50% -100%; margin-top: -3.1em; white-space: nowrap;
  font-size: clamp(9px, .95vw, 13px); color: rgba(255,255,255,.75); letter-spacing: .03em; }
.sp-1 { --l: -5.8%; --w: 41%; --b: -42%; --z: 1; --ty: 3.9%; --nx: 40.9%; --ox: -75vw; }
.sp-2 { --l: -5.7%; --w: 62%; --b: -39.1%; --z: 3; --ty: 4.7%; --nx: 62.4%; --ox: -65vw; }
.sp-3 { --l: 37%; --w: 46%; --b: -45.6%; --z: 5; --ty: 2.9%; --nx: 45.6%; --oy: 55%; }
.sp-4 { --l: 81.7%; --w: 26%; --b: -10.9%; --z: 1; --ty: 6.2%; --nx: 30%; --ox: 75vw; }
.sp-5 { --l: 60.5%; --w: 39%; --b: -21.4%; --z: 2; --ty: 8.9%; --nx: 50.1%; --ox: 65vw; }

/* ============ What type ============ */
.what-type { padding-block: 70px 90px; }
.what-type .cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }

/* ============ Roles ============ */
.roles { position: relative; overflow: hidden; background: var(--grey); color: #fff; padding-top: 90px; }
.roles-intro { position: relative; z-index: 1; text-align: center; font-weight: 500; font-size: 20px; line-height: 1.3; max-width: 600px; margin-bottom: 40px; }
.roles-intro b { font-weight: 800; }
.roles-cast { display: grid; grid-template-columns: 1fr 1.05fr 1fr; align-items: end; max-width: 1040px; margin-inline: auto; padding-inline: var(--gutter); }
.role { position: relative; text-align: center; }
.role figcaption { margin-bottom: 6px; position: relative; z-index: 1; }
/* Scroll-scrubbed: the Cloak and Guardian start tucked in behind the Mystic and slide out into place (--rp, 0 to 1), while the
   Mystic slowly levitates (--rl, 0 to 1) over her own label, then the heading, until her hooves clear the torn edge. Set in site.js. */
.role-mystic { z-index: 3; }
.role-mystic img { position: relative; z-index: 2; translate: 0 calc(var(--rl, 0) * -34%); }
.role-mystic img.mystic-flame { position: absolute; z-index: 2; }
.role-cloak, .role-guardian { z-index: 2; }
.role-cloak figcaption, .role-guardian figcaption { opacity: var(--rp, 1); }
@media (min-width: 821px) {
  .role-cloak { translate: calc((1 - var(--rp, 1)) * 105%) 0; }
  .role-guardian { translate: calc((1 - var(--rp, 1)) * -105%) 0; }
}
.role-cloak img { width: 92%; }
.role-guardian img { width: 100%; }
.role-mystic img:not(.mystic-flame) { width: 92%; margin-inline: auto; }
.mystic-flame { position: absolute; width: 46%; right: -4%; top: 8%; mix-blend-mode: screen; animation: flicker 4s ease-in-out infinite; }
@keyframes flicker { 50% { opacity: .82; transform: translateY(-4px); } }

/* ============ Map ============ */
/* The map is a tall window the map pans through as you scroll (see site.js) */
.map { position: relative; overflow: hidden; height: min(100svh, 1000px); min-height: 520px; background: #7fa4a8; }
.map img { position: absolute; top: 0; left: 50%; width: max(100%, 90svh); max-width: none; height: auto;
  transform: translate(-50%, var(--my, 0px)); will-change: transform; }

/* ============ Studio sign-off ============ */
.studio { position: relative; overflow: hidden; margin-top: 130px; padding: 70px 0 60px; text-align: center; color: var(--grey); background: #0d2236; }
.studio-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.studio-logo { position: relative; z-index: 2; width: 118px; margin: 20px auto 18px; }
.copyright { position: relative; z-index: 2; font-size: 12px !important; color: var(--grey); }

/* ============ Downloads ============ */
.dl-playtest { display: grid; grid-template-columns: .9fr 1fr; gap: 56px; align-items: center; padding-block: 60px 90px; }
.dl-cover img { width: 100%; }
.dl-text .h-gold-md { margin-top: 0; }
.dl-actions { display: flex; gap: 18px; align-items: center; margin-top: 26px; }
.btn-outline { display: inline-block; font-size: 16px; color: var(--gold); border: 1.5px solid var(--gold); padding: 6px 22px; text-decoration: none; transition: background-color .15s, color .15s; }
.btn-outline:hover { background: var(--gold); color: #fff; }
.text-link { color: var(--gold); text-decoration: none; font-size: 16px; line-height: 1.15; }
.text-link:hover { text-decoration: underline; }
.dl-sheets { background: #f7f7f7; padding-block: 110px; }
.dl-sheets-inner { display: grid; grid-template-columns: .9fr 1fr; gap: 56px; align-items: start; }
.dl-sheet img { width: 100%; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ks-band { position: relative; overflow: hidden; color: #fff; text-align: center; padding: 120px var(--gutter); background: #000; }
.ks-band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); object-position: 50% 40%; filter: brightness(.68); }
.ks-band-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ks-band .join { font-weight: 800; font-size: 20px; margin: 0; }
.ks-band-inner img { width: min(446px, 80vw); }
.dl-updates { text-align: center; padding-block: 90px 60px; max-width: 640px; }
.dl-updates iframe { border: 0; width: 100%; max-width: 480px; background: transparent; margin: 20px auto 30px; display: block; }

/* ============ Feedback ============ */
.page-feedback { background: #f5f5f5; }
.fb-wrap { padding: 30px var(--gutter) 90px; }
.fb-card { max-width: 500px; margin-inline: auto; background: #fff; padding: 40px 24px 36px; }
.fb-title { font-family: var(--sans); font-weight: 700; font-size: 22px; margin-bottom: 26px; }
.fb-intro { font-size: 16px; }
.fb-section { font-size: 28px; line-height: 1.3; margin: 34px 0 18px; }
.fb-field { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.fb-field > label, .fb-field legend { display: block; font-size: 14px; line-height: 1.4; margin-bottom: 8px; padding: 0; }
.fb-field textarea { width: 100%; min-height: 92px; font: inherit; font-size: 15px; border: 1px solid #8a8a8a; border-radius: 0; padding: 10px; resize: vertical; }
.fb-field textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.fb-help { font-size: 13px !important; color: #777; margin-top: 8px; }
.stars-row { display: flex; gap: 6px; }
.stars-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-row label { cursor: pointer; line-height: 0; }
.stars-row svg { width: 34px; height: 34px; fill: none; stroke: #3d7be0; stroke-width: 1.3; transition: fill .1s; }
.stars-row input:focus-visible + label svg { outline: 2px solid var(--gold); outline-offset: 2px; }
.stars-row:has(input:nth-of-type(1):checked) label:nth-of-type(-n+1) svg,
.stars-row:has(input:nth-of-type(2):checked) label:nth-of-type(-n+2) svg,
.stars-row:has(input:nth-of-type(3):checked) label:nth-of-type(-n+3) svg,
.stars-row:has(input:nth-of-type(4):checked) label:nth-of-type(-n+4) svg,
.stars-row:has(input:nth-of-type(5):checked) label:nth-of-type(-n+5) svg { fill: #3d7be0; }
.radios .radio { display: flex; align-items: center; gap: 10px; font-size: 15px; margin: 8px 0; cursor: pointer; }
.radios input { width: 18px; height: 18px; accent-color: var(--gold); margin: 0; }
.fb-submit { display: block; width: 100%; margin-top: 30px; padding: 12px; font-family: var(--sans); font-size: 16px; color: #fff; background: #000; border: 0; cursor: pointer; }
.fb-submit:hover:not(:disabled) { background: var(--gold); }
.fb-submit:disabled { opacity: .6; cursor: default; }
.fb-status { margin-top: 14px; font-size: 15px; }
.fb-status.error { color: #9b2f2f; }
.fb-status.ok { color: var(--gold-dark); font-weight: 500; }
.hp { position: absolute; left: -9999px; }

.notfound { padding-block: 120px; min-height: 50vh; }

/* ============ Scroll-scrubbed motion (driven by site.js; off for reduced motion) ============ */
@media (prefers-reduced-motion: no-preference) {
  .fade-text { opacity: var(--f, 1); translate: 0 calc((1 - var(--f, 1)) * 14px); }
  .slide-in { opacity: calc(.1 + .9 * var(--s, 1)); translate: calc((1 - var(--s, 1)) * -70%) 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pair { transition: none; }
  .mystic-flame { animation: none; }
}

/* ============ Smaller screens ============ */
@media (max-width: 820px) {
  .welcome, .the-game, .dl-playtest, .dl-sheets-inner, .what-type .cols { grid-template-columns: 1fr; }
  .welcome-art { max-width: 520px; margin-inline: auto; }
  .game-book, .dl-cover, .dl-sheet { max-width: 360px; margin-inline: auto; }
  .the-game { padding-block: 60px 80px; }
  .socials { grid-template-columns: 1fr; gap: 56px; padding-block: 90px 100px; }
  .roles-cast { grid-template-columns: 1fr 1fr; }
  .role-mystic { grid-column: 1 / -1; grid-row: 1; max-width: 300px; margin-inline: auto; }
  .pair { grid-template-columns: 1fr; gap: 6px; }
  .pairs-track { height: 260px; }
  .pair-box { height: 100px; }
  .amp { text-align: center; line-height: 1; }
}
@media (max-width: 520px) {
  .site-header { padding-inline: 20px; }
  .welcome { padding-top: 60px; }
}

/* Hero on small screens: narrower signup so it doesn't cover the side characters' faces.
   The leopard is always in front. */
@media (max-width: 600px) {
  /* Small screens: bring the side characters in front so their faces aren't hidden, and narrow the form */
  .hero-signup { width: min(230px, 64vw); }
}

/* Hero text on phones: sized so the text block fills about the top half of the hero */
@media (max-width: 599px) {
  .hero { --tag: min(12.5vw, calc((var(--hh) * .5 - 70px) / 5.6)); }
  .coming { font-size: calc(var(--tag) * .3); }
  .subtag { font-size: calc(var(--tag) * .34); }
  .hero-top { padding-top: calc(var(--hh) * .05); }
  /* the signup sits low so it stays under the leopard's face */
  .hero-signup { bottom: max(18px, 2.5vh); }
  .hero-protect { margin-bottom: 12px; }
  .signup { gap: 16px; }
}
