:root {
  --bg: #0d0b09;
  --bg-2: #15120e;
  --panel: #1b1712;
  --line: rgba(184, 165, 122, 0.22);
  --stone: #b8a57a;
  --stone-hi: #e6dcc3;
  --text: #ece5d6;
  --muted: #b3a990;
  --ember: #ff7a2e;
  --ember-hi: #ffb15e;
  --steam: #1b2838;
  --steam-hi: #2a475e;
  --radius: 10px;
  --serif: "Cormorant Garamond", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.65 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, .tagline, .pitch, .join p { text-wrap: balance; }
a { color: var(--ember-hi); }
h2 {
  font: 600 clamp(30px, 4vw, 46px)/1.1 var(--serif);
  color: var(--stone-hi);
  margin: 0 0 22px;
  letter-spacing: 0.01em;
}
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }
section { padding: clamp(64px, 9vw, 120px) 0; }
.eyebrow {
  font: 600 13px/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 14px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.hero-bg, .hero-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 30% 40%;
  z-index: -2;
}
.hero-bg img { animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.12) translateX(-1.5%); } }
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 48%, rgba(13, 11, 9, 0.55), rgba(13, 11, 9, 0.15) 70%),
    linear-gradient(to bottom, rgba(13, 11, 9, 0.35), rgba(13, 11, 9, 0) 30%, rgba(13, 11, 9, 0.2) 70%, var(--bg));
}
.hero-inner { padding: 96px 16px 120px; width: min(980px, 100%); }
.logo { margin: 0 auto 18px; width: min(760px, 92%); }
.logo img {
  width: 100%; height: auto;
  mix-blend-mode: screen;
  filter: drop-shadow(0 6px 30px rgba(0, 0, 0, 0.6));
}
.tagline {
  font: italic 600 clamp(22px, 3vw, 32px)/1.25 var(--serif);
  color: var(--stone-hi);
  margin: 0 0 14px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}
.pitch {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--text);
  font-size: clamp(17px, 1.6vw, 20px);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}
.status {
  margin: 26px 0 0;
  font: 600 13px/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; translate: -50% 0;
  width: 26px; height: 42px; border: 2px solid rgba(230, 220, 195, 0.5); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--stone-hi); border-radius: 2px;
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Buttons ---------- */
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  border-radius: 999px;
  font: 600 16px/1 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .nav-btn:focus-visible, .strip button:focus-visible, .video-poster:focus-visible {
  outline: 2px solid var(--ember-hi); outline-offset: 3px;
}
.btn-steam {
  background: linear-gradient(180deg, #ff8a3d, #e2601c);
  color: #1a0d04;
  box-shadow: 0 6px 24px rgba(255, 122, 46, 0.35);
}
.btn-steam:hover { box-shadow: 0 8px 30px rgba(255, 122, 46, 0.5); }
.btn-steam[aria-disabled="true"] {
  background: rgba(27, 23, 18, 0.75);
  color: var(--stone-hi);
  border: 1px solid var(--line);
  box-shadow: none;
  cursor: default;
  backdrop-filter: blur(6px);
}
.btn-steam[aria-disabled="true"]:hover { transform: none; }
.btn-ghost {
  background: rgba(13, 11, 9, 0.45);
  color: var(--stone-hi);
  border: 1px solid rgba(230, 220, 195, 0.35);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--stone-hi); background: rgba(13, 11, 9, 0.65); }
.btn[hidden] { display: none; }

/* ---------- About ---------- */
.about { background: var(--bg); }
.about p { color: var(--text); margin: 0 0 18px; }
.about p:last-child { margin-bottom: 0; }

/* ---------- Gallery ---------- */
.gallery { background: linear-gradient(var(--bg), var(--bg-2)); padding-bottom: clamp(48px, 7vw, 90px); }
.gallery-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.gallery-nav { display: flex; gap: 8px; margin-bottom: 22px; }
.nav-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--panel); color: var(--stone-hi);
  border: 1px solid var(--line);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.nav-btn:hover { border-color: var(--stone); }
.strip {
  list-style: none; margin: 0; padding: 4px max(16px, (100% - 1200px) / 2) 18px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(420px, 82%);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(16px, (100% - 1200px) / 2);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  outline: none;
}
.strip li { scroll-snap-align: start; }
.strip button {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line), 0 12px 30px rgba(0, 0, 0, 0.45);
}
.strip img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.4s ease; }
.strip button:hover img { transform: scale(1.04); }
.strip p { margin: 12px 2px 0; color: var(--muted); font-size: 16px; line-height: 1.4; }

/* ---------- Trailer ---------- */
.trailer { background: var(--bg-2); padding-top: clamp(32px, 5vw, 60px); }
.trailer h2 { text-align: center; }
.video {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(0, 0, 0, 0.6);
}
.video iframe, .video-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { padding: 0; cursor: pointer; background: #000; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.2s ease; }
.video-poster:hover img { opacity: 1; }
.play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 122, 46, 0.92); color: #1a0d04;
  box-shadow: 0 0 0 10px rgba(255, 122, 46, 0.22), 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease;
}
.play svg { width: 40px; height: 40px; margin-left: 5px; }
.video-poster:hover .play { transform: scale(1.06); }
.video-link { text-align: center; margin: 18px 0 0; }
.video-link a { color: var(--stone); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.video-link a:hover { color: var(--stone-hi); }

/* ---------- Features ---------- */
.features { background: linear-gradient(var(--bg-2), var(--bg)); }
.features h2 { text-align: center; margin-bottom: 40px; }
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px;
}
.cards li {
  position: relative;
  padding: 24px 24px 24px 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cards li::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--deep, var(--stone));
  box-shadow: 0 0 18px var(--deep, var(--stone));
}
.cards strong { display: block; font: 700 25px/1.15 var(--serif); font-variant-numeric: lining-nums; color: var(--stone-hi); margin-bottom: 6px; }
.cards span { color: var(--muted); font-size: 16px; }

/* ---------- Join ---------- */
.join { text-align: center; background:
  radial-gradient(ellipse 60% 70% at 50% 100%, rgba(255, 122, 46, 0.12), transparent 70%), var(--bg); }
.join p { color: var(--text); margin: 0 auto 30px; max-width: 600px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; text-align: center; color: var(--muted); font-size: 14px; }
.footer-logo { width: 200px; height: auto; margin: 0 auto 14px; mix-blend-mode: screen; opacity: 0.85; }
.footer p { margin: 4px 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px;
  padding: 16px;
  background: rgba(5, 4, 3, 0.94);
}
.lightbox[hidden] { display: none; }

/* One colour per Deep (00_identity.md 3); Gloam is lifted so it reads on dark. */
.d-ember { --deep: #ff7a2e; }
.d-brine { --deep: #1fa3a0; }
.d-gale { --deep: #9d7bff; }
.d-rime { --deep: #8fd8ff; }
.d-thorn { --deep: #7bc74d; }
.d-gloam { --deep: #8b6bc7; }
.d-stone { --deep: #b8a57a; }
.page-404 { min-height: 100svh; display: grid; place-items: center; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 12px; min-width: 0; }
.lightbox img { max-height: calc(100svh - 110px); width: auto; border-radius: 6px; }
.lightbox figcaption { color: var(--stone-hi); font: 600 20px/1.3 var(--serif); text-align: center; }
.lightbox button {
  background: rgba(27, 23, 18, 0.8); color: var(--stone-hi);
  border: 1px solid var(--line); border-radius: 50%;
  width: 48px; height: 48px; font-size: 28px; line-height: 1; cursor: pointer;
}
.lb-close { position: absolute; top: 16px; right: 16px; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero-inner { padding: 80px 16px 110px; }
  .btn { width: 100%; justify-content: center; }
  .cta { max-width: 360px; margin-inline: auto; }
  .gallery-nav { display: none; }
  .lightbox { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { display: none; }
  .lightbox img { max-height: calc(100svh - 140px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg img, .scroll-cue span { animation: none; }
  .btn, .strip img, .play { transition: none; }
}
