/* ============ Tokens ============ */
:root {
  --canvas: #0A1622;
  --canvas-raised: #0E1D2C;
  --grid-line: #1B2B3A;
  --hairline: #1E3040;
  --ink: #E8EEF2;
  --ink-soft: #8A9BA8;
  --accent: #2EC27E;
  --font-display: 'Cabinet Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

/* ============ Fonts (self-hosted) ============ */
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('fonts/CabinetGrotesk-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('fonts/CabinetGrotesk-800.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-400-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-400-latin-ext.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============ Drafting grid layer ============ */
.grid-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 240px 240px, 240px 240px, 48px 48px, 48px 48px;
  opacity: 0.3;
}

main, .footer { position: relative; z-index: 1; }

/* ============ Nav ============ */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 44px);
}

.nav-mark { display: inline-flex; }

.nav-right { display: flex; align-items: center; gap: 22px; }

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--ink); }

.lang-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.lang-opt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  padding: 3px 9px;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.lang-opt.is-active {
  color: var(--canvas);
  background: var(--accent);
}

/* ============ Hero ============ */
.hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 120px clamp(20px, 4vw, 44px) 60px;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.9rem, 7.2vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.line-mask { display: block; overflow: hidden; }
.line { display: block; }

.stamp-row { margin-top: 26px; }

.stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 5px;
  padding: 7px 16px;
  transform: rotate(-2deg);
}

.hero-sub {
  margin-top: 26px;
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.hero-cta-row { margin-top: 36px; }

.cta {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--accent);
  text-decoration: none;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 13px 28px;
  transition: background-color 0.25s ease, color 0.25s ease;
  will-change: transform;
}
.cta:hover { background: var(--accent); color: var(--canvas); }
.cta:active { transform: scale(0.98); }

.cta-solid { background: var(--accent); color: var(--canvas); }
.cta-solid:hover { background: #35D68C; border-color: #35D68C; }

/* Hero photo + dimension frame */
.hero-photo { display: flex; justify-content: center; }

.photo-wrap {
  position: relative;
  width: min(100%, 400px);
  padding: 36px 24px 58px 52px;
}

.photo-wrap::before {
  content: '';
  position: absolute;
  inset: 10% 15% 15% 20%;
  background: radial-gradient(closest-side, #14293D, transparent 72%);
  z-index: 0;
}

.photo-wrap img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(#000 86%, transparent 99%);
  mask-image: linear-gradient(#000 86%, transparent 99%);
}

.dim-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.dim {
  stroke: var(--ink-soft);
  stroke-width: 1;
  fill: none;
  opacity: 0.85;
}

.dim-label {
  position: absolute;
  color: var(--ink-soft);
  z-index: 2;
  white-space: nowrap;
}
.dim-label-w {
  bottom: 2px;
  left: 52%;
  transform: translateX(-50%);
}
.dim-label-h {
  left: 6px;
  top: 50%;
  transform: rotate(180deg) translateX(50%);
  writing-mode: vertical-rl;
}

/* ============ Journey ============ */
.journey {
  padding: clamp(90px, 12vh, 150px) clamp(20px, 4vw, 44px);
  max-width: 1240px;
  margin: 0 auto;
}

.journey-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  letter-spacing: -0.015em;
  margin-bottom: clamp(50px, 8vh, 90px);
}

.journey-track { position: relative; }

.plot-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.plot-path {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
}

.plot-head { fill: var(--accent); }

.station {
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  align-items: center;
  min-height: 230px;
  padding: 34px 0;
}

.station-node {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--ink-soft);
  background: var(--canvas);
  transition: border-color 0.4s ease;
}
.station.is-lit .station-node { border-color: var(--accent); }

.station:nth-of-type(odd) .station-node { transform: translateX(64px); }
.station:nth-of-type(even) .station-node { transform: translateX(-64px); }

.station-body { grid-row: 1; max-width: 400px; }
.station:nth-of-type(odd) .station-body {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}
.station:nth-of-type(even) .station-body {
  grid-column: 3;
  justify-self: start;
}

.glyph {
  width: 42px;
  height: 42px;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  margin-bottom: 14px;
}

.station-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.station-body p {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 12px;
}

.station-label { color: var(--ink-soft); opacity: 0.9; }

/* ============ Today ============ */
.today {
  padding: clamp(110px, 16vh, 190px) clamp(20px, 4vw, 44px);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.today h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.today p {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.today .cta { margin-top: 14px; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px clamp(20px, 4vw, 44px) 40px;
}

.title-block {
  display: grid;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--ink-soft);
}
.title-block span { padding: 6px 14px; }
.title-block span + span { border-top: 1px solid var(--hairline); }

.footer-links { display: flex; gap: 26px; }

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--accent); }

/* ============ Mobile ============ */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 110px;
    gap: 40px;
  }
  .hero-photo { justify-content: flex-start; }
  .photo-wrap { width: min(100%, 320px); }

  .station {
    grid-template-columns: 56px 1fr;
    min-height: 0;
    padding: 30px 0;
  }
  .station-node,
  .station:nth-of-type(odd) .station-node,
  .station:nth-of-type(even) .station-node {
    grid-column: 1;
    transform: none;
  }
  .station-body,
  .station:nth-of-type(odd) .station-body,
  .station:nth-of-type(even) .station-body {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .nav { padding: 16px 20px; }
  .hero-sub { font-size: 1.05rem; }
}
