/* ============================================================
   SPATIAL FORECASTING PAGE — launch landing page (Dark Redesign)
   Section-specific styling layered on global_dark.css. Headline serif,
   kicker face, and blues follow the SPEE 2026 booth set.
   ============================================================ */

.sf-page {
  --sf-serif: var(--font-serif);
  --sf-geo: var(--font-geo);
  --sf-blue: var(--blue);      /* booth "bright": kickers, rules */
  --sf-sky: var(--sky);        /* booth accent on dark: tagline */
  --sf-heat: linear-gradient(90deg, #19ae15, #c9b62a, #e8872a, #d4302a);
  --sf-halo: 0 0 28px rgba(11, 14, 22, 0.95), 0 0 10px rgba(11, 14, 22, 0.85);
  overflow-x: clip;
}

/* ============================================================
   HERO — copy left, the 3D render bleeding off the right edge
   ============================================================ */
.sf-hero {
  position: relative;
  padding: 120px 0 112px;
  min-height: 680px;
  overflow: clip;
}

.sf-hero-art {
  position: absolute;
  top: 24px;
  right: 3vw;
  width: min(1240px, 74vw);
  z-index: 0;
  /* The render is feathered on three sides; fade the hard right edge too, now it's on screen. */
  -webkit-mask-image: linear-gradient(to right, #000 80%, transparent);
  mask-image: linear-gradient(to right, #000 80%, transparent);
}
@media screen and (max-width: 1200px) {
  .sf-hero-art { right: -2vw; }
}
.sf-hero-art img,
.sf-hero-art video {
  width: 100%;
  height: auto;
  display: block;
}
.sf-hero-art video { cursor: pointer; }

.sf-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 580px;
}

.sf-kicker {
  font-family: var(--sf-geo);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sf-blue);
  margin: 0 0 var(--space-4);
  text-shadow: var(--sf-halo);
}
.sf-kicker-note {
  margin-left: 1.4em;
  font-size: 11px;
  color: var(--text-muted);
}

.sf-hero-title {
  font-family: var(--sf-serif);
  font-size: clamp(48px, 7.4vw, 92px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 var(--space-4);
  color: #fff;
  text-shadow: var(--sf-halo);
}

.sf-hero-tagline {
  font-family: var(--sf-serif);
  font-size: clamp(26px, 3.1vw, 40px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--sf-sky);
  margin: 0 0 var(--space-5);
  text-shadow: var(--sf-halo);
}

.sf-hero-lede {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--text);
  max-width: 540px;
  margin: 0 0 var(--space-6);
  text-shadow: var(--sf-halo);
}

.sf-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.sf-hero-foot {
  margin: var(--space-6) 0 0;
  padding-top: var(--space-4);
  border-top: 2px solid var(--sf-blue);
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  text-shadow: var(--sf-halo);
}

/* ============================================================
   SECTIONS + TYPE
   ============================================================ */
.sf-section {
  padding: var(--space-9) 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.sf-section-alt {
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface-1) 100%);
}
.sf-section-dark { background: var(--bg); }

.sf-narrow { max-width: 820px; }
.sf-narrow-wide { max-width: 1000px; }

.sf-section-header {
  text-align: center;
  margin-bottom: var(--space-7);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sf-eyebrow {
  display: inline-block;
  font-family: var(--sf-geo);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sf-blue);
  margin-bottom: var(--space-3);
}

.sf-title {
  font-family: var(--sf-serif);
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
  max-width: 820px;
  color: #fff;
}
.sf-split-copy .sf-title,
.sf-platform-copy .sf-title { margin-bottom: var(--space-4); }

.sf-section-lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 680px;
  margin: var(--space-4) 0 0;
}

.sf-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}
.sf-body + .sf-body { margin-top: var(--space-4); }
.sf-body strong { color: var(--text); font-weight: 600; }

.sf-link {
  display: inline-block;
  margin-top: var(--space-5);
  font-weight: 600;
}

/* ============================================================
   FIGURES
   ============================================================ */
.sf-figure { margin: 0; }

.sf-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    0 40px 100px -40px rgba(91, 123, 214, 0.35);
}
.sf-frame img,
.sf-frame video {
  width: 100%;
  height: auto;
  display: block;
}

/* Stacked flat views (section depletion + contest) on one dark panel. */
.sf-frame-pad {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  background: #121416;   /* matches the section views' own background */
}

/* The backtest plot carries its own rounded frame; just add the glow. */
.sf-plot {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(91, 123, 214, 0.22));
}

.sf-caption {
  margin: var(--space-3) 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.sf-caption strong { color: var(--text); font-weight: 600; }

.sf-heat-legend {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: 13px;
  color: var(--text-dim);
}
.sf-heat-bar {
  width: 120px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--sf-heat);
}

.sf-gallery { gap: var(--space-6); }
.sf-gallery .sf-frame { aspect-ratio: 5 / 3; }
.sf-gallery .sf-frame img { height: 100%; object-fit: cover; }

/* ============================================================
   CHART — "Same well, two forecasts" (inline SVG)
   ============================================================ */
.sf-chart-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.sf-chart-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-4);
}
.sf-chart { width: 100%; height: auto; display: block; overflow: visible; }
.sf-chart text { font-family: var(--font); }
.sf-chart-grid { stroke: var(--border); stroke-width: 1; }
.sf-chart-axis { stroke: #56607a; stroke-width: 1.2; }
.sf-chart-axis-label { fill: var(--text-dim); font-size: 12px; }
.sf-chart-dots { fill: #c9d3e8; }
.sf-chart-gap { fill: rgba(224, 70, 143, 0.24); }
.sf-chart-offset { stroke: rgba(201, 211, 232, 0.7); stroke-width: 1.4; stroke-dasharray: 4 3; }
.sf-chart-note { fill: var(--text-muted); font-size: 12px; font-weight: 600; }
.sf-chart-spatial { fill: none; stroke: #6f9bff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sf-chart-standalone { fill: none; stroke: #c9d3e8; stroke-width: 2.4; stroke-dasharray: 6 4; }
.sf-chart-label { font-size: 13px; font-weight: 600; }
.sf-chart-label-std { fill: #c9d3e8; }
.sf-chart-label-sp { fill: #6f9bff; }
.sf-chart-gap-label { fill: #ef5c9f; font-size: 13px; font-weight: 600; }
.sf-chart-leader { stroke: #ef5c9f; stroke-width: 1.2; }
.sf-chart-leader-dot { fill: #ef5c9f; }

/* ============================================================
   PROBLEM — contrast cards
   ============================================================ */
.sf-contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.sf-contrast-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.sf-contrast-card-hl {
  border-color: rgba(58, 134, 255, 0.45);
  background:
    radial-gradient(circle at top right, rgba(58, 134, 255, 0.14) 0%, transparent 65%),
    var(--surface-1);
}

.sf-contrast-label {
  display: block;
  font-family: var(--sf-geo);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.sf-contrast-card-hl .sf-contrast-label { color: var(--sf-blue); }

.sf-contrast-text {
  font-family: var(--sf-serif);
  font-size: clamp(21px, 2.1vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}

/* ============================================================
   THE QUESTION
   ============================================================ */
.sf-question {
  text-align: center;
  max-width: 900px;
  margin: 0 auto var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sf-question-text {
  font-family: var(--sf-serif);
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0;
}
.sf-question-text::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  margin: var(--space-6) auto 0;
  border-radius: 2px;
  background: var(--sf-blue);
}

/* ============================================================
   CARDS + GRIDS
   ============================================================ */
.sf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.sf-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.sf-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.sf-card-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--sf-blue);
  margin-bottom: var(--space-3);
}

.sf-card-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
  color: var(--text);
}

.sf-card-label {
  font-family: var(--sf-geo);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
}

.sf-card-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   CHECKLISTS
   ============================================================ */
.sf-checklist {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.sf-card .sf-checklist { margin-top: 0; }

.sf-checklist li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}
.sf-checklist li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 5px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.sf-checklist-muted li { color: var(--text-muted); }
.sf-checklist-muted li::before { border-color: var(--text-muted); }

/* ============================================================
   SPLIT ROWS (copy + figure)
   ============================================================ */
.sf-split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: center;
  gap: var(--space-8);
}
.sf-split-reverse { grid-template-columns: 7fr 5fr; }
.sf-split-reverse .sf-split-copy { order: 2; }
.sf-split-reverse .sf-figure     { order: 1; }

/* ============================================================
   HOW IT WORKS — mechanism diagram + numbered legend
   ============================================================ */
.sf-mech {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-7);
  align-items: center;
}

/* The diagram is drawn on light paper, as in the handout. */
.sf-mech-diagram {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f2f4f8;
  box-shadow: 0 40px 100px -40px rgba(91, 123, 214, 0.35);
}
.sf-mech-diagram img { width: 100%; height: auto; }

.sf-mech-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.sf-mech-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-4);
}

.sf-mech-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2b3550;
  border: 1px solid #44507a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.sf-mech-title {
  font-size: 17px;
  font-weight: 600;
  margin: 2px 0 var(--space-1);
  color: var(--text);
}
.sf-mech-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   WORKFLOW STEPS + DATA
   ============================================================ */
.sf-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}

.sf-step {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.sf-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(58, 134, 255, 0.14);
  border: 1px solid rgba(58, 134, 255, 0.45);
  color: var(--sf-sky);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.sf-step-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.sf-step-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.sf-data {
  display: grid;
  grid-template-columns: 4fr 5fr 4fr;
  gap: var(--space-4);
  align-items: start;
  margin-top: var(--space-8);
}
.sf-data-intro { padding: var(--space-5) var(--space-5) 0 0; }
.sf-data-title {
  font-family: var(--sf-serif);
  font-size: 28px;
  font-weight: 500;
  color: #fff;
  margin: 0 0 var(--space-3);
}
.sf-data-intro .sf-body { font-size: 15px; }

/* ============================================================
   PART OF OBSIDIAN — stats + quote
   ============================================================ */
.sf-platform {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.sf-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
.sf-stat { display: flex; flex-direction: column; }
.sf-stat-value {
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #75a3ff;
}
.sf-stat-label {
  margin-top: var(--space-2);
  font-size: 15px;
  color: var(--text);
}
.sf-stat-note {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-dim);
}

.sf-quote {
  margin: var(--space-7) 0 0;
  padding-top: var(--space-5);
  border-top: 2px solid var(--sf-blue);
  max-width: 520px;
}
.sf-quote p {
  font-family: var(--sf-serif);
  font-size: 22px;
  line-height: 1.4;
  color: var(--text);
  margin: 0 0 var(--space-3);
}
.sf-quote footer {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   FAQ
   ============================================================ */
.sf-faq {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sf-faq-item {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 180ms var(--ease);
}
.sf-faq-item[open] { border-color: var(--border-strong); }

.sf-faq-q {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-8) var(--space-4) var(--space-5);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.sf-faq-q::-webkit-details-marker { display: none; }
.sf-faq-q::after {
  content: '+';
  position: absolute;
  right: var(--space-5);
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--sf-blue);
  transition: transform 180ms var(--ease);
}
.sf-faq-item[open] .sf-faq-q::after { transform: translateY(-50%) rotate(45deg); }
.sf-faq-q:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.sf-faq-a {
  padding: 0 var(--space-5) var(--space-5);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 1100px) {
  .sf-data { grid-template-columns: 1fr 1fr; }
  .sf-data-intro { grid-column: 1 / -1; padding: 0; }
}

@media screen and (max-width: 1000px) {
  .sf-steps { grid-template-columns: repeat(2, 1fr); }
  .sf-split,
  .sf-split-reverse,
  .sf-mech,
  .sf-platform {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .sf-split-reverse .sf-split-copy { order: 1; }
  .sf-split-reverse .sf-figure     { order: 2; }
}

/* Hero stacks: copy first, then the render full-bleed beneath it. */
@media screen and (max-width: 900px) {
  .sf-hero {
    display: flex;
    flex-direction: column-reverse;
    padding: var(--space-8) 0 var(--space-6);
    min-height: 0;
  }
  .sf-hero-art {
    position: relative;
    top: auto;
    right: auto;
    width: 118%;
    margin: var(--space-2) 0 0 -6%;
  }
}

@media screen and (max-width: 760px) {
  .sf-grid-3,
  .sf-grid-2,
  .sf-contrast,
  .sf-data { grid-template-columns: 1fr; }
}

@media screen and (max-width: 600px) {
  .sf-section { padding: var(--space-7) 0; }
  .sf-steps,
  .sf-stats { grid-template-columns: 1fr; }
  .sf-steps { gap: var(--space-3); }
  .sf-step {
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
  }
  .sf-step-num { grid-row: span 2; margin: 0; }
  .sf-hero-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .sf-hero-actions .btn { justify-content: center; white-space: normal; }
  .sf-card,
  .sf-contrast-card,
  .sf-chart-card { padding: var(--space-5); }
  .sf-kicker-note { display: block; margin: var(--space-2) 0 0; }
}
