/* Quiblets: The Last Hearth. Palette and type taken from the game's title screen. */
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  --night: #1b1640;      /* deep cave plum */
  --night-2: #241c52;
  --night-3: #2f2463;
  --ink: #3b2a10;        /* text on gold */
  --cream: #fff6e6;
  --cream-dim: #e9dcf3;
  --gold: #ffd24d;
  --gold-soft: #f3d27e;
  --cyan: #4bd6e2;
  --cyan-deep: #146b70;
  --violet: #b99bff;
  --violet-deep: #5a3aa8;
  --coral: #ff9a7c;
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1200px;
  --font: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
p { margin: 0 0 1em; }
strong { font-weight: 600; color: #fff; }
a { color: var(--gold); }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: .7em 1.1em; border-radius: 12px; font-weight: 600;
}
.skip:focus { top: 16px; }
main:focus { outline: none; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .82rem; font-weight: 600;
  color: var(--cyan); margin-bottom: .8em;
}
.eyebrow-gold { color: var(--gold); }
.lede { font-size: 1.15rem; color: var(--cream-dim); max-width: 46ch; margin-inline: auto; }
.cyan { color: var(--cyan); }
.violet { color: var(--violet); }

/* Colony emblems: never colour alone, always the shape too */
.shape { display: inline-block; width: 14px; height: 14px; flex: none; vertical-align: -1px; }
.shape-circle { border-radius: 50%; border: 3px solid var(--cyan); }
.shape-diamond { border: 3px solid var(--violet); transform: rotate(45deg) scale(.85); border-radius: 2px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.dot-gold { background: radial-gradient(circle at 35% 35%, #fff3c4, var(--gold)); }

/* Buttons: chunky, glossy, like the in-game menu buttons */
.btn {
  --b: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: .7em 1.5em; border-radius: 18px; border: 0;
  font: inherit; font-weight: 600; font-size: 1.08rem; text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-gold {
  flex-direction: column; gap: 0; line-height: 1.1;
  background: linear-gradient(180deg, #ffe58a 0%, var(--gold) 45%, #f0b52e 100%);
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 246, 230, .55), 0 10px 30px rgba(255, 196, 60, .35), inset 0 -4px 0 rgba(160, 100, 10, .35);
}
.btn-gold:hover { box-shadow: 0 0 0 3px #fff6e6, 0 14px 40px rgba(255, 196, 60, .55), inset 0 -4px 0 rgba(160, 100, 10, .35); }
.btn-big { font-size: 1.5rem; font-weight: 700; }
.btn-small { font-size: .82rem; font-weight: 500; }
.btn-sm { min-height: 44px; padding: .45em 1.15em; font-size: 1rem; flex-direction: row; }
.btn-glass {
  background: rgba(27, 22, 64, .55); color: var(--cream);
  box-shadow: inset 0 0 0 2px rgba(255, 246, 230, .7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(47, 36, 99, .8); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem var(--gutter);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled { background: rgba(27, 22, 64, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.brand img { width: 128px; height: auto; filter: drop-shadow(0 3px 8px rgba(0,0,0,.4)); }
.site-header nav { margin-left: auto; }
.site-header nav ul { display: flex; gap: .25rem; }
.site-header nav a {
  display: block; padding: .55em .85em; border-radius: 12px;
  color: var(--cream); text-decoration: none; font-weight: 500;
}
.site-header nav a:hover { background: rgba(255,246,230,.12); }
@media (max-width: 820px) { .site-header nav { display: none; } .site-header .btn { margin-left: auto; } }

/* Film: the opening story, scrubbed by scroll. The section is tall; the stage sticks while frames advance. */
.film { position: relative; height: 900vh; }
.film-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; background: var(--night); }
.film-poster, .film-canvas, .film-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.film-poster { object-fit: cover; z-index: -3; }
.film-canvas { z-index: -2; }
.film-shade {
  z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(27,22,64,.55) 0%, rgba(27,22,64,0) 22%),
    linear-gradient(0deg, rgba(27,22,64,.92) 0%, rgba(27,22,64,.55) 26%, rgba(27,22,64,0) 52%);
}

.film-intro {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  padding: 6rem var(--gutter) 5rem;
  background: radial-gradient(ellipse 65% 55% at 50% 48%, rgba(27,22,64,.35), rgba(27,22,64,.72) 75%);
}
.film-intro > * { max-width: 880px; margin-inline: auto; }
.hero-title { margin: 0 0 1.2rem; }
.hero-title img {
  width: min(680px, 86vw); height: auto; margin-inline: auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.45)) drop-shadow(0 0 40px rgba(255, 210, 77, .25));
  animation: rise 1.2s cubic-bezier(.2,.8,.2,1) both;
}
.hero-sub {
  display: inline-block; margin-top: .4rem;
  font-size: clamp(1.1rem, 2.6vw, 1.7rem); font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold-soft); text-shadow: 0 2px 14px rgba(0,0,0,.7);
  animation: rise 1.2s .25s cubic-bezier(.2,.8,.2,1) both;
}
.hero-line {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 500; text-shadow: 0 2px 14px rgba(0,0,0,.8);
  animation: rise 1.2s .45s cubic-bezier(.2,.8,.2,1) both;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.8rem; animation: rise 1.2s .6s cubic-bezier(.2,.8,.2,1) both; }
.hero-actions .btn-gold { min-width: 220px; min-height: 72px; }
.hero-actions .btn-glass { min-height: 72px; }
/* Apple's badge, unaltered; the padding keeps the clear space Apple asks for */
.store-row { margin: 1.25rem 0 0; display: flex; justify-content: center; }
.store-badge { display: inline-block; padding: 12px; border-radius: 16px; line-height: 0; }
.store-badge img { display: block; height: 50px; width: auto; }
.store-badge:focus-visible { outline: 3px solid var(--gold); outline-offset: 0; }
.facts .store-badge { padding: 4px 0; }
.facts .store-badge img { height: 44px; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.scroll-hint {
  display: flex; align-items: center; justify-content: center; gap: .7rem; margin-top: 2.6rem;
  font-size: .95rem; font-weight: 500; color: var(--cream-dim); text-shadow: 0 2px 10px rgba(0,0,0,.8);
  animation: rise 1.2s .8s cubic-bezier(.2,.8,.2,1) both;
}
.scroll-hint .mouse { width: 22px; height: 34px; border-radius: 12px; border: 2.5px solid rgba(255,246,230,.8); position: relative; }
.scroll-hint .mouse::after {
  content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px;
  border-radius: 2px; background: var(--gold); animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 60% { transform: translateY(11px); opacity: 0; } 61% { transform: none; opacity: 0; } }

/* Story beats: real text laid over the film, faded in/out by scroll position (JS sets --o) */
.beat {
  --o: 0;
  position: absolute; left: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); bottom: clamp(4.5rem, 12vh, 8rem);
  max-width: 600px; padding-right: var(--gutter);
  opacity: var(--o); transform: translateY(calc((1 - var(--o)) * 26px));
  visibility: hidden; pointer-events: none;
}
.beat.on { visibility: visible; }
.beat::before { /* soft dark pool behind the words so they read over bright frames */
  content: ""; position: absolute; inset: -18% -12% -22% -14%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20,16,50,.62), rgba(20,16,50,0)); pointer-events: none;
}
.beat-right { left: auto; right: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); text-align: right; padding: 0 0 0 var(--gutter); }
.beat h3 { font-size: clamp(1.9rem, 4.4vw, 3.3rem); text-shadow: 0 3px 22px rgba(0,0,0,.75); }
.beat p { font-size: clamp(1.02rem, 1.6vw, 1.2rem); text-shadow: 0 2px 12px rgba(0,0,0,.9); }
.beat .eyebrow { display: inline-flex; align-items: center; gap: .6em; }
.beat-cyan .eyebrow, .beat-cyan h3 { color: var(--cyan); }
.beat-violet .eyebrow, .beat-violet h3 { color: var(--violet); }
.beat-big { left: 0; right: 0; bottom: auto; top: 50%; max-width: none; padding: 0 var(--gutter); text-align: center; translate: 0 -50%; }
.beat-big h3 { font-size: clamp(2.6rem, 8vw, 6rem); color: #dff3ff; text-shadow: 0 0 46px rgba(120,190,255,.4), 0 3px 18px rgba(0,0,0,.7); }

.film-progress {
  position: absolute; left: 50%; bottom: 1.6rem; translate: -50% 0; width: min(220px, 40vw); height: 4px;
  border-radius: 4px; background: rgba(255,246,230,.18); overflow: hidden;
}
.film-progress span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--gold-soft), var(--gold)); }

@media (max-width: 700px) {
  .film { height: 800vh; }
  .beat, .beat-right { left: var(--gutter); right: var(--gutter); max-width: none; padding: 0; text-align: left; bottom: 4.2rem; }
  .beat-big { bottom: auto; }
  .film-shade { background: linear-gradient(180deg, rgba(27,22,64,.6) 0%, rgba(27,22,64,0) 18%), linear-gradient(0deg, rgba(27,22,64,.95) 0%, rgba(27,22,64,.7) 34%, rgba(27,22,64,0) 62%); }
}

.motion-toggle {
  position: fixed; z-index: 40; right: var(--gutter); bottom: 1.25rem;
  display: inline-flex; align-items: center; gap: .5em;
  min-height: 44px; padding: .5em 1em; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-size: .9rem; color: var(--cream);
  background: rgba(27,22,64,.65); box-shadow: inset 0 0 0 1.5px rgba(255,246,230,.55);
}
.motion-toggle .i-play { display: none; }
.motion-toggle[aria-pressed="true"] .i-play { display: block; }
.motion-toggle[aria-pressed="true"] .i-pause { display: none; }
@media (max-width: 600px) { .motion-toggle .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* Sections */
section { position: relative; }
.section-head { text-align: center; max-width: 820px; margin: 0 auto 3rem; padding: 0 var(--gutter); }

/* Colonies */
.colonies { padding: 8rem 0 6rem; background: radial-gradient(ellipse 60% 40% at 20% 30%, rgba(75,214,226,.12), transparent), radial-gradient(ellipse 60% 40% at 80% 30%, rgba(185,155,255,.14), transparent), var(--night); }
.colony-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5rem; align-items: center;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
}
.colony {
  border-radius: calc(var(--radius) + 6px); overflow: hidden;
  background: var(--night-2);
  box-shadow: 0 30px 60px rgba(0,0,0,.35), inset 0 0 0 2px var(--edge);
  transition: transform .4s ease, box-shadow .4s ease;
}
.colony:hover { transform: translateY(-6px); box-shadow: 0 40px 80px rgba(0,0,0,.4), inset 0 0 0 2px var(--edge), 0 0 50px var(--glow); }
.colony-cyan { --edge: rgba(75,214,226,.6); --glow: rgba(75,214,226,.25); }
.colony-violet { --edge: rgba(185,155,255,.65); --glow: rgba(185,155,255,.25); }
.colony-media { position: relative; aspect-ratio: 16 / 10; }
.colony-still { width: 100%; height: 100%; object-fit: cover; }
.colony-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(36,28,82,0) 50%, var(--night-2)); }
.colony-hero {
  position: absolute; z-index: 1; width: 38%; bottom: -18%; height: auto;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.5));
  animation: bob 4s ease-in-out infinite;
}
.colony-cyan .colony-hero { right: 4%; }
.colony-violet .colony-hero { left: 4%; animation-delay: -2s; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
.colony-body { padding: 1.4rem 1.8rem 2rem; position: relative; }
.colony-violet .colony-body { text-align: right; }
.colony h3 { font-size: clamp(2rem, 3.6vw, 2.6rem); }
.colony-cyan h3 { color: var(--cyan); }
.colony-violet h3 { color: var(--violet); }
.emblem { display: inline-flex; align-items: center; gap: .55em; font-size: .9rem; font-weight: 500; color: var(--cream-dim); margin-bottom: .6em; }
.belief { font-size: 1.25rem; font-weight: 500; color: #fff; }
.versus span {
  display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%;
  font-size: 1.6rem; font-weight: 700; color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 60%, #e0a022);
  box-shadow: 0 0 0 4px rgba(255,246,230,.6), 0 0 40px rgba(255,210,77,.5);
}
@media (max-width: 900px) {
  .colony-grid { grid-template-columns: 1fr; }
  .versus { justify-self: center; margin: -.5rem 0; }
  .colony-violet .colony-body { text-align: left; }
}

.wound {
  display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center;
  max-width: 900px; margin: 5rem auto 0; padding: 2rem var(--gutter);
  border-top: 1px solid rgba(255,246,230,.12);
}
.wound-pics { display: flex; }
.wound-pics img { width: 120px; height: auto; filter: saturate(.7) drop-shadow(0 8px 14px rgba(0,0,0,.45)); }
.wound-pics img + img { margin-left: -28px; transform: scaleX(-1); }
.wound h3 { color: var(--gold-soft); }
@media (max-width: 640px) { .wound { grid-template-columns: 1fr; text-align: center; } .wound-pics { justify-content: center; } }

/* Race */
.race { min-height: 90vh; display: grid; align-items: center; padding: 6rem var(--gutter); overflow: hidden; isolation: isolate; }
.race-bg, .race-shade, .choice-bg, .choice-shade, .cta-bg, .cta-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.race-bg, .choice-bg, .cta-bg { object-fit: cover; z-index: -2; }
.race-shade { z-index: -1; background: linear-gradient(90deg, rgba(27,22,64,0) 30%, rgba(27,22,64,.92) 68%), linear-gradient(180deg, var(--night), rgba(27,22,64,0) 20%, rgba(27,22,64,0) 80%, var(--night)); }
.race-inner { max-width: 560px; justify-self: end; margin-right: max(0px, calc((100vw - var(--maxw)) / 2)); }
.rules li {
  position: relative; padding: .9rem 0 .9rem 2.6rem; border-bottom: 1px solid rgba(255,246,230,.12);
}
.rules li::before {
  content: ""; position: absolute; left: 0; top: 1.15rem; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c4, var(--gold) 65%); box-shadow: 0 0 14px rgba(255,210,77,.7);
}
@media (max-width: 800px) {
  .race-shade { background: linear-gradient(180deg, var(--night), rgba(27,22,64,.8) 30%, rgba(27,22,64,.92) 100%); }
  .race-inner { justify-self: start; }
}

/* Jobs: the game's glossy job icons, grouped by what they do */
.jobs { padding: 8rem 0 6rem; background: radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255,210,77,.07), transparent 70%); }
.lead-switch { display: flex; flex-wrap: wrap; gap: .6rem; }
.lead-switch button {
  display: inline-flex; align-items: center; gap: .55em;
  min-height: 46px; padding: .5em 1.2em; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-weight: 500; color: var(--cream);
  background: rgba(255,246,230,.07); box-shadow: inset 0 0 0 2px rgba(255,246,230,.3);
  transition: background-color .2s, box-shadow .2s;
}
.lead-switch button[aria-pressed="true"] { font-weight: 600; background: rgba(255,246,230,.16); }

.job-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
}
@media (max-width: 1000px) { .job-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .job-grid { gap: .8rem; } }
.job {
  --acc: 255, 210, 77;
  position: relative; text-align: center; padding: 1.6rem 1.2rem; border-radius: var(--radius);
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(var(--acc), .16), transparent 70%),
    linear-gradient(180deg, var(--night-3), var(--night-2));
  box-shadow: inset 0 0 0 1.5px rgba(255,246,230,.1), 0 14px 30px rgba(0,0,0,.22);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.job[data-cat="earth"] { --acc: 255, 154, 124; }  /* coral, like the frills */
.job[data-cat="route"] { --acc: 255, 210, 77; }   /* hearth gold */
.job[data-cat="safe"]  { --acc: 75, 214, 226; }   /* cyan */
.job[data-cat="hold"]  { --acc: 185, 155, 255; }  /* violet */
.job:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 2px rgba(var(--acc), .7), 0 22px 44px rgba(0,0,0,.32), 0 0 40px rgba(var(--acc), .18); }
.job-plate { position: relative; width: 132px; height: 132px; margin: 0 auto 1.1rem; display: grid; place-items: center; }
.job-plate::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%; opacity: .8;
  background: radial-gradient(circle at 50% 45%, rgba(var(--acc), .45), rgba(var(--acc), .08) 60%, transparent 72%);
  transition: transform .5s ease, opacity .5s ease;
}
.job-plate::after {
  content: ""; position: absolute; left: 24%; right: 24%; bottom: -4px; height: 12px; border-radius: 50%;
  background: rgba(0,0,0,.4); filter: blur(6px); transition: transform .5s ease, opacity .5s ease;
}
.job-plate img {
  position: relative; z-index: 1; width: 112px; height: 112px; object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.4));
  animation: hover-float 5s ease-in-out infinite;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.job:nth-child(2n) .job-plate img { animation-delay: -1.6s; }
.job:nth-child(3n) .job-plate img { animation-delay: -3.1s; }
.job:hover .job-plate img { transform: translateY(-8px) rotate(-6deg) scale(1.08); }
.job:hover .job-plate::before { transform: scale(1.15); opacity: 1; }
.job:hover .job-plate::after { transform: scaleX(.8); opacity: .6; }
@keyframes hover-float { 50% { translate: 0 -6px; } }
.job-tag {
  display: inline-block; margin: 0 0 .6rem; padding: .2em .8em; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: rgb(var(--acc)); background: rgba(var(--acc), .1); box-shadow: inset 0 0 0 1px rgba(var(--acc), .35);
}
.job h3 { margin-bottom: .3em; }
.job-desc { font-size: .98rem; color: var(--cream-dim); margin: 0; }
@media (max-width: 460px) {
  .job { padding: 1.1rem .7rem 1.2rem; }
  .job-plate { width: 96px; height: 96px; margin-bottom: .7rem; }
  .job-plate img { width: 82px; height: 82px; }
  .job h3 { font-size: 1.1rem; }
  .job-desc { font-size: .9rem; }
}

.gear { max-width: var(--maxw); margin: 4rem auto 0; padding: 0 var(--gutter); }
.gear-title { display: flex; align-items: center; gap: 1rem; font-size: 1rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.gear-title::before, .gear-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,246,230,.28), transparent); }
.gear-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.2rem; }
@media (max-width: 1000px) { .gear-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gear-list { grid-template-columns: 1fr; } }
.gear-item {
  display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border-radius: 18px;
  background: rgba(255,246,230,.04); box-shadow: inset 0 0 0 1.5px rgba(255,246,230,.09);
  transition: background-color .3s ease;
}
.gear-item:hover { background: rgba(255,246,230,.08); }
.gear-item img { width: 60px; height: 60px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.4)); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.gear-item:hover img { transform: rotate(-8deg) scale(1.08); }
.gear-item h4 { margin: 0 0 .1em; font-size: 1.05rem; font-weight: 600; }
.gear-item p { margin: 0; font-size: .92rem; line-height: 1.45; color: var(--cream-dim); }
.gear-item em { font-style: normal; font-weight: 700; color: var(--coral); }
.gear-note { text-align: center; margin: 1.6rem 0 0; font-size: .95rem; color: var(--cream-dim); }


/* Hearth Gate */
.gate {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center;
  max-width: var(--maxw); margin: 0 auto; padding: 6rem var(--gutter);
  --lead: 255, 210, 77;
}
.gate[data-lead="cyan"] { --lead: 75, 214, 226; }
.gate[data-lead="violet"] { --lead: 185, 155, 255; }
.gate-media {
  position: relative; border-radius: calc(var(--radius) + 8px); overflow: hidden; aspect-ratio: 16 / 10;
  box-shadow: 0 0 0 3px rgba(var(--lead), .7), 0 0 80px rgba(var(--lead), .45), 0 30px 60px rgba(0,0,0,.4);
  transition: box-shadow .9s ease;
}
.gate-media img { width: 100%; height: 100%; object-fit: cover; }
.gate-tint {
  position: absolute; inset: 0; mix-blend-mode: color; opacity: 0;
  background: radial-gradient(ellipse 45% 60% at 74% 55%, rgb(var(--lead)) 0%, rgba(var(--lead), .4) 55%, transparent 80%);
  transition: opacity .9s ease, background .9s ease;
}
.gate:not([data-lead="tied"]) .gate-tint { opacity: .9; }
.lead-switch { justify-content: flex-start; margin: 1.5rem 0 .8rem; }
.lead-switch button[data-lead="tied"][aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--gold), 0 0 22px rgba(255,210,77,.35); }
.lead-switch button[data-lead="cyan"][aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--cyan), 0 0 22px rgba(75,214,226,.35); }
.lead-switch button[data-lead="violet"][aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--violet), 0 0 22px rgba(185,155,255,.35); }
.lead-status { font-weight: 500; color: rgb(var(--lead)); transition: color .6s; }
@media (max-width: 900px) { .gate { grid-template-columns: 1fr; } }

/* Worlds */
.worlds { padding: 6rem 0; }
.world-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 34%); gap: 1.2rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem var(--gutter) 1.5rem;
  scrollbar-color: var(--violet-deep) transparent;
}
.world-row:focus-visible { outline-offset: -3px; }
.world { position: relative; scroll-snap-align: center; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: inset 0 0 0 1.5px rgba(255,246,230,.15); }
.world img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.world:hover img { transform: scale(1.07); }
.world::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27,22,64,0) 45%, rgba(27,22,64,.92)); }
.world h3 { position: absolute; z-index: 1; left: 1.2rem; bottom: .9rem; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
@media (max-width: 700px) { .world-row { grid-auto-columns: 82%; } }

/* Choice */
.choice { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 7rem var(--gutter); overflow: hidden; isolation: isolate; }
.choice-shade { z-index: -1; background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(27,22,64,.6), rgba(27,22,64,.9)), linear-gradient(180deg, var(--night), rgba(27,22,64,0) 20%, rgba(27,22,64,0) 80%, var(--night)); }
.choice-inner { max-width: 820px; }
.choice-inner h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.choice-inner > p { font-size: 1.15rem; color: var(--cream-dim); }
.choice-pair { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem 1.4rem; margin-top: 2rem; }
.choice-pair p { margin: 0; }
.choice-a, .choice-b {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 600; padding: .6em 1.1em; border-radius: 18px;
  background: rgba(27,22,64,.6); box-shadow: inset 0 0 0 2px rgba(255,246,230,.25);
}
.choice-b { box-shadow: inset 0 0 0 2px var(--gold), 0 0 40px rgba(255,210,77,.3); color: #fff3c4; }
.choice-or { font-style: italic; color: var(--gold-soft); }

/* Modes */
.modes { padding: 7rem 0 6rem; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.mode {
  --acc: 255, 210, 77;
  position: relative; padding: 2rem 1.8rem 2rem; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(ellipse 90% 60% at 0% 0%, rgba(var(--acc), .14), transparent 65%), linear-gradient(180deg, var(--night-3), var(--night-2));
  box-shadow: inset 0 0 0 1.5px rgba(255,246,230,.1), 0 14px 30px rgba(0,0,0,.22);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.mode:has([data-acc="violet"]) { --acc: 185, 155, 255; }
.mode:has([data-acc="cyan"]) { --acc: 75, 214, 226; }
.mode:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 2px rgba(var(--acc), .65), 0 22px 44px rgba(0,0,0,.32), 0 0 40px rgba(var(--acc), .16); }
.mode-badge {
  position: relative; width: 104px; height: 104px; display: grid; place-items: center; margin-bottom: 1.2rem; border-radius: 30px;
  background: radial-gradient(circle at 50% 40%, rgba(var(--acc), .42), rgba(var(--acc), .1) 70%);
  box-shadow: inset 0 0 0 2px rgba(var(--acc), .5), 0 10px 30px rgba(var(--acc), .18);
}
.mode-badge img { width: 72px; height: 72px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); animation: hover-float 5s ease-in-out infinite; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.mode:nth-child(2) .mode-badge img { animation-delay: -1.7s; }
.mode:nth-child(3) .mode-badge img { animation-delay: -3.3s; }
.mode:hover .mode-badge img { transform: rotate(-8deg) scale(1.1); }
.mode-meta { margin: 0 0 .4rem; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgb(var(--acc)); }
.mode p { color: var(--cream-dim); margin: 0; }
.modes-note { text-align: center; margin: 2.5rem auto 0; padding: 0 var(--gutter); font-weight: 500; color: var(--gold-soft); }

/* ---------- News sign-up ---------- */
.news { padding: 1rem var(--gutter) 6rem; }
.news-card {
  max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: center;
  padding: 2.2rem 2.4rem; border-radius: var(--radius);
  background: radial-gradient(ellipse 70% 90% at 0% 50%, rgba(75,214,226,.18), transparent 70%), linear-gradient(180deg, var(--night-3), var(--night-2));
  box-shadow: inset 0 0 0 2px rgba(255,210,77,.4), 0 18px 40px rgba(0,0,0,.25);
}
.news-pic { width: 100%; height: auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.4)); }
.news h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.news-body > p { color: var(--cream-dim); }
.news-form label { display: block; font-weight: 600; margin-bottom: .35rem; }
.news-row { display: flex; gap: .7rem; flex-wrap: wrap; }
.news-row input {
  flex: 1 1 240px; min-height: 48px; padding: .6rem 1rem; border-radius: 14px; font: inherit; color: var(--cream);
  background: rgba(27,22,64,.75); border: 2px solid rgba(255,246,230,.55);
}
.news-row input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-color: var(--gold); }
.news-row input[aria-invalid="true"] { border-color: var(--coral); }
.news-row .btn { min-height: 48px; }
.news-status { min-height: 1.6em; margin: .6rem 0 .2rem; font-weight: 600; color: var(--gold-soft); }
.news-status.err { color: var(--coral); }
.news-note { font-size: .9rem; color: var(--cream-dim); margin: 0; }
@media (max-width: 680px) { .news-card { grid-template-columns: 1fr; padding: 1.6rem 1.3rem; text-align: left; } .news-pic { width: 130px; } }
.footer-links a { display: inline-block; padding: .35rem .2rem; }

/* ---------- FAQ ---------- */
.faq { padding: 2rem 0 7rem; }
.faq-list { max-width: 820px; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: .8rem; }
.faq-item { border-radius: 18px; background: linear-gradient(180deg, var(--night-3), var(--night-2)); box-shadow: inset 0 0 0 1.5px rgba(255,246,230,.1); }
.faq-item[open] { box-shadow: inset 0 0 0 2px rgba(255,210,77,.45); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; padding: .7rem 1.3rem; border-radius: 18px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; font-size: 1.6rem; line-height: 1; color: var(--gold); }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item h3 { margin: 0; font-size: 1.15rem; font-weight: 600; color: var(--cream); }
.faq-item p { margin: 0; padding: 0 1.3rem 1.2rem; color: var(--cream-dim); }

/* CTA */
.cta { min-height: 90vh; display: grid; place-items: center; text-align: center; padding: 7rem var(--gutter); overflow: hidden; isolation: isolate; }
.cta-bg { animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.08) translate3d(-1%, -1%, 0); } }
.cta-shade { z-index: -1; background: radial-gradient(ellipse 55% 55% at 50% 50%, rgba(27,22,64,.35), rgba(27,22,64,.85)), linear-gradient(180deg, var(--night), rgba(27,22,64,0) 25%); }
.cta-logo { width: min(520px, 80vw); height: auto; margin: 0 auto 1rem; filter: drop-shadow(0 10px 30px rgba(0,0,0,.5)); }
.cta h2 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); font-weight: 600; text-shadow: 0 3px 16px rgba(0,0,0,.8); }

/* Footer */
.site-footer { text-align: center; padding: 3rem var(--gutter) 3.5rem; color: var(--cream-dim); font-size: .95rem; border-top: 1px solid rgba(255,246,230,.1); }
.site-footer img { width: 110px; margin: 0 auto 1rem; opacity: .9; }
.site-footer p { margin: .3em 0; }
.site-footer .footer-tm { font-size: .8rem; max-width: 46rem; margin-inline: auto; }

/* Trailer dialog */
.trailer { width: min(1100px, 94vw); max-height: 94vh; padding: 0; border: 0; border-radius: var(--radius); background: var(--night); color: var(--cream); box-shadow: 0 0 0 2px rgba(255,210,77,.6), 0 40px 120px rgba(0,0,0,.6); overflow: auto; }
.trailer::backdrop { background: rgba(10, 8, 28, .85); backdrop-filter: blur(6px); }
.trailer[open] { animation: pop .35s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.trailer-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .8rem .6rem 1.2rem; }
.trailer-bar h2 { font-size: 1.05rem; font-weight: 600; margin: 0; }
.close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; cursor: pointer; background: rgba(255,246,230,.1); color: var(--cream); }
.close:hover { background: rgba(255,246,230,.2); }
.trailer-tools { display: flex; align-items: center; gap: .5rem; }
.cc { min-height: 44px; padding: 0 .9rem; border: 2px solid rgba(255,246,230,.35); border-radius: 12px; cursor: pointer; background: transparent; color: var(--cream); font: inherit; font-weight: 600; }
.cc:hover { background: rgba(255,246,230,.12); }
.cc[aria-pressed="true"] { background: var(--cream); color: var(--night); border-color: var(--cream); }
.trailer video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.transcript { padding: .8rem 1.2rem 1.2rem; }
.transcript summary { cursor: pointer; font-weight: 500; color: var(--gold); min-height: 44px; display: flex; align-items: center; }
.transcript p { color: var(--cream-dim); font-size: .98rem; margin: .4rem 0 0; }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.job-grid .job:nth-child(4n+2) { transition-delay: .08s; }
.job-grid .job:nth-child(4n+3) { transition-delay: .16s; }
.job-grid .job:nth-child(4n+4) { transition-delay: .24s; }

/* Respect reduced motion: no autoplay drift, flipbooks hold a frame, reveals are instant */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
