:root {
  /* Design typography trace: Space Mono** for the domain wordmark; IBM Plex Mono** for readable paragraphs. */
  --deep: #123B2A;
  --moss: #4F8F4A;
  --ink: #1B1D18;
  --mist: #F3EEDC;
  --crater: #536F74;
  --lichen: #B7D36B;
  --gold: #C58A3A;
  --space: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --plex: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --fraunces: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--mist);
  background:
    radial-gradient(circle at 72% 8%, rgba(183, 211, 107, 0.28), transparent 18rem),
    radial-gradient(circle at 18% 74%, rgba(83, 111, 116, 0.34), transparent 24rem),
    linear-gradient(180deg, #123B2A 0%, #1B1D18 48%, #123B2A 100%);
  font-family: var(--plex);
  overflow-x: hidden;
}

.grain, .dawn-haze {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.grain {
  opacity: .18;
  background-image:
    linear-gradient(115deg, rgba(243, 238, 220, .08) 0 1px, transparent 1px 12px),
    radial-gradient(circle at 20% 30%, rgba(197, 138, 58, .22) 0 1px, transparent 1px 9px),
    radial-gradient(circle at 80% 60%, rgba(243, 238, 220, .18) 0 1px, transparent 1px 11px);
  mix-blend-mode: soft-light;
}

.dawn-haze {
  background: radial-gradient(circle at 58% 92%, rgba(197, 138, 58, .19), transparent 32rem);
}

.altitude-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  font-family: var(--space);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: lowercase;
}

.altitude-nav a {
  color: rgba(243, 238, 220, .55);
  text-decoration: none;
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: .45rem;
  transition: color .35s ease, transform .35s ease;
}

.altitude-nav a::before { content: attr(data-altitude); color: var(--gold); }
.altitude-nav span { width: 1px; height: 24px; background: currentColor; }
.altitude-nav a.active, .altitude-nav a:hover { color: var(--lichen); transform: translateX(-4px); }

.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5rem 2rem;
}

.coordinate-cloud span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: rotate(var(--r));
  font-family: var(--space);
  font-size: clamp(.62rem, 1vw, .82rem);
  letter-spacing: .18em;
  color: rgba(183, 211, 107, .78);
  border: 1px solid rgba(183, 211, 107, .32);
  background: rgba(18, 59, 42, .48);
  padding: .42rem .62rem;
  border-radius: 8px 5px 10px 4px;
}

.hero-mark {
  width: min(760px, 90vw);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  isolation: isolate;
}

.orbital-ring {
  position: absolute;
  inset: 3%;
  z-index: -1;
  overflow: visible;
}

.orbital-ring circle, .orbital-ring path {
  fill: none;
  stroke: var(--moss);
  stroke-width: 1.8;
  stroke-dasharray: 1050;
  stroke-dashoffset: 1050;
  animation: drawRing 3.7s ease forwards .35s;
}

.orbital-ring .gold { stroke: var(--gold); stroke-width: 4; stroke-dasharray: 210; stroke-dashoffset: 210; }
.ring-repair { stroke: var(--lichen); stroke-width: 3; }

.permit, .stamp, .chapter-label span {
  font-family: var(--space);
  color: var(--gold);
  letter-spacing: .22em;
  text-transform: lowercase;
  font-size: .72rem;
}

h1 {
  margin: .5rem 0;
  font-family: var(--space);
  font-size: clamp(2.2rem, 7vw, 6.9rem);
  line-height: .94;
  letter-spacing: .04em;
  color: var(--mist);
  text-shadow: 0 10px 42px rgba(183, 211, 107, .20);
}

.epigraph, .summit-line {
  font-family: var(--fraunces);
  color: var(--lichen);
  font-size: clamp(1.05rem, 2vw, 1.55rem);
}

.hero-mountains {
  position: absolute;
  left: -3vw;
  bottom: 0;
  width: 106vw;
  height: 34vh;
}

svg path, svg circle, svg ellipse {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.hero-mountains path {
  color: rgba(243, 238, 220, .74);
  stroke-dasharray: 1300;
  stroke-dashoffset: 1300;
  animation: sketchIn 4.2s ease forwards .8s;
}

.chapter {
  min-height: 100vh;
  padding: 8rem min(9vw, 8rem) 8rem min(7vw, 6rem);
  position: relative;
}

.chapter-label {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  transform: rotate(-1deg);
}

.chapter-label strong {
  font-family: var(--fraunces);
  font-size: clamp(1.8rem, 4vw, 4.8rem);
  color: var(--mist);
  font-weight: 500;
}

.masonry {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 76px;
  gap: 1.15rem;
  max-width: 1240px;
}

.fragment {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(243, 238, 220, .98), rgba(243, 238, 220, .84)),
    radial-gradient(circle at 20% 15%, rgba(183, 211, 107, .28), transparent 10rem);
  border: 1px solid rgba(27, 29, 24, .28);
  border-radius: 18px 9px 22px 12px;
  padding: 1.2rem;
  box-shadow: 0 18px 40px rgba(27, 29, 24, .22);
  transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s ease, border-color .5s ease;
}

.fragment::before {
  content: '';
  position: absolute;
  inset: .55rem;
  border: 1px solid rgba(27, 29, 24, .16);
  border-radius: 12px 8px 16px 7px;
  pointer-events: none;
}

.fragment::after {
  content: '';
  position: absolute;
  left: -12%;
  right: -12%;
  top: 42%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(197, 138, 58, .75), transparent);
  transform: rotate(-7deg) scaleX(.38);
  opacity: .55;
  transition: transform .45s ease, opacity .45s ease;
}

.fragment:hover, .fragment.is-near {
  transform: scale(1.045) rotate(var(--tilt, 0deg));
  box-shadow: 0 26px 68px rgba(79, 143, 74, .27), 0 12px 25px rgba(27, 29, 24, .22);
  border-color: rgba(79, 143, 74, .72);
  z-index: 3;
}

.fragment:hover::after, .fragment.is-near::after { transform: rotate(-7deg) scaleX(1); opacity: .9; }

.fragment h2 {
  font-family: var(--fraunces);
  color: var(--deep);
  font-size: clamp(1.45rem, 2.5vw, 2.75rem);
  line-height: 1.02;
  margin: .4rem 0 .8rem;
  font-weight: 700;
}

.fragment p, .fragment small, .fragment em {
  font-family: var(--plex);
  line-height: 1.55;
}

.fragment em {
  display: block;
  margin-top: 1rem;
  color: var(--crater);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}

.fragment:hover em, .fragment.is-near em { opacity: 1; transform: translateY(0); }
.fragment svg { width: 100%; height: auto; color: var(--deep); }
.fragment:hover svg path, .fragment:hover svg circle, .fragment:hover svg ellipse { stroke-width: 3; }
.gold-line { color: var(--gold); stroke: var(--gold); stroke-width: 4; }
.star-dot { fill: var(--lichen); stroke: var(--lichen); filter: drop-shadow(0 0 13px rgba(183, 211, 107, .9)); }

.tall { grid-column: span 4; grid-row: span 5; }
.square { grid-column: span 3; grid-row: span 4; }
.narrow { grid-column: span 2; grid-row: span 3; }
.wide { grid-column: span 6; grid-row: span 3; }
.panorama { grid-column: span 7; grid-row: span 5; }
.medium { grid-column: span 4; grid-row: span 3; }
.small { grid-column: span 3; grid-row: span 2; }
.sliver { grid-column: span 2; grid-row: span 2; }

.ridge-low .tall { margin-top: 4rem; --tilt: -1deg; }
.ridge-low .square { margin-top: 1rem; --tilt: 1deg; }
.ridge-low .wide { grid-column: 5 / span 6; --tilt: -.6deg; }
.ridge-peak .panorama { margin-top: 0; --tilt: .8deg; }
.ridge-peak .medium { margin-top: 4rem; --tilt: -1.1deg; }
.ridge-peak .tool { margin-top: 2rem; --tilt: .9deg; }
.ridge-air { gap: 2.2rem; }
.ridge-air .observatory { grid-column: 2 / span 4; --tilt: -1deg; }
.ridge-air .wide { grid-column: 6 / span 6; margin-top: 5rem; --tilt: 1deg; }
.ridge-air .specimen { grid-column: 8 / span 3; margin-top: -1rem; --tilt: -.5deg; }
.orbital-trail { transform: rotate(-3deg); align-items: start; }
.orbital-trail .fragment { transform: rotate(3deg); }
.orbital-trail .panorama { grid-column: 4 / span 7; margin-top: -2rem; }

.tag, .weather {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(183, 211, 107, .96), rgba(243, 238, 220, .88));
}

.tag span, .weather span { font-family: var(--space); letter-spacing: .2em; color: var(--deep); }
.tag strong, .weather strong { font-family: var(--space); font-size: clamp(1.1rem, 2.2vw, 2rem); color: var(--ink); }

@keyframes drawRing { to { stroke-dashoffset: 0; } }
@keyframes sketchIn { to { stroke-dashoffset: 0; } }

@media (max-width: 920px) {
  .altitude-nav { display: none; }
  .chapter { padding: 6rem 1rem; }
  .masonry { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 78px; }
  .tall, .square, .narrow, .wide, .panorama, .medium, .small, .sliver,
  .ridge-air .observatory, .ridge-air .wide, .ridge-air .specimen,
  .orbital-trail .panorama { grid-column: span 6; margin-top: 0; }
  .narrow, .small, .sliver { grid-row: span 2; }
  .orbital-trail { transform: none; }
  .orbital-trail .fragment { transform: none; }
}

@media (max-width: 560px) {
  .hero { padding: 3rem 1rem; }
  .coordinate-cloud span { display: none; }
  .chapter-label { display: block; }
  .masonry { display: block; }
  .fragment { margin: 1rem 0; min-height: 220px; }
}
