@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&display=swap");

:root {
  --ink: #12171c;
  --ink-2: #1b232a;
  --ink-3: #242f38;
  --paper: #f6f1e4;
  --paper-2: #efe6d2;
  --text: #211c14;
  --text-soft: #4a4437;
  --flare: #ff5a1f;
  --flare-2: #ffbb8a;
  --ember: #c23a0e;
  --glacier: #4f7480;
  --glacier-2: #8fb2ba;
  --line: rgba(23, 19, 10, 0.15);
  --line-dark: rgba(246, 241, 228, 0.16);
  --display: "Space Grotesk", -apple-system, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --measure: 62ch;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--serif);
  background: var(--paper);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
}
p {
  max-width: var(--measure);
}
.eyebrow {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ember);
}

/* ---------- Skip / focus ---------- */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--flare);
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--flare);
  color: var(--ink);
  padding: 10px 16px;
  z-index: 200;
  font-family: var(--display);
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Progress rail (desktop) ---------- */
.rail {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.rail-line {
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
}
.rail-dot {
  position: relative;
  width: 22px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
}
.rail-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--paper-2);
  border: 1px solid var(--text-soft);
  transform: rotate(45deg);
  transition: all 0.35s ease;
}
.rail-dot.active::before {
  background: var(--flare);
  border-color: var(--flare);
  transform: rotate(45deg) scale(1.35);
}
.rail-dot .rail-label {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--display);
  font-size: 0.72rem;
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  padding: 4px 9px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.rail-dot:hover .rail-label {
  opacity: 1;
}
@media (max-width: 980px) {
  .rail {
    display: none;
  }
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 23, 28, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-dark);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  color: var(--paper);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}
.brand-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.brand small {
  display: block;
  font-weight: 400;
  color: var(--glacier-2);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}
nav.primary-nav {
  display: flex;
  gap: 26px;
  align-items: center;
}
nav.primary-nav a {
  color: var(--paper);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 500;
  opacity: 0.82;
  transition: opacity 0.2s ease;
}
nav.primary-nav a:hover {
  opacity: 1;
}
.nav-cta {
  background: var(--flare);
  color: var(--ink) !important;
  padding: 9px 16px;
  border-radius: 2px;
  opacity: 1 !important;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-dark);
  color: var(--paper);
  padding: 8px 10px;
  font-family: var(--display);
  border-radius: 2px;
}
@media (max-width: 820px) {
  nav.primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--line-dark);
    display: none;
  }
  nav.primary-nav.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(
    180deg,
    var(--ink) 0%,
    var(--ink-2) 72%,
    var(--ink-3) 100%
  );
  color: var(--paper);
  overflow: hidden;
  padding-bottom: 0;
}
.hero-inner {
  position: relative;
  z-index: 3;
  padding: 88px 0 40px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 56px;
  }
}
.hero-stamp {
  position: absolute;
  top: 26px;
  right: 28px;
  z-index: 4;
  border: 1px solid rgba(246, 241, 228, 0.4);
  color: rgba(246, 241, 228, 0.75);
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 2px;
  transform: rotate(2deg);
}
@media (max-width: 640px) {
  .hero-stamp {
    display: none;
  }
}
.hero-kicker {
  font-family: var(--display);
  color: var(--flare-2);
  font-size: 0.86rem;
  font-weight: 500;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-kicker .dot {
  width: 7px;
  height: 7px;
  background: var(--flare);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.25);
}
h1.hero-title {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  max-width: 14ch;
}
h1.hero-title em {
  font-style: normal;
  color: var(--flare);
}
.hero-sub {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: rgba(246, 241, 228, 0.86);
  margin-top: 22px;
  max-width: 46ch;
}
.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.18s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-flare {
  background: var(--flare);
  color: var(--ink);
}
.btn-flare:hover {
  background: #ff6c37;
}
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(246, 241, 228, 0.4);
}
.btn-ghost:hover {
  border-color: var(--flare-2);
  color: var(--flare-2);
}
.btn-dark {
  background: var(--ink);
  color: var(--paper);
}
.btn-dark:hover {
  background: var(--ink-3);
}

.hero-figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  overflow: hidden;
}
.hero-figure {
  padding: 18px 16px;
  border-left: 1px solid var(--line-dark);
}
.hero-figure:first-child {
  border-left: none;
}
.hero-figure b {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--flare-2);
}
.hero-figure span {
  display: block;
  font-size: 0.74rem;
  color: rgba(246, 241, 228, 0.68);
  margin-top: 4px;
  line-height: 1.35;
}

.hero-art {
  position: relative;
  width: 100%;
}
.hero-art svg {
  width: 100%;
  height: auto;
}

.mountains-wrap {
  position: relative;
  margin-top: 26px;
}
.mountains-wrap svg {
  width: 100%;
  display: block;
}
.ridge-path {
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: draw-ridge 2.2s ease forwards 0.3s;
}
@keyframes draw-ridge {
  to {
    stroke-dashoffset: 0;
  }
}
.beacon {
  animation: pulse 2.6s ease-in-out infinite;
  transform-origin: center;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ridge-path {
    stroke-dashoffset: 0;
    animation: none;
  }
  .beacon {
    animation: none;
  }
}

/* ---------- Section basics ---------- */
section {
  padding: 88px 0;
}
@media (max-width: 640px) {
  section {
    padding: 60px 0;
  }
}
.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  margin-top: 10px;
}
.section-head p {
  margin-top: 16px;
  font-size: 1.05rem;
  color: var(--text-soft);
}

.on-dark {
  background: var(--ink);
  color: var(--paper);
}
.on-dark .text-soft {
  color: rgba(246, 241, 228, 0.68);
}
.on-glacier {
  background: var(--glacier);
  color: var(--paper);
}

/* ---------- Problem / hazards ---------- */
.hazard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
  padding: 44px 0;
  border-top: 1px solid var(--line);
}
.hazard:last-of-type {
  border-bottom: 1px solid var(--line);
}
.hazard.flip .hazard-text {
  order: 2;
}
.hazard.flip .hazard-visual {
  order: 1;
}
@media (max-width: 820px) {
  .hazard {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 34px 0;
  }
  .hazard.flip .hazard-text,
  .hazard.flip .hazard-visual {
    order: initial;
  }
}
.hazard-num {
  font-family: var(--display);
  color: var(--ember);
  font-size: 0.86rem;
  margin-bottom: 8px;
}
.hazard-text h3 {
  font-size: 1.55rem;
}
.hazard-text p {
  margin-top: 14px;
  color: var(--text-soft);
}
.hazard-cite {
  margin-top: 16px;
  font-family: var(--display);
  font-size: 0.72rem;
  color: var(--text-soft);
  opacity: 0.75;
  border-left: 2px solid var(--ember);
  padding-left: 10px;
}
.hazard-visual {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 22px;
}
.glacier-note {
  margin-top: 24px;
  padding: 20px 22px;
  border-left: 3px solid var(--glacier);
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.glacier-note-source-image {
  margin: -20px -22px 20px;
  background: var(--paper);
}
.glacier-note-source-image img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
}
.glacier-note-source-image figcaption {
  padding: 8px 14px;
  color: var(--text-soft);
  font-family: var(--display);
  font-size: 0.7rem;
}
.glacier-note-source-image a {
  color: var(--ember);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.glacier-note-source-image a:hover {
  color: var(--flare);
}
.glacier-note-label {
  font-family: var(--display);
  color: var(--glacier);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.glacier-note h4 {
  font-size: 1.12rem;
  margin-top: 7px;
}
.glacier-note p {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.93rem;
}
.glacier-note-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
  color: var(--ember);
  font-family: var(--display);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.glacier-note-link:hover {
  color: var(--flare);
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}
.bar-label {
  font-family: var(--display);
  font-size: 0.78rem;
  width: 112px;
  flex-shrink: 0;
  color: var(--text-soft);
}
.bar-track {
  flex: 1;
  height: 14px;
  background: rgba(23, 19, 10, 0.08);
  border-radius: 1px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ember), var(--flare));
  width: 0%;
  transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bar-value {
  font-family: var(--display);
  font-size: 0.8rem;
  width: 78px;
  text-align: right;
  flex-shrink: 0;
}

.dotgrid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
}
.dotgrid span {
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgba(23, 19, 10, 0.1);
}
.dotgrid span.on {
  background: var(--glacier);
}
.dotgrid span.on.danger {
  background: var(--ember);
}
.dotgrid-note {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-soft);
}
.swatch {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

/* ---------- Ascent / stages (signature element) ---------- */
.ascent-wrap {
  position: relative;
  margin-top: 16px;
}
.ascent-svg {
  width: 100%;
  height: auto;
}
.ascent-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 36px;
}
@media (max-width: 820px) {
  .ascent-legend {
    grid-template-columns: 1fr;
  }
}
.camp-card {
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  overflow: hidden;
  background: rgba(246, 241, 228, 0.03);
}
.camp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.camp-head::-webkit-details-marker {
  display: none;
}
.camp-head .camp-name {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
}
.camp-head .camp-target {
  font-family: var(--display);
  font-size: 0.86rem;
  color: var(--flare-2);
  flex-shrink: 0;
}
.camp-body {
  padding: 0 18px 20px;
  color: rgba(246, 241, 228, 0.78);
  font-size: 0.94rem;
}
.camp-body p {
  max-width: none;
}
.camp-plus {
  font-family: var(--display);
  flex-shrink: 0;
  color: var(--flare-2);
  transition: transform 0.2s ease;
}
details[open] .camp-plus {
  transform: rotate(45deg);
}

/* ---------- Pillars ---------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 820px) {
  .pillars-grid {
    grid-template-columns: 1fr;
  }
}
.pillar {
  background: var(--paper);
  padding: 34px 30px;
}
.pillar:nth-child(2) {
  padding-top: 60px;
}
.pillar:nth-child(3) {
  padding-top: 60px;
}
@media (max-width: 820px) {
  .pillar:nth-child(2),
  .pillar:nth-child(3) {
    padding-top: 34px;
  }
}
.pillar-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
}
.pillar h3 {
  font-size: 1.28rem;
}
.pillar p {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* ---------- Allocation ---------- */
.alloc-list {
  margin-top: 8px;
}
.alloc-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-dark);
}
.alloc-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--display);
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.alloc-top .pct {
  color: var(--flare-2);
}
.alloc-track {
  height: 8px;
  background: rgba(246, 241, 228, 0.1);
  border-radius: 1px;
  overflow: hidden;
}
.alloc-fill {
  height: 100%;
  background: var(--flare);
  width: 0;
  transition: width 1s ease;
}
.alloc-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: rgba(246, 241, 228, 0.55);
  max-width: 56ch;
}

/* ---------- Channels ---------- */
.channels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 980px) {
  .channels {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .channels {
    grid-template-columns: 1fr;
  }
}
.channel {
  border-left: 3px solid var(--ember);
  padding: 8px 22px 8px 20px;
  border-top: 1px solid var(--line);
}
.channel:nth-child(1) {
  border-left-color: var(--flare);
}
.channel:nth-child(2) {
  border-left-color: var(--ember);
}
.channel:nth-child(3) {
  border-left-color: var(--glacier);
}
.channel:nth-child(4) {
  border-left-color: var(--ink-3);
}
.channel h4 {
  font-size: 1.05rem;
  margin-top: 8px;
}
.channel p {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.channel .tag {
  font-family: var(--display);
  font-size: 0.7rem;
  color: var(--ember);
}

/* ---------- Governance checklist ---------- */
.gov-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 60px;
}
@media (max-width: 820px) {
  .gov-grid {
    grid-template-columns: 1fr;
  }
}
.gov-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.gov-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 3px;
}
.gov-item h4 {
  font-size: 1.02rem;
}
.gov-item p {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* ---------- Join / CTA ---------- */
.join-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  margin-top: 44px;
}
@media (max-width: 820px) {
  .join-grid {
    grid-template-columns: 1fr;
  }
}
.join-card {
  background: var(--ink);
  padding: 30px 26px;
}
.join-card h3 {
  font-size: 1.15rem;
  color: var(--flare-2);
}
.join-card p {
  margin-top: 12px;
  font-size: 0.92rem;
  color: rgba(246, 241, 228, 0.75);
}
.join-card a {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--display);
  font-size: 0.85rem;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--flare);
  padding-bottom: 2px;
}

.contact-box {
  margin-top: 56px;
  border: 1px dashed rgba(246, 241, 228, 0.35);
  border-radius: 2px;
  padding: 24px 26px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-box svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--flare-2);
}
.contact-box p {
  font-size: 0.88rem;
  color: rgba(246, 241, 228, 0.72);
}

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: rgba(246, 241, 228, 0.6);
  padding: 44px 0 30px;
  border-top: 1px solid var(--line-dark);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand {
  font-family: var(--display);
  color: var(--paper);
  font-size: 1rem;
}
.footer-meta {
  font-size: 0.8rem;
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Donation flyer modal ---------- */
.flyer-modal {
  position: fixed;
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0;
  width: min(92vw, 720px) !important;
  max-width: none !important;
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  background: var(--paper);
  color: var(--text);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
}
.flyer-modal::backdrop {
  background: rgba(18, 23, 28, 0.82);
}
.flyer-modal figure {
  position: relative;
  max-height: 92vh;
  overflow: auto;
}
.flyer-modal img {
  width: 100%;
  height: auto;
}
.flyer-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font: 600 1.35rem/1 var(--display);
}
.flyer-modal-close:hover {
  background: var(--flare);
  color: var(--ink);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

::selection {
  background: var(--flare);
  color: var(--ink);
}
