:root {
  --bg: #0d0e0f;
  --bg-warm: #111210;
  --amber: #c8933a;
  --amber-light: #e0a84a;
  --amber-dim: #8a6128;
  --cream: #e8e0d0;
  --cream-dim: #a89f90;
  --white: #f5f0e8;
  --rule: rgba(200,147,58,0.25);
  --serif: 'Playfair Display', Georgia, serif;
  --mono: 'DM Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ─── UTILITY ─── */
.amber { color: var(--amber); }
.dim { color: var(--cream-dim); }
hr.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ─── HERO ─── */
#hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 6vw 8vh;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(200,147,58,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(200,147,58,0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Topographic lines */
#hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 55%;
  height: 100%;
  background-image:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 38px,
      rgba(200,147,58,0.04) 38px,
      rgba(200,147,58,0.04) 39px
    );
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 900;
  line-height: 0.9;
  color: var(--white);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.4s;
}

.hero-name em {
  font-style: italic;
  color: var(--amber);
}

.hero-credential {
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.6s;
}

.hero-hook {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-style: italic;
  color: var(--cream);
  max-width: 680px;
  line-height: 1.5;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.8s;
}

.hero-scroll {
  position: absolute;
  bottom: 3vh;
  right: 6vw;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-dim);
  writing-mode: vertical-rl;
  opacity: 0;
  animation: fadeUp 1s ease forwards 1.2s;
}

.hero-year {
  position: absolute;
  top: 6vh;
  right: 6vw;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--amber-dim);
  opacity: 0;
  animation: fadeIn 1s ease forwards 1s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── SECTION WRAPPER ─── */
section {
  padding: 10vh 6vw;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
  max-width: 200px;
}

/* ─── ROUTE MAP ─── */
#route {
  background: var(--bg-warm);
  max-width: 100%;
  padding: 10vh 6vw;
}

#route > .inner {
  max-width: 1200px;
  margin: 0 auto;
}

.route-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 5rem;
}

@media (max-width: 700px) {
  .route-header { grid-template-columns: 1fr; gap: 2rem; }
}

.route-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
}

.route-desc {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--cream-dim);
  line-height: 1.8;
}

/* SVG Route Map */
.map-container {
  position: relative;
  width: 100%;
  background: #0a0b0a;
  border: 1px solid rgba(200,147,58,0.15);
  border-radius: 2px;
  overflow: hidden;
  padding: 2rem;
}

.map-container svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Elevation profile */
.elevation-container {
  margin-top: 2rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}

.elevation-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-dim);
  margin-bottom: 0.75rem;
}

.elevation-container svg {
  width: 100%;
  height: 80px;
  display: block;
}

/* ─── NUMBERS ─── */
#numbers {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

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

@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-item {
  padding: 3rem 2rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat-item:nth-child(3n) { border-right: none; }
.stat-item:nth-last-child(-n+3) { border-bottom: none; }

@media (max-width: 700px) {
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-last-child(-n+2) { border-bottom: none; }
  .stat-item:nth-last-child(1) { border-bottom: none; }
}

.stat-number {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-unit {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--amber-dim);
  margin-left: 0.25rem;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
  line-height: 1.6;
}

/* ─── STORY ─── */
#story .story-intro {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--white);
  max-width: 800px;
  margin-bottom: 5rem;
  border-left: 3px solid var(--amber);
  padding-left: 2rem;
}

.story-block {
  max-width: 680px;
  margin-bottom: 4rem;
}

.story-block h3 {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.25rem;
}

.story-block p {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--cream);
  line-height: 1.9;
  margin-bottom: 1rem;
}

.story-block p strong {
  color: var(--white);
  font-weight: 500;
}

.story-callout {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-style: italic;
  color: var(--amber-light);
  max-width: 680px;
  margin: 4rem 0;
  line-height: 1.5;
}

/* ─── PROOF ─── */
#proof {
  background: var(--bg-warm);
  max-width: 100%;
  padding: 12vh 6vw;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

#proof > .inner {
  max-width: 1200px;
  margin: 0 auto;
}

.quote-mark {
  font-family: var(--serif);
  font-size: 8rem;
  line-height: 0.5;
  color: var(--amber);
  opacity: 0.3;
  margin-bottom: 2rem;
  display: block;
}

.quote-text {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--white);
  max-width: 900px;
  margin-bottom: 3rem;
}

.quote-text em {
  font-style: italic;
  color: var(--amber-light);
}

.quote-attribution {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  color: var(--cream-dim);
}

.quote-attribution strong {
  color: var(--cream);
  font-weight: 500;
  display: block;
  margin-bottom: 0.3rem;
}

/* Proof stats row */
.proof-stats {
  display: flex;
  gap: 4rem;
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}

.proof-stat {
  flex: 1;
  min-width: 160px;
}

.proof-stat-number {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 0.4rem;
}

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

/* ─── CREDENTIALS ─── */
#credentials .cred-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  max-width: 800px;
}

@media (max-width: 600px) {
  #credentials .cred-grid { grid-template-columns: 1fr; }
}

.cred-item {
  padding: 2rem;
  border: 1px solid var(--rule);
  position: relative;
}

.cred-item::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 40px;
  height: 2px;
  background: var(--amber);
}

.cred-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.cred-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
  line-height: 1.6;
}

/* ─── CONNECT ─── */
#connect {
  border-top: 1px solid var(--rule);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.connect-heading {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  max-width: 600px;
  line-height: 1.2;
}

.connect-sub {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--cream-dim);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.connect-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--amber);
  padding: 1rem 2.5rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.connect-link:hover {
  background: var(--amber-light);
}

.connect-request {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid var(--rule);
  max-width: 560px;
  text-align: left;
}

.connect-request h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}

.connect-request p {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--cream-dim);
  line-height: 1.8;
}

/* ─── FOOTER ─── */
footer {
  padding: 3rem 6vw;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--cream-dim);
}

.footer-links {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber-dim);
}

.footer-links a {
  color: var(--amber);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--amber-light);
}

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── MISSION SPLASH PAGE ─── */
.mission-page {
  min-height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.mission-briefing {
  width: min(82vw, 760px);
  text-align: center;
}

.mission-typewriter-wrap {
  font-family: var(--mono);
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: bold;
  letter-spacing: 0.08em;
  white-space: pre-line;
  line-height: 1.5;
  color: #ff2a2a;
  text-shadow: 0 0 8px rgba(255, 42, 42, 0.8), 0 0 16px rgba(255, 42, 42, 0.5);
  margin-bottom: 2.5rem;
  min-height: 6em;
}

.mission-cursor {
  display: inline-block;
  color: #ff2a2a;
  text-shadow: 0 0 8px rgba(255, 42, 42, 0.8), 0 0 16px rgba(255, 42, 42, 0.5);
  animation: mission-blink 0.8s infinite;
}

@keyframes mission-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.mission-accept-button {
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: bold;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ff2a2a;
  background: transparent;
  border: 2px solid #ff2a2a;
  padding: 0.85rem 2.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 12px rgba(255, 42, 42, 0.4);
}

.mission-accept-button:hover {
  background: rgba(255, 42, 42, 0.1);
  box-shadow: 0 0 20px rgba(255, 42, 42, 0.7);
  color: #ff5555;
}

.mission-accept-button:active {
  transform: scale(0.98);
}

@media (max-width: 600px) {
  .mission-typewriter-wrap {
    font-size: clamp(12px, 1.5vw, 18px);
    min-height: 5.5em;
  }

  .mission-accept-button {
    font-size: clamp(11px, 1.1vw, 14px);
    padding: 0.75rem 2rem;
  }
}

/* ─── MISSION GATEWAY ─── */
.mission-gateway {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: all;
}

.mission-gateway.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mission-gateway-button {
  font-family: var(--mono);
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: bold;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ff2a2a;
  background: transparent;
  border: 2px solid #ff2a2a;
  padding: 0.85rem 2.5rem;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 42, 42, 0.4);
  transition: all 0.3s ease;
}

.mission-gateway-button:hover {
  background: rgba(255, 42, 42, 0.1);
  box-shadow: 0 0 20px rgba(255, 42, 42, 0.7);
  color: #ff5555;
}

.mission-gateway-button:disabled {
  opacity: 0.6;
  cursor: default;
}
