/* shared.css — NZ Climate Tech · shared across all pages */

:root {
  --bg: #0f1410;
  --bg-2: #161c18;
  --bg-3: #1d251f;
  --line: #2a3530;
  --line-2: #3a4842;
  --ink: #e8ebe6;
  --ink-2: #a6b0a9;
  --ink-3: #6e7a72;
  --accent: #7fb285;
  --accent-2: #a8d9af;
  --L0: #b8a0d9;
  --L1: #7fb8d4;
  --L2: #d99c7a;
  --L3: #d4a574;
  --L4: #c89090;
  --SYS: #8a9a85;
  --SOC: #c9a0c4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ===== SITE NAV ===== */
.site-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-nav-brand {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  position: relative;
}
.nav-search-wrap {
  position: relative;
  width: 190px;
}
.nav-search-wrap::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px; height: 9px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  box-shadow: 3px 3px 0 -2px var(--ink-3);
  pointer-events: none;
  z-index: 1;
}
.nav-search {
  width: 100%;
  padding: 5px 10px 5px 27px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font-size: 12px;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.nav-search:focus { outline: none; border-color: var(--accent); background: var(--bg-2); }
.nav-search::placeholder { color: var(--ink-3); }
.nav-links { display: flex; gap: 2px; }
.nav-link {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all 0.12s;
}
.nav-link:hover { color: var(--ink); background: var(--bg-2); }
.nav-link.active { color: var(--ink); background: var(--bg-3); }

/* ===== HERO ===== */
.hero {
  padding: 56px 48px 36px;
  border-bottom: 1px solid var(--line);
  max-width: 1600px;
  margin: 0 auto;
}
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.eyebrow .sep { color: var(--ink-3); }
.eyebrow .cadence { color: var(--ink-3); font-weight: 400; letter-spacing: 0.12em; }
.hero h1 {
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 18px;
  max-width: 100%;
}
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero p {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 960px;
  margin-bottom: 28px;
}
.hero .stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.stat .num { font-size: 28px; font-weight: 400; color: var(--ink); }
.stat .label { font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }

/* ===== SECTION LABEL ===== */
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ===== TOOLBAR ===== */
.toolbar {
  padding: 18px 48px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  top: 48px;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(15, 20, 16, 0.92);
  max-width: 1600px;
  margin: 0 auto;
}
.search-wrap { position: relative; flex: 1; min-width: 260px; }
.search-wrap::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  box-shadow: 6px 6px 0 -4px var(--ink-3);
  pointer-events: none;
}
.search {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}
.search:focus { outline: none; border-color: var(--accent); }
.search::placeholder { color: var(--ink-3); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.pill:hover { border-color: var(--line-2); color: var(--ink); }
.pill.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.results-count { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.clear-link {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}
.clear-link:hover { text-decoration: underline; }

/* ===== CARD ===== */
.card {
  padding: 9px 11px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s;
  margin-bottom: 2px;
}
.card:hover { background: var(--bg-3); border-color: var(--line-2); }
.card .name { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.3; margin-bottom: 2px; }
.card .meta { font-size: 11px; color: var(--ink-3); line-height: 1.3; }
.card.motion::before {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 6px;
  transform: translateY(-1px);
}

/* ===== GROUP LABEL ===== */
.group-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 14px 8px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.group-label .gc {
  background: var(--line);
  color: var(--ink-2);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}
.group-label:first-child { padding-top: 6px; }

/* ===== MODAL ===== */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(8, 10, 9, 0.82);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 640px;
  width: 100%;
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-head {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.modal-head h3 { font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); }
.modal-tag { font-size: 11px; color: var(--ink-3); margin-top: 8px; }
.modal-tag .layer-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.modal-close {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.modal-close:hover { background: var(--line); color: var(--ink); }
.modal-body { padding: 24px 32px 32px; overflow-y: auto; }
.field { margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
.field-label { font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px; }
.field-value { color: var(--ink); word-wrap: break-word; }
.field-value a { color: var(--accent-2); text-decoration: none; }
.field-value a:hover { text-decoration: underline; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.modal-foot { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ===== GAPS SECTION ===== */
.gaps {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px 56px;
  border-bottom: 1px solid var(--line);
}
.gaps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.gaps-col h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.gaps-col h4::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.gaps-col.gaps-second h4::before { background: var(--L1); }
.gaps-col p { font-size: 13px; color: var(--ink-2); line-height: 1.7; margin-bottom: 12px; }
.gaps-col p strong { color: var(--ink); font-weight: 500; }
.gaps-col ul { list-style: none; }
.gaps-col li {
  font-size: 13px;
  color: var(--ink-2);
  padding: 10px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.gaps-col li .res-name { color: var(--ink); font-weight: 500; }
.gaps-col li .res-name a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
  transition: border-color 0.15s, color 0.15s;
}
.gaps-col li .res-name a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }
.gaps-col li .res-desc { color: var(--ink-3); font-size: 12px; flex: 1; text-align: right; }

/* ===== READING PANEL ===== */
.reading-panel {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
  border-top: 1px solid var(--line);
}
.reading-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  background: none;
  border: none;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: color 0.15s;
}
.reading-toggle:hover { color: var(--ink-2); }
.reading-toggle .chev {
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s;
  margin-left: auto;
}
.reading-panel.open .reading-toggle .chev { transform: rotate(45deg); }
.reading-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.reading-panel.open .reading-content { max-height: 600px; }
.reading-inner { padding: 0 0 22px; max-width: 760px; }
.reading-inner p { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; line-height: 1.65; }
.reading-inner p:last-child { margin-bottom: 0; }
.reading-inner strong { color: var(--ink-2); font-weight: 500; }

/* ===== ABBREVIATION TOOLTIPS ===== */
abbr[title] { text-decoration: none; border-bottom: 1px dotted var(--ink-3); cursor: help; }
abbr[title]:hover { border-bottom-color: var(--ink); color: var(--ink); }

/* ===== FOOTER ===== */
.footer {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 48px 48px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.7;
}
.footer .row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .site-nav-inner { padding: 0 28px; }
  .hero, .gaps, .reading-panel, .footer { padding-left: 28px; padding-right: 28px; }
  .toolbar { padding-left: 28px; padding-right: 28px; }
  .gaps-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .site-nav-inner { padding: 0 20px; }
  .hero { padding: 36px 20px 28px; }
  .hero h1 { font-size: 30px; }
  .gaps, .reading-panel, .footer, .toolbar { padding-left: 20px; padding-right: 20px; }
}
