/* ============================================================
   GeoSurveyHub — Global Design System
   Based on MNTN template by Kryston Schwarze
   Strict color system: DO NOT add colors outside these vars
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Barlow:wght@300;400;500&family=Barlow+Condensed:wght@400;500;600&family=Space+Mono&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  /* Colors */
  --bg:          #0B1D26;
  --surface:     #162535;
  --surface2:    #1C2F3D;
  --white:       #FFFFFF;
  /* Body copy: higher contrast than legacy --muted for readability */
  --text-body:   #D6E0E8;
  --text-subtle: #A8B8C4;
  --muted:       #8B9DAA;
  --accent:      #FBD784;
  --accent-dim:  #C9A55A;
  --border:      rgba(255, 255, 255, 0.07);
  --border-med:  rgba(255, 255, 255, 0.12);
  --border-mid:  var(--border-med);
  --border-accent: rgba(251, 215, 132, 0.28);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-ui:      'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --card-text-bump: 2pt; /* cards & UI body text only — not headings / kickers */

  /* Spacing */
  --section-v:   120px;
  --section-h:   60px;
  --max-width:   1200px;
  --text-max:    560px;

  /* Radii */
  --radius-sm:   2px;
  --radius-md:   4px;
}

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

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

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── TYPOGRAPHY SCALE ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
}

h1 { font-size: clamp(52px, 7vw, 96px); letter-spacing: -1px; }
h2 { font-size: clamp(32px, 3.5vw, 52px); }
h3 { font-size: clamp(22px, 2vw, 32px); }
h4 { font-size: 18px; }

h1 em, h2 em, h3 em { font-style: italic; color: var(--accent); }

p {
  font-size: calc(1.05rem + var(--card-text-bump));
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.75;
  max-width: var(--text-max);
}

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 28px var(--section-h);
  background: linear-gradient(to bottom, rgba(11,29,38,0.92) 0%, transparent 100%);
  transition: background 0.3s;
}

.nav.scrolled {
  background: rgba(11,29,38,0.97);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--white);
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 28px;
}

.nav-links > a,
.nav-standalone {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  line-height: 1.2;
  box-sizing: border-box;
}

.nav-links > a:hover,
.nav-links > a.active { color: var(--white); }

/* Menu + search cluster (mobile: chevron menu + search; desktop: search only) */
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--muted);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  z-index: 210;
  transition: color 0.2s, background 0.2s;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.nav-toggle-icon {
  display: block;
  transition: transform 0.22s ease;
}

.nav.nav-is-open .nav-toggle-icon {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: relative;
  flex-shrink: 0;
}

.nav-dropdown-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  margin: 0;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.2s;
  min-height: 40px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  vertical-align: middle;
}

.nav-dropdown-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.65;
}

.nav-dropdown-btn:hover,
.nav-dropdown-btn.active,
.nav-dropdown.is-open .nav-dropdown-btn {
  color: var(--white);
}

.nav-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 12px;
  min-width: 240px;
  padding: 12px 0;
  background: var(--surface);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  z-index: 220;
}

.nav-dropdown.is-open .nav-dropdown-panel {
  display: flex;
  flex-direction: column;
}

/* Desktop: open on hover / keyboard focus; (hover:hover) keeps touch / coarse pointers on click-only */
@media (min-width: 1100px) and (hover: hover) {
  .nav-dropdown:hover .nav-dropdown-panel,
  .nav-dropdown:focus-within .nav-dropdown-panel {
    display: flex;
    flex-direction: column;
  }

  /* Bridge above the panel so moving from the button doesn’t drop hover in the margin gap */
  .nav-dropdown-panel::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 14px;
  }
}

.nav-dropdown-panel a {
  font-family: var(--font-body);
  font-size: calc(14px + var(--card-text-bump));
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-body);
  padding: 10px 20px;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-panel a:hover,
.nav-dropdown-panel a.active {
  color: var(--accent);
  background: rgba(251, 215, 132, 0.06);
}

.nav-dd-overview {
  font-family: var(--font-ui) !important;
  font-size: 11px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: var(--accent) !important;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  padding-bottom: 12px !important;
}

.nav-standalone {
  flex-shrink: 0;
}

/* Desktop: center the link cluster so items read as one horizontal bar */
@media (min-width: 1100px) {
  .nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .nav-logo {
    flex-shrink: 0;
  }

  .nav-links {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    align-items: center;
  }

  .nav-actions {
    margin-left: auto;
    gap: 8px;
  }
}

.nav-standalone:hover,
.nav-standalone.active {
  color: var(--white);
}

@media (max-width: 1099px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: min(100%, 400px);
    height: 100vh;
    margin: 0;
    padding: 88px 28px 40px;
    flex: none;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(11, 29, 38, 0.98);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    z-index: 205;
  }

  .nav.nav-is-open .nav-links {
    display: flex;
  }

  .nav-links > a,
  .nav-standalone {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-dropdown {
    border-bottom: 1px solid var(--border);
  }

  .nav-dropdown-btn {
    width: 100%;
    justify-content: space-between;
    padding: 16px 0;
  }

  .nav-dropdown-panel {
    position: static;
    margin: 0 0 12px;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    display: none;
  }

  .nav-dropdown.is-open .nav-dropdown-panel {
    display: flex;
  }

  .nav-dropdown-panel a {
    padding: 10px 0 10px 12px;
    border-left: 2px solid var(--border-accent);
  }

  .nav-dd-overview {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 8px !important;
  }
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: calc(13px + var(--card-text-bump));
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: opacity 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  padding: 14px 36px;
}

.btn-primary:hover { opacity: 0.85; }

.btn-ghost {
  color: var(--white);
  opacity: 0.6;
  padding: 14px 0;
}

.btn-ghost:hover { opacity: 1; }

.btn-outline {
  border: 1px solid rgba(251,215,132,0.4);
  color: var(--accent);
  padding: 9px 22px;
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--bg);
}

.read-more {
  font-family: var(--font-ui);
  font-size: calc(12px + var(--card-text-bump));
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(251,215,132,0.3);
  padding-bottom: 4px;
  transition: gap 0.2s, border-color 0.2s;
}

.read-more::after { content: '→'; font-size: calc(14px + var(--card-text-bump)); }
.read-more:hover { gap: 18px; border-color: var(--accent); }

/* ── KICKER / LABEL ── */
/* No decorative dash — text-only label for cleaner layout. */
.kicker {
  font-family: var(--font-ui);
  font-size: clamp(14px, 1.35vw, 17px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 20px;
  line-height: 1.5;
  max-width: 100%;
  box-sizing: border-box;
}

/* Markup uses <p class="kicker"> — match explicitly so body `p` rules never win. */
p.kicker {
  font-size: clamp(15px, 1.75vw, 20px);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.section-num {
  font-family: var(--font-ui);
  font-size: clamp(13px, 1.15vw, 16px);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
  line-height: 1.5;
  display: block;
}

/* Number + kicker on one row (e.g. home sections 01 / Get Started) */
.section-heading {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin-bottom: 20px;
}

.section-heading .section-num {
  margin-bottom: 0;
  flex-shrink: 0;
}

.section-heading .kicker {
  margin-bottom: 0;
}

.section-heading--center {
  justify-content: center;
}

@media (max-width: 380px) {
  .section-heading {
    flex-wrap: wrap;
  }
}

.section-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── SECTIONS ── */
.section {
  padding: var(--section-v) var(--section-h);
}

.section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-inner.reverse { direction: rtl; }
.section-inner.reverse > * { direction: ltr; }

.section-text { display: flex; flex-direction: column; gap: 0; }
.section-text h2 { margin-bottom: 24px; }
.section-text p { margin-bottom: 36px; }

.divider {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 1px;
  background: var(--border);
}

.divider-full {
  height: 1px;
  background: var(--border);
}

/* ── VISUAL PANELS ── */
.visual-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.visual-panel-inner {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.visual-panel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) brightness(0.7) contrast(1.08);
  transform: scale(1.02);
}

.visual-panel-inner:has(.visual-panel-img)::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(11, 29, 38, 0.88) 0%, transparent 42%),
    linear-gradient(135deg, rgba(11, 29, 38, 0.55) 0%, transparent 55%);
  z-index: 0;
}

.visual-panel-inner:has(.visual-panel-img) .panel-label {
  z-index: 1;
}

.panel-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-ui);
  font-size: calc(9px + var(--card-text-bump));
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

.panel-label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(11,29,38,0.85);
  border: 1px solid rgba(251,215,132,0.25);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

/* ── PRODUCT CARDS ── */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

a.product-card--link {
  text-decoration: none;
  color: inherit;
}

a.product-card--link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.product-card:hover {
  border-color: var(--border-med);
}

.product-card-img {
  aspect-ratio: 4/3;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card-img .panel-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.product-card-img--empty {
  min-height: 120px;
}

.product-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.product-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  color: var(--white);
}

.product-desc {
  font-size: calc(0.95rem + var(--card-text-bump));
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-family: var(--font-ui);
  font-size: calc(24px + var(--card-text-bump));
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--white);
}

.add-to-quote {
  font-family: var(--font-ui);
  font-size: calc(10px + var(--card-text-bump));
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(251,215,132,0.3);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.add-to-quote:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ── NEWS CARDS ── */
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}

.news-card:hover { border-color: var(--border-med); }

.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.news-date {
  font-family: var(--font-mono);
  font-size: calc(10px + var(--card-text-bump));
  color: var(--muted);
  letter-spacing: 1px;
}

.news-source {
  display: block;
  font-family: var(--font-ui);
  font-size: calc(10px + var(--card-text-bump));
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  opacity: 0.85;
}

.news-tag {
  font-family: var(--font-ui);
  font-size: calc(9px + var(--card-text-bump));
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.news-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

.news-excerpt {
  font-size: calc(0.95rem + var(--card-text-bump));
  color: var(--text-body);
  line-height: 1.65;
  max-width: 100%;
}

/* In-card summary + visible link to source (overrides global a { color: inherit }) */
.news-live-pill {
  font-family: var(--font-mono);
  font-size: calc(9px + var(--card-text-bump));
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
}

.news-summary {
  font-size: calc(14px + var(--card-text-bump));
  font-weight: 300;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  max-width: 100%;
  flex: 1;
  margin: 0;
}

.news-card-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.news-read-full {
  font-family: var(--font-ui);
  font-size: calc(12px + var(--card-text-bump));
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(251, 215, 132, 0.45);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s, gap 0.2s;
}

.news-read-full:hover {
  color: var(--white);
  border-bottom-color: var(--accent);
}

.news-read-full--internal {
  letter-spacing: 2px;
}

.news-link-host {
  font-family: var(--font-mono);
  font-size: calc(10px + var(--card-text-bump));
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* ── FOOTER ── */
.footer {
  padding: 80px var(--section-h) 40px;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo {
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--white);
  display: block;
  margin-bottom: 20px;
}

.footer-logo span { color: var(--accent); }

.footer-desc {
  font-size: calc(0.95rem + var(--card-text-bump));
  font-weight: 400;
  color: var(--text-subtle);
  line-height: 1.75;
  max-width: 320px;
}

.footer-desc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.footer-desc a:hover { color: var(--white); }

.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul a {
  font-size: calc(0.95rem + var(--card-text-bump));
  font-weight: 400;
  color: var(--text-subtle);
  transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 28px;
}

.footer-bottom p,
.footer-bottom a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted);
}

.footer-bottom a:hover { color: var(--accent); }

.footer-credit {
  font-size: 11px;
  letter-spacing: 0.5px;
  margin: 0;
}

.footer-credit a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-credit a:hover {
  color: var(--white);
}

.footer-credits {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}

.footer-financing {
  font-size: 10px;
  letter-spacing: 0.35px;
  margin: 0;
  color: var(--muted);
  font-weight: 400;
}

.footer-financing a {
  color: var(--text-subtle);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-financing a:hover {
  color: var(--accent);
}

/* ── UTILITY ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-h);
}

.tag {
  font-family: var(--font-ui);
  font-size: calc(9px + var(--card-text-bump));
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.tag-outline {
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(251,215,132,0.4);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  :root {
    --section-h: 40px;
    --section-v: 80px;
  }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  :root {
    --section-h: 24px;
    --section-v: 64px;
  }
  .section-inner { grid-template-columns: 1fr; gap: 40px; }
  .section-inner.reverse { direction: ltr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-credits {
    align-items: flex-start;
    text-align: left;
  }
  .nav {
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px var(--section-h);
  }
  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 14px 20px;
  }
  .nav-links > a,
  .nav-standalone,
  .nav-dropdown-btn {
    font-size: 11px;
    letter-spacing: 2px;
  }
}

/* ── SITE SEARCH (nav + modal) ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-search-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  color: var(--muted);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  box-sizing: border-box;
  vertical-align: middle;
}

.nav-search-btn:hover,
.nav-search-btn:focus-visible {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  outline: 2px solid rgba(251, 215, 132, 0.35);
  outline-offset: 2px;
}

body.site-search-open {
  overflow: hidden;
}

.site-search {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh var(--section-h) 24px;
  box-sizing: border-box;
}

.site-search[hidden] {
  display: none;
}

.site-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 29, 38, 0.82);
  backdrop-filter: blur(4px);
}

.site-search-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.site-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.site-search-mag {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.85;
}

.site-search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.05rem;
  outline: none;
}

.site-search-input::placeholder {
  color: var(--muted);
}

.site-search-close {
  flex-shrink: 0;
  display: flex;
  padding: 6px;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.site-search-close:hover,
.site-search-close:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.site-search-results {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 12px 8px 16px;
}

.site-search-hint kbd,
.site-search-empty kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-body);
  background: var(--surface2);
  border: 1px solid var(--border-med);
  border-radius: 3px;
}

.site-search-hint,
.site-search-empty {
  margin: 8px 12px 12px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.site-search-empty a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-search-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-search-hit {
  border-bottom: 1px solid var(--border);
}

.site-search-hit:last-child {
  border-bottom: none;
}

.site-search-hit-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  color: var(--text-body);
  transition: background 0.15s;
}

.site-search-hit-link:hover,
.site-search-hit-link:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.site-search-hit-title {
  font-size: calc(0.95rem + var(--card-text-bump));
  color: var(--white);
}

.site-search-hit-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .site-search {
    padding: 10vh 16px 16px;
    align-items: stretch;
  }

  .nav-search-btn {
    margin-left: auto;
  }
}
