/* Global Impact Hub Vietnam — minimal editorial */

:root {
  --paper: #faf7f2;
  --paper-2: #f3efe6;
  --ink: #1c1b18;
  --muted: #6f6a60;
  --line: #e2dcd2;
  --accent: #1e7a4e; /* forest green */
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.accent { color: var(--accent); }

a { color: inherit; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(24px, 6vw, 72px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
}

.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

/* ---------- layout ---------- */
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 48px);
}

/* ---------- hero ---------- */
.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding-top: 110px;
  padding-bottom: 48px;
}

.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.hero-sub {
  max-width: 560px;
  margin-top: 36px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted);
}

.hero-line { margin-top: 56px; }
.hero-line span {
  display: block;
  width: 72px;
  height: 1px;
  background: var(--ink);
}

/* ---------- hero map ---------- */
.hero-map { min-width: 0; }

#map {
  height: clamp(420px, 62vh, 560px);
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.map-hint {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* markers */
.hub-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
  position: relative;
}

.hub-marker::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.5;
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-marker::after { animation: none; opacity: 0; }
}

/* popup cards */
.maplibregl-popup-content {
  font-family: var(--sans);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(28, 27, 24, 0.08);
  padding: 18px 20px;
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--paper); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--paper); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--paper); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--paper); }

.hub-card .hub-status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hub-card h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  margin: 6px 0 2px;
  color: var(--ink);
}

.hub-card .hub-fn {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.hub-card .hub-blurb {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* map controls to match theme */
.maplibregl-ctrl-group {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--line);
  background: var(--paper);
}

.maplibregl-ctrl-group button { background: var(--paper); }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line); }

/* ---------- sections ---------- */
.section {
  padding: clamp(72px, 12vh, 128px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: clamp(32px, 5vh, 56px);
}

.num {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--accent);
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4.5vw, 44px);
  letter-spacing: -0.01em;
}

.lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 3.4vw, 32px);
  line-height: 1.4;
  max-width: 820px;
}

/* ---------- why now ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  color: var(--muted);
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--paper);
  padding: clamp(28px, 4vw, 44px);
  transition: background 0.3s;
}

.card:hover { background: var(--paper-2); }

.card-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
}

.card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 14px 0 12px;
}

.card p {
  font-size: 15px;
  color: var(--muted);
}

/* ---------- tags ---------- */
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.tags li {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}

.tags li:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- impact ---------- */
.impact-frame {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 36px;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.impact-item strong {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 14px;
}

.impact-item span {
  font-size: 14px;
  color: var(--muted);
}

.impact-note {
  margin-top: 48px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--accent);
}

/* ---------- team ---------- */
.team-group { margin-bottom: 48px; }
.team-group:last-child { margin-bottom: 0; }

.team-group h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 18px;
}

.people { list-style: none; }

.people li {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.people a, .people .name {
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}

.people a {
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s;
}

.people a:hover { border-color: var(--accent); }

.people .title {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- goal ---------- */
.goal { text-align: left; }

.goal-statement {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 4.4vw, 44px);
  line-height: 1.3;
  max-width: 900px;
}

.goal-statement em {
  font-style: italic;
  color: var(--accent);
}

/* ---------- footer ---------- */
.footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px clamp(24px, 6vw, 48px) 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-line { display: none; }
  #map { height: 380px; }
}

@media (max-width: 760px) {
  .nav-links a:not(:last-child) { display: none; }
  .two-col, .cards { grid-template-columns: 1fr; }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .people li {
    grid-template-columns: 70px 1fr;
  }
  .people .title {
    grid-column: 2;
    margin-top: -6px;
  }
}
