/* SunBit Mining Corporation — Investor Relations Site
   Design tokens, light/dark mode, and shared component styles.
   Concept: solar-powered data center at dusk — industrial precision + renewable energy + monetary discipline. */

:root,
[data-theme='light'] {
  /* Surfaces — warm off-white, graphite-tinted */
  --color-bg: #f3f2ee;
  --color-surface: #ffffff;
  --color-surface-2: #f8f7f3;
  --color-surface-offset: #ebe9e3;
  --color-surface-offset-2: #e2dfd6;
  --color-surface-dynamic: #d8d4c8;
  --color-divider: #ddd9d0;
  --color-border: #cdc8bc;

  /* Text */
  --color-text: #191b1f;
  --color-text-muted: #5b5c60;
  --color-text-faint: #92908a;
  --color-text-inverse: #f5f3ee;

  /* Primary accent — brushed brass/amber (Bitcoin-coded, muted) */
  --color-primary: #a97a2f;
  --color-primary-hover: #8a6224;
  --color-primary-active: #6f4e1c;
  --color-primary-highlight: #ecdcbc;

  /* Secondary accent — desaturated sage/moss solar-green (energy data only) */
  --color-sage: #5c7a60;
  --color-sage-hover: #48614c;
  --color-sage-active: #384c3b;
  --color-sage-highlight: #d9e2da;

  /* Status colors */
  --color-success: #4b7a4f;
  --color-warning: #a9642f;
  --color-error: #9c3f3f;
  --color-error-highlight: #ecd6d6;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 80 / 0.08);
  --shadow-md: 0 4px 16px oklch(0.2 0.02 80 / 0.10);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 80 / 0.14);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1220px;
  --content-full: 100%;

  --font-display: 'Cabinet Grotesk', 'General Sans', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', 'SF Mono', monospace;
}

[data-theme='dark'] {
  --color-bg: #14161a;
  --color-surface: #1a1d22;
  --color-surface-2: #1e2126;
  --color-surface-offset: #20242a;
  --color-surface-offset-2: #262b32;
  --color-surface-dynamic: #2e343c;
  --color-divider: #262b32;
  --color-border: #363c45;

  --color-text: #e8e6df;
  --color-text-muted: #9a9c9f;
  --color-text-faint: #676a70;
  --color-text-inverse: #14161a;

  --color-primary: #d9ab5c;
  --color-primary-hover: #e6bd77;
  --color-primary-active: #f0cd93;
  --color-primary-highlight: #3a3222;

  --color-sage: #839f86;
  --color-sage-hover: #9bb49e;
  --color-sage-active: #b1c7b3;
  --color-sage-highlight: #26302a;

  --color-success: #7fa982;
  --color-warning: #d9ab5c;
  --color-error: #d0837e;
  --color-error-highlight: #3a2626;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #14161a;
    --color-surface: #1a1d22;
    --color-surface-2: #1e2126;
    --color-surface-offset: #20242a;
    --color-surface-offset-2: #262b32;
    --color-surface-dynamic: #2e343c;
    --color-divider: #262b32;
    --color-border: #363c45;
    --color-text: #e8e6df;
    --color-text-muted: #9a9c9f;
    --color-text-faint: #676a70;
    --color-text-inverse: #14161a;
    --color-primary: #d9ab5c;
    --color-primary-hover: #e6bd77;
    --color-primary-active: #f0cd93;
    --color-primary-highlight: #3a3222;
    --color-sage: #839f86;
    --color-sage-hover: #9bb49e;
    --color-sage-active: #b1c7b3;
    --color-sage-highlight: #26302a;
    --color-success: #7fa982;
    --color-warning: #d9ab5c;
    --color-error: #d0837e;
    --color-error-highlight: #3a2626;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
  }
}

/* Type scale */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.25rem, 1rem + 3.5vw, 4.25rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ============ Base typography ============ */
body {
  font-family: var(--font-body);
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.mono, .stat-value, .data-num, table td.num, table th.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
}

/* ============ Layout helpers ============ */
.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.section {
  padding-block: clamp(var(--space-12), 7vw, var(--space-24));
}
.section-tight {
  padding-block: clamp(var(--space-8), 5vw, var(--space-16));
}
main {
  display: block;
}

/* ============ Header / Nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand svg {
  width: 34px;
  height: 34px;
  color: var(--color-primary);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-links {
  display: flex;
  gap: var(--space-5);
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--color-text);
}
.nav-links a[aria-current='page'] {
  color: var(--color-text);
  border-bottom-color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--color-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--color-primary);
  color: #191307;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
}
.btn-outline {
  border-color: var(--color-border);
  color: var(--color-text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface-2);
  padding-block: var(--space-16) var(--space-10);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-10);
  padding-bottom: var(--space-10);
}
.footer-brand p {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 32ch;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
  font-weight: 650;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: flex-start;
}
.footer-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  max-width: 62ch;
  line-height: 1.5;
}
.footer-copyright {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  white-space: nowrap;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin-top: var(--space-6);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, oklch(0.08 0.01 260 / 0.55) 0%, oklch(0.06 0.01 260 / 0.88) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(var(--space-16), 12vw, var(--space-32)) var(--space-8);
  color: #f4f1e9;
  max-width: 760px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d9ab5c;
  font-weight: 650;
  margin-bottom: var(--space-5);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9ab5c;
}
.hero h1 {
  font-size: var(--text-3xl);
  color: #f8f6ef;
  margin-bottom: var(--space-5);
}
.hero p.lead {
  font-size: var(--text-lg);
  color: #d8d5c9;
  max-width: 56ch;
  margin-bottom: var(--space-8);
  font-family: var(--font-body);
  font-weight: 400;
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Page header for interior pages (no image hero) */
.page-header {
  padding-block: clamp(var(--space-12), 8vw, var(--space-20)) var(--space-8);
  border-bottom: 1px solid var(--color-divider);
}
.page-header h1 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}
.page-header p.lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 68ch;
  font-family: var(--font-body);
  font-weight: 400;
}

/* ============ Stat strip ============ */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-1);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-cell {
  padding: var(--space-8) var(--space-6);
  background: var(--color-surface);
  border-right: 1px solid var(--color-divider);
}
.stat-cell:last-child {
  border-right: none;
}
.stat-value {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-primary);
  display: block;
  margin-bottom: var(--space-2);
  line-height: 1.1;
}
.stat-value.sage { color: var(--color-sage); }
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ============ Cards ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 {
  font-size: var(--text-lg);
  font-family: var(--font-body);
  font-weight: 650;
}
.card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ============ Section heading ============ */
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
  max-width: 68ch;
}
.section-head .kicker {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-primary);
  font-weight: 650;
}
.section-head h2 {
  font-size: var(--text-xl);
}
.section-head p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* ============ Quote block ============ */
.quote-block {
  background: var(--color-surface-offset);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-10);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text);
}
.quote-block cite {
  display: block;
  margin-top: var(--space-6);
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============ Tables ============ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
table.data-table {
  width: 100%;
  font-size: var(--text-sm);
  min-width: 560px;
}
table.data-table caption {
  text-align: left;
  padding: var(--space-5) var(--space-6) 0;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  font-weight: 650;
}
table.data-table th, table.data-table td {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
}
table.data-table thead th {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  font-weight: 650;
}
table.data-table tbody tr:last-child td {
  border-bottom: none;
}
table.data-table tbody tr:hover {
  background: var(--color-surface-2);
}
table.data-table td.num, table.data-table th.num {
  text-align: right;
  font-weight: 500;
}

/* Stacked key-value tables: avoid forced horizontal scroll on mobile for
   two-column tables where both label and value can be long-form text. */
@media (max-width: 640px) {
  table.data-table.data-table--stack {
    min-width: 0;
  }
  table.data-table.data-table--stack thead {
    display: none;
  }
  table.data-table.data-table--stack tbody tr {
    display: flex;
    flex-direction: column;
    padding: var(--space-4) var(--space-5);
    gap: var(--space-1);
    border-bottom: 1px solid var(--color-divider);
  }
  table.data-table.data-table--stack tbody tr:last-child {
    border-bottom: none;
  }
  table.data-table.data-table--stack tbody tr td,
  table.data-table.data-table--stack tbody tr th {
    display: block;
    width: auto !important;
    padding: 0;
    border-bottom: none;
    text-align: left !important;
  }
  table.data-table.data-table--stack tbody tr th {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 650;
  }
  table.data-table.data-table--stack tbody tr td {
    font-size: var(--text-base);
  }
}

/* ============ Chart card ============ */
.chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.chart-card h3 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 650;
  margin-bottom: var(--space-1);
}
.chart-card .chart-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.chart-canvas-wrap {
  position: relative;
  height: 300px;
}

/* ============ Two column ============ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.two-col img {
  border-radius: var(--radius-lg);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.two-col.reverse .img-slot { order: 2; }

/* ============ Pills / badges ============ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.02em;
}
.pill-active { background: var(--color-sage-highlight); color: var(--color-sage); }
.pill-progress { background: var(--color-primary-highlight); color: var(--color-primary); }
.pill-complete { background: var(--color-sage-highlight); color: var(--color-sage); }
.pill-filed { background: var(--color-surface-offset-2); color: var(--color-text-muted); }
.pill-executed { background: var(--color-sage-highlight); color: var(--color-sage); }

/* ============ Timeline (roadmap) ============ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--color-divider);
  margin-left: var(--space-4);
}
.timeline-item {
  position: relative;
  padding: 0 0 var(--space-12) var(--space-10);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-4) - 6px);
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-primary);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 650;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-2);
  display: block;
}
.timeline-item h3 {
  font-size: var(--text-lg);
  font-family: var(--font-body);
  font-weight: 650;
  margin-bottom: var(--space-2);
}
.timeline-item p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 60ch;
}

/* ============ Risk cards ============ */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}
.risk-card {
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: var(--color-surface);
}
.risk-card .risk-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
  display: block;
}
.risk-card h3 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 650;
  margin-bottom: var(--space-2);
}
.risk-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============ Callout / important note ============ */
.callout {
  background: var(--color-primary-highlight);
  border: 1px solid color-mix(in oklab, var(--color-primary) 40%, transparent);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  gap: var(--space-5);
}
.callout svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.callout h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 650;
  margin-bottom: var(--space-2);
}
.callout p {
  font-size: var(--text-sm);
  color: var(--color-text);
}

/* ============ Person card ============ */
.person-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-10);
  align-items: start;
}
.person-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

/* ============ Contact form ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.form-field label {
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-field input,
.form-field textarea,
.form-field select {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-sm);
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-primary);
}
.form-field textarea { resize: vertical; min-height: 120px; }

/* ============ Utility ============ */
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--space-5); }
.prose p { max-width: 72ch; color: var(--color-text-muted); margin-bottom: var(--space-4); }
.prose p:last-child { margin-bottom: 0; }
.divider {
  height: 1px;
  background: var(--color-divider);
  margin-block: var(--space-16);
}
.img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-divider);
}
.img-caption {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
}

/* count-up target reveal */
[data-countup] { display: inline-block; }

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 700ms cubic-bezier(0.16,1,0.3,1), transform 700ms cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Mobile nav drawer ============ */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: color-mix(in oklab, var(--color-bg) 97%, transparent);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.16,1,0.3,1);
}
.nav-drawer.is-open {
  transform: translateX(0);
}
.nav-drawer-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-10);
}
.nav-drawer-close {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-drawer-close svg { width: 20px; height: 20px; }
.nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.nav-drawer a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-3) 0;
  display: block;
  border-bottom: 1px solid var(--color-divider);
}
.nav-drawer a[aria-current='page'] { color: var(--color-primary); }
.nav-drawer-footer {
  margin-top: auto;
  padding-top: var(--space-8);
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .two-col { grid-template-columns: 1fr; }
  .two-col.reverse .img-slot { order: 0; }
  .risk-grid { grid-template-columns: 1fr; }
  .person-card { grid-template-columns: 1fr; }
  .person-photo { max-width: 220px; }
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

@media (max-width: 760px) {
  .nav-links, .header-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-cell { border-right: none; border-bottom: 1px solid var(--color-divider); }
  .stat-cell:nth-child(2n) { border-right: none; }
  .card-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: var(--text-2xl); }
  .hero-content { padding: var(--space-16) var(--space-5); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; }
}
