/* ============================================
   RUN THE ROOM. LANDING PAGE. V3.
   Construction-document design language.
   Locked brand tokens. Smooth section gradients.
   Signature element: scroll-drawn iron margin line.
   ============================================ */

:root {
  --ink: #050505;
  --concrete: #2A2A2C;
  --concrete-lt: #4A4A4D;
  --rebar: #7C7C7E;
  --chalk: #E8E6E1;
  --iron: #E8590C;
  --iron-dark: #B84207;

  /* Gradient transition stops (between Ink and Concrete) */
  --shift-dark: #1A1A1B;
  --shift-mid: #1F1F21;

  --sans: 'Archivo', sans-serif;
  --narrow: 'Archivo Narrow', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --container: 1200px;
  --gutter: 48px;

  /* Margin line geometry (desktop) */
  --margin-w: 64px;
  /* Reserved left rail so the margin line + its labels never overlap content.
     Collapses to the gutter at <=768px where the margin line is hidden. */
  --rail: 152px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ============================================
   FOCUS STATES (keyboard)
   ============================================ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--iron);
  outline-offset: 2px;
}

/* ============================================
   REVEAL STATES (GSAP drives the transitions)
   .reveal  hero load only (opacity + y)
   .stamp   sheet labels + headlines (scale 1.06 -> 1.0)
   .fade    body copy (opacity only, no translate)
   ============================================ */
.reveal { opacity: 0; transform: translateY(24px); will-change: transform, opacity; }
.stamp  { opacity: 0; transform: scale(1.06); transform-origin: left center; will-change: transform, opacity; }
.fade   { opacity: 0; will-change: opacity; }

/* ============================================
   NAV (title block, top)
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--sans);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--chalk);
  text-decoration: none;
}
.slash { color: var(--iron); margin: 0 4px; }

.nav-strip {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--concrete-lt);
}
.nav-cell {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rebar);
  padding: 6px 12px;
  border-right: 1px solid var(--concrete-lt);
  white-space: nowrap;
}
.nav-cell:last-child { border-right: 0; }
.nav-cell-rev { color: var(--chalk); }

/* ============================================
   MARGIN LINE (signature element)
   Fixed full-height SVG. main.js builds + animates.
   ============================================ */
.margin-line {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--margin-w);
  height: 100vh;
  z-index: 40;
  pointer-events: none;
}
.margin-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
/* Ticks are a held scroll-spy: hidden until reached, dim once passed, bright +
   thicker while their section is the active one (set by main.js). */
.margin-svg .ml-tick-group { opacity: 0; transition: opacity 0.35s ease; }
.margin-svg .ml-tick-group.is-passed { opacity: 0.4; }
.margin-svg .ml-tick-group.is-active { opacity: 1; }
.margin-svg .ml-tick { stroke: var(--iron); transition: stroke-width 0.2s ease; }
.margin-svg .ml-tick-group.is-active .ml-tick { stroke-width: 3; }
.margin-svg .ml-label { fill: var(--rebar); transition: fill 0.2s ease; }
.margin-svg .ml-tick-group.is-active .ml-label { fill: var(--iron); }
.margin-svg .ml-dot { opacity: 0; }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px var(--gutter) 120px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink) 80%, var(--shift-dark) 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--concrete) 1px, transparent 1px),
    linear-gradient(90deg, var(--concrete) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 1;
}
/* Drafting grid labels */
.grid-col, .grid-row {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--rebar);
  opacity: 0.3;
}
.grid-col { top: 14px; transform: translateX(-50%); }
.grid-row { right: 16px; transform: translateY(-50%); }

.hero-motion {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Reserved container for future motion graphic, video, Lottie, or WebGL */
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.hero-headline {
  font-family: var(--narrow);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.93;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--chalk);
  margin: 0 auto 36px;
  max-width: 880px;
  text-align: left;
}
.hero-headline .accent { color: var(--iron); }
.hero-sub {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  color: var(--rebar);
  max-width: 720px;
  margin: 0 auto 48px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

/* Hero scroll cue */
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 3;
}
.mono-meta {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rebar);
}
.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, var(--iron) 0%, transparent 100%);
}

/* Oversized outline wordmark above the headline (footer-mark style).
   Scales with the viewport (15vw) so it spans wide but never folds off the side. */
.hero-mark {
  font-family: var(--narrow);
  font-weight: 700;
  font-size: clamp(48px, 15vw, 240px);
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ink);
  -webkit-text-stroke: 1.5px var(--rebar);
  white-space: nowrap;
  /* Size to the text and center with a transform so it stays dead-centered on the
     page even when the wordmark is wider than the hero content column. */
  width: max-content;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 56px;
  user-select: none;
}
.hero-mark .slash { color: var(--iron); -webkit-text-stroke: 0; }

/* ============================================
   BUTTONS
   ============================================ */
.btn-ghost-iron {
  display: inline-block;
  background: transparent;
  color: var(--iron);
  padding: 16px 32px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-decoration: none;
  border: 2px solid var(--iron);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-ghost-iron:hover { background: var(--iron); color: var(--ink); }

.btn-ghost-chalk {
  display: inline-block;
  background: transparent;
  color: var(--chalk);
  padding: 16px 32px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-decoration: none;
  border: 2px solid var(--chalk);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-ghost-chalk:hover { background: var(--chalk); color: var(--ink); }

.btn-iron-solid {
  display: inline-block;
  background: var(--iron);
  color: var(--ink);
  padding: 22px 56px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-decoration: none;
  border: 2px solid var(--iron);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-iron-solid:hover { background: var(--iron-dark); border-color: var(--iron-dark); color: var(--chalk); }

/* ============================================
   SECTIONS (shared) + per-section gradients
   ============================================ */
.section {
  padding: 160px var(--gutter) 160px var(--rail);
  position: relative;
}

#problem {
  background: linear-gradient(180deg, var(--shift-dark) 0%, var(--concrete) 50%, var(--shift-mid) 100%);
}
#math {
  background: linear-gradient(180deg, var(--shift-mid) 0%, var(--ink) 30%, var(--ink) 70%, var(--shift-dark) 100%);
}
#methodology {
  background: linear-gradient(180deg, var(--shift-dark) 0%, var(--concrete) 40%, var(--concrete) 60%, var(--shift-mid) 100%);
}
#transformation {
  background: linear-gradient(180deg, var(--shift-mid) 0%, var(--ink) 35%, var(--ink) 65%, var(--shift-mid) 100%);
}
#about {
  background: linear-gradient(180deg, var(--shift-mid) 0%, var(--concrete) 50%, var(--shift-dark) 100%);
}
#fieldnotes {
  background: linear-gradient(180deg, var(--shift-dark) 0%, var(--ink) 35%, var(--ink) 65%, var(--shift-dark) 100%);
}
#cta {
  background: linear-gradient(180deg, var(--shift-dark) 0%, var(--ink) 100%);
}

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
}

/* Sheet label (iron section eyebrow, no sheet number) */
.sheet-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--iron);
  margin-bottom: 32px;
}
.sheet-label::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--iron);
  flex-shrink: 0;
}

.section-headline {
  font-family: var(--narrow);
  font-weight: 700;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 0.97;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--chalk);
  margin-bottom: 32px;
  max-width: 1000px;
}
.section-lede {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  color: var(--rebar);
  max-width: 720px;
  margin-bottom: 64px;
}

/* ============================================
   FIG. FRAME (Jake portrait, About section)
   ============================================ */
.fig {
  max-width: var(--container);
  margin: 0 auto;
}
.fig-portrait { max-width: 280px; margin: 0; }
.fig-portrait .fig-frame { width: 280px; height: 340px; background: var(--concrete); }

.fig-frame {
  position: relative;
  border: 1px solid var(--concrete-lt);
  background: transparent;
}
.fig-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Corner crop marks */
.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--iron);
}
.corner.tl { top: -1px; left: -1px; border-top: 2px solid var(--iron); border-left: 2px solid var(--iron); }
.corner.tr { top: -1px; right: -1px; border-top: 2px solid var(--iron); border-right: 2px solid var(--iron); }
.corner.bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--iron); border-left: 2px solid var(--iron); }
.corner.br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--iron); border-right: 2px solid var(--iron); }

.fig-caption {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rebar);
  text-align: left;
  margin-top: 16px;
}

/* ============================================
   PROBLEM (single centered column, wide-spaced beats)
   ============================================ */
.problem-body {
  max-width: 1040px;
  margin: 0 auto;
}
.problem-body .section-headline {
  margin-bottom: 3rem;
}
.problem-beat {
  font-family: var(--sans);
  font-size: 21px;
  line-height: 1.6;
  color: var(--chalk);
  margin-bottom: 2.75rem;
}
.problem-beat:last-child { margin-bottom: 0; }

/* ============================================
   THE TRANSFORMATION (body copy block)
   ============================================ */
.transform-body {
  max-width: 760px;
}
.transform-beat {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  color: var(--chalk);
  margin-bottom: 1.75rem;
}
.transform-beat:last-child { margin-bottom: 0; }

/* ============================================
   MATH (horizontal stat cards + count-ups)
   ============================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 24px;
  align-items: stretch;
}
.stat-card {
  background: var(--concrete);
  border: 1px solid var(--concrete-lt);
  border-left: 4px solid var(--iron);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rebar);
  margin-bottom: 20px;
}
.stat-number {
  font-family: var(--narrow);
  font-weight: 700;
  font-size: clamp(64px, 8vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--iron);
  margin-bottom: 24px;
}
.stat-aff { font-size: 0.6em; }
.stat-desc {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--rebar);
  margin-top: auto;
}

/* ============================================
   G-103 METHODOLOGY (schedule table)
   ============================================ */
.schedule-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rebar);
  margin-bottom: 16px;
}
.schedule {
  border: 1px solid var(--concrete-lt);
  background: rgba(5, 5, 5, 0.35);
}
.sch-head, .sch-row {
  display: grid;
  grid-template-columns: 88px 280px 1fr;
}
.sch-head {
  border-bottom: 1px solid var(--concrete-lt);
}
.sch-row {
  border-bottom: 1px solid var(--concrete-lt);
}
.sch-row:last-child { border-bottom: 0; }

.sch-head .sch-h {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rebar);
  padding: 14px 24px;
  border-right: 1px solid var(--concrete-lt);
}
.sch-head .sch-h:last-child { border-right: 0; }

.sch-row .sch-mark,
.sch-row .sch-item,
.sch-row .sch-desc {
  padding: 28px 24px;
  border-right: 1px solid var(--concrete-lt);
}
.sch-row .sch-desc { border-right: 0; }

.sch-row .sch-mark {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--iron);
}
.sch-row .sch-item {
  font-family: var(--narrow);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--chalk);
}
.sch-row .sch-desc {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--chalk);
}

/* ============================================
   G-104 WHO'S TEACHING IT (portrait + bio)
   ============================================ */
#about .section-headline { margin-bottom: 48px; }
.about-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: start;
}
.about-body { max-width: 600px; }
.about-body p {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--chalk);
  margin-bottom: 24px;
}
.about-body p:last-child { margin-bottom: 0; }

/* ============================================
   G-105 CTA
   ============================================ */
.section-cta {
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.section-cta .section-inner { width: 100%; }

.rev-flag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.rev-text {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rebar);
}

.cta-headline {
  font-family: var(--narrow);
  font-weight: 700;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--chalk);
  margin-bottom: 32px;
  max-width: 1000px;
}
.cta-sub {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--rebar);
  max-width: 720px;
  margin-bottom: 56px;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
/* ============================================
   FIELD NOTES (horizontal scroll deck)
   ============================================ */
.deck-controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}
.deck-arrow {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--concrete-lt);
  color: var(--iron);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.deck-arrow:hover:not(:disabled) { border-color: var(--iron); }
.deck-arrow:disabled { opacity: 0.3; cursor: default; }

.deck {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  cursor: grab;
}
.deck::-webkit-scrollbar { display: none; }
.deck.dragging { cursor: grabbing; scroll-snap-type: none; }

.fn-card {
  flex: 0 0 360px;
  width: 360px;
  min-height: 320px;
  scroll-snap-align: start;
  background: var(--chalk);
  color: var(--ink);
  border-left: 6px solid var(--iron);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  user-select: none;
}
.fn-meta {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--iron);
  margin-bottom: 18px;
}
.fn-headline {
  font-family: var(--narrow);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 16px;
}
.fn-excerpt {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Card actions row (Read note button + optional LinkedIn link) */
.fn-actions {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.fn-read {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--iron);
  text-decoration: none;
}
.fn-read:hover { text-decoration: underline; }

/* Hover button that opens the full note in the reader modal */
.fn-expand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--iron);
  background: transparent;
  border: 1px solid var(--iron);
  padding: 9px 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.fn-expand:hover,
.fn-expand:focus-visible { background: var(--iron); color: var(--chalk); }
.fn-expand span { transition: transform 0.2s ease; }
.fn-expand:hover span { transform: translateX(3px); }

/* ============================================
   FIELD NOTE READER MODAL
   ============================================ */
.fn-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.fn-modal.is-open { display: flex; }
.fn-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.82);
}
.fn-modal-panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 84vh;
  overflow-y: auto;
  background: var(--chalk);
  color: var(--ink);
  border-left: 6px solid var(--iron);
  padding: 48px 48px 44px;
  -webkit-overflow-scrolling: touch;
}
.fn-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  color: var(--rebar);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}
.fn-modal-close:hover { color: var(--iron); }
.fn-modal-meta {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--iron);
  margin-bottom: 18px;
}
.fn-modal-title {
  font-family: var(--narrow);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 24px;
}
.fn-modal-body p {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 1.1rem;
}
.fn-modal-body p:last-child { margin-bottom: 0; }
.fn-modal-link {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--iron);
  text-decoration: none;
}
.fn-modal-link:hover { text-decoration: underline; }

.deck-progress {
  margin-top: 28px;
  height: 2px;
  width: 100%;
  background: var(--concrete-lt);
}
.deck-progress-fill {
  height: 100%;
  width: 0;
  background: var(--iron);
}

/* ============================================
   FOOTER (minimal: wordmark + outline mark)
   ============================================ */
.footer {
  background: var(--ink);
  padding: 56px var(--gutter) 0;
  position: relative;
  overflow: hidden;
}
/* Small wordmark sits at the content rail so it clears the margin line. */
.footer-wordmark {
  display: inline-block;
  margin-left: calc(var(--rail) - var(--gutter));
}
/* Oversized outline mark: scales with the viewport (15vw) and is centered on the
   page via a transform, matching the hero mark, so it spans wide and never folds
   off the side. */
.footer-mark {
  font-family: var(--narrow);
  font-weight: 700;
  font-size: clamp(48px, 15vw, 240px);
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ink);
  -webkit-text-stroke: 1px var(--concrete-lt);
  white-space: nowrap;
  width: max-content;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 32px 0 24px;
  user-select: none;
}
.footer-mark .slash { color: var(--iron); -webkit-text-stroke: 0; }
.footer-legal {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rebar);
  text-align: center;
  padding: 8px 0 28px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  :root { --gutter: 32px; --rail: 132px; }
  .section { padding: 120px var(--gutter) 120px var(--rail); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .sch-head, .sch-row { grid-template-columns: 72px 220px 1fr; }
  .about-split { grid-template-columns: 240px 1fr; gap: 40px; }
  .fig-portrait, .fig-portrait .fig-frame { max-width: 240px; width: 240px; }
}

@media (max-width: 768px) {
  /* Margin line is hidden here, so the rail collapses back to the gutter. */
  :root { --gutter: 24px; --rail: 24px; }
  body { font-size: 15px; }

  /* Margin line hidden on mobile */
  .margin-line { display: none; }

  .nav-inner { padding: 14px var(--gutter); }
  .nav-cell-set, .nav-cell-date { display: none; }
  .nav-strip { border-color: var(--concrete-lt); }

  .hero { padding: 120px var(--gutter) 100px; min-height: 100vh; }
  .hero-grid { background-size: 40px 40px; }
  .grid-col, .grid-row { display: none; }
  .hero-headline { margin-bottom: 28px; }
  .hero-sub { font-size: 16px; margin-bottom: 36px; }
  .hero-ctas { flex-direction: column; align-items: stretch; gap: 12px; }
  .btn-ghost-iron, .btn-ghost-chalk { text-align: center; padding: 16px 24px; }

  .section { padding: 96px var(--gutter); }
  .section-headline { margin-bottom: 32px; }
  .section-lede { font-size: 16px; margin-bottom: 48px; }
  .problem-beat { font-size: 16px; margin-bottom: 2.25rem; }
  .about-body p { font-size: 16px; }

  /* Stat cards stack full width */
  .stat-grid { grid-template-columns: 1fr; }

  /* Field Notes deck: native swipe, arrows hidden */
  .deck-controls { display: none; }
  .fn-card { flex-basis: 280px; width: 280px; min-height: 280px; }
  .fn-modal { padding: 16px; }
  .fn-modal-panel { padding: 40px 24px 32px; }

  /* Schedule table collapses to stacked blocks */
  .sch-head { display: none; }
  .sch-row { grid-template-columns: auto 1fr; }
  .sch-row .sch-mark,
  .sch-row .sch-item { padding: 20px 20px 12px; border-right: 0; }
  .sch-row .sch-desc { grid-column: 1 / -1; padding: 0 20px 24px; }

  /* About stacks, portrait first */
  .about-split { grid-template-columns: 1fr; gap: 32px; }
  .fig-portrait, .fig-portrait .fig-frame { max-width: 240px; width: 240px; }

  .btn-iron-solid { padding: 20px 36px; font-size: 14px; width: 100%; text-align: center; }
  .cta-sub { font-size: 16px; margin-bottom: 40px; }

  .hero-mark { margin-bottom: 36px; }
}

@media (max-width: 480px) {
  .sheet-label { font-size: 10px; }
  .stat-label { font-size: 10px; }
  .fig-caption { font-size: 11px; }
}

/* ============================================
   REDUCED MOTION (kill all motion, show all)
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .stamp, .fade { opacity: 1; transform: none; }
  .margin-svg .ml-tick-group,
  .margin-svg .ml-dot { opacity: 1; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
