/* ===== FONTS =====
   Loaded via <link> in index.html <head> (with preconnect) rather than an
   @import here, which would serialize: download styles.css → then discover
   and fetch the font CSS. Keep the two in sync if the families change. */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: 17px; line-height: 1.65;
  color: var(--ink); background: var(--paper);
  min-width: 375px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }

/* ===== CSS VARIABLES ===== */
:root {
  /* ── Redesign tokens (v3.1) ── */
  --paper:      #F5F4EC;   /* page background — replaces flat white */
  --paper-deep: #ECEAE0;   /* alternating sections */
  --ink:        #172119;   /* darkest value — replaces #333A35 */
  --ink-soft:   #4A544C;   /* secondary text — replaces #555555 */
  --green:      #008223;   /* fills, buttons */
  --green-text: #00631C;   /* green as text on paper (AA) */
  --bright:     #00CC36;   /* highlights only */
  --sun:        #FFEA00;   /* marker-highlight backgrounds behind ink text */
  --sea:        #0077CC;   /* focus rings, map accents */

  /* Type */
  --display: "Fraunces", Georgia, serif;
  --body:    "Inter", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  /* Rhythm */
  --max: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --nav-h: 66px;
}

/* ===== GLOBAL A11Y ===== */
:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; border-radius: 4px; }

/* Marker-highlight — the "whimsy" span. Always ink text so it stays
   readable on the sun highlight. */
.hl {
  background: linear-gradient(0deg, var(--sun) 0 42%, transparent 42%);
  color: var(--ink); padding: 0 .08em;
}
/* On DARK sections the 42% gradient leaves the top of the word as ink-on-ink
   (invisible). Fill the whole word with sun so the ink text stays legible —
   this also matches the hero's fully-highlighted "grows". */
#bubble-explorer .hl, #contact .hl { background: var(--sun); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===== NAV ===== */
/* Light translucent-paper bar with a text wordmark (redesign v3.1). */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  min-height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #DDDACB;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--pad);
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}
#main-nav.scrolled { padding: 4px var(--pad); box-shadow: 0 4px 20px rgba(23,33,25,0.08); }
#main-nav .logo { text-decoration: none; display: block; line-height: 1.05; }
#main-nav .brand-name {
  display: block; font-family: var(--display); font-variation-settings: "WONK" 1;
  font-weight: 600; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.01em;
}
#main-nav .brand-sub {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green-text); margin-top: 2px;
}
.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a {
  color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500;
  border-bottom: 2px solid transparent; padding-bottom: 2px; transition: border-color 0.2s;
}
.nav-links a:hover { border-color: var(--sun); }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid #DDDACB;
    padding: 1rem var(--pad) 1.5rem; gap: 1rem;
  }
}

/* ===== SECTION SHARED ===== */
section { padding: clamp(72px, 10vw, 130px) var(--pad); position: relative; }
.container { max-width: var(--max); margin: 0 auto; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-label {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green-text);
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.section-label::before { content: ""; width: 26px; height: 2px; background: var(--green); flex: none; }
.section-heading {
  font-family: var(--display); font-variation-settings: "SOFT" 60, "WONK" 1;
  font-weight: 560; font-size: clamp(2rem, 4.4vw, 3.2rem);
  color: var(--ink); line-height: 1.04; letter-spacing: -0.01em; margin-bottom: 0.4em;
  text-wrap: balance;
}
.section-sub { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--ink-soft); max-width: 60ch; line-height: 1.6; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* organic wave divider between light and dark sections */
.wave-divider { display: block; width: 100%; height: 70px; line-height: 0; background: var(--paper-deep); }
.wave-divider svg { display: block; width: 100%; height: 100%; }

/* ===== SECTION BACKGROUNDS (redesign alternation) ===== */
#map-section { background: var(--paper-deep); }
#directory { background: var(--paper-deep); }

/* ===== BUTTONS (shared) ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--green); color: #fff; font-family: var(--body);
  font-weight: 600; font-size: 15px; padding: 14px 26px;
  border-radius: 999px; text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--ink); font-family: var(--body);
  font-weight: 600; font-size: 15px; padding: 14px 26px;
  border-radius: 999px; text-decoration: none; border: 2px solid var(--ink); cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-secondary:hover { background: var(--sun); transform: translateY(-2px); }

/* ===== S1 HERO — drifting data-blobs behind editorial type ===== */
#hero {
  min-height: 88vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding: 0;
}
#hero-blobs { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-in {
  position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; width: 100%;
  padding: calc(var(--nav-h) + 46px) var(--pad) 120px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 4vw, 64px); align-items: center;
}
.hero-content { position: relative; z-index: 2; max-width: none; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.hero-eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--sun); }
.hero-headline {
  font-family: var(--display); font-variation-settings: "SOFT" 60, "WONK" 1;
  font-weight: 560; font-size: clamp(2.9rem, 8vw, 5.6rem);
  color: var(--ink); line-height: 1.04; letter-spacing: -0.01em;
  text-wrap: balance; margin-bottom: 0;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft);
  max-width: 56ch; margin: 26px 0 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-visual { position: relative; z-index: 2; }
#hero-collage { width: 100%; height: auto; display: block; }
.collage-note {
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  margin-top: 10px; text-align: right;
}
.collage-note:empty { display: none; }
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; padding-bottom: 150px; }
  #hero-collage { max-width: 440px; margin: 0 auto; }
  .collage-note { text-align: center; }
}
/* hero footer strip — live figures as a quiet ticker */
.hero-strip {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  border-top: 1px solid #DDDACB;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-strip-inner {
  max-width: var(--max); margin: 0 auto; padding: 16px var(--pad);
  display: flex; gap: clamp(24px, 5vw, 72px); overflow-x: auto;
}
.strip-provenance {
  font-family: var(--mono); font-size: 13px; color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none;
  animation: livePulse 2.4s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,130,35,0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(0,130,35,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,130,35,0); }
}

/* ===== S2 KPI — borderless editorial columns ===== */
#kpis { background: var(--paper); }
.kpi-context-text {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--ink-soft); line-height: 1.6;
  max-width: 64ch; margin-top: 0;
}
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(20px, 3vw, 44px); margin-top: clamp(36px, 5vw, 56px);
}
.kpi-card { border-top: 2px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; align-items: flex-start; }
.kpi-number {
  font-family: var(--display); font-variation-settings: "WONK" 1;
  font-size: clamp(3rem, 6vw, 4.6rem); font-weight: 600; line-height: 1;
  color: var(--ink); letter-spacing: -0.01em;
}
.kpi-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft); margin-top: 8px;
}
.kpi-disclaimer { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin-top: 40px; max-width: 66ch; }
@media (max-width: 480px) { .kpi-number { font-size: clamp(2.6rem, 12vw, 3.4rem); } }

/* ===== AIRBNB-STYLE FILTER CHIPS ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: center; margin-top: 1.5rem; margin-bottom: 1.25rem; }
.filter-chip {
  position: relative; display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border: 1.5px solid #ddd; border-radius: 999px;
  background: white; font-family: 'Inter', sans-serif; font-size: 0.8125rem;
  font-weight: 500; color: var(--ink); cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap; user-select: none;
}
.filter-chip:hover { border-color: #aaa; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.filter-chip.active { border-color: var(--ink); background: var(--ink); color: white; }
.filter-chip svg { width: 12px; height: 12px; transition: transform 0.2s; }
.filter-chip.open svg { transform: rotate(180deg); }
.filter-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 200;
  background: white; border: 1px solid #ddd; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14); min-width: 180px; max-height: 280px;
  overflow-y: auto; padding: 0.5rem; display: none;
}
.filter-dropdown.open { display: block; }
.filter-option {
  padding: 0.5rem 0.75rem; border-radius: 8px; font-size: 0.8125rem;
  cursor: pointer; color: var(--ink); transition: background 0.12s;
  display: flex; align-items: center; gap: 0.5rem;
}
.filter-option:hover { background: var(--paper-deep); }
.filter-option.selected { background: #e8f5e9; color: var(--green); font-weight: 600; }
.filter-option.selected::before { content: '✓'; font-size: 0.75rem; }

/* ===== S3 ARCHIPELAGO EXPLORER (dark) ===== */
#bubble-explorer { background: var(--ink); }
#bubble-explorer .section-label { color: var(--bright); }
#bubble-explorer .section-label::before { background: var(--bright); }
#bubble-explorer .section-heading { color: var(--paper); }
#bubble-explorer .section-sub { color: #B9C2BA; }

/* dark variants of the filter chips (open/close pattern unchanged) */
#bubble-explorer .filter-chip {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.22); color: var(--paper);
}
#bubble-explorer .filter-chip:hover { border-color: rgba(255,255,255,0.5); box-shadow: none; }
#bubble-explorer .filter-chip.active { background: var(--paper); color: var(--ink); border-color: var(--paper); }

#bubble-back-btn {
  display: none; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--paper);
  border: 1.5px solid rgba(255,255,255,0.3); border-radius: 999px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 0.5rem 1.125rem; cursor: pointer; transition: background 0.2s, border-color 0.2s;
  margin-top: 0.5rem; margin-bottom: 0.25rem; width: fit-content;
}
#bubble-back-btn:hover { background: var(--sun); color: var(--ink); border-color: var(--sun); }
#bubble-canvas {
  width: 100%; height: 560px;
  background: transparent; border: none; box-shadow: none; border-radius: 16px;
  position: relative; overflow: hidden; margin-top: 1rem;
}
#bubble-canvas svg { width: 100%; height: 100%; display: block; }
.bubble-group { cursor: pointer; transition: opacity .2s; }
.bubble-group .blob { transition: filter .2s; }
.bubble-group:hover .blob { filter: brightness(1.12); }
#bubble-canvas svg:has(.bubble-group:hover) .bubble-group:not(:hover) { opacity: .45; }
@media (max-width: 768px) { #bubble-canvas { height: 420px; } }

/* ===== S4 MAP ===== */
#map-section { background: var(--paper-deep); }
/* organic marker dot — fill set inline per sector */
.map-pin {
  width: 16px; height: 16px;
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 54%;
  border: 2px solid var(--paper); box-shadow: 0 2px 5px rgba(23,33,25,0.35);
}
.cluster-icon {
  min-width: 40px; height: 40px; padding: 0 6px;
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  background: var(--sun); color: var(--ink);
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--paper); box-shadow: 0 2px 8px rgba(23,33,25,0.28);
}
.map-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.map-pill {
  padding: 0.4rem 0.95rem; border-radius: 999px; font-size: 0.8125rem;
  font-weight: 500; border: 1.5px solid #DDDACB; background: var(--paper);
  cursor: pointer; color: var(--ink); white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.map-pill:hover { border-color: var(--ink); }
.map-pill.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
#map-container {
  height: 520px; border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--green);
}
.leaflet-popup-content-wrapper {
  border-radius: 14px !important; border: 1.5px solid var(--ink) !important;
  box-shadow: 6px 6px 0 rgba(23,33,25,0.14) !important;
}
.leaflet-popup-content { margin: 15px 17px !important; font-family: var(--body); }
.popup-name { font-family: var(--body); font-weight: 700; font-size: 0.95rem; color: var(--ink); margin-bottom: 6px; }
.popup-loc { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin-bottom: 9px; }
.popup-sector { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.popup-link { font-size: 0.8125rem; color: var(--green-text); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--sun); }
.popup-link:hover { background: var(--sun); }
@media (max-width: 768px) { #map-container { height: 360px; box-shadow: 5px 5px 0 var(--green); } }

/* ===== S5 CHARTS ===== */
#charts { background: var(--paper-deep); }
.charts-scroll-region { position: relative; margin-top: 0; }
.charts-scroll-wrap { overflow-x: auto; scrollbar-width: none; padding: 6px 8px 8px 2px; }
.charts-scroll-wrap::-webkit-scrollbar { display: none; }
.charts-row {
  display: flex; gap: 1.75rem; align-items: stretch;
  min-width: max-content;
}
.chart-card {
  background: var(--paper); border-radius: var(--radius); border: 1.5px solid var(--ink);
  padding: 1.75rem 1.5rem; box-shadow: 5px 5px 0 rgba(23,33,25,0.14);
  flex-shrink: 0;
  height: 420px; display: flex; flex-direction: column;
}
/* Canvas wrapper used by SDG and Year cards — fills remaining height */
.chart-canvas-wrap { flex: 1; position: relative; min-height: 0; }
.chart-card.chart-donut { width: 360px; }
/* Donut canvas-wrap fills remaining card height (420px - padding - title) */
.donut-canvas-wrap { flex: 1; position: relative; min-height: 0; }
.chart-card.chart-sdg { width: 420px; }
.chart-card.chart-year { width: 560px; }
.chart-title {
  flex-shrink: 0; font-family: var(--display); font-variation-settings: "WONK" 1;
  font-size: 1.2rem; font-weight: 600; color: var(--ink); margin-bottom: 1.25rem;
}
.chart-scroll-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--paper);
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--paper); cursor: pointer; z-index: 10;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, background 0.2s ease;
  line-height: 1;
}
.chart-scroll-arrow:hover { background: var(--green); }
.chart-scroll-arrow.visible { opacity: 1; pointer-events: auto; }
.chart-scroll-arrow--left  { left: 0.5rem; }
.chart-scroll-arrow--right { right: 0.5rem; }
/* Scroll indicator dots below the chart row */
.chart-dots { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 1.5rem; }
.chart-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #DDDACB; border: none; cursor: pointer; padding: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}
.chart-dot.active { background: var(--ink); transform: scale(1.3); }
.chart-disclaimer { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin-top: 1.5rem; max-width: 780px; }
@media (max-width: 768px) {
  .charts-row { flex-direction: column; min-width: 0; }
  .chart-card { width: 100% !important; }
  .chart-scroll-arrow { display: none; }
  .chart-dots { display: none; }
}

/* ===== S6 DIRECTORY ===== */
#directory { background: var(--paper-deep); }
.directory-controls { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0; align-items: flex-start; }
#dir-search {
  width: 100%; max-width: 320px; min-width: 180px;
  padding: 0.625rem 1rem 0.625rem 2.25rem;
  border: 1.5px solid #DDDACB; border-radius: 999px;
  font-family: var(--body); font-size: 0.875rem; color: var(--ink);
  outline: none; transition: border-color 0.2s;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%234A544C' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat 0.75rem center;
}
#dir-search:focus { border-color: var(--ink); }
.dir-dropdowns { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.dir-dropdown-wrap { position: relative; }
.dir-dropdown-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border: 1.5px solid #DDDACB; border-radius: 999px;
  background: var(--paper); font-family: var(--body); font-size: 0.8125rem;
  font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.dir-dropdown-btn:hover { border-color: var(--ink); }
.dir-dropdown-btn.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.dir-dropdown-btn svg { width: 12px; height: 12px; flex-shrink: 0; transition: transform 0.2s; }
.dir-dropdown-btn.open svg { transform: rotate(180deg); }
.dir-dropdown-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 200;
  background: white; border: 1px solid #ddd; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14); min-width: 200px; max-height: 260px;
  overflow-y: auto; padding: 0.5rem; display: none;
}
.dir-dropdown-panel.open { display: block; }
.dir-dropdown-option {
  padding: 0.5rem 0.75rem; border-radius: 8px; font-size: 0.8125rem;
  cursor: pointer; color: var(--ink); transition: background 0.12s;
}
.dir-dropdown-option:hover { background: var(--paper-deep); }
.dir-dropdown-option.selected { background: #e8f5e9; color: var(--green-text); font-weight: 600; }
#dir-count { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-soft); margin: 1.25rem 0; }
.dir-toggle-wrap { margin: 0 0 1.5rem; }
#dir-toggle-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px;
  padding: 0.7rem 1.5rem; font-family: var(--body);
  font-size: 0.9375rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
#dir-toggle-btn:hover { background: var(--sun); transform: translateY(-2px); }
.cards-grid {
  display: none; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  animation: fadeUp 0.3s ease-out;
}
.cards-grid.expanded { display: grid; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1024px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards-grid { grid-template-columns: 1fr; } }

/* ===== ENTERPRISE CARD ===== */
.ent-card {
  background: #fff; border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 1.375rem; display: flex; flex-direction: column; gap: 0.625rem;
  min-height: 260px;
  transition: box-shadow 0.18s ease, transform 0.18s ease; position: relative;
}
.ent-card:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: 6px 6px 0 var(--sun); }
.ent-card.highlighted {
  outline: 3px solid var(--green);
  animation: pulse-outline 2.2s ease-out forwards;
}
@keyframes pulse-outline {
  0%   { outline-color: var(--green); }
  60%  { outline-color: var(--bright); }
  100% { outline-color: transparent; }
}
.card-header { display: flex; align-items: center; gap: 0.75rem; }
.card-avatar {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-variation-settings: "WONK" 1;
  font-weight: 700; font-size: 1.2rem; overflow: hidden;
}
.card-avatar-logo { background: #fff; border: 1.5px solid #DDDACB; }
.card-avatar img { width: 100%; height: 100%; object-fit: contain; }
.card-name-wrap { flex: 1; min-width: 0; }
.card-name { font-size: 0.9375rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.card-subline { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin-top: 0.3rem; line-height: 1.4; }
.card-desc {
  font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.6;
  padding-left: calc(44px + 0.75rem);
}
.card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; line-height: 1.7;
}
.tag-gender { background: #e8f5e9; color: var(--green-text); }
.tag-stage  { background: #E4EFEA; color: #1B5E52; }
.card-desc-spacer { flex: 1; min-height: 0.5rem; }
.card-footer { margin-top: auto; padding-top: 0.5rem; }
.card-cta-wrap { margin-bottom: 0.625rem; padding-left: calc(44px + 0.75rem); }
.card-meta {
  display: flex; align-items: center; gap: 0.375rem;
  flex-wrap: wrap; justify-content: flex-end;
}
.card-cta {
  display: inline-flex; align-items: center; gap: 0.375rem;
  background: var(--green); color: white; border: none; border-radius: 999px;
  padding: 0.5rem 0.95rem; font-family: var(--body);
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease; white-space: nowrap; flex-shrink: 0;
}
.card-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.sdg-icon {
  width: 32px; height: 32px; border-radius: 5px; flex-shrink: 0;
  object-fit: contain; display: block;
}
.sdg-badge {
  width: 32px; height: 32px; border-radius: 5px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 800; color: white; line-height: 1;
  text-align: center;
}

/* ===== FLOATING BACK BTN ===== */
#float-back {
  position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 900;
  background: var(--ink); color: white;
  padding: 0.75rem 1.25rem; border-radius: 999px; border: none;
  font-family: 'Inter', sans-serif; font-size: 0.875rem; font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  display: none; align-items: center; gap: 0.375rem;
  transition: background 0.2s, transform 0.15s;
}
#float-back:hover { background: var(--green); transform: translateY(-2px); }
#float-back.visible { display: flex; }

/* ===== S7 FOOTER / CONTACT ===== */
#contact { background: var(--ink); padding: clamp(80px,10vw,130px) var(--pad) 40px; }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px,6vw,80px); align-items: start; }
.contact-info .section-label { color: var(--bright); }
.contact-info .section-label::before { background: var(--bright); }
.contact-info .section-heading { color: var(--paper); }
.contact-info p { color: #B9C2BA; line-height: 1.7; margin: 0 0 1.75rem; font-size: 0.9375rem; max-width: 40ch; }
.contact-email-link {
  display: inline-block; font-family: var(--display); font-variation-settings: "WONK" 1;
  font-size: clamp(1.2rem,2.6vw,1.7rem); color: var(--paper); text-decoration: none;
  border-bottom: 3px solid var(--sun); line-height: 1.3;
}
.contact-email-link:hover { color: var(--sun); }
.contact-form-wrap { background: rgba(255,255,255,0.04); border: 1px solid #2C372E; border-radius: 16px; padding: 2rem; }
.form-group { margin-bottom: 1.125rem; }
.form-group label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #8E9A90; margin-bottom: 0.45rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.75rem 1rem;
  background: #212B23; border: 1.5px solid #3A463C;
  border-radius: 10px; font-family: var(--body); font-size: 0.9375rem;
  color: var(--paper); outline: none; transition: border-color 0.2s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(245,244,236,0.35); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--bright); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-fine { font-family: var(--mono); font-size: 11px; color: #8E9A90; margin-top: 0.75rem; line-height: 1.5; }
.form-honeypot { display: none !important; }
#contact-success { display: none; color: var(--paper); text-align: center; padding: 2rem 0; }
#contact-success .success-icon { font-size: 2rem; color: var(--bright); margin-bottom: 0.75rem; }
#contact-success h3 { font-family: var(--display); font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
#contact-success p { font-size: 0.9375rem; color: #B9C2BA; }
.footer-bottom { border-top: 1px solid #2C372E; margin-top: clamp(48px,8vw,80px); padding-top: 1.75rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo img { height: 28px; opacity: 0.85; }
.footer-copy { font-family: var(--mono); font-size: 12.5px; color: #8E9A90; }
.footer-copy-link { color: inherit; text-decoration: none; border-bottom: 1px solid #3A463C; }
.footer-copy-link:hover { color: var(--paper); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ===== EMAIL GATE ===== */
.gate-overlay { position: fixed; inset: 0; background: rgba(23,33,25,0.55); z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.gate-panel { background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 2rem; max-width: 420px; width: 100%; box-shadow: 10px 10px 0 rgba(23,33,25,0.18); position: relative; }
.gate-panel h3 { font-family: var(--display); font-variation-settings: "SOFT" 60, "WONK" 1; font-size: 1.3rem; font-weight: 600; color: var(--ink); margin-bottom: 0.5rem; line-height: 1.2; }
.gate-panel p { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 1.25rem; }
.gate-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; cursor: pointer; color: var(--ink-soft); font-size: 1.25rem; line-height: 1; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.15s; }
.gate-close:hover { background: var(--paper-deep); }
.gate-field { margin-bottom: 0.875rem; }
.gate-field label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.35rem; }
.gate-field input { width: 100%; padding: 0.7rem 0.875rem; background: #fff; border: 1.5px solid #DDDACB; border-radius: 10px; font-family: var(--body); font-size: 0.9375rem; color: var(--ink); outline: none; transition: border-color 0.2s; }
.gate-field input:focus { border-color: var(--ink); }
.gate-fine { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); line-height: 1.5; margin-top: 0.85rem; }
.gate-success-msg { text-align: center; padding: 1rem 0; color: var(--green-text); font-weight: 600; font-size: 0.9375rem; }
.gate-error-msg { color: #c0392b; font-size: 0.8125rem; margin-top: 0.5rem; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
#data-error {
  background: #fff3cd; border-bottom: 1px solid #ffc107;
  padding: 1rem 2rem; text-align: center; font-size: 0.9375rem;
  color: #856404; margin-top: 64px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
