/* ===== ALT & JUNG — SHARED STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;500;600&display=swap');

:root {
  --bg: #f4f0e8;
  --bg-alt: #e8e2d6;
  --bg-warm: #ede5d8;
  --fg: #1c1a16;
  --fg-muted: #5a5446;
  --fg-subtle: #96907e;
  --accent-green: oklch(36% 0.1 150);
  --accent-green-light: oklch(94% 0.05 150);
  --accent-terra: oklch(54% 0.15 38);
  --accent-terra-light: oklch(95% 0.06 38);
  --accent-gold: oklch(70% 0.14 82);
  --accent-gold-light: oklch(96% 0.06 82);
  --accent-sage: oklch(62% 0.08 148);
  --white: #fdfaf3;
  --border: #cec8b8;
  --border-strong: #b8b0a0;
  --shadow: 0 2px 24px rgba(28,26,22,0.09);
  --shadow-lg: 0 10px 48px rgba(28,26,22,0.15);
  --radius: 6px;
  --radius-lg: 12px;
  --nav-height: 68px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --max-w: 1160px;
  --transition: 0.22s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* TYPOGRAPHY */
.serif { font-family: var(--font-serif); }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; }

.display-xl { font-size: clamp(2.8rem, 6vw, 5.2rem); line-height: 1.05; }
.display-lg { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.1; }
.display-md { font-size: clamp(1.5rem, 2.5vw, 2.2rem); }
.body-lg { font-size: 1.15rem; line-height: 1.75; }
.body-sm { font-size: 0.875rem; }
.label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-sans); }
.caption { font-size: 0.8rem; color: var(--fg-muted); }

/* LAYOUT */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-warm { background: var(--bg-warm); }
.section-dark { background: var(--accent-green); color: var(--white); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .fg-muted { color: rgba(253,252,248,0.65); }
.section-terra { background: var(--accent-terra); color: var(--white); }
.section-terra h1, .section-terra h2, .section-terra h3 { color: var(--white); }
.section-gold { background: var(--accent-gold); color: var(--fg); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr 1fr; gap: 24px; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
}

/* CARDS */
.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-accent-top { border-top: 4px solid var(--accent-terra); }
.card-accent-green { border-top: 4px solid var(--accent-green); }
.card-terra { background: var(--accent-terra-light); border-color: oklch(88% 0.08 38); }
.card-green { background: var(--accent-green-light); border-color: oklch(88% 0.06 150); }
.card-gold { background: var(--accent-gold-light); border-color: oklch(90% 0.08 82); }

/* STAT NUMBERS */
.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--accent-terra);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-number.green { color: var(--accent-green); }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}
.btn-primary { background: var(--accent-green); color: var(--white); }
.btn-primary:hover { background: oklch(30% 0.1 150); transform: translateY(-2px); box-shadow: 0 6px 20px oklch(36% 0.1 150 / 0.35); }
.btn-outline { background: transparent; color: var(--accent-green); border: 2px solid var(--accent-green); }
.btn-outline:hover { background: var(--accent-green); color: var(--white); transform: translateY(-2px); }
.btn-terra { background: var(--accent-terra); color: var(--white); }
.btn-terra:hover { background: oklch(48% 0.15 38); transform: translateY(-2px); box-shadow: 0 6px 20px oklch(54% 0.15 38 / 0.35); }

/* SOURCE CITE */
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--fg-muted);
  border-bottom: 1px dotted var(--border);
  padding-bottom: 1px;
  transition: color var(--transition);
}
.source-link:hover { color: var(--accent-green); border-bottom-color: var(--accent-green); text-decoration: none; }

/* SECTION LABEL */
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-terra);
  margin-bottom: 16px;
  padding: 4px 12px;
  background: var(--accent-terra-light);
  border-radius: 100px;
}
.section-label.light { color: oklch(72% 0.1 40); background: rgba(255,255,255,0.15); }

/* DIVIDER */
.divider { border: none; border-top: 1px solid var(--border); margin: 48px 0; }

/* QUOTE */
.pullquote {
  border-left: 4px solid var(--accent-terra);
  padding: 20px 28px;
  margin: 32px 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--fg);
  background: var(--accent-terra-light);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

/* BADGE */
.badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-green { background: var(--accent-green); color: white; }
.badge-terra { background: var(--accent-terra); color: white; }
.badge-gold { background: var(--accent-gold); color: var(--fg); }

/* SCROLL FADE IN */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* TOOLTIP */
.tooltip-wrap { position: relative; }
.tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--white);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
  z-index: 100;
}
.tooltip-wrap:hover .tooltip-content { opacity: 1; }

/* PROGRESS BAR */
.progress-bar-track { background: var(--bg-alt); border-radius: 2px; height: 8px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 2px; background: var(--accent-green); transition: width 1.2s cubic-bezier(0.4,0,0.2,1); }
.progress-bar-fill.terra { background: var(--accent-terra); }
.progress-bar-fill.gold { background: var(--accent-gold); }

/* NAV */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(244,240,232,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1.5px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--accent-terra); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 7px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--fg); background: var(--bg-alt); text-decoration: none; }
.nav-links a.active { color: var(--accent-green); background: var(--accent-green-light); font-weight: 600; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--fg); border-radius: 1px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1.5px solid var(--border);
    padding: 16px;
    gap: 4px;
    z-index: 999;
  }
  .nav-burger { display: flex; }
}

/* PAGE CONTENT */
.page-content { padding-top: var(--nav-height); min-height: 100vh; }

/* TABS */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 40px; }
.tab-btn {
  padding: 13px 24px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--fg-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  border-radius: var(--radius) var(--radius) 0 0;
}
.tab-btn:hover { color: var(--fg); background: var(--bg-alt); }
.tab-btn.active { color: var(--accent-terra); border-bottom-color: var(--accent-terra); background: var(--accent-terra-light); }

/* ACCORDION */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
  width: 100%;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}
.accordion-trigger:hover { color: var(--accent-green); }
.accordion-trigger .icon { transition: transform var(--transition); font-size: 1.2rem; color: var(--fg-muted); }
.accordion-trigger.open .icon { transform: rotate(45deg); }
.accordion-body { overflow: hidden; max-height: 0; transition: max-height 0.35s ease, padding 0.35s ease; }
.accordion-body.open { max-height: 1000px; padding-bottom: 20px; }

/* HERO */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 64px 0 48px; min-height: auto; }
}

/* CHART AREAS */
.chart-wrap { position: relative; width: 100%; }
.chart-canvas { display: block; }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-alt);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--border);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-alt); }

/* TIMELINE */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-terra);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--accent-terra);
}

/* INTERACTIVE MAP PLACEHOLDER */
.map-placeholder {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-align: center;
  line-height: 1.6;
}

/* FOOTER */
.site-footer {
  background: oklch(18% 0.04 150);
  color: rgba(253,252,248,0.7);
  padding: 56px 0;
  font-size: 0.875rem;
  border-top: 4px solid var(--accent-terra);
}
.site-footer a { color: rgba(253,252,248,0.55); }
.site-footer a:hover { color: var(--white); }
