/* ==========================================================================
   It Runs Fine: site.css
   One shared stylesheet for the whole site. Design language: "Kept by
   firelight": dusk-dark grounds, smoke-warmed surfaces, restrained gold.
   Structure: tokens → base → typography → layout → header/nav → components
   → page sections → footer → motion & accessibility guards.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Grounds & surfaces */
  --bg-0: #0b0906;            /* page ground: brown-black */
  --bg-deep: #140e08;         /* bottom of the page gradient */
  --bg-1: #131009;            /* alternate section band */
  --surface-1: #191309;       /* elevated panel */
  --surface-2: #221a10;       /* higher panel / input hover */
  --ink: #0f0b07;             /* text on gold */

  /* Lines */
  --border: rgba(216, 193, 143, 0.14);
  --border-soft: rgba(216, 193, 143, 0.08);
  --border-gold: rgba(212, 175, 55, 0.38);

  /* Accents */
  --gold: #d4af37;
  --gold-2: #e9cd75;          /* bright gold: links, focus, hover */
  --gold-deep: #8c6b2f;       /* bronze */
  --amber: #e0862e;           /* firelight */
  --ember: #ff9d45;           /* ember cores */
  --green: #5d7050;           /* muted forest */
  --burgundy: #7d3b3b;        /* desaturated burgundy */

  /* Text */
  --text: #e9dfc3;
  --text-2: #b6a67f;
  --text-3: #93865f;

  /* States */
  --focus: #e9cd75;
  --ok: #8ba36f;
  --warn: #d4a13a;
  --err: #cf7a68;

  /* Type */
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "EB Garamond", Georgia, "Times New Roman", serif;
  --fs-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-sm: 0.9rem;
  --fs-xs: 0.8rem;
  --fs-h1: clamp(2.4rem, 1.6rem + 3.4vw, 4.2rem);
  --fs-h2: clamp(1.7rem, 1.4rem + 1.4vw, 2.4rem);
  --fs-h3: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --fs-lead: clamp(1.1rem, 1.02rem + 0.5vw, 1.3rem);

  /* Space scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  --width-content: 72rem;
  --width-prose: 65ch;
  --radius-sm: 4px;
  --radius: 10px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-1: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, 0.55);

  /* Motion */
  --ease: cubic-bezier(0.25, 0.6, 0.3, 1);
  --dur-fast: 160ms;
  --dur: 240ms;
  --dur-slow: 500ms;

  /* Z-layers */
  --z-header: 100;
  --z-overlay: 200;
  --z-skip: 300;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--fs-0);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg-0);
  background-image: linear-gradient(to bottom, var(--bg-0), var(--bg-deep));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Static parchment-smoke grain: replaces the old animated grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 140px 140px;
}

main { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }

::selection { background: rgba(212, 175, 55, 0.28); color: var(--text); }

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text);
  margin: 0 0 var(--space-4);
  letter-spacing: 0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; margin: 0 0 var(--space-2); }

p { margin: 0 0 var(--space-4); max-width: var(--width-prose); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text);
}

.muted { color: var(--text-2); }
.small { font-size: var(--fs-sm); color: var(--text-2); }

a {
  color: var(--gold-2);
  text-decoration: underline;
  text-decoration-color: rgba(233, 205, 117, 0.35);
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease), text-decoration-color var(--dur-fast) var(--ease);
}
a:hover { color: var(--gold-2); text-decoration-color: currentColor; }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.2rem; }
li { margin: var(--space-2) 0; max-width: var(--width-prose); }
li::marker { color: var(--gold-deep); }

strong { color: var(--text); }
em { color: inherit; }

/* Kicker: small-caps label with a forged diamond */
.kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 var(--space-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* --------------------------------------------------------------------------
   4. Layout utilities
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - 3rem, var(--width-content));
  margin-inline: auto;
}

.section { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }
.section-tight { padding-block: clamp(3rem, 6vw, 5rem); }

.band {
  background: var(--bg-1);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

/* Forged divider: a thin gradient line with one diamond */
.forge-divider {
  display: flex;
  align-items: center;
  gap: 0;
  height: 13px;
  margin-block: var(--space-6);
  border: 0;
}
.forge-divider::before,
.forge-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}
.forge-divider span {
  width: 9px;
  height: 9px;
  margin-inline: 12px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.45);
}

.center { text-align: center; }
.center p, .center .kicker { margin-inline: auto; }
.center .kicker { justify-content: center; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: var(--z-skip);
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus-visible { transform: none; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.btn-solid {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  border-color: rgba(0, 0, 0, 0.4);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 244, 200, 0.5);
}
.btn-solid:hover {
  background: linear-gradient(180deg, #f2dd94, var(--gold));
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 244, 200, 0.5);
}
.btn-solid:active { transform: translateY(1px); }

.btn-ghost {
  background: rgba(212, 175, 55, 0.04);
  border-color: var(--border-gold);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
  color: var(--gold-2);
}
.btn-ghost:active { transform: translateY(1px); }

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--gold-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(233, 205, 117, 0.35);
  padding-bottom: 2px;
  transition: border-color var(--dur-fast) var(--ease);
}
.btn-text:hover { border-color: currentColor; }
.btn-text::after { content: "→"; transition: transform var(--dur-fast) var(--ease); }
.btn-text:hover::after { transform: translateX(3px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* --------------------------------------------------------------------------
   6. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  border-bottom: 1px solid var(--border-soft);
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   create a containing block and trap the fixed mobile-nav overlay inside it. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(9, 7, 4, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
  border: 0;
}
.brand img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1.2vw, 1rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 0.65rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-2);
  text-decoration: none;
  position: relative;
  transition: color var(--dur-fast) var(--ease);
}
.site-nav a:not(.btn):hover { color: var(--gold-2); }

/* Current page: gold underline mark */
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.15rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.site-nav .btn { min-height: 2.5rem; padding-block: 0.35rem; }

.nav-toggle {
  display: none;
  position: relative;
  z-index: calc(var(--z-overlay) + 1); /* stays clickable above the open overlay */
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle .bars::before { position: absolute; top: -6px; }
.nav-toggle .bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 859px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    display: none;
    background:
      radial-gradient(60rem 26rem at 50% 118%, rgba(224, 134, 46, 0.14), transparent 65%),
      linear-gradient(to bottom, #0b0906, #110c07);
    padding: 6rem 2rem 3rem;
    overflow-y: auto;
  }
  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
  }
  .site-nav a:not(.btn) {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    padding: 0.5rem 1.25rem;
  }
  .site-nav a[aria-current="page"]::after { left: 1.25rem; right: 1.25rem; }
  .site-nav li.nav-cta { margin-top: var(--space-5); }

  body.nav-locked { overflow: hidden; }
}

/* --------------------------------------------------------------------------
   7. Heroes & atmosphere
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: clip;
  display: grid;
  align-items: center;
  isolation: isolate;
}

.hero-home { min-height: min(46rem, 92svh); padding-block: clamp(4rem, 10vh, 7rem); }
.hero-page { min-height: 24rem; padding-block: clamp(4rem, 9vh, 6.5rem); }

/* Layer 1: fog / dusk sky */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(70rem 42rem at 70% -18%, rgba(93, 112, 80, 0.10), transparent 60%),
    radial-gradient(55rem 30rem at 12% 8%, rgba(125, 59, 59, 0.08), transparent 60%),
    linear-gradient(to bottom, #0a0805, #0e0a06 55%, #17100a);
}

/* Layer 2: firelight from below */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58rem 24rem at 50% 108%, rgba(224, 134, 46, 0.22), rgba(224, 134, 46, 0.06) 45%, transparent 70%),
    radial-gradient(30rem 12rem at 50% 104%, rgba(255, 157, 69, 0.16), transparent 70%);
  animation: fire-breathe 9s ease-in-out infinite alternate;
}

@keyframes fire-breathe {
  from { opacity: 0.85; }
  to   { opacity: 1.15; }
}

/* Ember canvas sits above light, below content */
.embers {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero > .container { position: relative; z-index: 1; }

/* Bottom edge of a hero fades into the page ground */
.hero .hero-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6rem;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg-0));
}

/* Home hero specifics */
.hero-logo {
  width: clamp(240px, 34vw, 430px);
  margin: 0 auto var(--space-5);
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)) drop-shadow(0 2px 18px rgba(212, 175, 55, 0.12));
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem);
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.hero-statement {
  color: var(--text-2);
  font-size: var(--fs-lead);
  max-width: 44ch;
  margin-inline: auto;
}

/* Featured-project ribbon inside the home hero */
.hero-feature {
  margin-top: clamp(2rem, 5vh, 3.5rem);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-soft);
  display: grid;
  justify-items: center;
  gap: var(--space-2);
}
.hero-feature .feature-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--amber);
}
.hero-feature .feature-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 1.2rem + 2.6vw, 2.9rem);
  letter-spacing: 0.12em;
  color: var(--text);
  text-shadow: 0 0 40px rgba(224, 134, 46, 0.35);
}
.hero-feature .feature-line { color: var(--text-2); max-width: 52ch; }
.hero-feature .btn-row { justify-content: center; margin-top: var(--space-4); }

/* Page hero (inner pages) */
.hero-page .kicker { justify-content: flex-start; }
.hero-page h1 { margin-bottom: var(--space-3); }
.hero-page .lead { color: var(--text-2); }

/* Home & Duskward hero backdrop: an original layered dusk/fog/ember study
   (not derived from either game's art, since Duskward has none yet and this
   backdrop is shared by the studio-level home hero too). Declared before
   .hero-rh::before so Red Harvest (which carries both classes) keeps its
   own key-art-derived backdrop via source-order precedence. */
.hero-home::before {
  background:
    linear-gradient(to bottom, rgba(9, 7, 5, 0.5), rgba(11, 9, 6, 0.86) 65%, rgba(11, 9, 6, 0.95)),
    url("/images/dusk-atmosphere.webp") center / cover no-repeat;
}

/* Red Harvest hero backdrop: derived blur of the real key art */
.hero-rh::before {
  background:
    linear-gradient(to bottom, rgba(10, 8, 5, 0.55), rgba(11, 9, 6, 0.92)),
    url("/images/redharvest-backdrop.webp") center / cover no-repeat;
}
.hero-rh .hero-game-logo {
  width: min(85vw, 520px);
  margin: 0 auto var(--space-4);
  filter: drop-shadow(0 10px 34px rgba(0, 0, 0, 0.7));
}

/* Duskward atmosphere panel: pure treatment, no fake screenshots */
.dusk-panel {
  position: relative;
  overflow: clip;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(42rem 18rem at 50% 118%, rgba(224, 134, 46, 0.28), rgba(224, 134, 46, 0.05) 55%, transparent 75%),
    radial-gradient(30rem 16rem at 82% -30%, rgba(93, 112, 80, 0.12), transparent 60%),
    linear-gradient(to bottom, #100c07, #1a1109);
  box-shadow: var(--shadow-2);
  min-height: 18rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3rem);
}
.dusk-panel .dusk-mark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.6rem);
  color: var(--text);
  text-shadow: 0 0 46px rgba(224, 134, 46, 0.4);
  margin: 0;
}
.dusk-panel .dusk-sub {
  margin: var(--space-3) auto 0;
  color: var(--text-2);
  font-style: italic;
  max-width: 38ch;
}

/* --------------------------------------------------------------------------
   8. Content components
   -------------------------------------------------------------------------- */

/* Two-column feature row (media + text) */
.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.feature-row.media-right .row-media { order: 2; }
@media (max-width: 879px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.media-right .row-media { order: 0; }
}

/* Framed media */
.media-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: clip;
  background: var(--surface-1);
  box-shadow: var(--shadow-2);
}
.media-frame img { width: 100%; height: auto; }
.media-frame figcaption {
  padding: 0.65rem 1rem;
  font-size: var(--fs-sm);
  color: var(--text-3);
  border-top: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.25);
}

/* Panel: used only where content is genuinely a unit */
.panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow-1);
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0; margin: var(--space-4) 0 0; list-style: none; }
.chips li {
  margin: 0;
  padding: 0.35rem 0.85rem;
  font-size: var(--fs-sm);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.02);
}

/* Fact list (dl) */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--space-4) var(--space-6);
  margin: var(--space-6) 0 0;
}
.facts div { border-left: 2px solid var(--border-gold); padding-left: var(--space-4); }
.facts dt {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-1);
}
.facts dd { margin: 0; color: var(--text); }

/* Feature grid (Red Harvest pillars) */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.pillar { border-top: 1px solid var(--border); padding-top: var(--space-4); }
.pillar h3 { margin-bottom: var(--space-2); }
.pillar h3::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 0.6rem;
  background: var(--gold-deep);
  transform: rotate(45deg) translateY(-2px);
}
.pillar p { color: var(--text-2); font-size: 1rem; }

/* Timeline */
.timeline {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0 0 0 1.4rem;
  position: relative;
  max-width: var(--width-prose);
}
.timeline::before {
  content: "";
  position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--border-gold), var(--border-soft));
}
.timeline li { position: relative; margin: 0 0 var(--space-5); }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: 0.5em;
  width: 9px; height: 9px;
  background: var(--gold);
  transform: translateX(-4px) rotate(45deg);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}
.timeline .when {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-1);
}
.timeline p { color: var(--text-2); margin: 0; }

/* Devlog entries: one featured (larger, with image) followed by compact
   rows, so a growing list reads with hierarchy instead of identical cards. */
.devlog-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  margin-top: var(--space-7);
}
.devlog-entry {
  border-top: 1px solid var(--border);
  padding-top: var(--space-6);
  display: grid;
  gap: var(--space-3);
}
.devlog-entry:first-child { border-top: 0; padding-top: 0; }
.devlog-entry--featured {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 0;
  padding-top: 0;
}
.devlog-entry--featured h3 { font-size: var(--fs-h3); }
@media (max-width: 779px) {
  .devlog-entry--featured { grid-template-columns: 1fr; }
}
.devlog-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.devlog-meta .devlog-date { color: var(--text-3); }
.devlog-meta .devlog-category { color: var(--gold); }
.devlog-meta .devlog-category::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.5rem;
  background: var(--gold);
  transform: rotate(45deg);
  vertical-align: 1px;
}
.devlog-entry h3 { margin: 0; }
.devlog-entry h3 a { color: inherit; text-decoration: none; }
.devlog-entry h3 a:hover { color: var(--gold-2); }
.devlog-entry p { color: var(--text-2); }

/* Profiles */
.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.profile { display: grid; grid-template-rows: auto 1fr; }
.profile .media-frame { max-width: 21rem; }
.profile .profile-body { padding-top: var(--space-4); }
.profile .role {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-2);
}
.profile .tagline { font-style: italic; color: var(--text-3); margin-bottom: var(--space-3); }
.profile p { color: var(--text-2); font-size: 1rem; }

/* Role listing (careers) */
.role-card { border-top: 1px solid var(--border); padding: var(--space-5) 0; }
.role-card:last-child { border-bottom: 1px solid var(--border); }
.role-card .badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.7rem;
  margin-bottom: var(--space-2);
}
.role-card h3 { margin-bottom: var(--space-2); }
.role-card p { color: var(--text-2); }
.role-card ul { color: var(--text-2); margin-bottom: 0; }

/* FAQ: native details/summary */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent);
  margin-bottom: var(--space-3);
  overflow: clip;
  transition: border-color var(--dur-fast) var(--ease);
}
.faq details[open] { border-color: var(--border-gold); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 1rem 1.25rem;
  min-height: 3rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--gold-2); }
.faq summary .chev {
  margin-left: auto;
  flex: none;
  color: var(--gold);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .faq-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-2);
  border-top: 1px solid var(--border-soft);
}
.faq .faq-body > :first-child { margin-top: var(--space-4); }

/* Notice: quiet callout with a gold rule */
.notice {
  border-left: 3px solid var(--gold);
  background: rgba(212, 175, 55, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
  max-width: var(--width-prose);
}
.notice p { font-size: 1rem; color: var(--text-2); }

/* Community strip */
.community-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  align-items: center;
  margin-top: var(--space-5);
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.social-link img { width: 1.4rem; height: 1.4rem; object-fit: contain; }
.social-link:hover { border-color: var(--border-gold); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   9. Mailing list panel (n8n integration preserved)
   -------------------------------------------------------------------------- */
.mail-panel {
  max-width: 40rem;
  margin: var(--space-7) auto 0;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  overflow: clip;
}
.mail-panel .mail-head {
  padding: var(--space-5) var(--space-6) var(--space-4);
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.18);
}
.mail-panel .mail-head h2,
.mail-panel .mail-head h3 { margin-bottom: var(--space-1); font-size: 1.35rem; }
.mail-panel .mail-head p { color: var(--text-2); font-size: var(--fs-sm); margin: 0 auto; }

.mail-panel form {
  padding: var(--space-5) var(--space-6) var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.mail-panel .field { display: grid; gap: 0.3rem; }
.mail-panel label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mail-panel input[type="text"],
.mail-panel input[type="email"] {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom-jump */
  color: var(--text);
  background: #0e0a07;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease);
}
.mail-panel input:hover { border-color: var(--border-gold); }
.mail-panel input:focus { outline: none; border-color: var(--gold); }
.mail-panel input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.mail-panel .mail-actions {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: var(--space-2);
}
.mail-panel button { width: min(100%, 16rem); }

.mail-status { min-height: 1.4em; margin: 0; font-size: var(--fs-sm); color: var(--text-2); text-align: center; }
.mail-status.is-error { color: var(--err); }
.mail-status.is-ok { color: var(--ok); }

@media (max-width: 540px) {
  .mail-panel form { grid-template-columns: 1fr; }
}

/* Honeypot: hidden from everyone, present for bots */
.hp-field {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   10. Prose pages (privacy)
   -------------------------------------------------------------------------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.5rem; margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-5); }
.prose .box {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-4) 0;
}
.prose dt { font-weight: 700; color: var(--gold-2); margin-top: var(--space-3); }
.prose dd { margin: 0 0 var(--space-3); color: var(--text-2); }
.optout-wrap {
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-width: 34rem;
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(to bottom, var(--bg-1), #0a0805);
  padding: var(--space-8) 0 var(--space-6);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 719px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-grid .footer-brand img { margin-inline: auto; }
  .footer-grid ul { justify-content: center; }
}
.footer-brand img { height: 34px; width: auto; opacity: 0.9; margin-bottom: var(--space-3); }
.footer-brand p { margin: 0 0 var(--space-2); max-width: 34ch; }
@media (max-width: 719px) { .footer-brand p { margin-inline: auto; } }

.site-footer h2 {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-3);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.site-footer ul.inline { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.site-footer a {
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.site-footer a:hover { color: var(--gold-2); }

.footer-legal {
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  justify-content: space-between;
  color: var(--text-3);
}
.footer-legal p { margin: 0; }
.footer-legal a { color: var(--text-3); text-decoration: underline; text-decoration-color: rgba(147, 134, 95, 0.4); }
.footer-legal a:hover { color: var(--gold-2); }

/* --------------------------------------------------------------------------
   12. Reveal animation (JS adds .reveal; CSS keeps content visible without it)
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
/* If JS never runs, nothing gets the .reveal class. Content stays visible. */

/* --------------------------------------------------------------------------
   13. Focus & interaction guards
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn:focus-visible { outline-offset: 2px; }

/* --------------------------------------------------------------------------
   14. Reduced motion: all animation off
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .embers { display: none; }
}

/* --------------------------------------------------------------------------
   15. Editorial micro-typography
   -------------------------------------------------------------------------- */
body {
  /* Oldstyle figures suit Garamond prose; no-op if the font build lacks the feature */
  font-variant-numeric: oldstyle-nums;
  /* Quotes hang into the margin where supported (Safari); harmless elsewhere */
  hanging-punctuation: first allow-end;
}

/* All-caps labels pair better with lining figures */
.kicker,
.timeline .when,
.facts dt,
.badge,
.hero-feature .feature-label {
  font-variant-numeric: lining-nums;
}

/* Gold drop cap for lore and story openings */
.drop-cap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.1em;
  line-height: 0.82;
  padding: 0.08em 0.14em 0 0;
  color: var(--gold);
  text-shadow: 0 0 26px rgba(212, 175, 55, 0.28);
}

/* --------------------------------------------------------------------------
   16. Cross-document view transitions (progressive enhancement:
       browsers without support simply navigate normally)
   -------------------------------------------------------------------------- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 240ms;
  animation-timing-function: var(--ease);
}

/* The header is identical on every page: give it its own snapshot so it
   holds still while page content crossfades beneath it (also avoids the
   sticky-element jump when navigating from a scrolled position). */
.site-header {
  view-transition-name: site-header;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* --------------------------------------------------------------------------
   17. 404 page
   -------------------------------------------------------------------------- */
.notfound { min-height: 60svh; display: grid; place-items: center; text-align: center; }
.notfound .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 60px rgba(212, 175, 55, 0.25);
  margin-bottom: var(--space-3);
}
