/* ============================================================
   South Foundry Systems — flagship landing (Industrial base)
   Tokens per SFW_Fable5_Cinematic_Web_Build_Guide.md Part C.
   Provisional until the brand reference locks exact hexes.
   ============================================================ */

:root {
  --void:        #080F1A;
  --surface:     #0D1829;
  --mid:         #162035;
  --gold:        #B89154;
  --gold-bright: #D8A24A;
  --paper:       #F5F1E8;
  --ink:         rgba(245, 241, 232, 0.92);
  --muted:       rgba(245, 241, 232, 0.5);
  --faint:       rgba(245, 241, 232, 0.28);
  --hairline:    rgba(184, 145, 84, 0.22);
  --hairline-lt: rgba(184, 145, 84, 0.12);
  --card:        rgba(13, 24, 41, 0.78);
  --gold-ink:    #171006;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body:    'DM Sans', 'Segoe UI', sans-serif;
  --nav-h: 68px;
  --max: 1180px;
  --pad: clamp(20px, 5vw, 48px);
}

/* Lux variant scaffold (unused on this page; flip data-theme on <html>
   for /lux/* surfaces so the same codebase reskins). */
[data-theme="lux"] {
  --void:    #171320;
  --surface: #201A2B;
  --mid:     #2A2237;
  --card:    rgba(32, 26, 43, 0.78);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, canvas { max-width: 100%; display: block; }

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--paper); }

::selection { background: var(--gold); color: var(--gold-ink); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold-bright); color: var(--gold-ink);
  padding: 10px 18px; z-index: 300; font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

/* ------------------------------------------------------------
   THE FORGE STAGE — fixed cinematic layer behind everything
   ------------------------------------------------------------ */

#forge-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--void);
  overflow: hidden;
  transition: opacity 0.7s ease;
}

#forge-poster,
#forge-canvas,
#forge-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#forge-poster { z-index: 1; opacity: 1; transition: opacity 0.6s ease; }
#forge-canvas { z-index: 2; opacity: 0; transition: opacity 0.6s ease; }
#forge-loop   { z-index: 2; opacity: 0; display: none; }

/* canvas fades in once the engine draws its first frame */
.forge-on #forge-canvas { opacity: 1; }
.forge-on #forge-poster { opacity: 0; }

/* mobile ambient loop */
.loop-on #forge-loop { display: block; opacity: 1; transition: opacity 0.6s ease; }
.loop-on #forge-poster { opacity: 0; }

/* legibility scrim over the footage */
#forge-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(8, 15, 26, 0.55) 0%, rgba(8, 15, 26, 0.1) 55%, rgba(8, 15, 26, 0) 100%),
    linear-gradient(180deg, rgba(8, 15, 26, 0.62) 0%, rgba(8, 15, 26, 0.12) 26%, rgba(8, 15, 26, 0.14) 70%, rgba(8, 15, 26, 0.78) 100%);
  pointer-events: none;
}

/* once the scrub completes, the stage settles back */
.past-forge #forge-stage { opacity: 0.35; }

/* reduced motion / data saver: static poster only */
.motion-off #forge-canvas, .motion-off #forge-loop { display: none; }
.motion-off #forge-poster { opacity: 1; }

/* ------------------------------------------------------------
   NAV
   ------------------------------------------------------------ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--pad);
  background: linear-gradient(180deg, rgba(8, 15, 26, 0.72), rgba(8, 15, 26, 0));
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(8, 15, 26, 0.96);
  border-bottom-color: var(--hairline-lt);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  min-width: 0;
}
.brand:hover { color: var(--paper); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { line-height: 1.15; white-space: nowrap; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand-name span { color: var(--gold-bright); }
.brand-sub {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--gold-bright); }

/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--gold-ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); color: var(--gold-ink); }
.btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  clip-path: none;
}
.btn-ghost:hover { background: rgba(184, 145, 84, 0.12); color: var(--gold-bright); }

.btn-sm { min-height: 44px; padding: 0 22px; font-size: 12.5px; }

/* ------------------------------------------------------------
   LAYOUT PRIMITIVES
   ------------------------------------------------------------ */

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

.section {
  position: relative;
  padding: clamp(84px, 12vh, 150px) var(--pad);
}
.wrap { max-width: var(--max); margin: 0 auto; }

/* sections that ride over the forge footage */
.over-forge { background: transparent; }

/* sections with solid ground */
.solid {
  background: var(--void);
  border-top: 1px solid var(--hairline-lt);
}
.solid-alt { background: var(--surface); }

.stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 26px;
}
.stage-chip::before {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--gold);
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--paper);
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(42px, 7.2vw, 92px);
  font-weight: 600;
}
.h-section {
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 600;
  margin-bottom: 20px;
}
.h-card {
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 640px;
}
.lede strong, p strong { color: var(--ink); font-weight: 600; }

.gold { color: var(--gold-bright); }

/* ------------------------------------------------------------
   HERO — Stage 01, over the pour
   ------------------------------------------------------------ */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 110px;
}
.hero .wrap { width: 100%; }

.hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.hero-eyebrow b { color: var(--gold-bright); font-weight: 600; }

.hero h1 {
  max-width: 900px;
  margin-bottom: 26px;
  text-shadow: 0 2px 34px rgba(8, 15, 26, 0.75);
}
.hero .lede {
  margin-bottom: 40px;
  text-shadow: 0 1px 18px rgba(8, 15, 26, 0.8);
}

.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.cred {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline-lt);
  max-width: 640px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
  text-transform: uppercase;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.scroll-cue svg { width: 16px; height: 16px; }
.js:not(.motion-off) .scroll-cue svg { animation: cue 2.2s ease-in-out infinite; }
@keyframes cue {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50%      { transform: translateY(7px); opacity: 1; }
}

/* ------------------------------------------------------------
   LEAKS — Stage 02, the metal gets worked
   ------------------------------------------------------------ */

.leaks-head { max-width: 760px; margin-bottom: 56px; }

.leak-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.leak {
  background: var(--card);
  border: 1px solid rgba(184, 145, 84, 0.16);
  padding: 30px 30px 34px;
  position: relative;
}
.leak-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.18em;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.leak-num::after { content: ""; height: 1px; flex: 1; background: var(--hairline); }
.leak p { color: var(--muted); font-size: 15.5px; }

.leaks-close {
  margin-top: 60px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--paper);
  line-height: 1.2;
  max-width: 800px;
  text-shadow: 0 2px 28px rgba(8, 15, 26, 0.75);
}
.leaks-close em { font-style: normal; color: var(--gold-bright); }

/* ------------------------------------------------------------
   SPRINT — Stage 03, the shape
   ------------------------------------------------------------ */

.sprint-head { max-width: 760px; margin-bottom: 64px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  background: var(--card);
  border: 1px solid rgba(184, 145, 84, 0.16);
  border-top: 2px solid var(--gold);
  padding: 30px;
}
.step-k {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 14px;
}
.step p { color: var(--muted); font-size: 15.5px; }

.price-note {
  margin-top: 44px;
  padding: 24px 28px;
  border: 1px solid var(--hairline);
  background: rgba(8, 15, 26, 0.6);
  max-width: 760px;
  color: var(--ink);
  font-size: 16px;
}
.price-note b { color: var(--gold-bright); }

/* ------------------------------------------------------------
   WEDGE + DEMO — Stage 04, the part
   ------------------------------------------------------------ */

.wedge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.agent-points { list-style: none; margin-top: 34px; display: grid; gap: 18px; }
.agent-points li {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 16px;
}
.agent-points .tick {
  flex: none;
  width: 26px; height: 26px;
  margin-top: 2px;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
}
.agent-points b { color: var(--ink); font-weight: 600; }

.demo-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.demo-visual { position: relative; aspect-ratio: 5 / 2.4; overflow: hidden; }
.demo-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.demo-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13, 24, 41, 0) 30%, var(--surface) 100%);
}
.demo-body { padding: 30px; }
.demo-body h3 { margin-bottom: 12px; }
.demo-body > p { color: var(--muted); font-size: 15.5px; margin-bottom: 22px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%;
  background: var(--mid);
  border: 1px solid rgba(184, 145, 84, 0.18);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 13px 14px;
  transition: border-color 0.15s ease;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold-bright);
}

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-status {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--gold);
  background: rgba(184, 145, 84, 0.1);
  color: var(--ink);
  font-size: 15px;
}
.form-status.err { border-color: rgba(216, 90, 74, 0.6); background: rgba(216, 90, 74, 0.08); }

.privacy-line {
  margin-top: 18px;
  font-size: 13px;
  color: var(--faint);
  line-height: 1.6;
}

/* ------------------------------------------------------------
   HOW IT RUNS + SYSTEM CARE — Stage 05
   ------------------------------------------------------------ */

.runs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.rail { list-style: none; margin-top: 38px; position: relative; }
.rail::before {
  content: "";
  position: absolute;
  left: 12px; top: 10px; bottom: 10px;
  width: 1px;
  background: var(--hairline);
}
.rail li {
  position: relative;
  padding: 0 0 26px 44px;
  color: var(--muted);
  font-size: 16px;
}
.rail li:last-child { padding-bottom: 0; }
.rail li::before {
  content: "";
  position: absolute;
  left: 8px; top: 8px;
  width: 9px; height: 9px;
  background: var(--gold-bright);
  transform: rotate(45deg);
}
.rail b { color: var(--ink); font-weight: 600; }

.care-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.care-visual { position: relative; aspect-ratio: 5 / 2.6; overflow: hidden; }
.care-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.care-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13, 24, 41, 0) 30%, var(--surface) 100%);
}
.care-body { padding: 30px; }
.care-body h3 { margin-bottom: 12px; }
.care-body p { color: var(--muted); font-size: 15.5px; }
.care-body p + p { margin-top: 14px; }
.care-tag {
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-bright);
  border: 1px solid var(--hairline);
  padding: 6px 12px;
}

/* ------------------------------------------------------------
   PROOF + FAQ — Stage 06
   ------------------------------------------------------------ */

.proof-wrap { position: relative; }
.proof-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.proof-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.2;
}
.proof-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--void) 0%, rgba(8, 15, 26, 0.35) 50%, var(--void) 100%);
}
.proof-inner { position: relative; z-index: 1; }

.proof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 48px;
}
.proof-card {
  background: var(--card);
  border: 1px solid rgba(184, 145, 84, 0.16);
  padding: 32px;
}
.proof-card h3 { margin-bottom: 12px; }
.proof-card p { color: var(--muted); font-size: 15.5px; }
.proof-card p + p { margin-top: 12px; }

.placeholder-chip {
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px dashed rgba(245, 241, 232, 0.3);
  padding: 6px 12px;
}
.proof-card.reserved { border-style: dashed; background: rgba(13, 24, 41, 0.5); }

.faq { margin-top: 84px; max-width: 860px; }
.faq h2 { margin-bottom: 28px; }
.faq details { border-top: 1px solid var(--hairline-lt); }
.faq details:last-child { border-bottom: 1px solid var(--hairline-lt); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--paper);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold-bright);
  flex: none;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 4px 24px; color: var(--muted); font-size: 15.5px; max-width: 720px; }

/* ------------------------------------------------------------
   FINAL CTA — Stage 07
   ------------------------------------------------------------ */

.book-head { max-width: 700px; margin-bottom: 44px; }

.cal-shell {
  background: var(--surface);
  border: 1px solid var(--hairline);
  min-height: 560px;
  position: relative;
}
#cal-inline { width: 100%; height: 640px; overflow: auto; }
.cal-fallback {
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline-lt);
  color: var(--muted);
  font-size: 15px;
}

.book-alt { margin-top: 22px; color: var(--faint); font-size: 14.5px; }
.book-alt a { color: var(--gold-bright); }

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */

footer {
  position: relative;
  z-index: 1;
  background: #060B13;
  border-top: 1px solid var(--hairline-lt);
  padding: 56px var(--pad) 40px;
}
.foot-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}
.foot-brand .brand-name { font-size: 17px; }
.foot-tag {
  margin-top: 12px;
  color: var(--gold-bright);
  font-size: 15px;
}
.foot-meta { margin-top: 14px; color: var(--muted); font-size: 14px; }
.foot-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--gold-bright); }
.foot-legal {
  max-width: var(--max);
  margin: 44px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(245, 241, 232, 0.07);
  color: var(--faint);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   REVEALS — fail safe: visible by default, JS opts elements in
   ------------------------------------------------------------ */

.js:not(.motion-off) [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js:not(.motion-off) [data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scroll-cue svg { animation: none !important; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 980px) {
  .wedge-grid, .runs-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  #forge-canvas { display: none; }
  .btn-sm { min-height: 52px; }
  .leak-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-links { flex-direction: row; flex-wrap: wrap; gap: 14px 20px; }
  .hero { padding-bottom: 90px; }
  .cred { margin-top: 42px; }
}

@media (max-width: 420px) {
  .cta-row .btn { width: 100%; }
  .brand-sub { display: none; }
  #cal-inline { height: 580px; }
}
