/* ============================================================
   Willow Initiative — v2 "Journey" design layer
   Loaded AFTER styles.css. Deep-forest canvas, halftone dither,
   pollen accents, one continuous willow line down the page.
   ============================================================ */

:root {
  /* Forest canvas — from the "Repairing" + aranya posters */
  --forest-900: #04140F;
  --forest-800: #072019;
  --forest-700: #0A2B21;
  --forest-600: #0E3A2C;
  --emerald:    #0E7A57;

  /* Light half of the journey */
  --bone:       #F2EEE1;
  --bone-2:     #E7E2D2;

  /* Accents */
  --pollen:     #E8F0A4;   /* pale yellow — aranya dots */
  --lime:       #C4E85C;   /* lime — glass-card reference */
  --pollen-dim: rgba(232,240,164,0.55);

  /* Type */
  --f-poster: "Archivo Black", "Geist", Impact, sans-serif;
  --f-body:   "DM Sans", "Geist", -apple-system, sans-serif;

  --ease-journey: cubic-bezier(.16,1,.3,1);
}

body { font-family: var(--f-body); }

/* ------------------------------------------------------------
   Halftone dither — the poster texture, as a reusable layer.
   Dot size ramps down the element via stacked masks.
   ------------------------------------------------------------ */
.dither {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(currentColor 1.1px, transparent 1.2px);
  background-size: 9px 9px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.35) 45%, transparent 85%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.35) 45%, transparent 85%);
}
.dither.up {
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,0.3) 50%, transparent 90%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,0.3) 50%, transparent 90%);
}
.dither.cap { height: 100vh; bottom: auto; }
.dither.coarse { background-size: 16px 16px; background-image: radial-gradient(currentColor 2px, transparent 2.1px); }
.dither.fine   { background-size: 6px 6px;  background-image: radial-gradient(currentColor 0.8px, transparent 0.9px); }

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */
.j-forest { background: var(--forest-800); color: var(--bone); position: relative; overflow: hidden; }
.j-forest-deep { background: var(--forest-900); color: var(--bone); position: relative; overflow: hidden; }
.j-bone   { background: var(--bone); color: var(--forest-900); position: relative; overflow: hidden; }
.j-pad    { padding: clamp(88px, 12vw, 180px) 0; }
.j-wrap   { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; position: relative; z-index: 2; }

.j-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pollen);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.j-eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.j-bone .j-eyebrow { color: var(--emerald); }

/* ------------------------------------------------------------
   HERO — half capsule, willow growing out of the break
   ------------------------------------------------------------ */
.hero-j {
  min-height: 100svh;
  background: var(--forest-900);
  color: var(--bone);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.hero-j .dither { color: var(--emerald); opacity: 0.5; }

.hero-j-grid {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  position: relative;
  z-index: 3;
  padding: clamp(120px, 14vh, 180px) 0 clamp(56px, 8vh, 96px);
}

.hero-j-title {
  margin: 0;
  line-height: 0.82;
  letter-spacing: -0.02em;
}
.hero-j-title .l1 {
  display: block;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(38px, 6.2vw, 92px);
  color: var(--bone);
  opacity: 0.92;
  letter-spacing: -0.01em;
}
.hero-j-title .l2 {
  display: block;
  font-family: var(--f-poster);
  font-size: clamp(62px, 12.5vw, 176px);
  letter-spacing: -0.045em;
  color: var(--pollen);
  margin-top: 0.06em;
  text-transform: uppercase;
}
.hero-j-sub {
  margin: clamp(24px, 3vw, 36px) 0 0;
  max-width: 34ch;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.7;
  color: rgba(242,238,225,0.62);
}
.hero-j-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: clamp(28px, 3.5vw, 42px); }

.btn-pollen, .btn-outline-bone {
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 500;
  padding: 15px 26px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: transform 220ms var(--ease-journey), background 220ms, color 220ms, box-shadow 220ms;
  display: inline-flex; align-items: center; gap: 10px;
}
.btn-pollen { background: var(--pollen); color: var(--forest-900); }
.btn-pollen:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(232,240,164,0.25); }
.btn-outline-bone { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1.5px rgba(242,238,225,0.28); }
.btn-outline-bone:hover { background: rgba(242,238,225,0.08); transform: translateY(-2px); }

/* The capsule + tree stage */
.hero-stage { position: relative; height: min(76vh, 720px); }
.hero-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.grow-path {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: grow 2.6s var(--ease-journey) forwards;
}
@keyframes grow { to { stroke-dashoffset: 0; } }
.leaf-dot { opacity: 0; animation: leafIn 900ms var(--ease-journey) forwards; }
@keyframes leafIn { from { opacity: 0; transform: translateY(-6px) scale(0.4); } to { opacity: 1; transform: none; } }

.hero-scroll-cue {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(242,238,225,0.4);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 4;
}
.hero-scroll-cue i { display: block; width: 1px; height: 42px; background: linear-gradient(var(--pollen), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%,100% { opacity: 0.25; transform: scaleY(0.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ------------------------------------------------------------
   STATS — huge counting numbers
   ------------------------------------------------------------ */
.stat-j { padding: clamp(56px, 7vw, 112px) 0; border-bottom: 1px solid rgba(4,20,15,0.08); }
.stat-j:last-of-type { border-bottom: none; }
.stat-j-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 72px);
  align-items: baseline;
}
.stat-j-num {
  font-family: var(--f-poster);
  font-size: clamp(76px, 15vw, 230px);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: var(--forest-900);
  font-variant-numeric: tabular-nums;
}
.stat-j-num.pollen { color: var(--pollen); }
.stat-j-cap {
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.7;
  color: rgba(4,20,15,0.6);
  max-width: 44ch;
  padding-bottom: 0.6em;
}
.j-forest .stat-j-cap, .j-forest-deep .stat-j-cap { color: rgba(242,238,225,0.55); }
.stat-j-src {
  display: block;
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(4,20,15,0.35);
}
.j-forest .stat-j-src, .j-forest-deep .stat-j-src { color: rgba(242,238,225,0.3); }

/* ------------------------------------------------------------
   WHAT IS WILLOW — sticky tree, scroll-drawn
   ------------------------------------------------------------ */
.tree-scene { position: relative; background: var(--forest-800); color: var(--bone); }
.tree-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}
.tree-copy h2 {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--bone);
  margin: 18px 0 0;
}
.tree-copy h2 em { font-style: italic; color: var(--pollen); }
.tree-copy p {
  color: rgba(242,238,225,0.62);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.75;
  max-width: 42ch;
  margin-top: 22px;
}
.tree-canvas { position: relative; height: 82vh; }
.tree-canvas svg { width: 100%; height: 100%; overflow: visible; }

/* Sector nodes */
.sector-node {
  cursor: pointer;
  transition: transform 320ms var(--ease-journey);
}
.sector-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--bone);
}
.sector-panel {
  border: 1px solid rgba(232,240,164,0.22);
  background: rgba(14,58,44,0.55);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-radius: 22px;
  padding: clamp(22px, 3vw, 34px);
}
.sector-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.sector-tab {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(242,238,225,0.18);
  background: transparent;
  color: rgba(242,238,225,0.6);
  cursor: pointer;
  transition: all 220ms var(--ease-journey);
}
.sector-tab:hover { border-color: rgba(232,240,164,0.5); color: var(--bone); }
.sector-tab.on { background: var(--pollen); color: var(--forest-900); border-color: var(--pollen); }
.sector-body h3 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(24px, 2.6vw, 36px); color: var(--bone); margin: 0 0 12px; }
.sector-body p  { color: rgba(242,238,225,0.66); font-size: 15.5px; line-height: 1.7; margin: 0; }
.sector-body ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.sector-body li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: rgba(242,238,225,0.72); }
.sector-body li::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--pollen); margin-top: 8px; flex: none; }

/* ------------------------------------------------------------
   JOIN US — typed, poster-scale
   ------------------------------------------------------------ */
.join-j { min-height: 92svh; display: grid; place-items: center; text-align: center; position: relative; }
.join-type {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(34px, 6.4vw, 104px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--bone);
  min-height: 2.2em;
  max-width: 18ch;
  margin: 0 auto;
}
.join-type em { font-style: italic; color: var(--pollen); }
.caret { display: inline-block; width: 0.06em; height: 0.82em; background: var(--pollen); margin-left: 0.06em; vertical-align: -0.06em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------
   NAV — soft rectangle, collapses on scroll
   ------------------------------------------------------------ */
.nav-j {
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  width: min(100% - 2 * var(--gutter), var(--maxw));
  transition: width 520ms var(--ease-journey);
}
.nav-j-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 12px 12px 20px;
  border-radius: 18px;                 /* softened rectangle */
  background: rgba(7,32,25,0.72);
  border: 1px solid rgba(242,238,225,0.12);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  color: var(--bone);
  transition: padding 420ms var(--ease-journey), background 420ms, border-radius 420ms;
}
.nav-j.collapsed { width: min(100% - 2 * var(--gutter), var(--maxw)); }
.nav-j-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; font-size: 16px; color: var(--bone); background: none; border: none; cursor: pointer; }
.nav-j-links { display: flex; align-items: center; gap: 2px; }
.nav-j-links button {
  background: none; border: none; cursor: pointer;
  font-family: var(--f-body);
  font-size: 14px;
  color: rgba(242,238,225,0.62);
  padding: 9px 14px;
  border-radius: 11px;
  transition: color 200ms, background 200ms;
}
.nav-j-links button:hover { color: var(--bone); background: rgba(242,238,225,0.07); }
.nav-j-links button.on { color: var(--forest-900); background: var(--pollen); }
.nav-j-right { display: flex; align-items: center; gap: 8px; }
.nav-j-donate {
  font-family: var(--f-body); font-size: 14px; font-weight: 500;
  padding: 10px 18px; border-radius: 11px; border: none; cursor: pointer;
  background: var(--pollen); color: var(--forest-900);
  transition: transform 200ms var(--ease-journey);
}
.nav-j-donate:hover { transform: translateY(-1px); }

/* collapsed state: only brand + burger */
.nav-j .nav-collapsible {
  display: flex; align-items: center; gap: 8px;
  max-width: 900px; opacity: 1;
  overflow: hidden;
  transition: max-width 520ms var(--ease-journey), opacity 280ms ease;
}
.nav-j.collapsed .nav-collapsible { max-width: 0; opacity: 0; pointer-events: none; }

.nav-burger {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(242,238,225,0.16);
  background: transparent;
  display: none;
  place-items: center;
  cursor: pointer;
  flex: none;
  transition: background 200ms, border-color 200ms;
}
.nav-burger:hover { background: rgba(242,238,225,0.08); }
.nav-j.collapsed .nav-burger { display: grid; }
.nav-burger span { display: block; width: 17px; height: 1.6px; background: var(--bone); border-radius: 2px; }
.nav-burger span + span { margin-top: 4px; }
.nav-burger span:nth-child(3) { width: 11px; }

/* full-screen menu */
.nav-sheet-j {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(4,20,15,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: grid;
  align-content: center;
  padding: clamp(28px, 8vw, 96px);
  animation: sheetIn 420ms var(--ease-journey);
}
@keyframes sheetIn { from { opacity: 0; } to { opacity: 1; } }
.nav-sheet-j a, .nav-sheet-j button.sheet-link {
  display: block;
  font-family: var(--f-serif);
  font-size: clamp(32px, 6vw, 72px);
  line-height: 1.15;
  color: var(--bone);
  background: none; border: none; text-align: left; cursor: pointer;
  padding: 6px 0;
  transition: color 200ms, transform 320ms var(--ease-journey);
}
.nav-sheet-j button.sheet-link:hover { color: var(--pollen); transform: translateX(12px); }
.nav-sheet-j .sheet-close {
  position: absolute; top: 26px; right: clamp(20px, 4vw, 48px);
  width: 46px; height: 46px; border-radius: 14px;
  background: rgba(242,238,225,0.08); border: 1px solid rgba(242,238,225,0.14);
  color: var(--bone); font-size: 20px; cursor: pointer;
}

/* ------------------------------------------------------------
   ABOUT — ribbon of photos
   ------------------------------------------------------------ */
.ribbon-scene {
  position: relative;
  height: clamp(420px, 52vw, 620px);
  overflow: hidden;
  perspective: 1400px;
}
.ribbon-track {
  position: absolute;
  top: 50%; left: 0;
  width: 200%;
  display: flex;
  gap: clamp(16px, 2.4vw, 34px);
  transform: translateY(-50%) rotate(-8deg);
  animation: ribbon 46s linear infinite;
  transform-style: preserve-3d;
}
@keyframes ribbon { from { transform: translateY(-50%) rotate(-8deg) translateX(0); } to { transform: translateY(-50%) rotate(-8deg) translateX(-50%); } }
.ribbon-track:hover { animation-play-state: paused; }
.ribbon-cell {
  flex: none;
  width: clamp(180px, 20vw, 300px);
  aspect-ratio: 4/5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(4,20,15,0.45);
  transform-style: preserve-3d;
}
.ribbon-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ribbon-cell:nth-child(odd)  { transform: rotateY(14deg) translateZ(28px) translateY(-16px); }
.ribbon-cell:nth-child(even) { transform: rotateY(-14deg) translateZ(-14px) translateY(18px); }
.ribbon-mask {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--forest-800) 0%, transparent 14%, transparent 86%, var(--forest-800) 100%);
}

/* Roles — three overlapping circles */
.venn { position: relative; aspect-ratio: 1.35/1; max-width: 560px; margin-inline: auto; }
.venn-c {
  position: absolute;
  width: 58%; aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(232,240,164,0.4);
  background: rgba(232,240,164,0.06);
  display: grid; place-items: center;
  text-align: center;
  cursor: pointer;
  transition: background 320ms var(--ease-journey), transform 320ms var(--ease-journey), border-color 320ms;
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(242,238,225,0.7);
}
.venn-c:hover, .venn-c.on { background: rgba(232,240,164,0.18); border-color: var(--pollen); color: var(--bone); transform: scale(1.03); }
.venn-c.a { top: 0;    left: 21%; }
.venn-c.b { bottom: 4%; left: 0; }
.venn-c.c { bottom: 4%; right: 0; }

/* ------------------------------------------------------------
   Reveal-on-scroll
   ------------------------------------------------------------ */
.j-reveal { opacity: 0; transform: translateY(26px); transition: opacity 900ms var(--ease-journey), transform 900ms var(--ease-journey); }
.j-reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 980px) {
  .hero-j-grid { grid-template-columns: 1fr; padding-top: clamp(104px, 16vh, 150px); }
  .hero-stage { height: 52vh; order: 2; }
  .tree-sticky { grid-template-columns: 1fr; height: auto; position: relative; padding: clamp(56px,10vw,90px) 0; }
  .tree-canvas { height: 46vh; order: -1; }
  .stat-j-row { grid-template-columns: 1fr; gap: 12px; }
  .prof-row, .prof-row.flip .prof-media { grid-template-columns: 1fr; order: 0; }
  .prof-rail .rail-line { left: 14px; }
  .nav-j-links, .nav-j-donate { display: none; }
  .nav-burger { display: grid !important; }
}

@media (prefers-reduced-motion: reduce) {
  .grow-path { animation: none; stroke-dashoffset: 0; }
  .leaf-dot { animation: none; opacity: 1; }
  .ribbon-track { animation: none; }
  .j-reveal { opacity: 1; transform: none; transition: none; }
  .hero-scroll-cue i { animation: none; }
}

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