/* ==========================================================================
   Majorney — shared styles
   Palette: charcoal/black base, brass gold + bronze accents, sage green
   for "growth/unlocked" states.
   ========================================================================== */

@font-face {
  font-family: "IBM Plex Serif";
  src: url("assets/fonts/IBMPlexSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0b;
  --bg-alt: #131416;
  --bg-panel: #17181b;
  --line: #2a2b2e;

  --gold: #d4af6a;
  --gold-bright: #f0cf8e;
  --bronze: #8a5a2e;
  --green: #5c8a68;
  --green-bright: #79ad86;

  --text: #ece7dc;
  --text-muted: #a39c8f;
  --text-faint: #6b6660;

  --locked: #3c3c3c;
  --locked-text: #77746e;

  --font-display: "IBM Plex Serif", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-brand: "IBM Plex Serif", "Georgia", serif;

  --shadow-glow: 0 0 24px rgba(212, 175, 106, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
}

p {
  margin: 0;
}

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------------------------------- Nav --------------------------------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.75rem;
  background: linear-gradient(to bottom, rgba(10,10,11,0.9), rgba(10,10,11,0));
  backdrop-filter: blur(2px);
}

.site-nav.solid {
  background: rgba(10, 10, 11, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-brand span,
.brand-word {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
}

.nav-brand span {
  font-size: 1.05rem;
  color: var(--gold-bright);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--gold);
}

/* -------------------------------- Buttons -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--bronze));
  color: #14100a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(212, 175, 106, 0.08);
}

/* ------------------------------ Loading screen --------------------------- */

#loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background: radial-gradient(ellipse at center, #141416 0%, #08080a 75%);
  transition: opacity 0.9s ease, visibility 0.9s ease;
  padding: 2rem;
  text-align: center;
}

#loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-mark {
  position: relative;
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-mark img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 18px rgba(212, 175, 106, 0.35));
}

.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--gold);
  border-right-color: var(--gold);
  animation: spin 1.6s linear infinite;
}

.loader-ring.slow {
  inset: -14px;
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: var(--bronze);
  border-left-color: var(--bronze);
  animation-duration: 2.6s;
  animation-direction: reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-quote {
  max-width: 420px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 1.2s ease 0.4s forwards;
}

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

/* ---------------------------------- Hero --------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/banner-clean.png");
  background-size: cover;
  background-position: center 38%;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(8,8,9,0.55) 0%, rgba(8,8,9,0.35) 35%, rgba(8,8,9,0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  padding: 2rem 1.5rem;
}

.hero-content img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  color: var(--gold-bright);
  text-shadow: 0 2px 30px rgba(0,0,0,0.6);
}

.hero-tagline {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--text-muted);
  max-width: 34rem;
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-faint);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ------------------------------- Purpose ---------------------------------- */

.purpose {
  padding: 7rem 0;
  background: var(--bg);
  position: relative;
}

.purpose::before {
  content: "";
  display: block;
  width: 1px;
  height: 4rem;
  margin: 0 auto 2.5rem;
  background: linear-gradient(to bottom, transparent, var(--gold));
}

.purpose .container {
  max-width: 760px;
  text-align: center;
}

.purpose h2 {
  color: var(--gold-bright);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  margin-bottom: 2rem;
}

.purpose p {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--text);
  font-weight: 300;
}

.purpose p + p {
  margin-top: 1.2rem;
}

/* -------------------------------- Socials --------------------------------- */

.socials {
  padding: 4rem 0 5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.socials .eyebrow {
  display: block;
  margin-bottom: 1.6rem;
}

.social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
}

.social-row a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-row a svg {
  width: 18px;
  height: 18px;
}

.social-row a:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  transform: translateY(-3px);
}

/* ------------------------------- Try section ------------------------------- */

.try {
  padding: 7rem 0;
  text-align: center;
  position: relative;
}

.try-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 2.4rem;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--bg-panel), var(--bg-alt));
  border: 1px solid var(--line);
  position: relative;
}

.try-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 20px 20px 0 0;
}

.try-card h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--gold-bright);
  margin-bottom: 1rem;
}

.try-card p {
  color: var(--text-muted);
  max-width: 30rem;
  margin: 0 auto 2rem;
}

/* --------------------------------- Footer ---------------------------------- */

.site-footer {
  padding: 3rem 0 2.5rem;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.site-footer .nav-brand {
  justify-content: center;
  margin-bottom: 1rem;
}

/* ============================================================================
   Climb / prototype map page
   ============================================================================ */

/* ============================================================================
   Climb page — constellation backdrop
   The constellation mountain is fixed behind the whole page, so every section
   below has to be transparent and sit above it.
   ============================================================================ */

#climb-constellation {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  transition: opacity 1.4s ease;
}

#climb-constellation.ready {
  opacity: 1;
}

body:has(#climb-constellation) {
  background: #000;
}

.climb-hero,
.route-section,
.site-footer {
  position: relative;
  z-index: 1;
  background: transparent;
}

.climb-hero {
  padding: 9rem 1.5rem 3rem;
  text-align: center;
}

/* Soft scrim behind the intro copy — the densest part of the constellation
   sits right behind this text, and without it the body copy washes out. */
.climb-hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
}

.climb-hero-content::before {
  content: "";
  position: absolute;
  inset: -2rem -1rem;
  z-index: -1;
  background: radial-gradient(ellipse 62% 58% at center, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.55) 55%, transparent 82%);
  pointer-events: none;
}

.climb-hero-content h1,
.climb-hero-content p,
.climb-hero-content .eyebrow {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9);
}

/* --------------------------------- The route -------------------------------- */

.route-section {
  padding: 2rem 1.5rem 4rem;
}

.route {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: min(100%, 540px);
  margin: 0 auto;
}

/* Override the old map-pinned node styles: these are laid out in flow now,
   not positioned on ridge coordinates. */
.route .trail-node {
  position: static;
  transform: none;
  opacity: 1;
  width: 100%;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.route .trail-node:hover:not(.locked) {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(212, 175, 106, 0.35);
}

.route .node-badge {
  width: 46px;
  height: 46px;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.route .node-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.route .node-label,
.route .node-sub {
  text-align: left;
}

.route .trail-node.locked {
  opacity: 0.5;
}

.summit-banner {
  position: relative;
  z-index: 1;
}

.climb-hero .eyebrow {
  display: block;
  margin-bottom: 0.8rem;
}

.climb-hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--gold-bright);
  margin-bottom: 1rem;
}

.climb-hero p {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--text-muted);
}

.preview-badge {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.4rem 1rem;
  border: 1px dashed var(--bronze);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
}

.trailmap-section {
  position: relative;
  padding: 2rem 0 3rem;
  background: var(--bg);
  overflow-x: auto;
  overflow-y: hidden;
}

.trailmap {
  position: relative;
  width: max(100%, 1100px);
  height: clamp(420px, 40vw, 620px);
  margin: 0;
  overflow: hidden;
}

/* ---- sky: gradient wash + stars, ground (bottom-left) to high sky (top-right) ---- */

.trail-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    70deg,
    #2c2115 0%,
    #1c1a13 14%,
    #131313 30%,
    #0d0e11 50%,
    #0a0a0d 70%,
    #08080a 100%
  );
}

.trail-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(1.6px 1.6px at 15% 20%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 65% 10%, #fff 60%, transparent),
    radial-gradient(1.4px 1.4px at 35% 35%, #fff 55%, transparent),
    radial-gradient(1.1px 1.1px at 80% 25%, #fff 55%, transparent),
    radial-gradient(1.3px 1.3px at 50% 15%, #fff 55%, transparent),
    radial-gradient(1px 1px at 25% 8%, #fff 55%, transparent),
    radial-gradient(1.5px 1.5px at 90% 40%, #fff 55%, transparent);
  background-size: 260px 260px;
  -webkit-mask-image: linear-gradient(70deg, transparent 15%, #000 55%, #000 100%);
  mask-image: linear-gradient(70deg, transparent 15%, #000 55%, #000 100%);
  animation: drift-stars 90s linear infinite, twinkle-stars-soft 4.8s ease-in-out infinite alternate;
}

/* a second, sparser layer of bigger/brighter stars with its own drift +
   twinkle timing so the two layers drift out of sync with each other —
   reads as real independent sparkle rather than one flat pulse ---- */
.trail-stars-twinkle {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(1.8px 1.8px at 20% 12%, #fff 75%, transparent),
    radial-gradient(1.6px 1.6px at 55% 24%, #fff 70%, transparent),
    radial-gradient(2px 2px at 75% 6%, #fff 75%, transparent),
    radial-gradient(1.5px 1.5px at 40% 32%, #fff 70%, transparent),
    radial-gradient(1.7px 1.7px at 88% 20%, #fff 70%, transparent),
    radial-gradient(1.4px 1.4px at 10% 38%, #fff 65%, transparent),
    radial-gradient(1.9px 1.9px at 65% 4%, #fff 75%, transparent);
  background-size: 340px 340px;
  -webkit-mask-image: linear-gradient(70deg, transparent 15%, #000 55%, #000 100%);
  mask-image: linear-gradient(70deg, transparent 15%, #000 55%, #000 100%);
  mix-blend-mode: screen;
  animation: drift-stars-rev 130s linear infinite, twinkle-stars 3.2s ease-in-out infinite alternate;
}

@keyframes drift-stars {
  from { background-position: 0 0; }
  to { background-position: -260px 260px; }
}

@keyframes drift-stars-rev {
  from { background-position: 0 0; }
  to { background-position: 340px -180px; }
}

@keyframes twinkle-stars {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.45; }
}

@keyframes twinkle-stars-soft {
  0% { opacity: 0.55; }
  50% { opacity: 0.85; }
  100% { opacity: 0.6; }
}

/* ---- the mountain: one continuous jagged slope, clipped from a single
   shape so it always reads as one mountain rather than scattered decoration.
   It deliberately runs off the top of the frame instead of closing into a
   peak — the point is that it keeps going further than you can see. ---- */

.slope-clip {
  clip-path: polygon(
    0% 90%, 4% 82%, 10% 87%, 17% 68%, 23% 73%, 29% 74%, 35% 58%, 38% 63%,
    42% 52%, 48% 57%, 54% 58%, 60% 42%, 64% 47%, 66% 38%, 72% 43%, 78% 44%,
    84% 26%, 87% 31%, 90% 20%, 94% 13%, 97% 17%, 100% 10%, 100% 100%, 0% 100%
  );
}

.mountain-slope {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    70deg,
    #201406 0%,
    #2e1c0a 14%,
    #3d260f 28%,
    #4f3016 42%,
    #653c1d 56%,
    #7e5228 68%,
    #9c7038 78%,
    #bd9152 88%,
    #dcb877 96%,
    #efd39a 100%
  );
}

.mountain-slope {
  clip-path: polygon(
    0% 90%, 4% 82%, 10% 87%, 17% 68%, 23% 73%, 29% 74%, 35% 58%, 38% 63%,
    42% 52%, 48% 57%, 54% 58%, 60% 42%, 64% 47%, 66% 38%, 72% 43%, 78% 44%,
    84% 26%, 87% 31%, 90% 20%, 94% 13%, 97% 17%, 100% 10%, 100% 100%, 0% 100%
  );
}

.ridge-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  fill: none;
  stroke: rgba(240, 207, 142, 0.5);
  stroke-width: 0.35;
  vector-effect: non-scaling-stroke;
}

.ridge-line polyline {
  fill: none;
  stroke: inherit;
  stroke-width: inherit;
}

/* Mist banked up over the still-unmapped, work-in-progress stretch of the
   ridge (top-right, around the locked nodes) — sized/positioned in % so it
   still reads as an atmospheric layer at any trailmap width, not a tiny
   corner accent. ---- */

.trail-fog {
  position: absolute;
  z-index: 5;
  border-radius: 50%;
  filter: blur(28px);
  pointer-events: none;
}

.fog-a {
  width: 38%;
  height: 58%;
  top: -6%;
  left: 54%;
  background: radial-gradient(ellipse, rgba(240,235,225,0.4), transparent 72%);
  animation: drift-a 50s ease-in-out infinite;
}

.fog-b {
  width: 30%;
  height: 46%;
  top: 6%;
  left: 73%;
  background: radial-gradient(ellipse, rgba(240,235,225,0.3), transparent 72%);
  animation: drift-b 65s ease-in-out infinite;
}

.fog-c {
  width: 24%;
  height: 40%;
  top: -4%;
  left: 86%;
  background: radial-gradient(ellipse, rgba(240,235,225,0.26), transparent 72%);
  animation: drift-a 74s ease-in-out infinite reverse;
}

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-3%, 5%); }
}

@keyframes drift-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3%, -4%); }
}

/* ---- trail line + stops ---- */

.trail-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
}

.trail-path {
  fill: none;
  stroke-width: 0.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.trail-path.unlocked {
  stroke: var(--gold);
  stroke-dasharray: 1.4 1.6;
  opacity: 0.65;
}

.trail-path.locked {
  stroke: var(--locked);
  stroke-dasharray: 1.4 1.6;
  opacity: 0.7;
}

.trail-node {
  position: absolute;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 148px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  font-family: var(--font-body);
  padding: 0;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.3s ease;
}

.trail-node.in-view {
  opacity: 1;
}

.trail-node:hover:not(.locked) {
  transform: translate(-50%, -52%);
}

.node-badge {
  position: relative; /* anchors the .node-check tick in the corner */
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 2px solid var(--gold);
  background: radial-gradient(circle at 35% 30%, #26211a, var(--bg-panel));
  box-shadow: 0 0 0 4px rgba(212,175,106,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* "You are here" pulses gold; green is reserved for stops you've finished,
   so the two states never get confused for each other. */
.trail-node.current .node-badge {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(212,175,106,0.15), 0 0 22px rgba(212,175,106,0.35);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(212,175,106,0.15), 0 0 22px rgba(212,175,106,0.35); }
  50% { box-shadow: 0 0 0 6px rgba(212,175,106,0.2), 0 0 30px rgba(212,175,106,0.55); }
}

@media (prefers-reduced-motion: reduce) {
  .trail-node.current .node-badge {
    animation: none;
  }
}

.node-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}

.node-sub {
  font-size: 0.68rem;
  color: var(--text-faint);
  text-align: center;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}

/* ------------------------------ Finished stops ------------------------------
   script.js adds .done to a stop once you actually complete it (camp set up,
   quiz answered, trail scouted, matches seen, first step committed). The ring
   goes green and the tick pops in, so the route reads as progress at a glance
   instead of a flat list. Progress is per-visit, like the rest of the state. */

.trail-node.done .node-badge {
  border-color: var(--green-bright);
  background: radial-gradient(circle at 35% 30%, #1d2620, var(--bg-panel));
  box-shadow: 0 0 0 4px rgba(121, 173, 134, 0.12);
  animation: none; /* a finished stop never pulses, even mid-handoff */
}

.node-check {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: #10180f;
  background: var(--green-bright);
  border: 2px solid var(--bg);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.trail-node.done .node-check {
  opacity: 1;
  transform: scale(1);
}

/* In the list layout, tint the whole row so a finished stop is obvious
   without having to look at the badge. */
.route .trail-node.done {
  background: rgba(121, 173, 134, 0.06);
  border-color: rgba(121, 173, 134, 0.28);
}

.route .trail-node.done:hover {
  background: rgba(121, 173, 134, 0.1);
  border-color: rgba(121, 173, 134, 0.45);
}

.trail-node.done .node-sub {
  color: var(--green-bright);
}

@media (prefers-reduced-motion: reduce) {
  .node-check {
    transition: none;
  }
}

.trail-node.locked {
  cursor: default;
}

/* Locked stops can't be finished, so they never carry a tick. */
.trail-node.locked .node-check {
  display: none;
}

.trail-node.locked .node-badge {
  border-color: var(--locked);
  background: radial-gradient(circle at 35% 30%, #1c1c1c, #141414);
  box-shadow: none;
  color: var(--locked-text);
}

.trail-node.locked .node-label,
.trail-node.locked .node-sub {
  color: var(--locked-text);
}

.summit-banner {
  position: relative;
  z-index: 2;
  margin: 2.5rem auto 0;
  width: min(320px, 86%);
  text-align: center;
  padding: 1.4rem 1.6rem;
  border-radius: 16px;
  border: 1px dashed var(--locked);
  color: var(--locked-text);
  font-size: 0.85rem;
}

.summit-banner strong {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

/* --------------------------------- Modal ----------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(6,6,7,0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.panel-card {
  max-width: 460px;
  width: 100%;
  max-height: min(640px, 86vh);
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  transform: translateY(10px);
  transition: transform 0.25s ease;
}

.modal-backdrop.open .panel-card {
  transform: translateY(0);
}

.panel-card .node-badge {
  margin: 0 auto 1rem;
}

.panel-card h3 {
  color: var(--gold-bright);
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.panel-card > p.panel-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.panel-tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px dashed var(--locked);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--locked-text);
}

/* ---- forms (Basecamp / Scout the Trail) ---- */

.panel-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 0.5rem;
}

.field label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.field input[type="text"],
.field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.field input[type="text"]:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.option-grid.single-col {
  grid-template-columns: 1fr;
}

.option-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.84rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.option-pill:hover {
  border-color: var(--bronze);
  color: var(--text);
}

.option-pill.selected {
  border-color: var(--gold);
  background: rgba(212,175,106,0.1);
  color: var(--gold-bright);
}

.option-pill .opt-icon {
  font-size: 1.1rem;
}

/* ---- quiz (Find Your Spark) ---- */

.quiz-progress {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.quiz-progress span {
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.quiz-progress span.done {
  background: var(--green-bright);
}

.quiz-progress span.active {
  background: var(--gold);
}

.quiz-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  text-align: center;
}

.quiz-result {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.quiz-result .result-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-weight: 600;
  margin: 0.6rem 0 1.2rem;
}

/* ---- results / choice (Camp Unlocked / First Step) ---- */

.panel-card.panel-wide {
  max-width: 600px;
}

/* Each EC type gets its own color, carried as --type by anything tagged
   with data-type (cards, type badges, filter chips). */
[data-type] { --type: #a39c8f; }
[data-type="competition"] { --type: #e5a55d; }
[data-type="program"] { --type: #b59ae0; }
[data-type="club"] { --type: #7fb0e6; }
[data-type="volunteer"] { --type: #7fc091; }
[data-type="course"] { --type: #5ec4bb; }
[data-type="perform"] { --type: #e58fa3; }
[data-type="internship"] { --type: #e6cf6e; }

.ec-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.2rem 0 0.9rem;
  text-align: left;
}

.ec-filter-row {
  position: relative;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 1.5rem 4px 2px;
  /* Fade the right edge so it's obvious the row scrolls. */
  -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
  mask-image: linear-gradient(to right, #000 88%, transparent);
}

.ec-filter-row::-webkit-scrollbar {
  display: none;
}

.ec-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.5rem 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.ec-chip:hover:not(:disabled) {
  border-color: var(--bronze);
  color: var(--text);
}

.ec-chip[aria-pressed="true"] {
  border-color: var(--gold);
  background: rgba(212, 175, 106, 0.12);
  color: var(--gold-bright);
}

.ec-chip[data-type][aria-pressed="true"] {
  border-color: var(--type);
  background: color-mix(in srgb, var(--type) 14%, transparent);
  color: var(--type);
}

.ec-chip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ec-chip .count {
  min-width: 1.3rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-faint);
  font-size: 0.66rem;
  text-align: center;
}

.ec-chip[aria-pressed="true"] .count {
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.ec-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--type);
}

.ec-chip .you-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
}

.ec-summary {
  margin: 0 0 0.7rem;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-align: left;
}

.ec-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 0 1.4rem;
  text-align: left;
}

.ec-card {
  position: relative;
  padding: 1rem 1.05rem 0.9rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  background: linear-gradient(135deg, color-mix(in srgb, var(--type) 10%, var(--bg-alt)), var(--bg-alt) 55%);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  animation: ec-in 0.35s ease both;
  animation-delay: calc(min(var(--i), 10) * 45ms);
}

.ec-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--type);
}

.ec-card:hover {
  border-color: color-mix(in srgb, var(--type) 45%, var(--line));
}

.ec-card.selectable {
  cursor: pointer;
}

.ec-card.selectable:hover {
  transform: translateY(-1px);
}

.ec-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow-glow);
}

.ec-name {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.ec-type {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--type) 35%, transparent);
  background: color-mix(in srgb, var(--type) 15%, transparent);
  color: var(--type);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ec-blurb {
  margin: 0 0 0.8rem;
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.ec-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ec-locs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ec-loc {
  padding: 0.16rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-faint);
  font-size: 0.66rem;
}

.ec-loc.is-you {
  border-color: rgba(212, 175, 106, 0.5);
  background: rgba(212, 175, 106, 0.1);
  color: var(--gold-bright);
}

.ec-actions {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.ec-link,
.ec-pick {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.75rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ec-link {
  border: 1px solid color-mix(in srgb, var(--type, var(--gold)) 40%, transparent);
  color: var(--type, var(--gold-bright));
  background: transparent;
}

.ec-link:hover {
  background: color-mix(in srgb, var(--type, var(--gold)) 15%, transparent);
}

.ec-pick {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--text-muted);
}

.ec-pick:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.ec-pick[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--bg);
}

.ec-chip:focus-visible,
.ec-link:focus-visible,
.ec-pick:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.ec-commit {
  width: 100%;
  justify-content: center;
}

.confirm-link {
  display: flex;
  width: fit-content;
  margin-top: 0.9rem;
}

@keyframes ec-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ec-card { animation: none; }
}

@media (max-width: 480px) {
  .panel-card.panel-wide {
    max-height: 90vh;
    padding: 1.5rem 1.1rem;
  }
}

.confirm-box {
  padding: 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--green-bright);
  background: rgba(92,138,104,0.1);
  color: var(--text);
  font-size: 0.9rem;
  margin: 1rem 0 1.4rem;
}

/* ---- waitlist email capture (locked stops + end of the current trail) ---- */

.waitlist-box {
  margin: 1.2rem 0 1.4rem;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 1px dashed var(--gold);
  background: rgba(212, 175, 106, 0.06);
  text-align: left;
}

.waitlist-prompt {
  font-size: 0.86rem;
  color: var(--text);
  margin: 0 0 0.8rem;
}

.waitlist-form {
  display: flex;
  gap: 0.5rem;
}

.waitlist-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.waitlist-form input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
}

.waitlist-form button {
  flex-shrink: 0;
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
}

.waitlist-note {
  margin: 0.6rem 0 0;
  font-size: 0.7rem;
  color: var(--text-faint);
}

.waitlist-thanks {
  margin: 0;
  font-size: 0.88rem;
  color: var(--green-bright);
  text-align: center;
}

@media (max-width: 420px) {
  .waitlist-form {
    flex-direction: column;
  }
}

.form-disclaimer {
  margin-top: 0.9rem;
  font-size: 0.72rem;
  color: var(--text-faint);
  text-align: center;
}

/* --------------------------------- Utility ---------------------------------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-top: 3rem;
}

@media (max-width: 640px) {
  .trailmap {
    height: clamp(360px, 62vw, 480px);
  }
  .trail-node {
    width: 118px;
  }
  .node-badge {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }
  .node-label {
    font-size: 0.74rem;
  }
  .node-sub {
    font-size: 0.62rem;
  }
  .option-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-nav {
    padding: 1rem 1.1rem;
  }
  .nav-links {
    gap: 1rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .nav-brand span {
    font-size: 0.9rem;
  }
}
