/* ==========================================================================
   SpeedX — base.css
   Design tokens, reset, typography and shared utilities.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Local webfonts
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "InterLocal";
  src: url("../fonts/inter-v12-latin-regular.woff2") format("woff2"),
       url("../fonts/inter-v12-latin-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "InterLocal";
  src: url("../fonts/inter-v12-latin-500.woff2") format("woff2"),
       url("../fonts/inter-v12-latin-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "InterLocal";
  src: url("../fonts/inter-v12-latin-700.woff2") format("woff2"),
       url("../fonts/inter-v12-latin-700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand — navy */
  --navy-900: #030f24;
  --navy-800: #06182f;
  --navy-700: #0a2547;
  --navy-600: #0f3363;
  --navy-500: #17457f;

  /* Brand — gold */
  --gold-700: #a9761a;
  --gold-600: #c8901f;
  --gold-500: #e5ab33;
  --gold-400: #f2c25c;
  --gold-300: #f8db9a;

  /* Accent — signal blue */
  --blue-400: #3f8fd8;
  --blue-300: #7cb8ee;

  /* Neutrals */
  --ink: #0b1626;
  --ink-soft: #33415a;
  --slate: #5f6d85;
  --slate-light: #8a97ab;
  --line: #e2e7f0;
  --line-soft: #eef1f7;
  --paper: #f5f7fb;
  --paper-warm: #faf8f4;
  --white: #ffffff;

  /* On-dark neutrals */
  --on-dark: rgba(255, 255, 255, 0.94);
  --on-dark-soft: rgba(255, 255, 255, 0.68);
  --on-dark-faint: rgba(255, 255, 255, 0.44);
  --rule-dark: rgba(255, 255, 255, 0.14);

  /* Status */
  --up: #47c98b;

  /* Typography */
  --font-body: "InterLocal", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Sora", "InterLocal", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --shell: 1240px;
  --gutter: 24px;
  --section-y: 7.5rem;
  --section-y-sm: 4.5rem;

  /* Shape */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(11, 22, 38, 0.06);
  --shadow-sm: 0 4px 14px rgba(11, 22, 38, 0.07);
  --shadow-md: 0 14px 38px rgba(11, 22, 38, 0.10);
  --shadow-lg: 0 28px 70px rgba(11, 22, 38, 0.16);
  --shadow-dark: 0 30px 80px rgba(3, 15, 36, 0.55);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.35s;
}

/* --------------------------------------------------------------------------
   3. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

p {
  text-align: justify;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

::selection {
  background: var(--gold-500);
  color: var(--navy-900);
}

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 1.4rem + 3.4vw, 4.2rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.95rem, 1.2rem + 2.4vw, 3.1rem);
  letter-spacing: -0.035em;
}

h3 {
  font-size: clamp(1.15rem, 1.02rem + 0.5vw, 1.4rem);
  letter-spacing: -0.02em;
}

h4 {
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

p {
  text-wrap: pretty;
}

strong,
b {
  font-weight: 700;
}

.display-em {
  color: var(--gold-500);
  font-style: normal;
}

/* --------------------------------------------------------------------------
   5. Layout utilities
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell-narrow {
  max-width: 880px;
}

.section {
  padding-block: var(--section-y);
}

.section-tight {
  padding-block: var(--section-y-sm);
}

.section-paper {
  background: var(--paper);
}

.section-warm {
  background: var(--paper-warm);
}

.section-dark {
  background: var(--navy-900);
  color: var(--on-dark);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   6. Text utilities
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--gold-600);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  flex: none;
  background: var(--gold-500);
}

.eyebrow-plain::before {
  display: none;
}

.section-dark .eyebrow,
.on-dark .eyebrow {
  color: var(--gold-400);
}

.lead {
  color: var(--slate);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  line-height: 1.7;
}

.section-dark .lead,
.on-dark .lead {
  color: var(--on-dark-soft);
}

.measure {
  max-width: 56ch;
}

.measure-sm {
  max-width: 44ch;
}

.text-center {
  text-align: center;
}

.center-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.center-stack .measure {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   7. Section headings
   -------------------------------------------------------------------------- */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: end;
  gap: 2rem 4rem;
  margin-bottom: 3.25rem;
}

.section-head h2 {
  margin-top: 1rem;
}

.section-head-center {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   8. Rules and dividers
   -------------------------------------------------------------------------- */
.rule {
  height: 1px;
  border: 0;
  background: var(--line);
}

.rule-dark {
  background: var(--rule-dark);
}

/* --------------------------------------------------------------------------
   9. Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* --------------------------------------------------------------------------
   9b. Inline SVG icon sprite (definitions only, never rendered)
   -------------------------------------------------------------------------- */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   10. Accessibility helpers
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--navy-900);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

/* --------------------------------------------------------------------------
   11. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  :root {
    --section-y: 4.75rem;
    --section-y-sm: 3.25rem;
  }

  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 20px;
  }

  body {
    font-size: 0.97rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
