/* Base — reset, typography, utilities */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-en);
  font-size: var(--fs-1);
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, picture, video, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; text-wrap: balance; }
p { text-wrap: pretty; }
button { cursor: pointer; border: none; background: none; }
table { border-collapse: collapse; width: 100%; }

/* Focus */
:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--ink-900);
  color: white;
  padding: var(--s-2) var(--s-3);
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { inset-inline-start: 0; }

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}
.container--narrow { max-width: 780px; }

/* Section */
.section { padding-block: var(--s-6); }
@media (max-width: 767px) {
  .section { padding-block: var(--s-5); }
}
.section--alt { background: var(--mist); }

/* Section header */
.section-header {
  max-width: 640px;
  margin-bottom: var(--s-5);
}
.section-header__eyebrow {
  display: inline-block;
  font-size: var(--fs-0);
  font-weight: 600;
  color: var(--accent-600);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: var(--s-2);
}
.section-header__title {
  font-size: var(--fs-3);
  margin-bottom: var(--s-2);
}
.section-header__lead {
  font-size: var(--fs-1);
  color: var(--ink-500);
}

/* Grid */
.grid { display: grid; gap: var(--s-4); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Dot accent */
.dot { color: var(--accent-500); }

/* Empty state */
.empty-state {
  text-align: center;
  color: var(--ink-500);
  padding: var(--s-6);
}

/* ── Fixed gradient backdrop (light mode only): Navy → Electric Blue → White ──
   The gradient is anchored to the viewport (background-attachment: fixed),
   so every screen shows Navy at the top → Electric Blue in the middle →
   White at the bottom. Content floats in translucent glass panels so text
   stays readable over every zone. Dark mode keeps its solid backgrounds. */
body {
  background-color: var(--paper);
  background-image: linear-gradient(180deg, #0B1220 0%, #2563EB 50%, #F8FAFC 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Sections become transparent so the gradient shows around their panels */
:root:not([data-theme="dark"]) .hero,
:root:not([data-theme="dark"]) .trust-bar,
:root:not([data-theme="dark"]) .page-hero,
:root:not([data-theme="dark"]) .section--alt,
:root:not([data-theme="dark"]) .cta-band,
:root:not([data-theme="dark"]) .footer {
  background: transparent;
}
:root:not([data-theme="dark"]) .trust-bar {
  border-bottom: none;
}

/* Glass panel: each section's container floats over the gradient */
:root:not([data-theme="dark"]) .section > .container,
:root:not([data-theme="dark"]) .hero > .container,
:root:not([data-theme="dark"]) .trust-bar > .container,
:root:not([data-theme="dark"]) .page-hero > .container,
:root:not([data-theme="dark"]) .cta-band > .container,
:root:not([data-theme="dark"]) .footer > .container {
  background: rgba(248, 250, 252, .9);
  border-radius: var(--r-lg);
  padding-block: var(--s-4);
  box-shadow: var(--shadow-2);
}
@media (min-width: 768px) {
  :root:not([data-theme="dark"]) .section > .container,
  :root:not([data-theme="dark"]) .hero > .container,
  :root:not([data-theme="dark"]) .trust-bar > .container,
  :root:not([data-theme="dark"]) .page-hero > .container,
  :root:not([data-theme="dark"]) .cta-band > .container,
  :root:not([data-theme="dark"]) .footer > .container {
    padding-block: var(--s-5);
  }
}

/* Fixed attachment is unreliable on small/touch screens (iOS, Android,
   tablets) — fall back to a document-length gradient there (same colors). */
@media (max-width: 1023px), (pointer: coarse) {
  body,
  [data-theme="dark"] body { background-attachment: scroll; }
}

/* ── Fixed gradient backdrop (dark mode): Midnight Navy → Electric Blue → Off-White ──
   Same treatment as light mode with the dark palette: viewport-anchored
   gradient, transparent sections, dark glass panels for content. */
[data-theme="dark"] body {
  background-color: #060B16;
  background-image: linear-gradient(180deg, #060B16 0%, #2563EB 50%, #E9ECF2 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

[data-theme="dark"] .hero,
[data-theme="dark"] .trust-bar,
[data-theme="dark"] .page-hero,
[data-theme="dark"] .section--alt,
[data-theme="dark"] .cta-band,
[data-theme="dark"] .footer {
  background: transparent;
}
[data-theme="dark"] .trust-bar {
  border-bottom: none;
}

[data-theme="dark"] .section > .container,
[data-theme="dark"] .hero > .container,
[data-theme="dark"] .trust-bar > .container,
[data-theme="dark"] .page-hero > .container,
[data-theme="dark"] .cta-band > .container,
[data-theme="dark"] .footer > .container {
  background: rgba(11, 27, 43, .9);
  border-radius: var(--r-lg);
  padding-block: var(--s-4);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
}
@media (min-width: 768px) {
  [data-theme="dark"] .section > .container,
  [data-theme="dark"] .hero > .container,
  [data-theme="dark"] .trust-bar > .container,
  [data-theme="dark"] .page-hero > .container,
  [data-theme="dark"] .cta-band > .container,
  [data-theme="dark"] .footer > .container {
    padding-block: var(--s-5);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
