/* ─────────────────────────────────────────────
   LANDING PAGE — TACTICAL BLUEPRINT FACADE
   Uses existing main.css variables only.
   ───────────────────────────────────────────── */

.blueprint-page {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.blueprint-page > * {
  position: relative;
  z-index: 1;
}

/* Weathered blueprint paper layer — subtle, tough, not noisy */
.blueprint-page::before,
.blueprint-page::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.blueprint-page::before {
  background:
    radial-gradient(ellipse at 18% 14%, var(--cyan-glow), transparent 34%),
    radial-gradient(ellipse at 86% 22%, var(--gold-glow), transparent 30%),
    radial-gradient(ellipse at 42% 78%, var(--bg-elevated), transparent 48%),
    linear-gradient(90deg, transparent 0%, var(--cyan-glow) 48%, transparent 100%);
  opacity: 0.58;
  mix-blend-mode: screen;
}

.blueprint-page::after {
  background-image:
    repeating-linear-gradient(104deg, transparent 0 26px, var(--border) 27px, transparent 28px),
    repeating-linear-gradient(8deg, transparent 0 52px, var(--border-light) 53px, transparent 54px),
    radial-gradient(circle at 12% 20%, var(--border-light) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 68%, var(--border) 0 1px, transparent 2px);
  background-size: auto, auto, 38px 38px, 54px 54px;
  opacity: 0.16;
  mix-blend-mode: screen;
}

.bp-shell {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
}

.bp-frame {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: inset 0 1px 0 var(--border-light);
}

.bp-frame::before,
.bp-frame::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
  border-color: var(--cyan);
  opacity: 0.65;
}

.bp-frame::before {
  top: var(--space-sm);
  left: var(--space-sm);
  border-top: 1px solid;
  border-left: 1px solid;
}

.bp-frame::after {
  right: var(--space-sm);
  bottom: var(--space-sm);
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.bp-label {
  font-family: var(--font-mono);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.bp-small {
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  line-height: 1.6;
}

.bp-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  width: 100%;
  opacity: 0.55;
}

/* HERO */

.hero {
  min-height: 100vh;
  padding-top: 60px;
  display: flex;
  align-items: stretch;
  position: relative;
}

.hero-canvas {
  width: 100%;
  min-height: calc(100vh - 60px);
  padding: var(--space-xl) 0 var(--space-2xl);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: var(--space-lg);
}

.hero-ruler {
  border-right: 1px solid var(--border);
  padding-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xl);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  opacity: 0.72;
}

.hero-ruler span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: var(--space-xl);
  align-items: center;
  min-height: calc(100vh - 160px);
}

.hero-copy {
  padding: var(--space-xl);
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.hero-kicker::before {
  content: '';
  width: 42px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.7;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4.3rem, 10vw, 9.5rem);
  line-height: 0.82;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  text-shadow: 0 0 24px var(--cyan-glow);
}

.hero-title .top-word {
  display: block;
  font-size: 0.33em;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.hero-title .main-word {
  display: block;
  -webkit-text-stroke: 1px var(--text-muted);
}

.hero-subplate {
  display: inline-flex;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-lg);
  background: var(--gold-glow);
}

.hero-subtitle {
  color: var(--text-secondary);
  max-width: 54ch;
  margin-bottom: var(--space-xl);
  font-family: var(--font-mono);
  font-size: 0.96rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.hero-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: var(--space-md);
  max-width: 520px;
}

.status-plate {
  border: 1px solid var(--border);
  background: var(--cyan-glow);
  padding: var(--space-md);
  position: relative;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.status-plate strong {
  display: block;
  color: var(--cyan);
  margin-top: var(--space-xs);
  font-family: var(--font-mono);
}

.hero-model {
  min-height: 560px;
  padding: var(--space-xl);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.model-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.chart-blueprint {
  flex: 1;
  min-height: 360px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 52%, var(--cyan-glow), transparent 52%),
    linear-gradient(90deg, transparent, var(--cyan-glow), transparent);
}

.chart-blueprint::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.22;
  pointer-events: none;
}

.axis-line,
.level-line,
.measure-line {
  position: absolute;
  background: var(--border-light);
  opacity: 0.55;
}

.axis-line.vertical {
  width: 1px;
  top: 10%;
  bottom: 10%;
  left: 14%;
}

.axis-line.horizontal {
  height: 1px;
  left: 8%;
  right: 8%;
  bottom: 22%;
}

.level-line {
  height: 1px;
  left: 10%;
  right: 8%;
}

.level-line.l1 { top: 25%; }
.level-line.l2 { top: 48%; opacity: 0.35; }
.level-line.l3 { top: 68%; opacity: 0.4; }

.demand-zone {
  position: absolute;
  left: 36%;
  right: 15%;
  bottom: 28%;
  height: 18%;
  border: 1px solid var(--cyan);
  background: var(--cyan-glow);
  opacity: 0.72;
}

.structure-arc {
  position: absolute;
  border: 1px solid var(--cyan);
  background: var(--cyan-glow);
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
}

.structure-arc.a1 { width: 72px; height: 52px; left: 16%; top: 33%; }
.structure-arc.a2 { width: 96px; height: 70px; left: 44%; top: 18%; }
.structure-arc.a3 { width: 76px; height: 56px; right: 12%; top: 30%; }

.swing-line {
  position: absolute;
  left: 10%;
  right: 9%;
  bottom: 25%;
  height: 1px;
  border-top: 1px dashed var(--border-light);
  transform: rotate(-4deg);
  opacity: 0.5;
  transform-origin: left center;
}

.candle-sequence {
  position: absolute;
  inset: 9% 11% 13% 12%;
}

.bp-candle {
  position: absolute;
  left: var(--l);
  bottom: var(--b);
  width: var(--w, 9px);
  height: var(--h);
  background: var(--cyan);
  opacity: 0.82;
  box-shadow: 0 0 16px var(--cyan-glow);
}

.bp-candle::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  background: var(--border-light);
  transform: translateX(-50%);
  top: var(--wt, -14px);
  bottom: var(--wb, -14px);
  opacity: 0.8;
}

.bp-candle.down {
  background: transparent;
  border: 1px solid var(--cyan);
  box-shadow: none;
}

.bp-candle.c1  { --l: 5%;  --b: 38%; --h: 18%; --wt: -11px; --wb: -8px; }
.bp-candle.c2  { --l: 9%;  --b: 43%; --h: 26%; --wt: -18px; --wb: -11px; }
.bp-candle.c3  { --l: 13%; --b: 48%; --h: 20%; --wt: -9px;  --wb: -16px; }
.bp-candle.c4  { --l: 17%; --b: 36%; --h: 31%; --wt: -20px; --wb: -10px; }
.bp-candle.c5  { --l: 22%; --b: 31%; --h: 16%; --wt: -8px;  --wb: -18px; }
.bp-candle.c6  { --l: 27%; --b: 27%; --h: 21%; --wt: -13px; --wb: -12px; }
.bp-candle.c7  { --l: 33%; --b: 32%; --h: 28%; --wt: -10px; --wb: -10px; }
.bp-candle.c8  { --l: 38%; --b: 41%; --h: 34%; --w: 10px; --wt: -16px; --wb: -13px; }
.bp-candle.c9  { --l: 43%; --b: 50%; --h: 24%; --wt: -12px; --wb: -21px; }
.bp-candle.c10 { --l: 48%; --b: 45%; --h: 20%; --wt: -9px;  --wb: -13px; }
.bp-candle.c11 { --l: 53%; --b: 38%; --h: 35%; --w: 10px; --wt: -18px; --wb: -10px; }
.bp-candle.c12 { --l: 58%; --b: 28%; --h: 30%; --wt: -14px; --wb: -22px; }
.bp-candle.c13 { --l: 63%; --b: 23%; --h: 22%; --wt: -11px; --wb: -16px; }
.bp-candle.c14 { --l: 68%; --b: 30%; --h: 28%; --wt: -15px; --wb: -9px; }
.bp-candle.c15 { --l: 72%; --b: 40%; --h: 34%; --w: 10px; --wt: -18px; --wb: -13px; }
.bp-candle.c16 { --l: 77%; --b: 52%; --h: 22%; --wt: -9px;  --wb: -18px; }
.bp-candle.c17 { --l: 82%; --b: 44%; --h: 27%; --wt: -14px; --wb: -11px; }
.bp-candle.c18 { --l: 86%; --b: 34%; --h: 35%; --w: 10px; --wt: -26px; --wb: -12px; }

.model-note {
  position: absolute;
  font-family: var(--font-mono);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  line-height: 1.45;
  opacity: 0.9;
}

.model-note.n1 { top: 24%; right: 7%; }
.model-note.n2 { top: 48%; right: 6%; color: var(--gold); }
.model-note.n3 { bottom: 12%; left: 33%; }

.model-angle { display: none; }

.model-footer {
  margin-top: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-md);
  align-items: end;
}

.gold-callout {
  border: 1px solid var(--gold);
  background: var(--gold-glow);
  padding: var(--space-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* STATS */

.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-item {
  padding: var(--space-lg);
  border-right: 1px solid var(--border);
  text-align: center;
}

.stat-item:last-child {
  border-right: 0;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

/* COURSE INDEX */

.course-index-section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.index-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--space-lg);
  align-items: start;
}

.section-header-plate {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.section-tag {
  font-family: var(--font-mono);
  color: var(--bg);
  background: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
  padding: 2px 6px;
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.section-header-plate h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--text-primary);
}

.section-header-plate .bp-rule {
  align-self: center;
}

.module-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-group-heading {
  margin: var(--space-lg) 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}

.module-group-heading:first-child {
  margin-top: 0;
}

.module-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 150px 90px 42px;
  align-items: stretch;
  min-height: 76px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  transition: all var(--transition);
  overflow: hidden;
}

.module-row::before,
.module-row::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--cyan);
  opacity: 0.55;
}

.module-row::before {
  left: 5px;
  top: 5px;
  border-left: 1px solid;
  border-top: 1px solid;
}

.module-row::after {
  right: 5px;
  bottom: 5px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.module-row:hover {
  border-color: var(--cyan);
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.module-row.completed {
  border-color: var(--green-dark);
}

.module-row.featured {
  border-color: var(--gold);
  background: var(--gold-glow);
}

.module-cell {
  padding: var(--space-md);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.module-cell:last-child {
  border-right: 0;
}

/* Planned rows have no Grade cell; keep the arrow cell in the last column */
.module-row--planned .module-arrow {
  grid-column: -2 / -1;
}

.module-num {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 2rem;
  line-height: 1;
  text-align: center;
  align-items: center;
}

.module-row.featured .module-num {
  color: var(--gold);
}

.module-title {
  font-family: var(--font-display);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.module-desc {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.module-status-label,
.module-grade-label {
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.66rem;
  margin-bottom: var(--space-xs);
}

.module-status-value {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.module-row.completed .module-status-value {
  color: var(--green);
}

.module-row.featured .module-status-value {
  color: var(--gold);
}

.module-grade-value {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 1.15rem;
}

.module-row.completed .module-grade-value {
  color: var(--green);
}

.module-arrow {
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 1.15rem;
}

.side-panels {
  display: grid;
  gap: var(--space-md);
}

.side-panel {
  padding: var(--space-lg);
  min-height: 150px;
}

.field-note {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.65;
  font-style: italic;
}

.legend-list {
  list-style: none;
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.legend-list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}

.legend-mark {
  width: 12px;
  height: 12px;
  border: 1px solid var(--cyan);
  background: var(--cyan-glow);
}

.legend-mark.gold {
  border-color: var(--gold);
  background: var(--gold-glow);
}

.legend-mark.green {
  border-color: var(--green);
  background: var(--green-glow);
}

/* GENERAL SECTIONS */

.learn-grid,
.setups-grid {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.learn-grid {
  grid-template-columns: repeat(3, 1fr);
}

.setups-grid {
  grid-template-columns: repeat(4, 1fr);
}

.learn-card,
.setup-card,
.philosophy {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 var(--border-light);
}

.learn-card::before,
.setup-card::before,
.philosophy::before {
  content: '';
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  width: 16px;
  height: 16px;
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
  opacity: 0.45;
}

.learn-card:hover,
.setup-card:hover {
  border-color: var(--cyan);
  background: var(--bg-elevated);
}

.learn-icon {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.learn-title,
.setup-card-name {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.learn-desc,
.setup-card-type {
  color: var(--text-secondary);
  max-width: 100%;
}

.setup-card-num {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.72rem;
  margin-bottom: var(--space-sm);
}

.philosophy {
  text-align: center;
  padding: var(--space-2xl);
}

.philosophy-quote {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(1.3rem, 3vw, 2rem);
  line-height: 1.25;
}

.philosophy-quote .highlight {
  color: var(--gold);
}

.cta-section {
  text-align: center;
  padding: var(--space-3xl) 0;
}

@media (max-width: 980px) {
  .hero-main,
  .index-layout {
    grid-template-columns: 1fr;
  }

  .hero-model {
    min-height: 460px;
  }

  .module-row {
    grid-template-columns: 72px minmax(0, 1fr) 42px;
  }

  .module-status,
  .module-grade {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-canvas {
    grid-template-columns: 1fr;
    padding-top: var(--space-lg);
  }

  .hero-ruler {
    display: none;
  }

  .hero-copy {
    padding: var(--space-lg) 0;
  }

  .hero-title {
    font-size: clamp(3.6rem, 16vw, 6rem);
  }

  .hero-model {
    min-height: 390px;
    padding: var(--space-md);
  }

  .chart-blueprint {
    min-height: 280px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(2) {
    border-right: 0;
  }

  .section-header-plate {
    grid-template-columns: 1fr;
  }

  .learn-grid,
  .setups-grid {
    grid-template-columns: 1fr;
  }

  .hero-status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .module-row {
    grid-template-columns: 58px minmax(0, 1fr) 34px;
    min-height: 84px;
  }

  .module-cell {
    padding: var(--space-sm);
  }

  .module-num {
    font-size: 1.35rem;
  }

  .module-title {
    font-size: 0.92rem;
  }

  .module-desc {
    font-size: 0.68rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Hamburger z-index fix ── */
#nav-hamburger { position: relative; z-index: 200; }
#nav-mobile-menu { z-index: 200 !important; }
