/* maargin.ai — shared styles */

@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-Light.ttf') format('truetype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }

@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces-Light.ttf') format('truetype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces-LightItalic.ttf') format('truetype'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg-0: #f8f6f1;
  --bg-1: #f0ece4;
  --bg-2: #e6e1d6;
  --bg-3: #dbd6ca;
  --line: rgba(0,0,0,0.07);
  --line-2: rgba(0,0,0,0.13);
  --ink-0: #16140d;
  --ink-1: #3a3828;
  --ink-2: #716d60;
  --ink-3: #a8a498;
  --teal: #008CAB;
  --teal-2: #00889e;
  --teal-deep: #005570;
  --amber: #9a6500;
  --violet: #5b50d0;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1360px;
  --pad: 48px;
  --ink-1-rgb:       58,56,40;
  --card-bg:         rgba(255,255,255,0.85);
  --card-bg-strong:  rgba(255,255,255,0.72);
  --card-bg-soft:    rgba(255,255,255,0.60);
  --teal-rgb:        0,140,171;
  --line-rgb:        0,0,0;
  --nav-bg:          rgba(248,246,241,0.95);
  --nav-overlay-bg:  rgba(248,246,241,0.98);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html { overflow-x: hidden; }
body {
  background: var(--bg-0);
  color: var(--ink-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(0,140,171,0.05), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(184,120,16,0.07), transparent 45%);
}
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 2;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(0,140,171,0.40); color: #16140d; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }
@keyframes revealWord { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.5; transform:scale(1.3); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes dash { to { stroke-dashoffset: -200; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: 3;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  display: inline-block;
}

.section {
  padding: 72px 0;
  border-top: 1px solid rgba(0,0,0,0.07);
  position: relative;
}

/* keep anchored sections clear of the fixed nav bar */
section[id], [id^="caas"] { scroll-margin-top: 96px; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  margin-bottom: 48px;
  align-items: start;
}
.section-head .h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink-0);
  font-variation-settings: "opsz" 144;
}
.section-head .h2 em {
  font-style: italic;
  color: var(--teal);
}

.h-italic-teal { font-style: italic; color: var(--teal); font-weight: 300; }
.h-italic-amber { font-style: italic; color: var(--amber); font-weight: 300; }
.h-italic-violet { font-style: italic; color: var(--violet); font-weight: 300; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.dot-pulse {
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--teal);
  display: inline-block;
  animation: pulse 2.4s var(--ease) infinite;
  flex-shrink: 0;
}

/* Card */
.card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.60) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: rgba(0,140,171,0.27);
  transform: translateY(-2px);
}
.card-edge {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.card:hover .card-edge { opacity: 1; }

/* Btn */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.03);
  color: var(--ink-0);
  transition: all 0.4s var(--ease);
  text-decoration: none;
}
.btn:hover {
  background: rgba(0,0,0,0.09);
  border-color: var(--ink-1);
  transform: translateY(-1px);
}
.btn.primary {
  background: var(--ink-0);
  color: var(--bg-0);
  border-color: transparent;
}
.btn.primary:hover {
  background: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -20px rgba(0,140,171,0.42);
}
.btn .arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Grid background motif */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE SYSTEM — standard breakpoints
   ──────────────────────────────────────────────────────────
   Aligned with Tailwind defaults (and Bootstrap 5 noted):
     xs : <  640 px            phones
     sm : ≥  640 px (TW) / 576 px (BS)
     md : ≥  768 px (TW & BS)  tablets
     lg : ≥ 1024 px (TW) / 992 px (BS)   small laptops
     xl : ≥ 1280 px (TW) / 1200 px (BS)  desktops
     2xl: ≥ 1536 px (TW) / 1400 px (BS)  large desktops
   ──────────────────────────────────────────────────────────
   The hamburger menu appears below `lg` (< 1024 px) and the
   full desktop nav appears at lg+ to give the four links + CTA
   enough horizontal breathing room.
   All inline-style grid overrides use !important because React
   components set grid-template-columns as inline styles.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Breakpoint tokens — exposed for any consumer */
  --bp-sm:   640px;
  --bp-md:   768px;
  --bp-lg:  1024px;
  --bp-xl:  1280px;
  --bp-2xl: 1536px;

  /* Bootstrap equivalents (for reference) */
  --bp-bs-sm: 576px;
  --bp-bs-md: 768px;
  --bp-bs-lg: 992px;
  --bp-bs-xl: 1200px;
  --bp-bs-2xl: 1400px;

  /* Fluid container max-widths (Bootstrap-style) */
  --container-sm:  540px;
  --container-md:  720px;
  --container-lg:  960px;
  --container-xl: 1140px;
  --container-2xl: 1320px;
}

/* Nav defaults — desktop layout */
.nav-links-desktop {
  display: flex;
  gap: 32px;
  list-style: none;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  align-items: center;
}
.nav-cta-desktop  { display: inline-flex; }
.nav-hamburger    { display: none; }

/* ── Get-in-touch CTA in the header ──
   Higher-contrast treatment than the generic .btn.primary so the
   label is unambiguous against the translucent cream nav bar.    */
.nav-cta-btn.btn.primary {
  background: var(--ink-0) !important;
  color: #ffffff !important;
  border: 1px solid var(--ink-0) !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px -10px rgba(0,0,0,0.45);
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.nav-cta-btn.btn.primary:hover {
  background: var(--teal) !important;
  color: #ffffff !important;
  border-color: var(--teal) !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(0,140,171,0.55);
}
.nav-cta-btn.btn.primary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* Dark mode — flip the relationship: teal default, cream hover */
[data-theme="dark"] .nav-cta-btn.btn.primary {
  background: var(--teal) !important;
  color: #ffffff !important;
  border-color: var(--teal) !important;
  box-shadow: 0 6px 18px -8px rgba(0,140,171,0.45);
}
[data-theme="dark"] .nav-cta-btn.btn.primary:hover {
  background: #f4f1ea !important;
  color: #07090c !important;
  border-color: transparent !important;
}

/* Responsive grid utility classes — applied via className on
   React elements whose grid is set inline. */
.resp-text-cols     {} /* 2-col descriptive text pairs       */
.resp-grid-2        {} /* generic 1fr 1fr grids              */
.resp-grid-4        {} /* 4-col capability / model card grids */
.resp-stat-3col     {} /* 3-col aggregate stats strip        */
.resp-shard-row     {} /* 8-node sharding diagram row        */
.resp-foot-grid     {} /* footer 5-col brand + link columns  */
.resp-form-2col     {} /* contact form name / email row      */
.resp-contact-inner {} /* contact section inner padding      */

/* ════════════════════════════════════════════════════════════
   2xl and above (≥ 1536 px) — large desktops
   Container is wider, padding is generous
   ════════════════════════════════════════════════════════════ */
@media (min-width: 1536px) {
  :root {
    --max: 1440px;
    --pad: 56px;
  }
}

/* ════════════════════════════════════════════════════════════
   < xl  (≤ 1279 px) — below desktop
   Bootstrap-aligned: also catches the 1200 px tier
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1279.98px) {
  :root {
    --max: 1140px;
    --pad: 40px;
  }
}

/* ════════════════════════════════════════════════════════════
   < lg  (≤ 1023 px) — tablet / small laptop
   ▸ Hamburger menu turns on here
   ▸ 4-col grids collapse to 2
   ▸ Hero orbital animation hides (overflows tight viewports)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1023.98px) {
  :root {
    --max: 960px;
    --pad: 32px;
  }

  /* Nav: hide desktop links + CTA, show hamburger */
  .nav-links-desktop { display: none !important; }
  .nav-cta-desktop   { display: none !important; }
  .nav-hamburger     { display: flex !important; }

  /* Section head stacks earlier so headings keep their width */
  .section-head {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 64px;
  }

  /* 4-col → 2-col */
  .resp-grid-4    { grid-template-columns: 1fr 1fr !important; }
  /* 3-col cards stay 3-up on tablet but ease the gap */
  .resp-grid-3    { grid-template-columns: 1fr 1fr 1fr !important; gap: 16px !important; }
  /* Footer 5-col → 2-col */
  .resp-foot-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ════════════════════════════════════════════════════════════
   < md  (≤ 767 px) — tablet portrait & below
   ▸ All multi-col grids collapse
   ▸ Hero orbital decoration hidden
   ════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
  :root {
    --max: 720px;
    --pad: 24px;
  }

  .section { padding: 96px 0; }
  .section-head { margin-bottom: 48px; }

  /* Hide the 880 × 880 orbital animation (overflows viewport) */
  .hero-orbital-wrap { display: none !important; }
  .hero-section { padding-top: 140px !important; }

  /* 2-col → 1-col patterns */
  .resp-text-cols { grid-template-columns: 1fr !important; }
  .resp-grid-2    { grid-template-columns: 1fr !important; }
  .resp-grid-3    { grid-template-columns: 1fr !important; }
  .resp-grid-4    { grid-template-columns: 1fr 1fr !important; }

  /* 3-col stats → single column */
  .resp-stat-3col {
    grid-template-columns: 1fr !important;
    border-right: none !important;
  }
  .resp-stat-3col > * {
    border-right: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.07);
  }
  .resp-stat-3col > *:last-child { border-bottom: none; }

  /* Sharding row: horizontal scroll instead of clip */
  .resp-shard-row {
    overflow-x: auto !important;
    padding-bottom: 8px;
  }

  /* Contact form */
  .resp-form-2col { grid-template-columns: 1fr !important; }
}

/* ════════════════════════════════════════════════════════════
   < sm  (≤ 639 px) — phones
   Tailwind's sm boundary; Bootstrap's sm is 576 px but we
   group both here so the phone experience is consistent.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 639.98px) {
  :root {
    --max: 540px;
    --pad: 20px;
  }

  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }

  /* All multi-col grids collapse to one column on phones */
  .resp-grid-4    { grid-template-columns: 1fr !important; }
  .resp-foot-grid { grid-template-columns: 1fr !important; }

  /* Fabric Weaver: 3 formation stages stack vertically */
  .resp-formation { grid-template-columns: 1fr !important; padding: 24px !important; }

  /* Tighter contact section padding */
  .resp-contact-inner { padding: 0 var(--pad) !important; }

  /* Hero padding & button stack */
  .hero-section { padding-top: 116px !important; }
  .hero-btn-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .hero-btn-row .btn { justify-content: center; }
}

/* ════════════════════════════════════════════════════════════
   < xs (≤ 380 px) — very small phones
   ════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  :root { --pad: 16px; }
  .section { padding: 56px 0; }
}

/* ── colored text legibility (light mode) ── */
em[style*="color: var(--teal)"],
span[style*="color:#008CAB"],
.teal-text { font-weight: 500; }


/* ════════════════════════════════════════════════════════════
   DARK THEME OVERRIDES  [data-theme="dark"]
   ════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --nav-bg: rgba(7,9,12,0.92);
  --nav-overlay-bg: rgba(7,9,12,0.97);
  --bg-rgb: 7,9,12;
  --line-rgb: 255,255,255;
  --card-bg: rgba(255,255,255,0.04);
  --ink-1-rgb:      212,207,195;
  --card-bg-strong: rgba(255,255,255,0.06);
  --card-bg-soft:   rgba(255,255,255,0.03);
  --bg-0: #07090c;
  --bg-1: #0a1016;
  --bg-2: #0d141c;
  --bg-3: #121a24;
  --ink-0: #f4f1ea;
  --ink-1: #d4cfc3;
  --ink-2: #8b8679;
  --ink-3: rgba(244,241,234,0.38);
  --teal: #008CAB;
  --teal-2: #5eead4;
  --amber: #f5b971;
  --violet: #7c6ff0;
  --line: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.11);
  color-scheme: dark;
}

[data-theme="dark"] html { overflow-x: hidden; }
body {
  background: var(--bg-0);
  color: var(--ink-1);
}

[data-theme="dark"] body::after {
  opacity: 0.04;
  mix-blend-mode: overlay;
}

/* Cards */
[data-theme="dark"] .card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .use-case-card,
[data-theme="dark"] .step-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  box-shadow: none;
}

/* Inputs */
[data-theme="dark"] .mgn-input {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
  color: #f4f1ea;
}
[data-theme="dark"] .mgn-input::placeholder { color: #55524a; }

/* Nav */
[data-theme="dark"] nav.scrolled,
[data-theme="dark"] nav[style*="rgba(248"] {
  background: rgba(7,9,12,0.92) !important;
}

/* Section backgrounds */
[data-theme="dark"] section,
[data-theme="dark"] .section-alt {
  background: transparent;
}

/* Hero orbital earth */
[data-theme="dark"] .hero-section { background: transparent; }

/* Buttons */
[data-theme="dark"] .btn {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  color: #f4f1ea;
}
[data-theme="dark"] .btn.primary {
  background: #f4f1ea;
  color: #07090c;
}

/* Text colors */
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5 { color: #f4f1ea; }
[data-theme="dark"] p, [data-theme="dark"] li { color: #d4cfc3; }
[data-theme="dark"] .mono-label { color: #8b8679; }

/* Grid background */
[data-theme="dark"] .grid-bg { opacity: 0.06; }

[data-theme="dark"] body {
  background: #07090c;
  color: #d4cfc3;
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(0,140,171,0.14), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(245,185,113,0.07), transparent 45%);
}

[data-theme="dark"] .section-alt {
  background: #0a1016;
}

[data-theme="dark"] .card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .use-case-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border-color: rgba(255,255,255,0.06);
  box-shadow: none;
}

[data-theme="dark"] .stat-line,
[data-theme="dark"] .divider {
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .grid-bg {
  opacity: 0.06;
  filter: invert(1);
}

[data-theme="dark"] footer {
  background: #0a1016;
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  color: #f4f1ea;
}

[data-theme="dark"] .maargin-logo-svg path { fill: #f4f1ea; }

/* ── Logo invert in dark mode ── */
[data-theme="dark"] img[src="maargin-logo.svg"],
[data-theme="dark"] img[src="maargin-logo.png"],
[data-theme="dark"] img[src="maargin-ai-logo.svg"],
[data-theme="dark"] .mgn-logo-img { filter: invert(1) brightness(2); }

/* ════════════════════════════════════════════════════════════
   DARK MODE — comprehensive class overrides
   ════════════════════════════════════════════════════════════ */

/* Body & root */
[data-theme="dark"] body { background: #07090c !important; color: #d4cfc3; }
[data-theme="dark"] ::selection { background: rgba(0,140,171,0.35); color: #f4f1ea; }

/* Sections */
[data-theme="dark"] .section { border-top-color: rgba(255,255,255,0.06) !important; }
[data-theme="dark"] .section-alt { background: #0a1016 !important; }

/* Cards */
[data-theme="dark"] .card {
  background: linear-gradient(180deg,rgba(255,255,255,0.05) 0%,rgba(255,255,255,0.02) 100%) !important;
  border-color: rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
[data-theme="dark"] .card:hover { border-color: rgba(0,140,171,0.30) !important; }

/* Section head */
[data-theme="dark"] .section-head .h2 { color: #f4f1ea !important; }
[data-theme="dark"] .section-head > p,
[data-theme="dark"] .section-head .body-copy { color: #8b8679 !important; }

/* Eyebrow / mono labels */
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .mono-label { color: #8b8679 !important; }

/* Hero stats border */
[data-theme="dark"] .resp-grid-4[style*="borderTop"] { border-top-color: rgba(255,255,255,0.06) !important; }

/* Nav background */
[data-theme="dark"] nav { background: transparent !important; }

/* Buttons */
[data-theme="dark"] .btn {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.13) !important;
  color: #f4f1ea !important;
}
[data-theme="dark"] .btn.primary,
[data-theme="dark"] .btn[class*="primary"] {
  background: #f4f1ea !important;
  color: #07090c !important;
  border-color: transparent !important;
}
[data-theme="dark"] .btn.primary:hover { background: var(--teal) !important; color: #fff !important; }

/* Footer */
[data-theme="dark"] footer,
[data-theme="dark"] [class*="footer"] {
  background: #0a1016 !important;
  border-top-color: rgba(255,255,255,0.06) !important;
}

/* Grid background */
[data-theme="dark"] .grid-bg { filter: invert(1); opacity: 0.05 !important; }

/* Stat items on hero */
[data-theme="dark"] .stat-label { color: #8b8679 !important; }

/* Input styling */
[data-theme="dark"] .mgn-input {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: #f4f1ea !important;
}
[data-theme="dark"] .mgn-input:focus {
  border-color: #008CAB !important;
  background: rgba(0,140,171,0.06) !important;
}

/* Theme toggle button adapts */
[data-theme="dark"] .theme-toggle-btn {
  border-color: rgba(255,255,255,0.13) !important;
  color: #8b8679 !important;
}

/* ── Text visibility improvements ── */
body { font-weight: 400; }

.section-head .body-copy,
.section-head > p { font-size: 18px !important; font-weight: 400 !important; color: var(--ink-1) !important; }

.card p, .card-body { font-weight: 400; color: var(--ink-1); }

.mono-label {
  font-weight: 500;
  letter-spacing: 0.16em;
}

.eyebrow {
  font-weight: 600;
  letter-spacing: 0.18em;
}

/* Hero subtitle */
.hero-section p[style] { font-weight: 400 !important; }

/* stat labels in hero */
.resp-grid-4 span:first-child { font-weight: 600 !important; }

/* Section headings */
.h2 { color: var(--ink-0) !important; }
.h2 em { color: var(--teal) !important; font-weight: 300 !important; }

/* Card text */
.card [style*="color: var(--ink-1)"],
.card [style*="color: var(--ink-2)"] { font-weight: 400; }

/* Nav link weight */
.nav-links-desktop a { font-weight: 500; }

/* ── Global text weight improvements ── */
.nav-links-desktop li a,
.nav-links-desktop a { font-weight: 500 !important; font-size: 14px; letter-spacing: 0.01em; }

/* MicroDC + section card bodies */
.card p, .card > p { font-weight: 400 !important; color: var(--ink-1) !important; font-size: 16px; }

/* Section descriptions */
.section-head > p,
.section-head .body-copy { font-weight: 400 !important; color: var(--ink-1) !important; font-size: 18px !important; }

/* All mono-labels in cards */
.card .mono-label { font-weight: 600; font-size: 11px; letter-spacing: 0.18em; }

/* Hero subtitle */
.hero-section > .container > p { font-weight: 400 !important; }

/* Stat labels */
.resp-grid-4 .mono-label { font-weight: 500 !important; color: var(--ink-2) !important; }
.resp-grid-4 > div > span:last-child { font-size: 14px !important; font-weight: 400 !important; }

/* Justified body text — paragraphs between section heads */
.hero-section > .container > p,
.resp-text-cols p,
.section-head > p,
.section-head .body-copy {
  text-align: justify !important;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Overflow fix — belt and braces */
html, body { overflow-x: hidden !important; max-width: 100vw; }
.hero-orbital-wrap { overflow: hidden !important; max-width: min(880px, 52vw); }

/* Toggle button — more visible */
.theme-toggle-btn {
  font-weight: 600 !important;
  font-size: 12px !important;
  border: 1.5px solid var(--teal) !important;
  color: var(--teal) !important;
  padding: 7px 14px !important;
  background: rgba(0,140,171,0.06) !important;
}
.theme-toggle-btn:hover {
  background: rgba(0,140,171,0.12) !important;
  transform: none;
}

/* ════════════════════════════════════
   GLOBAL DARK + BOLD — everything except backgrounds
   ════════════════════════════════════ */

/* Force all body-level text to use darkest ink */
body, p, li, td, th, label, span, div { color: inherit; }

/* Section descriptions & body copy — max visible */
.section p, .section li,
.section-head p, .section-head > *:not(.h2):not(.eyebrow) {
  color: var(--ink-1) !important;
  font-weight: 400 !important;
  font-size: 17px;
}

/* Card bodies */
.card p, .card li, .card span:not(.mono-label) {
  color: var(--ink-1) !important;
  font-weight: 400 !important;
}

/* mono-label everywhere */
.mono-label {
  color: var(--ink-2) !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em;
  font-size: 11px;
}

/* Eyebrows */
.eyebrow {
  color: var(--teal) !important;
  font-weight: 500 !important;
  letter-spacing: 0.20em;
}

/* h2 section headings */
.h2, h1, h2, h3, h4 {
  color: var(--ink-0) !important;
}

/* Nav links */
.nav-links-desktop a, .nav-links-desktop li a {
  color: var(--ink-1) !important;
  font-weight: 500 !important;
  font-size: 14px;
}

/* Hero stat section */
.resp-grid-4 .mono-label {
  color: var(--ink-2) !important;
  font-weight: 500 !important;
}

/* Hero overline tags */
.hero-section .mono-label,
.dot-pulse + span {
  color: var(--ink-2) !important;
  font-weight: 500 !important;
}

/* Footer text */
footer p, footer li, footer span:not(.mono-label) {
  color: var(--ink-2) !important;
  font-weight: 400 !important;
}

/* Dark mode — restore correct light-on-dark colors */
[data-theme="dark"] .section p,
[data-theme="dark"] .section li,
[data-theme="dark"] .card p,
[data-theme="dark"] .card li,
[data-theme="dark"] .card span { color: #d4cfc3 !important; }

[data-theme="dark"] .mono-label { color: #8b8679 !important; }
[data-theme="dark"] .eyebrow { color: #008CAB !important; }
[data-theme="dark"] .h2, [data-theme="dark"] h1,
[data-theme="dark"] h2, [data-theme="dark"] h3 { color: #f4f1ea !important; }
[data-theme="dark"] .nav-links-desktop a { color: #d4cfc3 !important; }
[data-theme="dark"] footer p, [data-theme="dark"] footer span { color: #8b8679 !important; }
