/* ============================================================
   START THE CHAIN — style.css
   Fonts: DM Serif Display (headings) + DM Sans (body)
   Palette: Warm off-white · Deep forest green · Soft amber
   ============================================================ */

/* ── DESIGN TOKENS ── */
:root {
  --color-bg:           #F7F4EF;
  --color-bg-dark:      #1A2E22;
  --color-bg-muted:     #EEE9E1;
  --color-bg-card:      #FFFFFF;

  --color-text:         #1C1C1A;
  --color-text-light:   #F7F4EF;
  --color-text-muted:   #6B6860;
  --color-text-faint:   #9E9B94;

  --color-green:        #1D7A5F;
  --color-green-light:  #E0F2EB;
  --color-green-dark:   #0D4032;
  --color-purple:       #3D3480;
  --color-purple-light: #ECEAFA;
  --color-amber:        #C47B1A;
  --color-amber-light:  #FDF0DC;

  --color-border:       #DDD9D1;

  --font-display:       'DM Serif Display', Georgia, serif;
  --font-body:          'DM Sans', system-ui, sans-serif;

  --radius-sm:          6px;
  --radius-md:          12px;
  --radius-lg:          18px;

  --shadow-card:        0 2px 12px rgba(0,0,0,0.06);
  --shadow-lift:        0 8px 32px rgba(0,0,0,0.10);

  --max-width:          860px;
  --section-gap:        5rem;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

/* ── LAYOUT ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-green-dark);
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--color-text); }

/* ── HERO ── */
.hero {
  padding: 5rem 0 3rem;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 1rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-green-dark);
  margin-bottom: 1.25rem;
}

.hero-headline em {
  font-style: italic;
  color: var(--color-green);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  background: var(--color-green-dark);
  color: var(--color-text-light);
  font-size: 15px;
  font-weight: 500;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--color-green);
  transform: translateY(-1px);
}

.hero-rule {
  width: 1px;
  height: 60px;
  background: var(--color-border);
  margin: 3rem auto 0;
}

/* ── SECTIONS ── */
.section {
  padding: var(--section-gap) 0;
}

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
}

.section-muted {
  background: var(--color-bg-muted);
}

.section-header {
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 0.5rem;
}

.eyebrow-light { color: #6FCF97; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-green-dark);
  margin-bottom: 0.75rem;
}

.section-dark .section-title { color: #E8F5EE; }

.section-desc {
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 580px;
  line-height: 1.7;
}

.section-dark .section-desc { color: #8FBFA8; }

/* ── CARDS ── */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.controls-card {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-dark .controls-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.10);
}

/* ── SLIDERS ── */
.slider-group { display: flex; flex-direction: column; gap: 1.25rem; }

.slider-row {}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.slider-header label {
  font-size: 14px;
  color: var(--color-text-muted);
}

.section-dark .slider-header label { color: #8FBFA8; }

.slider-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.section-dark .slider-val { color: var(--color-text-light); }

input[type="range"] {
  width: 100%;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-green-dark);
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.15); }

input[type="range"]:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 4px;
  border-radius: 4px;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-faint);
  margin-top: 5px;
}

/* ── METRICS GRID ── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 1.25rem;
}

.metric {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.metric-green {
  background: var(--color-green-light);
  border-color: #A8DCCA;
}

.metric-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 5px;
}

.metric-green .metric-label { color: var(--color-green); }

.metric-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 3px;
}

.metric-green .metric-value { color: var(--color-green-dark); }

.metric-sub {
  font-size: 11px;
  color: var(--color-text-faint);
}

.metric-green .metric-sub { color: var(--color-green); }

/* ── CHART ── */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.section-dark .chart-legend { color: #8FBFA8; }

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

.dot-green  { background: #1D9E75; }
.dot-gray   { background: #888780; }
.dot-light  { background: #D3D1C7; }
.dot-purple { background: #534AB7; }
.dot-amber  { background: #EF9F27; }

.chart-wrap {
  position: relative;
  height: 220px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.section-dark .chart-wrap {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

/* ── CONTEXT BLOCKS ── */
.context-block {
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  margin-bottom: 0;
}

.context-block-purple {
  background: var(--color-purple-light);
  border-left: 3px solid var(--color-purple);
}

.context-block-green {
  background: rgba(29,122,95,0.12);
  border-left: 3px solid #6FCF97;
}

.context-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-purple);
  margin-bottom: 6px;
}

.context-block-green .context-eyebrow { color: #6FCF97; }

.context-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
}

.context-block-green .context-text { color: #C8E6D8; }

/* ── PIVOT SECTION ── */
.pivot-section {
  padding: 4rem 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-muted);
}

.pivot-line {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-style: italic;
  color: var(--color-green-dark);
  margin-bottom: 0.5rem;
}

.pivot-sub {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ── GENERATION CARDS ── */
.gen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 1.25rem;
}

.gen-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
}

.gen-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.gen-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.gen-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-light);
  margin-bottom: 1px;
}

.gen-desc {
  font-size: 11px;
  color: #8FBFA8;
}

.gen-contribute {
  font-size: 12px;
  color: #8FBFA8;
  margin-bottom: 6px;
}

.gen-amount {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1;
  margin-bottom: 2px;
}

.gen-amount-label {
  font-size: 11px;
  color: #8FBFA8;
}

/* ── NEXT STEPS ── */
.next-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.next-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
}

.next-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.next-icon { font-size: 1.8rem; }

.next-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-green-dark);
}

.next-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
}

.next-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-green);
  margin-top: 4px;
}

/* ── ABOUT ── */
.about-inner {
  max-width: 620px;
}

.about-inner h2 {
  margin-bottom: 1.25rem;
}

.about-inner p {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.about-inner p:last-child { margin-bottom: 0; }

/* ── FOOTER ── */
.site-footer {
  background: var(--color-green-dark);
  color: #8FBFA8;
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-text-light);
}

.footer-disclaimer {
  font-size: 12px;
  line-height: 1.7;
  max-width: 640px;
}

.footer-copy {
  font-size: 12px;
  color: #5A8A72;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  :root { --section-gap: 3.5rem; }

  .site-nav { display: none; }

  .hero { padding: 3.5rem 0 2rem; }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .gen-grid {
    grid-template-columns: 1fr;
  }

  .next-grid {
    grid-template-columns: 1fr;
  }

  .chart-wrap { height: 180px; }

  input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 400px) {
  .hero-headline { font-size: 1.9rem; }
}
