/* Landing page. Concept: a cyanotype print. Prussian blue, paper white, one fern. */

:root {
  --sec-paper: var(--bg);
  --sec-blue: var(--blue-deep);
  --gutter: clamp(20px, 5vw, 72px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sec-paper: #0a2038;
    --sec-blue: #0f3a6b;
  }
}

body.lp { background: var(--sec-paper); }
.lp-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  color: var(--print);
  background:
    radial-gradient(70% 80% at 74% 42%, rgba(70, 140, 200, 0.42), transparent 70%),
    linear-gradient(165deg, #14508a 0%, #0f3a6b 48%, #0a2a50 100%);
  overflow: hidden;
  isolation: isolate;
}
.hero > .lp-wrap { position: relative; display: flex; flex-direction: column; min-height: 100svh; }

.hero-fern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 120%;
  z-index: -2;
  will-change: transform;
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.lp-top { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; gap: 16px; flex-wrap: wrap; }
.lp-top .brand { color: var(--print); }
.lp-top .brand svg { color: var(--print); }
.lp-top nav { display: flex; gap: 22px; font-size: 0.95rem; }
.lp-top nav a { color: rgba(234, 243, 248, 0.78); text-decoration: none; }
.lp-top nav a:hover { color: #fff; text-decoration: underline; }

.hero-body { margin-block: auto; padding-block: clamp(24px, 6vh, 72px) clamp(40px, 8vh, 96px); }

.hero-title {
  margin: 0 0 0.22em;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.7rem, 6.4vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: #fff;
  text-wrap: balance;
}
.hero-lede { margin: 0 0 32px; max-width: 36ch; font-size: clamp(1rem, 1.4vw, 1.12rem); line-height: 1.55; color: rgba(234, 243, 248, 0.74); }

.hero-card { max-width: 480px; background: var(--surface); color: var(--ink); border-color: transparent; box-shadow: 0 30px 60px -28px rgba(3, 14, 32, 0.7), 0 2px 4px rgba(3, 14, 32, 0.25); }
.hero-sponsor { max-width: 480px; margin-top: 18px; background: rgba(8, 28, 58, 0.7); border-color: rgba(234, 243, 248, 0.25); color: rgba(234, 243, 248, 0.94); backdrop-filter: blur(4px); }
.hero-sponsor .tag, .hero-sponsor .muted { color: rgba(234, 243, 248, 0.7); }
.hero-sponsor a { color: #fff; }
.hero-sponsor a.s-body { color: #fff; }

/* one orchestrated moment: the headline settles as the fern unfurls */
.js .hero-title, .js .hero-lede, .js .hero-card, .js .hero-sponsor { opacity: 0; transform: translateY(14px); }
.js.go .hero-title { animation: settle 1.1s cubic-bezier(.2,.7,.2,1) 0.25s forwards; }
.js.go .hero-lede { animation: settle 1.1s cubic-bezier(.2,.7,.2,1) 0.55s forwards; }
.js.go .hero-card { animation: settle 1.1s cubic-bezier(.2,.7,.2,1) 0.85s forwards; }
.js.go .hero-sponsor { animation: settle 1.1s cubic-bezier(.2,.7,.2,1) 1.1s forwards; }
@keyframes settle { to { opacity: 1; transform: none; } }

/* ---------- sections ---------- */

.sec { padding-block: clamp(80px, 13vw, 168px); }
.sec.paper { background: var(--sec-paper); color: var(--ink); }
.sec.blue { background: var(--sec-blue); color: var(--print); }
.sec.tint { background: var(--bg-2); color: var(--ink); }

.sec-title {
  margin: 0 0 0.3em;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.3rem, 5.4vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.sec-head { margin-bottom: clamp(36px, 6vw, 72px); }
.sec-head .sec-title { margin-bottom: 0.28em; }
.sec-head .sec-lede { margin-bottom: 0; }
.sub { margin-top: clamp(56px, 8vw, 104px); }
.sub-title { margin: 0 0 clamp(22px, 3vw, 34px); font-family: var(--display); font-weight: 300; font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.05; letter-spacing: -0.04em; }
.sec-lede { margin: 0 0 clamp(36px, 6vw, 72px); max-width: 44ch; font-size: 1.15rem; color: var(--muted); }
.blue .sec-lede { color: rgba(234, 243, 248, 0.8); }

/* figures */
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); }
@media (max-width: 820px) { .figs { grid-template-columns: 1fr; } }
.fig { margin: 0; }
.fig svg { display: block; width: 100%; height: auto; color: var(--blue); margin-bottom: 20px; overflow: visible; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fig svg { color: var(--print); } }
.fig h3 { font-family: var(--display); font-weight: 500; font-size: 1.5rem; margin: 0 0 8px; letter-spacing: -0.03em; }
.fig p { margin: 0 0 12px; max-width: 42ch; color: var(--muted); }
.fig figcaption { font-size: 0.875rem; color: var(--muted); }
.fig .lbl text { font: 600 12.5px var(--sans); fill: currentColor; opacity: 0.78; }
.fig .rail { opacity: 0.5; }

/* fig. 1 motion: runs while it is on screen */
.fig .pt { fill: var(--blue); opacity: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fig .pt { fill: var(--print); } }
.fig.live .pt { animation: travel 2.6s linear infinite; }
.fig.live .pt:nth-child(2) { animation-delay: 0.45s; }
.fig.live .pt:nth-child(3) { animation-delay: 0.9s; }
.fig.live .pt:nth-child(4) { animation-delay: 1.35s; }
.fig.live .pt:nth-child(5) { animation-delay: 1.8s; }
@keyframes travel { 0% { transform: translateX(0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(108px); opacity: 0; } }
.fig .arrive { opacity: 0.35; }
.fig.live .arrive { animation: arrive 2.6s ease-in-out infinite; }
@keyframes arrive { 0%, 55% { opacity: 0.25; } 80%, 100% { opacity: 1; } }
.fig .intro { opacity: 0.3; }
.fig.live .intro { animation: intro 5s ease-in-out infinite; }
.fig.live .i2 { animation-delay: 0.3s; }
@keyframes intro { 0% { stroke-dashoffset: 40; opacity: 0; } 20% { opacity: 0.8; } 50%, 100% { stroke-dashoffset: 0; opacity: 0.25; } }

.ring { stroke-dasharray: 289; stroke-dashoffset: 0; }

/* ---------- the 48 hours, scrolled ---------- */

.sec.age { padding-block: 0; }
.age-track { position: relative; }
.age-stick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 96px); align-items: center; padding-block: clamp(72px, 12vw, 140px); }
.age-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.age-steps h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 6px; letter-spacing: -0.035em; }
.age-steps p { margin: 0; max-width: 40ch; color: rgba(234, 243, 248, 0.82); font-size: 1.08rem; }

.age-plate { position: relative; aspect-ratio: 4 / 5; max-height: 78svh; width: 100%; justify-self: end; border: 1px solid rgba(234, 243, 248, 0.28); border-radius: 4px; background: radial-gradient(80% 70% at 50% 40%, rgba(70, 140, 200, 0.35), rgba(10, 42, 80, 0.2)); box-shadow: inset 0 0 0 10px rgba(10, 42, 80, 0.55), inset 0 0 0 11px rgba(234, 243, 248, 0.18); }
.age-plate canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.clock { position: absolute; left: 28px; bottom: 24px; display: flex; align-items: baseline; gap: 10px; color: #fff; }
.clock #hrs { font-family: var(--display); font-weight: 300; font-size: clamp(3.4rem, 7vw, 5.6rem); line-height: 0.9; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.04em; }
.clock .of { font-size: 0.95rem; color: rgba(234, 243, 248, 0.78); }

/* with JS: the section is tall, the stage sticks, one step shows at a time */
.js .sec.age .age-track { height: 320svh; }
.js .sec.age .age-stick { position: sticky; top: 0; height: 100svh; padding-block: 24px; }
.js .age-steps { display: grid; }
.js .age-steps li { grid-area: 1 / 1; opacity: 0; transform: translateY(10px); transition: opacity 0.5s, transform 0.5s; pointer-events: none; }
.js .age-steps li.on { opacity: 1; transform: none; pointer-events: auto; }
.js .age-copy { align-self: center; }
.js .age-copy .sec-title { margin-bottom: 0.5em; }

@media (max-width: 820px) {
  .age-stick { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 18px; }
  .js .sec.age .age-stick { align-content: start; padding-top: 18px; }
  .age-copy { order: 2; }
  .age-plate { order: 1; aspect-ratio: auto; height: 42svh; justify-self: stretch; }
  .age-steps p { font-size: 1rem; }
  .js .age-copy .sec-title { font-size: clamp(1.8rem, 8vw, 2.4rem); margin-bottom: 12px; }
  .clock { left: 18px; bottom: 14px; }
  .clock #hrs { font-size: 3rem; }
}

/* ---------- what we keep: a specimen label ---------- */

.keep-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(20px, 3vw, 40px); }
@media (max-width: 900px) { .keep-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .keep-list { grid-template-columns: 1fr; gap: 28px; } }
.keep-list li { display: block; }
.keep-ico { display: block; width: 96px; height: 96px; margin-bottom: 18px; overflow: hidden; border-radius: 8px; background: #0f3a6b; box-shadow: var(--shadow); }
.keep-ico img { display: block; width: 100%; height: 100%; transform: scale(1.5); }
.keep-list h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 1.4rem; letter-spacing: -0.03em; }
.keep-list p { margin: 0; color: var(--muted); max-width: 32ch; }
.keep-note { margin: clamp(40px, 6vw, 72px) 0 0; max-width: 70ch; color: var(--muted); font-size: 0.95rem; }

/* ---------- close ---------- */

.sec.close { padding-block: clamp(80px, 12vw, 150px) 0; }
.close-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: end; padding-bottom: clamp(64px, 10vw, 120px); }
@media (max-width: 860px) { .close-grid { grid-template-columns: 1fr; } }
.pay-h { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.035em; margin-bottom: 14px !important; }
.close-pay p { max-width: 46ch; color: rgba(234, 243, 248, 0.84); }
.close-pay a, .lp-foot a { color: #fff; }
.big-cta { margin: 0 0 22px; font-family: var(--display); font-weight: 300; font-size: clamp(3rem, 8vw, 7rem); line-height: 0.94; letter-spacing: -0.05em; color: #fff; }
.btn.light { background: var(--print); color: var(--blue-deep); }
.lp-foot { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; padding-block: 24px 28px; font-size: 0.875rem; color: rgba(234, 243, 248, 0.7); }
.lp-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* focus on blue */
.hero :focus-visible, .sec.blue :focus-visible { outline-color: var(--print); }

@media (max-width: 760px) {
  .hero-fern { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero-title, .js .hero-lede, .js .hero-card, .js .hero-sponsor { opacity: 1; transform: none; animation: none !important; }
  .fig.live .pt, .fig.live .arrive, .fig.live .intro { animation: none !important; }
  .fig .pt { opacity: 0.8; }
  .js .age-steps li { transition: none; }
}

/* the landing page manages its own widths */
body.lp main { max-width: none; padding: 0; margin: 0; }

/* ---------- sponsors pay, trees get planted ---------- */

.hero-pledge { margin: -14px 0 28px; max-width: 40ch; font-size: 0.95rem; color: rgba(234, 243, 248, 0.82); }

.flow { margin: 0; }
.flow-art { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow); background: #0f3a6b; }
.flow-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 22px; }
@media (max-width: 720px) { .flow-legend { grid-template-columns: 1fr; gap: 14px; } }
.flow-legend b { display: block; font-weight: 600; color: var(--ink); }
.flow-legend span { color: var(--muted); font-size: 0.95rem; }
.flow figcaption { margin-top: 14px; font-size: 0.8rem; color: var(--muted); }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr; gap: 36px; } }
.fact-art { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; margin-bottom: 20px; border-radius: 6px; background: #0f3a6b; box-shadow: var(--shadow); }
.fact h4 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 1.45rem; letter-spacing: -0.03em; }
.fact p { margin: 0; color: var(--muted); max-width: 36ch; }

.partners-empty { margin: 22px 0 0; color: var(--muted); max-width: 52ch; }
.partners-list { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: center; }
.partners-list:empty { display: none; }
.partners-list a { display: flex; align-items: center; padding: 14px 22px; border-radius: 10px; background: #fff; color: #0a2540; text-decoration: none; font-weight: 600; opacity: 0.95; box-shadow: var(--shadow); transition: opacity 0.15s; }
.partners-list a:hover { opacity: 1; }
.partners-list img { display: block; height: 44px; width: auto; max-width: 170px; object-fit: contain; }
.partners-list .name { font-weight: 600; }
