/* ============================================================
   TERRANE — Ridgeline National Reserve
   vintage topographic map × modern field guide
   ============================================================ */

:root {
  --paper: #f4efe3;
  --paper-deep: #ece5d3;
  --ink: #1e3a2f;
  --ink-soft: rgba(30, 58, 47, 0.8);
  --tan: #c9b896;
  --rust: #b5502a;
  --line: rgba(30, 58, 47, 0.24);
  --line-faint: rgba(30, 58, 47, 0.12);
  --panel: rgba(244, 239, 227, 0.94);
  --panel-solid: color-mix(in srgb, var(--paper) 96%, white 4%);
  --frame: 18px;
  --head-h: 64px;
  --sightline-y: calc(100svh - 120px);
  --f-display: 'Fraunces', serif;
  --f-body: 'Archivo', sans-serif;
  --f-mono: 'Chivo Mono', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-stamp: cubic-bezier(0.2, 1.35, 0.22, 1);
}

/* Season palettes — flipped by data-season on <body>, mirrored in WebGL uniforms */
body[data-season="thaw"]   { --paper:#edf2e2; --paper-deep:#e2ead1; --ink:#24452c; --tan:#a9bd8d; --rust:#4f7a33; --line:rgba(36,69,44,.24); --line-faint:rgba(36,69,44,.12); --panel:rgba(237,242,226,.94); --ink-soft:rgba(36,69,44,.8); }
body[data-season="summer"] { --paper:#f6efd9; --paper-deep:#eee4c6; --ink:#1e3a2f; --tan:#cdbb8e; --rust:#b5502a; --line:rgba(30,58,47,.24); --line-faint:rgba(30,58,47,.12); --panel:rgba(246,239,217,.94); --ink-soft:rgba(30,58,47,.8); }
body[data-season="frost"]  { --paper:#f3e7d3; --paper-deep:#ead9bd; --ink:#46301f; --tan:#c8a878; --rust:#a34419; --line:rgba(70,48,31,.26); --line-faint:rgba(70,48,31,.13); --panel:rgba(243,231,211,.94); --ink-soft:rgba(70,48,31,.82); }
body[data-season="snow"]   { --paper:#eceff0; --paper-deep:#dfe4e6; --ink:#2e4653; --tan:#b3bfc6; --rust:#3f6478; --line:rgba(46,70,83,.26); --line-faint:rgba(46,70,83,.13); --panel:rgba(236,239,240,.94); --ink-soft:rgba(46,70,83,.82); }

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + var(--frame) + 12px);
}
html, body { overflow-x: clip; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.68;
  font-kerning: normal;
  font-optical-sizing: auto;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color 1.1s ease, color 1.1s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.48;
  background:
    linear-gradient(112deg, transparent 0 18%, color-mix(in srgb, var(--tan) 16%, transparent) 18.2% 18.6%, transparent 18.8% 58%, color-mix(in srgb, var(--ink) 7%, transparent) 58.3% 58.7%, transparent 59%),
    radial-gradient(ellipse at 18% 78%, color-mix(in srgb, var(--rust) 9%, transparent), transparent 32%),
    radial-gradient(ellipse at 86% 18%, color-mix(in srgb, var(--tan) 16%, transparent), transparent 36%);
  mix-blend-mode: multiply;
  transition: background 1.1s ease;
}

::selection { background: var(--rust); color: var(--paper); }

html {
  scrollbar-color: var(--rust) var(--paper-deep);
}
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track {
  background: var(--paper-deep);
  border-left: 1px solid var(--line-faint);
}
::-webkit-scrollbar-thumb {
  background:
    linear-gradient(var(--rust), color-mix(in srgb, var(--rust) 72%, var(--ink)));
  border: 3px solid var(--paper-deep);
}

a { color: inherit; }

h1, h2, h3 { font-optical-sizing: auto; text-wrap: balance; }
p { text-wrap: pretty; }

:is(
  .hud-label,
  .hud-bearing,
  .alt-marker b,
  .hero-meta,
  .hero-survey,
  .stat dd,
  .pk-el,
  .tc-stats dd,
  .season-data dd,
  .wp-table td:nth-child(2),
  .summit-stamp,
  .foot-credit,
  .sec-kicker,
  .elev-stamp
) {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "kern" 1;
}

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: fixed; top: -60px; left: 50%;
  transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  padding: 12px 22px; z-index: 200;
  font-family: var(--f-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.1em; text-decoration: none;
  transition: top 0.25s ease;
}
.skip-link:focus-visible { top: 8px; }

/* ---------- fixed layers ---------- */
#terrain {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  display: block; z-index: 0;
}

.grain {
  position: fixed; inset: 0; z-index: 3;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.42 0 0 0 0 0.36 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* vintage map neatline frame */
.map-frame {
  position: fixed; inset: 0; z-index: 60;
  pointer-events: none;
}
.map-frame::before {
  content: ""; position: absolute;
  inset: calc(var(--frame) - 8px);
  border: 1px solid var(--line);
}
.map-frame::after {
  content: ""; position: absolute;
  inset: var(--frame);
  border: 2px solid var(--ink);
  transition: border-color 1.1s ease;
}
.mf-coord {
  position: absolute;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.14em; color: var(--ink-soft);
  background: var(--paper);
  padding: 0 10px;
  transition: background-color 1.1s ease, color 1.1s ease;
}
.mf-n, .mf-s { display: none; } /* header & footer own those edges */
.mf-w { left: calc(var(--frame) - 7px); top: 50%; transform: translate(-50%, -50%) rotate(-90deg); transform-origin: center; }
.mf-e { right: calc(var(--frame) - 7px); top: 50%; transform: translate(50%, -50%) rotate(90deg); transform-origin: center; }

.chrome-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--frame) + 2px);
  z-index: 90;
  pointer-events: none;
  background: color-mix(in srgb, var(--paper) 96%, white 4%);
  transition: background 1.1s ease;
}

.terrain-hud {
  position: fixed;
  left: calc(var(--frame) + clamp(16px, 3vw, 42px));
  bottom: calc(var(--frame) + clamp(18px, 4vh, 42px));
  z-index: 54;
  display: grid;
  grid-template-columns: auto minmax(42px, 10vw) auto;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  color: var(--ink-soft);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  mix-blend-mode: multiply;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
body.footer-zone .terrain-hud {
  opacity: 0;
  transform: translateY(10px);
}
.hud-label {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border: 1px solid var(--line);
  padding: 7px 10px;
  color: var(--ink);
  transition: background-color 1.1s ease, color 1.1s ease;
}
.hud-rule {
  display: block;
  height: 1px;
  background: var(--rust);
  transform-origin: left center;
  transform: scaleX(calc(0.18 + var(--scroll-frac, 0) * 0.82));
}
.hud-bearing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hud-bearing i {
  width: 16px;
  height: 16px;
  display: inline-block;
  clip-path: polygon(50% 0, 75% 50%, 50% 100%, 25% 50%);
  background: var(--rust);
  transform: rotate(var(--bearing, 14deg));
  transition: background-color 1.1s ease;
}

.contour-sightline {
  position: fixed;
  left: var(--frame);
  right: var(--frame);
  top: var(--sightline-y);
  z-index: 5;
  height: 0;
  pointer-events: none;
  color: var(--rust);
  opacity: 0.82;
  mix-blend-mode: multiply;
  transform: translateY(-50%);
  transition: opacity 0.35s ease, color 1.1s ease, transform 0.35s ease;
}
.contour-sightline::before {
  content: "";
  position: absolute;
  left: clamp(18px, 5vw, 84px);
  right: clamp(18px, 5vw, 84px);
  top: 0;
  border-top: 1px solid currentColor;
  background: currentColor;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--paper) 52%, transparent),
    0 10px 28px -18px currentColor;
}
.contour-sightline::after {
  content: "";
  position: absolute;
  left: clamp(22px, 9vw, 164px);
  top: -5px;
  width: 9px;
  height: 9px;
  background: currentColor;
  transform: rotate(45deg);
}
.contour-sightline span {
  position: absolute;
  right: clamp(26px, 6vw, 100px);
  top: 0;
  transform: translateY(-50%);
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--rust) 78%, var(--ink));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 26px -22px rgba(30, 58, 47, 0.7);
  transition: background-color 1.1s ease, color 1.1s ease, border-color 1.1s ease;
}
body.footer-zone .contour-sightline {
  opacity: 0;
  transform: translateY(10px);
}

/* ---------- header ---------- */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--head-h) + var(--frame));
  z-index: 80;
  display: flex; align-items: center; gap: 24px;
  padding: var(--frame) calc(var(--frame) + clamp(16px, 3vw, 36px)) 0;
  background: var(--panel-solid);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 14px 34px -28px rgba(30, 58, 47, 0.72);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  transition: background-color 1.1s ease, border-color 1.1s ease, box-shadow 1.1s ease;
}
.brand {
  display: flex; align-items: baseline; gap: 12px;
  text-decoration: none;
  min-height: 44px; align-items: center;
}
.brand-mark {
  width: 30px; height: 30px; flex: none;
  transition: transform 0.45s var(--ease-out), color 0.45s ease;
}
.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  transform: rotate(-9deg) translateY(-1px);
  color: var(--rust);
}
.brand-word {
  font-family: var(--f-display);
  font-weight: 700; font-size: 20px;
  letter-spacing: 0.24em;
}
.brand-sub {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
.head-nav {
  margin-left: auto;
  display: flex; gap: clamp(10px, 1.6vw, 26px);
}
.head-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 0 6px;
  position: relative;
  transition: color 0.3s ease;
}
.head-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%;
  bottom: 9px; height: 2px; background: var(--rust);
  transition: right 0.3s var(--ease-out);
}
.head-nav a:hover { color: var(--rust); }
.head-nav a:hover::after { right: 0; }
.head-nav a[aria-current="true"] {
  color: var(--rust);
}
.head-nav a[aria-current="true"]::after { right: 0; }

.menu-btn {
  display: none;
  margin-left: auto;
  align-items: center; gap: 10px;
  min-height: 44px; min-width: 44px;
  padding: 0 14px;
  background: none; border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.28s ease, color 0.28s ease, border-color 0.28s ease, transform 0.28s var(--ease-out);
}
.menu-btn:hover,
.menu-btn:focus-visible {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.menu-lines { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-lines i { display: block; width: 18px; height: 2px; background: currentColor; transition: transform .3s ease, opacity .3s ease; }
.menu-btn[aria-expanded="true"] .menu-lines i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-lines i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-lines i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: calc(var(--frame) + var(--head-h)) var(--frame) var(--frame);
  z-index: 70;
  background: var(--panel-solid);
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px clamp(24px, 8vw, 80px);
  gap: 28px;
}
.nav-overlay[hidden] { display: none; }
.ov-kicker, .ov-foot {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}
.nav-overlay nav { display: flex; flex-direction: column; }
.nav-overlay nav a {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(28px, 7vw, 44px);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-faint);
  display: flex; align-items: baseline; gap: 18px;
  transition: color 0.25s ease, transform 0.35s var(--ease-out), border-color 0.25s ease;
}
.nav-overlay nav a em {
  font-family: var(--f-mono); font-style: normal;
  font-size: 13px; color: var(--rust); letter-spacing: 0.1em;
}
.nav-overlay nav a:hover,
.nav-overlay nav a:focus-visible,
.nav-overlay nav a:active {
  color: var(--rust);
  border-bottom-color: color-mix(in srgb, var(--rust) 52%, transparent);
  transform: translateX(8px);
}

/* ---------- altimeter ---------- */
.altimeter {
  position: fixed;
  right: calc(var(--frame) + 14px);
  top: calc(var(--frame) + var(--head-h) + 48px);
  bottom: calc(var(--frame) + 48px);
  z-index: 55;
  pointer-events: none;
}
.alt-track {
  position: relative; height: 100%;
  border-right: 1px solid var(--line);
  width: 10px;
}
.alt-tick {
  position: absolute; right: 0; width: 10px; height: 1px;
  background: var(--line);
}
.alt-tick i {
  position: absolute; right: 16px; top: -0.6em;
  font-family: var(--f-mono); font-style: normal;
  font-size: 9px; letter-spacing: 0.08em;
  color: var(--ink-soft); white-space: nowrap;
}
.alt-marker {
  position: absolute; right: -5px; top: 100%;
  width: 11px; height: 11px;
  background: var(--rust);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transition: background-color 1.1s ease;
}
.alt-marker b {
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-mono); font-weight: 400;
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--paper);
  background: var(--ink);
  padding: 3px 8px;
  white-space: nowrap;
  transition: background-color 1.1s ease, color 1.1s ease;
}

/* ---------- reveal machinery ---------- */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out) var(--d, 0s),
              transform 0.9s var(--ease-out) var(--d, 0s);
}
.rv.in { opacity: 1; transform: none; }

/* ---------- main flow ---------- */
main { position: relative; z-index: 10; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: stretch; justify-content: center;
  text-align: left;
  position: relative;
  padding: calc(var(--head-h) + var(--frame) + 24px) clamp(24px, 6vw, 64px) 90px;
}
.hero-inner {
  position: relative;
  width: min(1240px, 100%);
  margin-inline: auto;
  padding: clamp(24px, 5vh, 48px) clamp(16px, 4vw, 56px);
}
.hero-inner::before {
  content: ""; position: absolute; inset: -16% -18% -12% -12%;
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--paper) 82%, transparent) 0%,
    color-mix(in srgb, var(--paper) 52%, transparent) 58%,
    transparent 78%);
  z-index: -1;
  transition: background 1.1s ease;
}
.hero-inner::after {
  content: "EL. 640 → 2 847 M";
  position: absolute;
  right: clamp(0px, 3vw, 46px);
  top: clamp(16px, 7vh, 74px);
  writing-mode: vertical-rl;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--rust);
  border-left: 2px solid var(--rust);
  padding-left: 9px;
}
.hero-overline {
  font-family: var(--f-mono);
  font-size: clamp(10px, 1.4vw, 12px);
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(14px, 2.5vh, 26px);
  display: flex; flex-wrap: wrap; justify-content: flex-start;
  gap: 6px 14px;
}
.ho-dot { color: var(--rust); }
.hero-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(52px, 12.7vw, 186px);
  line-height: 0.9;
  white-space: nowrap;
  letter-spacing: 0.035em;
  margin-left: -0.03em;
  color: var(--ink);
  filter: drop-shadow(0 8px 0 color-mix(in srgb, var(--tan) 22%, transparent));
  transition: color 1.1s ease;
}
.ht-l {
  display: inline-block;
  animation: letter-rise 1.1s var(--ease-out) both;
  animation-delay: calc(0.12s + var(--i) * 0.07s);
}
@keyframes letter-rise {
  from { opacity: 0; transform: translateY(0.35em) rotate(2deg); }
  to   { opacity: 1; transform: none; }
}
.hero-poem {
  font-family: var(--f-display);
  font-size: clamp(17px, 2.4vw, 24px);
  font-weight: 400;
  line-height: 1.5;
  margin-top: clamp(18px, 3vh, 30px);
  color: var(--ink);
  max-width: 58ch;
}
.hero-poem em { font-style: italic; font-weight: 300; }
.hero-survey {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 740px;
  margin-top: clamp(12px, 2vh, 18px);
}
.hero-survey span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 76%, transparent);
  padding: 4px 9px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: flex-start;
  align-items: center; gap: 12px 16px;
  margin-top: clamp(20px, 3.5vh, 34px);
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.hm-dot { width: 5px; height: 5px; background: var(--rust); transform: rotate(45deg); }
.hero-scroll {
  position: absolute; bottom: clamp(32px, 6vh, 56px); left: 50%;
  transform: translate(-50%, 26px);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-scroll.rv.in { transform: translateX(-50%); }
.hero-scroll svg { width: 14px; height: 24px; animation: scroll-bob 2.4s ease-in-out infinite; }
@keyframes scroll-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}
.compass {
  position: absolute;
  top: calc(var(--head-h) + var(--frame) + 30px);
  right: clamp(36px, 6vw, 84px);
  width: clamp(72px, 9vw, 118px); height: auto;
  color: var(--ink);
  opacity: 0.85;
  animation: compass-settle 2.2s var(--ease-out) both;
}
@keyframes compass-settle {
  from { opacity: 0; transform: rotate(-24deg); }
  to   { opacity: 0.85; transform: rotate(0); }
}
.compass-n {
  font-family: var(--f-mono); font-size: 13px;
  fill: currentColor;
}

/* ---------- legend strip ---------- */
.legend-strip {
  position: relative;
  margin: 0 auto 12vh;
  width: min(1060px, calc(100% - clamp(48px, 10vw, 128px)));
  background: var(--panel);
  border: 1px solid var(--ink);
  outline: 1px solid var(--line);
  outline-offset: 3px;
  padding: 14px clamp(16px, 3vw, 30px);
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px clamp(18px, 3vw, 34px);
  transition: background-color 1.1s ease, border-color 1.1s ease;
  transform: rotate(-0.45deg);
  transform-origin: 32% 50%;
}
.legend-strip > * {
  transform: rotate(0.45deg);
}
.legend-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  padding-right: clamp(8px, 2vw, 18px);
  border-right: 1px solid var(--line);
}
.legend-item {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft);
}
.legend-item svg { width: 38px; height: 15px; color: var(--ink); }
.legend-note { margin-left: auto; text-transform: none; letter-spacing: 0.04em; }
.legend-note em { font-family: var(--f-display); font-size: 12.5px; }

/* ---------- sections ---------- */
.section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(var(--frame), 1fr) minmax(0, 1080px) minmax(var(--frame), 1fr);
  padding: 10vh 0;
}
.sec-margin {
  grid-column: 1;
  justify-self: end;
  padding-right: 18px;
  padding-top: 8px;
}
.sec-body { grid-column: 2; min-width: 0; }
.sec-left .sec-body { margin-right: clamp(0px, 14vw, 260px); }
.sec-right .sec-body { margin-left: clamp(0px, 14vw, 260px); }

.elev-stamp {
  position: sticky; top: calc(var(--head-h) + var(--frame) + 24px);
  writing-mode: vertical-rl;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--rust);
  border-left: 2px solid var(--rust);
  padding-left: 8px;
  white-space: nowrap;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--ink);
  outline: 1px solid var(--line);
  outline-offset: 4px;
  padding: clamp(28px, 5vw, 60px);
  position: relative;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  box-shadow: 0 24px 60px -30px rgba(30, 58, 47, 0.35);
  background-image:
    linear-gradient(90deg, color-mix(in srgb, var(--rust) 8%, transparent) 0 1px, transparent 1px),
    repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in srgb, var(--ink) 4%, transparent) 31px 32px);
  transition: background-color 1.1s ease, border-color 1.1s ease;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid var(--line-faint);
  pointer-events: none;
  clip-path: inherit;
}
.sec-body.panel::after,
.panel-head::after {
  content: "RIDGELINE · VERIFIED";
  position: absolute;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(12px, 2.4vw, 22px);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: color-mix(in srgb, var(--rust) 72%, transparent);
  transform: rotate(-2deg);
  pointer-events: none;
}
.panel > * {
  position: relative;
  z-index: 1;
}
.panel-head { margin-bottom: clamp(24px, 4vh, 40px); }
#seasons .panel-head {
  position: relative;
  overflow: hidden;
}
#seasons .panel-head::before {
  content: "";
  position: absolute;
  right: clamp(18px, 4vw, 66px);
  top: 50%;
  width: clamp(190px, 24vw, 320px);
  aspect-ratio: 1.25;
  transform: translateY(-50%) rotate(-8deg);
  opacity: 0.72;
  pointer-events: none;
  background:
    repeating-radial-gradient(ellipse at 48% 52%,
      transparent 0 17px,
      color-mix(in srgb, var(--ink) 14%, transparent) 18px 19px,
      transparent 20px 34px),
    radial-gradient(ellipse at center,
      color-mix(in srgb, var(--tan) 18%, transparent),
      transparent 60%);
}
#seasons .panel-head::after {
  content: "";
  position: absolute;
  right: clamp(86px, 12vw, 170px);
  top: 27%;
  width: 2px;
  height: 46%;
  transform: rotate(19deg);
  background: repeating-linear-gradient(
    to bottom,
    var(--rust) 0 10px,
    transparent 10px 18px);
  opacity: 0.62;
  pointer-events: none;
}
#seasons .panel-head > * {
  position: relative;
  z-index: 1;
}
.sec-wide .panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.ph-ornament {
  width: clamp(150px, 16vw, 220px); height: auto;
  color: var(--ink);
  opacity: 0.85;
  transition: color 1.1s ease;
}
.ph-n { font-family: var(--f-mono); font-size: 11px; fill: currentColor; text-anchor: middle; }

.sec-kicker {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 14px;
}
.sec-kicker::after {
  content: ""; flex: 1; max-width: 120px; height: 1px;
  background: var(--rust); opacity: 0.5;
}
.sec-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
  margin-bottom: clamp(18px, 3vh, 30px);
  max-width: 20ch;
  text-wrap: balance;
}
.sec-title em { font-style: italic; font-weight: 400; color: var(--ink); }
.sec-lede {
  font-size: clamp(16px, 1.8vw, 18px);
  max-width: 58ch;
  color: var(--ink);
}
.sec-prose { max-width: 62ch; }
.sec-prose p:first-child::first-letter {
  font-family: var(--f-display);
  font-size: 3.1em;
  line-height: 0.86;
  float: left;
  padding: 0.08em 0.12em 0 0;
  color: var(--rust);
}
.sec-prose p + p { margin-top: 1.1em; }
.sec-prose em { font-family: var(--f-display); font-size: 1.04em; }

/* stats */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(26px, 4vh, 40px);
}
.stat {
  background: var(--paper);
  padding: 18px 20px 16px;
  transition: background-color 1.1s ease;
}
.stat dt {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.stat dd {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}
.stat dd span { font-size: 0.5em; font-weight: 400; color: var(--ink-soft); margin-left: 2px; }

.surveyor-note {
  margin-top: clamp(26px, 4vh, 40px);
  padding-left: 20px;
  border-left: 2px solid var(--rust);
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 52ch;
}
.surveyor-note em { font-family: var(--f-display); font-size: 17px; color: var(--ink); }
.sn-attrib {
  display: block;
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- vistas (gaps where the map shows through) ---------- */
.vista {
  height: 52vh;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 6vh;
}
.vista-caption {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px 18px;
  transition: background-color 1.1s ease;
  margin-inline: calc(var(--frame) + 12px);
  text-align: center;
  transform: rotate(-0.35deg);
}

/* ---------- rapid survey band ---------- */
.survey-band {
  width: min(1180px, calc(100% - clamp(40px, 9vw, 120px)));
  margin: -4vh auto 9vh;
  display: grid;
  grid-template-columns: auto minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(18px, 4vw, 54px);
  align-items: stretch;
  padding: clamp(18px, 3vw, 34px);
  border-block: 2px solid var(--ink);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--paper) 92%, transparent), color-mix(in srgb, var(--tan) 32%, transparent)),
    repeating-linear-gradient(118deg, transparent 0 46px, color-mix(in srgb, var(--ink) 7%, transparent) 46px 47px);
  box-shadow: 0 18px 42px -34px rgba(30, 58, 47, 0.55);
  position: relative;
}
.survey-band::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.survey-band__mark {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(46px, 8vw, 108px);
  line-height: 0.88;
  color: var(--rust);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0.88;
}
.survey-band__copy h2 {
  font-family: var(--f-display);
  font-size: clamp(24px, 3.3vw, 42px);
  line-height: 1.04;
  max-width: 14ch;
  text-wrap: balance;
}
.survey-band__copy p:last-child {
  margin-top: 14px;
  max-width: 52ch;
  color: var(--ink-soft);
}
.survey-band__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: center;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 72%, transparent);
}
.survey-band__facts div {
  padding: 15px 16px;
  border-right: 1px solid var(--line-faint);
}
.survey-band__facts div:last-child { border-right: 0; }
.survey-band__facts dt {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.survey-band__facts dd {
  margin-top: 6px;
  font-family: var(--f-display);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  color: var(--ink);
}

/* ---------- massif profile ---------- */
.profile-wrap {
  margin: clamp(26px, 4vh, 42px) 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: background-color 1.1s ease;
}
.profile { display: block; min-width: 660px; width: 100%; height: auto; }
.pf-grid line { stroke: var(--line-faint); stroke-width: 1; }
.pf-grid text { font-family: var(--f-mono); font-size: 11px; fill: var(--ink-soft); }
.pf-fill { fill: var(--tan); opacity: 0.28; transition: fill 1.1s ease; }
.pf-line { fill: none; stroke: var(--ink); stroke-width: 2; transition: stroke 1.1s ease; }
.pf-base { stroke: var(--ink); stroke-width: 1; opacity: 0.5; }
.pf-peak line { stroke: var(--ink); stroke-width: 0.8; stroke-dasharray: 3 4; opacity: 0.55; }
.pf-peak circle { fill: var(--ink); }
.pf-peak text {
  font-family: var(--f-mono); font-size: 11.5px;
  letter-spacing: 0.08em; fill: var(--ink);
  text-anchor: middle;
}
.pf-max path { fill: var(--rust); }
.pf-max text { fill: var(--rust); font-size: 12.5px; }

.peak-list { list-style: none; }
.peak-list li {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) auto minmax(0, 1.4fr);
  grid-template-areas: "name el fa" "note note note";
  gap: 2px 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-faint);
  align-items: baseline;
}
.peak-list li:last-child { border-bottom: 0; }
.pk-name { grid-area: name; font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.pk-el { grid-area: el; font-family: var(--f-mono); font-size: 13px; color: var(--rust); letter-spacing: 0.06em; }
.pk-fa { grid-area: fa; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); text-align: right; }
.pk-note { grid-area: note; font-size: 14.5px; color: var(--ink-soft); max-width: 68ch; }

/* ---------- trails ---------- */
.sec-wide .sec-body { max-width: none; }
.trail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
}
.trail-card {
  background: var(--panel);
  border: 1px solid var(--ink);
  padding: clamp(22px, 3vw, 34px);
  position: relative;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition: background-color 1.1s ease, border-color 1.1s ease,
              transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out),
              opacity 0.9s var(--ease-out) var(--d, 0s);
  box-shadow: 0 16px 44px -26px rgba(30, 58, 47, 0.4);
}
.trail-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -28px rgba(30, 58, 47, 0.5);
}
.trail-card:hover::before {
  border-color: color-mix(in srgb, var(--rust) 48%, transparent);
}
.trail-card::before {
  content: ""; position: absolute; inset: 6px;
  border: 1px solid var(--line-faint);
  pointer-events: none;
}
.trail-card::after {
  content: "TRAIL " counter(trail);
  counter-increment: trail;
  position: absolute;
  right: 14px;
  top: 14px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: color-mix(in srgb, var(--rust) 72%, transparent);
  transform: rotate(2deg);
}
.trail-grid {
  counter-reset: trail;
}
.trail-card:nth-child(2),
.trail-card:nth-child(4) {
  margin-top: clamp(18px, 4vw, 52px);
}
.tc-grade {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.tc-grade svg { width: 52px; height: 16px; color: var(--rust); flex: none; }
.tc-grade b {
  font-family: var(--f-mono); font-weight: 400;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--rust);
}
.trail-card h3 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(21px, 2.4vw, 27px);
  margin-bottom: 12px;
  line-height: 1.15;
}
.trail-card > p { font-size: 15px; color: var(--ink); max-width: 52ch; }
.tc-stats {
  display: grid; grid-template-columns: repeat(4, auto);
  justify-content: start; gap: 8px 26px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.tc-stats dt {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.tc-stats dd { font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.tc-hard { border-width: 2px; }
.tc-hard .tc-grade b { font-weight: 400; }

/* ---------- seasons ---------- */
.season {
  margin-top: clamp(20px, 3vh, 30px);
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.6fr);
  gap: 10px clamp(24px, 4vw, 56px);
  overflow: hidden;
  --season-paper: var(--paper);
  --season-ink: var(--ink);
  --season-tan: var(--tan);
  --season-rust: var(--rust);
}
.season::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: linear-gradient(var(--season-paper), var(--season-tan), var(--season-rust));
  opacity: 0.85;
}
.season.is-active {
  box-shadow: 0 30px 72px -34px color-mix(in srgb, var(--season-rust) 58%, transparent);
}
.season.is-active::before {
  border-color: color-mix(in srgb, var(--season-rust) 44%, transparent);
}
.season[data-season="thaw"]   { --season-paper:#edf2e2; --season-ink:#24452c; --season-tan:#a9bd8d; --season-rust:#4f7a33; }
.season[data-season="summer"] { --season-paper:#f6efd9; --season-ink:#1e3a2f; --season-tan:#cdbb8e; --season-rust:#b5502a; }
.season[data-season="frost"]  { --season-paper:#f3e7d3; --season-ink:#46301f; --season-tan:#c8a878; --season-rust:#a34419; }
.season[data-season="snow"]   { --season-paper:#eceff0; --season-ink:#2e4653; --season-tan:#b3bfc6; --season-rust:#3f6478; }
.season-head h3 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}
.season-head h3::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin-top: 12px;
  background: var(--season-rust);
}
.season-months {
  display: block;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 10px;
}
.season > p { font-size: 15.5px; }

/* season ink swatches — each card previews the palette it will paint the map with */
.season-inks {
  display: flex; align-items: center; gap: 7px;
  margin-top: 18px;
}
.season-inks i {
  width: 15px; height: 15px;
  border: 1px solid var(--line);
  transform: rotate(45deg);
}
.season-inks b {
  font-family: var(--f-mono); font-weight: 400;
  font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-left: 8px;
}
.season[data-season="thaw"]   .season-inks i:nth-child(1) { background: #edf2e2; }
.season[data-season="thaw"]   .season-inks i:nth-child(2) { background: #24452c; }
.season[data-season="thaw"]   .season-inks i:nth-child(3) { background: #a9bd8d; }
.season[data-season="thaw"]   .season-inks i:nth-child(4) { background: #4f7a33; }
.season[data-season="summer"] .season-inks i:nth-child(1) { background: #f6efd9; }
.season[data-season="summer"] .season-inks i:nth-child(2) { background: #1e3a2f; }
.season[data-season="summer"] .season-inks i:nth-child(3) { background: #cdbb8e; }
.season[data-season="summer"] .season-inks i:nth-child(4) { background: #b5502a; }
.season[data-season="frost"]  .season-inks i:nth-child(1) { background: #f3e7d3; }
.season[data-season="frost"]  .season-inks i:nth-child(2) { background: #46301f; }
.season[data-season="frost"]  .season-inks i:nth-child(3) { background: #c8a878; }
.season[data-season="frost"]  .season-inks i:nth-child(4) { background: #a34419; }
.season[data-season="snow"]   .season-inks i:nth-child(1) { background: #eceff0; }
.season[data-season="snow"]   .season-inks i:nth-child(2) { background: #2e4653; }
.season[data-season="snow"]   .season-inks i:nth-child(3) { background: #b3bfc6; }
.season[data-season="snow"]   .season-inks i:nth-child(4) { background: #3f6478; }

.season-data {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 24px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.season-data dt {
  font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.season-data dd { font-family: var(--f-display); font-weight: 600; font-size: 15.5px; }

/* ---------- field notes ---------- */
.notes-list {
  list-style: none;
  margin-top: clamp(24px, 4vh, 38px);
}
.note {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 30px);
  padding: clamp(20px, 3vh, 30px) 0;
  border-top: 1px solid var(--line-faint);
}
.note:nth-child(even) {
  margin-left: clamp(0px, 5vw, 58px);
}
.note-glyph {
  width: 56px; height: 56px;
  color: var(--ink);
  justify-self: center;
  margin-top: 6px;
  transition: color 1.1s ease;
}
.note-date {
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 6px;
}
.note h3 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(19px, 2.2vw, 24px);
  margin-bottom: 8px;
}
.note h3 em { font-weight: 400; font-size: 0.82em; color: var(--ink-soft); }
.note div > p:last-child { font-size: 15px; max-width: 62ch; }

/* ---------- waypoints ---------- */
.wp-table-wrap {
  overflow-x: auto;
  margin: clamp(24px, 4vh, 36px) 0;
  border: 1px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
}
.wp-table {
  width: 100%; min-width: 620px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.wp-table th, .wp-table td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-faint);
  vertical-align: top;
}
.wp-table thead th {
  font-family: var(--f-mono); font-weight: 400;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  transition: background-color 1.1s ease, color 1.1s ease;
}
.wp-table tbody th {
  font-family: var(--f-display); font-weight: 600; font-size: 17px;
  white-space: nowrap;
}
.wp-table tbody tr:last-child th,
.wp-table tbody tr:last-child td { border-bottom: 0; }
.wp-table td:nth-child(2) { font-family: var(--f-mono); font-size: 13px; color: var(--rust); white-space: nowrap; }

.wp-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.wp-block h3 {
  font-family: var(--f-display); font-weight: 600; font-size: 20px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
}
.wp-block h3::before {
  content: ""; width: 22px; height: 2px; background: var(--rust); flex: none;
}
.wp-block p { font-size: 15px; }
.wp-block em { font-family: var(--f-display); }

.summit-close {
  margin-top: clamp(36px, 6vh, 56px);
  padding-top: clamp(24px, 4vh, 36px);
  border-top: 2px solid var(--ink);
  text-align: center;
  transform-origin: 50% 0;
}
.summit-close.rv {
  transform: translateY(28px) rotate(0.35deg);
}
.summit-close.rv.in {
  transform: none;
}
.summit-poem {
  font-family: var(--f-display);
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: 400;
  line-height: 1.5;
}
.summit-stamp {
  display: inline-block;
  max-width: 100%;
  margin-top: 22px;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--rust);
  border: 1.5px solid var(--rust);
  padding: 9px 16px;
  line-height: 1.7;
  text-wrap: balance;
  transform: rotate(-2.5deg);
  transform-origin: 50% 50%;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--rust) 18%, transparent),
    0 12px 28px -24px var(--rust);
}
.summit-close.in .summit-stamp {
  animation: stamp-hit 0.72s var(--ease-stamp) 0.22s both;
}
@keyframes stamp-hit {
  0% { opacity: 0; transform: translateY(-18px) rotate(-7deg) scale(1.08); filter: blur(1px); }
  62% { opacity: 1; transform: translateY(2px) rotate(-2deg) scale(0.98); filter: none; }
  100% { opacity: 1; transform: rotate(-2.5deg) scale(1); filter: none; }
}

/* ---------- footer ---------- */
.site-foot {
  position: relative; z-index: 10;
  margin-top: 8vh;
  background: var(--ink);
  color: var(--paper);
  transition: background-color 1.1s ease, color 1.1s ease;
}
.foot-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 72px) clamp(24px, 5vw, 56px) calc(clamp(28px, 5vh, 48px) + var(--frame));
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 6vw, 80px);
}
.foot-brand .brand-word { font-size: 24px; letter-spacing: 0.28em; }
.foot-brand p {
  margin-top: 14px;
  font-size: 14px; line-height: 1.7;
  color: color-mix(in srgb, var(--paper) 86%, var(--ink));
  max-width: 46ch;
}
.foot-nav {
  display: flex; flex-direction: column; gap: 4px;
  justify-self: end; align-self: center;
}
.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--f-mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 92%, var(--ink));
  text-decoration: none;
  padding: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 20%, transparent);
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out);
}
.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: var(--paper);
  border-bottom-color: var(--rust);
  transform: translateX(4px);
}
.foot-credit {
  grid-column: 1 / -1;
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 74%, var(--ink));
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1160px) {
  .brand-sub { display: none; }
}

@media (max-width: 1100px) {
  .altimeter { display: none; }
  .terrain-hud {
    right: calc(var(--frame) + 18px);
    left: auto;
    bottom: calc(var(--frame) + 18px);
    grid-template-columns: auto;
  }
  .hud-rule,
  .hud-bearing { display: none; }
  .sec-left .sec-body, .sec-right .sec-body { margin-left: 0; margin-right: 0; }
  .section {
    grid-template-columns: minmax(24px, 1fr) minmax(0, 920px) minmax(24px, 1fr);
  }
  .sec-margin { display: none; }
}

@media (max-width: 1000px) {
  .head-nav:not(.guide-nav) { display: none; }
  .menu-btn { display: inline-flex; }
}

@media (max-width: 900px) {
  .hero-overline { letter-spacing: 0.18em; }
  .legend-note { margin-left: 0; }
  .survey-band {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .survey-band__facts {
    grid-column: 1 / -1;
  }
  .trail-grid { grid-template-columns: 1fr; }
  .trail-card:nth-child(2),
  .trail-card:nth-child(4) { margin-top: 0; }
  .season { grid-template-columns: 1fr; }
  .season-data { grid-column: 1; }
  .sec-wide .panel-head { grid-template-columns: 1fr; }
  .ph-ornament { display: none; }
  .foot-inner { grid-template-columns: 1fr; }
  .foot-nav { justify-self: start; }
}

@media (max-width: 640px) {
  :root { --frame: 10px; --head-h: 58px; }
  body { font-size: 15px; }
  .mf-coord { display: none; }
  .map-frame::before { display: none; }
  .hero { padding-bottom: 110px; }
  .hero-inner {
    padding-inline: 4px;
  }
  .hero-inner::after {
    display: none;
  }
  .hero-title {
    font-size: clamp(48px, 17vw, 64px);
    letter-spacing: 0.018em;
  }
  .hero-survey span {
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  .poem-br { display: none; }
  .hm-dot { display: none; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 9px; }
  .hero-overline { flex-direction: column; gap: 7px; }
  .ho-dot { display: none; }
  .terrain-hud { display: none; }
  .contour-sightline {
    left: calc(var(--frame) + 6px);
    right: calc(var(--frame) + 6px);
    opacity: 0.62;
  }
  .contour-sightline::before {
    left: 0;
    right: 0;
  }
  .contour-sightline::after {
    left: 18px;
    width: 7px;
    height: 7px;
  }
  .contour-sightline span {
    display: none;
  }
  .season-data { grid-template-columns: 1fr; gap: 12px; }
  .compass {
    width: 60px;
    right: 20px;
    top: calc(var(--head-h) + var(--frame) + 18px);
  }
  .section { padding: 7vh 0; grid-template-columns: 16px minmax(0, 1fr) 16px; }
  .panel { padding: 24px 20px; outline-offset: 3px; }
  .panel::before { inset: 6px; }
  .sec-body.panel::after,
  .panel-head::after { display: none; }
  #seasons .panel-head::before,
  #seasons .panel-head::after { display: none; }
  .vista { height: 38vh; }
  .survey-band {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    margin-top: -3vh;
  }
  .survey-band__mark {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 42px;
  }
  .survey-band__facts {
    grid-template-columns: 1fr;
  }
  .survey-band__facts div {
    border-right: 0;
    border-bottom: 1px solid var(--line-faint);
  }
  .survey-band__facts div:last-child { border-bottom: 0; }
  .peak-list li {
    grid-template-columns: 1fr auto;
    grid-template-areas: "name el" "fa fa" "note note";
  }
  .pk-fa { text-align: left; }
  .tc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .legend-strip { width: calc(100% - 32px); }
  .note { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .note:nth-child(even) { margin-left: 0; }
  .note-glyph { width: 40px; height: 40px; }
  .season-inks { flex-wrap: wrap; }
  .season-inks b { font-size: 10px; letter-spacing: 0.12em; }
  .summit-stamp { letter-spacing: 0.14em; }
}

/* elevation stamp fallback inside kicker on narrow screens */
@media (max-width: 1100px) {
  .section[data-elev] .sec-kicker::before {
    content: "";
    font-family: var(--f-mono);
    font-size: 10px; letter-spacing: 0.18em;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    padding: 3px 8px;
    order: 2; margin-left: auto;
  }
  .section[data-elev="640"]  .sec-kicker::before { content: "EL. 640 M"; }
  .section[data-elev="1120"] .sec-kicker::before { content: "EL. 1 120 M"; }
  .section[data-elev="1480"] .sec-kicker::before { content: "EL. 1 480 M"; }
  .section[data-elev="1910"] .sec-kicker::before { content: "EL. 1 910 M"; }
  .section[data-elev="2340"] .sec-kicker::before { content: "EL. 2 340 M"; }
  .section[data-elev="2847"] .sec-kicker::before { content: "EL. 2 847 M"; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { transition: none; opacity: 1; transform: none; }
  .ht-l { animation: none; }
  .compass { animation: none; }
  .hero-scroll svg { animation: none; }
  .summit-close.in .summit-stamp { animation: none; }
  .trail-card, .trail-card:hover { transform: none; transition: none; }
  .menu-btn:hover,
  .menu-btn:focus-visible,
  .nav-overlay nav a:hover,
  .nav-overlay nav a:focus-visible,
  .foot-nav a:hover,
  .foot-nav a:focus-visible { transform: none; }
  * { transition-duration: 0.01ms !important; }
}
