/* ActNow.Earth, tide line
   Palette and type are documented in ../../../extract/STRUCTURE.md */

:root {
  /* water, from deep to surface */
  --ink:   #06231f;
  --deep:  #0a3a33;
  --tide:  #11655c;
  --sky:   #2e9fd8;
  --leaf:  #4f8f3f;
  --new:   #c9f24d;      /* new growth, the one loud colour */
  --shell: #f4f6f2;
  --paper: #ffffff;
  --silt:  #ccd4cd;
  --text:  #102a25;
  --muted: #47635d;

  --measure: 60ch;
  --container: 1160px;
  --rule: 1px solid var(--silt);

  --s1: .5rem;  --s2: .875rem; --s3: 1.25rem; --s4: 2rem;
  --s5: 3rem;   --s6: 4.5rem;  --s7: 7rem;

  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Public Sans", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--shell);
  color: var(--text);
  font: 400 1rem/1.6 var(--body);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -.01em; }
p  { margin: 0 0 1em; max-width: var(--measure); }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--sky); }

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

.skip {
  position: absolute; left: var(--s3); top: -4rem; z-index: 100;
  background: var(--new); color: var(--ink);
  padding: .6rem 1rem; font-weight: 700; border-radius: 0 0 6px 6px;
  transition: top .15s;
}
.skip:focus { top: 0; }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s3); }
@media (min-width: 48rem) { .wrap { padding-inline: var(--s4); } }

/* ---------- masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink);
  color: var(--shell);
  border-bottom: 1px solid rgba(201, 242, 77, .22);
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); min-height: 4rem;
}
.logo {
  display: inline-flex; align-items: baseline; gap: .45rem;
  font-family: var(--display); font-weight: 800; font-size: 1.05rem;
  letter-spacing: -.02em; text-decoration: none;
}
.logo b { color: var(--new); }
.logo span { color: var(--shell); opacity: .92; }

.nav { display: flex; align-items: center; gap: clamp(.85rem, 2.5vw, 1.75rem); }
.nav a {
  font-size: .95rem; font-weight: 500; text-decoration: none;
  padding-block: .55rem; color: var(--shell);
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--new); }

/* ---------- hero: underwater, surfacing ---------- */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(46,159,216,.32), transparent 60%),
    linear-gradient(176deg, var(--ink) 0%, var(--deep) 55%, var(--tide) 100%);
  color: var(--shell);
  padding-block: var(--s6) 0;
}
.hero::after { /* surface line */
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--new) 22%, var(--sky) 78%, transparent);
  opacity: .8;
}
.hero .wrap {
  display: grid; gap: var(--s4); align-items: end;
  grid-template-columns: 1fr;
}
@media (min-width: 62rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--s5); }
}
.hero-copy { padding-bottom: var(--s6); }
.hero h1 { color: var(--paper); }
.hero h1 em {
  font-style: normal; display: block;
  color: var(--new);
}
.hero-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: rgba(244,246,242,.82);
  max-width: 44ch; margin-top: var(--s3);
}
.hero-art {
  position: relative; align-self: end;
  display: flex; justify-content: center;
  padding-bottom: var(--s5);
}

/* the original hands artwork, with a rotating globe behind it.
   Geometry matches the source PNG: disc centred at 50% / 49.5%, radius 36% of width. */
.globe-stage {
  position: relative;
  width: min(100%, 31rem); aspect-ratio: 1;
  filter: drop-shadow(0 18px 44px rgba(0,0,0,.42));
}
/* disc geometry measured from the source artwork */
.globe {
  position: absolute; z-index: 0;
  left: 50%; top: 49.5%; width: 71.9%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.globe-static { z-index: 0; }        /* rendered earth, shown until the canvas takes over */
.hands {
  position: absolute; z-index: 1; inset: 0;
  width: 100%; height: 100%;
}

/* tide rise: one orchestrated moment */
.tide {
  position: absolute; inset-inline: 0; bottom: 0; height: 38%;
  background: linear-gradient(0deg, rgba(46,159,216,.30), rgba(46,159,216,0));
  pointer-events: none;
  transform: translateY(100%);
  animation: rise 1.6s cubic-bezier(.22,.7,.2,1) .15s forwards;
}
@keyframes rise { to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .tide { animation: none; transform: none; }
}

/* ---------- buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.btn {
  display: inline-flex; align-items: center; min-height: 2.9rem;
  padding: .7rem 1.35rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.btn-primary { background: var(--new); color: var(--ink); }
.btn-primary:hover { background: var(--paper); }
.btn-ghost { border-color: rgba(244,246,242,.5); color: var(--shell); }
.btn-ghost:hover { border-color: var(--new); color: var(--new); }
.btn-dark { background: var(--ink); color: var(--shell); }
.btn-dark:hover { background: var(--tide); }

/* ---------- sections, hung off the water level ---------- */

.band { padding-block: var(--s6); }
.band-paper { background: var(--paper); }
.band-tight { padding-block: var(--s5); }

.level { border-top: var(--rule); }
.level > .wrap { position: relative; }
@media (min-width: 62rem) {
  .level > .wrap::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0;
    border-left: var(--rule);
  }
  .level > .wrap { padding-left: var(--s5); }
}

.lead-in { max-width: 34ch; }
.lead-in + .prose { margin-top: var(--s3); }
.prose { max-width: var(--measure); color: var(--muted); font-size: 1.05rem; }
.prose strong { color: var(--text); }

.split {
  display: grid; gap: var(--s4);
  grid-template-columns: 1fr;
}
@media (min-width: 62rem) {
  .split { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: var(--s6); align-items: start; }
}

/* ---------- growth stages (learn / lead / act) ---------- */

.stages {
  list-style: none; margin: var(--s5) 0 0; padding: 0;
  display: grid; gap: var(--s4);
}
@media (min-width: 48rem) { .stages { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }
.stage { padding-top: var(--s3); border-top: 2px solid var(--ink); }
.stage svg { width: 100%; height: 5.5rem; margin-bottom: var(--s2); overflow: visible; }
.stage h3 { margin-bottom: .4rem; }
.stage p { color: var(--muted); font-size: .98rem; max-width: 34ch; margin: 0; }
.stage:nth-child(2) { border-top-color: var(--tide); }
.stage:nth-child(3) { border-top-color: var(--leaf); }

/* ---------- ledger (what we give you) ---------- */

.ledger { margin: var(--s4) 0 0; }
.ledger div {
  display: grid; gap: .35rem var(--s4); padding-block: var(--s3);
  border-top: var(--rule);
}
@media (min-width: 55rem) {
  .ledger div { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); align-items: baseline; }
}
.ledger dt { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.ledger dd { margin: 0; color: var(--muted); max-width: var(--measure); }

/* ---------- programs: asymmetric rows ---------- */

.program {
  display: grid; gap: var(--s3) var(--s5); align-items: center;
  padding-block: var(--s5); border-top: var(--rule);
  grid-template-columns: 1fr;
}
@media (min-width: 55rem) {
  .program { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .program:nth-child(even) > .program-art { order: 2; }
}
.program-art { position: relative; background: var(--shell); }
.program-art img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.program-body p { color: var(--muted); }
.program-body .go {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 2.75rem; font-weight: 700; text-decoration: none;
  border-bottom: 2px solid var(--new);
}
.program-body .go:hover { border-bottom-color: var(--ink); }
.program-body .go svg { width: 1.1rem; height: 1.1rem; }

/* ---------- stories strip ---------- */

.strip {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: min(78vw, 24rem);
  gap: var(--s3);
  margin-top: var(--s4);
  overflow-x: auto; overscroll-behavior-x: contain;
  padding-bottom: var(--s3);
  scroll-snap-type: x proximity;
}
.strip figure { margin: 0; scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.strip figcaption {
  margin-top: .65rem; font-size: .95rem; color: var(--muted);
  max-width: 34ch;
}

/* ---------- closing call ---------- */

.call {
  background: var(--new); color: var(--ink);
  padding-block: var(--s6);
}
.call h2 { max-width: 26ch; }
.call p { max-width: 46ch; font-size: 1.1rem; }

/* ---------- steps (a real sequence: mangrove page) ---------- */

.steps { counter-reset: step; margin-top: var(--s4); }
.step {
  counter-increment: step;
  border-top: var(--rule); padding-block: var(--s4);
  display: grid; gap: var(--s2) var(--s4); grid-template-columns: 1fr;
}
@media (min-width: 48rem) { .step { grid-template-columns: 4rem minmax(0, 1fr); } }
.step::before {
  content: counter(step);
  font-family: var(--display); font-weight: 800;
  font-size: 2.25rem; line-height: 1; color: var(--tide);
}
.step ul { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--muted); max-width: var(--measure); }
.step li { margin-bottom: .45rem; }

.aside {
  margin-top: var(--s4); padding: var(--s3);
  background: var(--paper); border-left: 4px solid var(--new);
  max-width: var(--measure);
}
.aside p { margin: 0; color: var(--muted); }

/* ---------- page hero (interior pages) ---------- */

.pagehead {
  position: relative; color: var(--shell);
  background: var(--ink);
  padding-block: var(--s6);
  overflow: hidden;
}
.pagehead img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .38;
}
.pagehead .wrap { position: relative; }
.pagehead p { color: rgba(244,246,242,.85); font-size: 1.1rem; max-width: 48ch; }
.pagehead .back {
  display: inline-block; margin-bottom: var(--s3);
  font-size: .95rem; color: var(--new); text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* ---------- footer ---------- */

.foot {
  background: var(--ink); color: rgba(244,246,242,.72);
  padding-block: var(--s5) var(--s4); font-size: .95rem;
}
.foot .wrap { display: grid; gap: var(--s4); }
@media (min-width: 55rem) { .foot .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--s3); }
.foot a { color: var(--shell); text-decoration: none; border-bottom: 1px solid transparent; }
.foot a:hover { border-bottom-color: var(--new); }
.foot .fine { margin: 0; font-size: .9rem; max-width: 40ch; }
.foot .tagline { font-family: var(--display); font-weight: 700; color: var(--shell); font-size: 1.15rem; margin-bottom: .5rem; }
