:root {
  color-scheme: dark;
  --ink: #020306;
  --paper: #f4f2ea;
  --muted: rgba(244, 242, 234, 0.68);
  --line: rgba(244, 242, 234, 0.16);
  --blue: #526dff;
  --blue-bright: #8da0ff;
  --display: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
}

body {
  min-height: 100svh;
  color: var(--paper);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

body.climb-home { overflow-x: hidden; }

a,
button,
input { font: inherit; }

a { color: inherit; }
button { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

.terrain {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 82% 10%, rgba(75, 101, 255, 0.08), transparent 24%),
    var(--ink);
}

#terrain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.edge,
.story-node,
.summit-copy,
.position-note {
  position: absolute;
  z-index: 8;
}

.edge {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.edge a,
.edge button {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
  transition: color 160ms ease;
}

.edge button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  letter-spacing: inherit;
  text-transform: inherit;
}

.edge a:hover,
.edge a:focus-visible,
.edge button:hover,
.edge button:focus-visible {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--blue-bright);
  text-underline-offset: 6px;
}

.top-nav a[aria-current="page"] {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--blue-bright);
  text-underline-offset: 6px;
}

.brand {
  top: 12px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible { text-decoration: none; }

.top-nav {
  top: 12px;
  right: 28px;
  display: flex;
  gap: clamp(18px, 2.4vw, 38px);
}

.top-nav button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  letter-spacing: inherit;
  text-transform: inherit;
}

.bottom-left {
  left: 26px;
  bottom: 8px;
  display: flex;
  gap: 28px;
}

.bottom-right {
  right: 28px;
  bottom: 8px;
}

.story-node {
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  text-decoration: none;
}

.node-pip {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 1px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 5px rgba(244, 242, 234, 0.1);
  transform: translate(-50%, -50%);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.story-node:hover .node-pip,
.story-node:focus-visible .node-pip {
  background: var(--blue);
  box-shadow: 0 0 0 7px rgba(82, 109, 255, 0.2), 0 0 28px rgba(82, 109, 255, 0.7);
}

.node-title,
.node-detail {
  position: absolute;
  left: 34px;
  width: max-content;
  max-width: 260px;
  text-align: left;
  text-transform: uppercase;
}

.node-title {
  top: 9px;
  color: var(--paper);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.14em;
}

.node-title small {
  display: block;
  color: var(--blue-bright);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.node-detail {
  top: 48px;
  width: 250px;
  padding: 12px 13px;
  border: 1px solid rgba(244, 242, 234, 0.16);
  background: rgba(2, 3, 6, 0.86);
  color: var(--paper);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
  backdrop-filter: blur(8px);
}

.alinery-node:hover .node-detail,
.alinery-node:focus-visible .node-detail,
.story-node.active .node-detail {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.story-node.active,
.story-node:hover,
.story-node:focus-visible { z-index: 10; }

.trail-node .node-title {
  left: -6px;
  top: 28px;
  padding: 5px 8px 4px;
  color: var(--blue-bright);
  font-size: 11px;
  text-shadow: 0 1px 5px var(--ink), 0 0 16px var(--ink);
}

.trail-node .node-detail {
  left: -6px;
  top: auto;
  bottom: 48px;
}

.alinery-node {
  --billboard-yaw: -14deg;
  width: 214px;
  height: 172px;
  perspective: 1100px;
  perspective-origin: 50% 55%;
  translate: 8px -12px;
  transform: translate(-50%, -100%);
  transform-style: preserve-3d;
  cursor: pointer;
}

.alinery-node:focus-visible { outline: none; }

.billboard {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.billboard-rig {
  position: absolute;
  inset: 0;
  transform: rotateY(var(--billboard-yaw)) rotateX(4deg) scale(0.86);
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
}

.billboard-post,
.billboard-foot,
.billboard-box {
  position: absolute;
  transform-style: preserve-3d;
}

.billboard-post {
  bottom: 1px;
  width: 6px;
  height: 82px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, #4b5666, #252e3a 25%, #111721 70%);
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.45);
}

.billboard-post.left { left: 59px; }
.billboard-post.right { right: 59px; }

.billboard-foot {
  bottom: -2px;
  width: 22px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, rgba(104, 116, 132, 0.72) 0 14%, rgba(39, 49, 62, 0.94) 36%, rgba(10, 15, 22, 0.98) 64%, transparent 69%);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5));
  transform: translateZ(-1px);
}

.billboard-foot.left { left: 51px; }
.billboard-foot.right { right: 51px; }

.billboard-box {
  left: 18px;
  right: 18px;
  top: 0;
  height: 104px;
}

.billboard-face,
.billboard-side,
.billboard-top,
.billboard-back {
  position: absolute;
  box-sizing: border-box;
}

.billboard-face {
  inset: 0;
  transform: translateZ(7px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  background:
    linear-gradient(135deg, rgba(196, 206, 255, 0.07), transparent 48%),
    linear-gradient(180deg, #141b28 0%, #0a0f18 52%, #070b11 100%);
  border: 1px solid rgba(226, 230, 242, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(244, 242, 234, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.7),
    0 10px 24px rgba(0, 0, 0, 0.4);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.alinery-node:hover .billboard-face,
.alinery-node:focus-visible .billboard-face {
  border-color: rgba(165, 183, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(244, 242, 234, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.7),
    0 10px 24px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(82, 109, 255, 0.12);
}

.alinery-node:focus-visible .billboard-face {
  outline: 2px solid var(--blue-bright);
  outline-offset: 4px;
}

.billboard-face small {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-bright);
}

.billboard-face img {
  display: block;
  width: 100%;
  height: auto;
}

.billboard-side {
  top: 0;
  width: 14px;
  height: 100%;
  background: linear-gradient(180deg, #1a1e2a, #080a10);
  border: 1px solid rgba(244, 242, 234, 0.16);
}

.billboard-side.right { right: -7px; transform: rotateY(90deg); }
.billboard-side.left { left: -7px; transform: rotateY(-90deg); }

.billboard-top {
  left: 0;
  right: 0;
  top: -7px;
  height: 14px;
  background: linear-gradient(90deg, #2a3146, #141822);
  border: 1px solid rgba(244, 242, 234, 0.1);
  transform: rotateX(90deg);
}

.billboard-back {
  display: none;
}

.alinery-node .node-detail {
  left: 50%;
  top: calc(100% + 8px);
  width: 230px;
  text-align: center;
  transform: translateX(-50%) translateY(-5px);
}

.alinery-node:hover .node-detail,
.alinery-node:focus-visible .node-detail {
  transform: translateX(-50%);
}

.summit-node .node-title,
.summit-node .node-detail {
  right: 33px;
  left: auto;
  text-align: right;
}

.summit-node .node-title {
  right: 42px;
  line-height: 1.3;
  white-space: nowrap;
}

.summit-node .node-title small {
  margin-bottom: 3px;
  line-height: 1.1;
}

.position-note {
  margin: 0;
  color: var(--blue-bright);
  font-size: 9px;
  line-height: 1.55;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translate(24px, 12px);
  pointer-events: none;
  text-shadow: 0 1px 4px var(--ink), 0 0 10px var(--ink);
}

.summit-copy {
  top: 80px;
  left: 26%;
  width: max-content;
  max-width: 46vw;
  text-align: left;
  text-transform: uppercase;
}

.summit-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 2.8vw, 42px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-transform: none;
  text-wrap: balance;
}

.summit-copy p {
  margin: 18px 0 0;
  max-width: 42em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  text-transform: none;
}

.climb-page {
  min-height: 100svh;
  background:
    radial-gradient(circle at 82% 10%, rgba(75, 101, 255, 0.08), transparent 24%),
    var(--ink);
}

.climb-page::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 7;
  height: 96px;
  background: linear-gradient(var(--ink) 60%, transparent);
  pointer-events: none;
}

.climb-page .brand,
.climb-page .top-nav {
  position: fixed;
}

.page-main {
  width: min(720px, calc(100% - 48px));
  margin: 0 auto;
  padding: 132px 0 96px;
}

.page-kicker {
  color: var(--blue-bright);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-main h1 {
  margin: 12px 0 0;
  font-family: var(--display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-transform: none;
  text-wrap: balance;
}

.page-lede,
.page-main p,
.page-main li {
  color: var(--muted);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

.page-main .page-kicker {
  font-family: var(--mono);
  color: var(--blue-bright);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.page-lede { margin: 18px 0 0; max-width: 38rem; text-wrap: pretty; }

.page-main p { margin: 16px 0 0; max-width: 38rem; }

.page-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.page-list li {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.page-list li:last-child { border-bottom: 1px solid var(--line); }

.page-list strong {
  display: block;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-list span { display: block; margin-top: 6px; }

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 28px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.page-links a:hover,
.page-links a:focus-visible { color: var(--paper); text-decoration: underline; text-underline-offset: 6px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .terrain { min-height: 760px; }

  .brand {
    top: 4px;
    left: 18px;
  }

  .top-nav {
    top: 48px;
    right: 18px;
    left: 18px;
    justify-content: flex-start;
    gap: 28px;
    font-size: 10px;
  }

  .summit-copy {
    top: 104px;
    right: auto;
    left: 18px;
    width: calc(100% - 36px);
    max-width: 440px;
    text-align: left;
  }

  .summit-copy h1 { font-size: clamp(23px, 6.5vw, 30px); }
  .summit-copy p { max-width: 34em; font-size: 11px; }
  .summit-copy p br { display: none; }
  .node-title { font-size: 9px; }
  .node-detail { width: min(230px, 70vw); }
  .trail-node .node-title { top: 20px; }
  .summit-node .node-detail { right: 0; }
  .climb-page::before { height: 112px; }

  .alinery-node {
    --billboard-yaw: -10deg;
    width: 188px;
    height: 156px;
    translate: -8px -12px;
  }

  .billboard-box { height: 92px; }
  .billboard-post { height: 68px; }
  .billboard-face { gap: 6px; padding: 12px 14px 10px; }
  .billboard-face img { width: min(148px, 86%); }
  .position-note { transform: translate(22px, 10px); font-size: 8px; }
  .alinery-node .node-detail { left: 20px; transform: translateY(-5px); text-align: left; }
  .alinery-node:hover .node-detail,
  .alinery-node:focus-visible .node-detail { transform: none; }

  .bottom-left {
    left: 16px;
    bottom: max(10px, env(safe-area-inset-bottom));
    flex-direction: column;
    gap: 0;
    font-size: 9px;
  }

  .bottom-right {
    right: 16px;
    bottom: max(10px, env(safe-area-inset-bottom));
    font-size: 9px;
  }

  .page-main { width: calc(100% - 36px); padding: 118px 0 80px; }
}

@media (min-width: 361px) and (max-width: 760px) {
  .top-nav { top: 4px; left: auto; gap: 18px; font-size: 9px; }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .summit-copy { top: 72px; max-width: 48vw; }
  .summit-copy h1 { font-size: clamp(24px, 2.8vw, 28px); }
  .summit-copy p { margin-top: 12px; font-size: 12px; line-height: 1.55; }
  .summit-copy p br { display: none; }
}

@media (min-width: 761px) and (max-aspect-ratio: 3 / 2) {
  .summit-copy { left: 8%; }
}

@media (min-width: 761px) and (max-aspect-ratio: 1 / 1) {
  .summit-copy { top: 16%; }
}

@media (min-width: 1200px) and (min-aspect-ratio: 19 / 10) {
  .summit-copy {
    top: 52px;
    left: 12%;
  }

  .summit-copy p { margin-top: 28px; }
}

@media (max-height: 600px) and (orientation: landscape) {
  .terrain { min-height: max(620px, 100svh); }

  .brand {
    top: 14px;
    left: 18px;
  }

  .top-nav {
    top: 8px;
    right: 18px;
    gap: 18px;
  }

  .summit-copy {
    top: 70px;
    left: 8%;
    max-width: 48vw;
  }

  .summit-copy h1 {
    margin-top: 8px;
    font-size: clamp(20px, 3.2vw, 30px);
  }

  .summit-copy p {
    margin-top: 8px;
    font-size: 10px;
  }

  .trail-node .node-title { left: auto; right: 34px; top: 9px; padding: 0; }

  .bottom-left,
  .bottom-right { bottom: max(6px, env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .terrain { min-height: 800px; }
  .alinery-node { transform: translate(calc(-50% + 6px), -100%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
