/* ---------------------------------------------------------------
   Design tokens
   --------------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --surface: #ffffff;
  --border: #e3e5ea;
  --text: #16181d;
  --text-muted: #5a6070;
  --accent: #2f5bd7;
  --accent-hover: #24499f;
  --accent-contrast: #ffffff;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.86rem, 0.84rem + 0.1vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius: 12px;
  --container: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --bg-alt: #16191f;
    --surface: #191d24;
    --border: #2a2f39;
    --text: #eceef2;
    --text-muted: #a3aab8;
    --accent: #7ea2ff;
    --accent-hover: #a3bcff;
    --accent-contrast: #10141f;
  }
}

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

body, h1, h2, h3, p, ul, figure {
  margin: 0;
  padding: 0;
}

ul { list-style: none; }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------
   Layout primitives
   --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.container.narrow { max-width: 42rem; }

.section { padding-block: var(--space-6); }
.section-alt { background: var(--bg-alt); }

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
  z-index: 10;
  padding: var(--space-1) var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: var(--space-3);
  font-size: var(--step--1);
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.nav a:hover { color: var(--text); }

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero {
  padding-block: var(--space-6) var(--space-5);
}

.eyebrow {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.hero h1 {
  font-size: var(--step-3);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 18ch;
}

.lede {
  margin-top: var(--space-3);
  max-width: 52ch;
  font-size: var(--step-1);
  color: var(--text-muted);
}

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
  font-size: var(--step--1);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-contrast);
}

.button-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.button-ghost:hover {
  background: var(--bg-alt);
  border-color: var(--text-muted);
  color: var(--text);
}

/* ---------------------------------------------------------------
   Sections & cards
   --------------------------------------------------------------- */
h2 {
  font-size: var(--step-2);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 680;
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--step-1);
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 640;
  margin-bottom: var(--space-1);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-3);
}

.card {
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card p { color: var(--text-muted); }

#contact p { color: var(--text-muted); }

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-3);
  font-size: var(--step--1);
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
}

/* ---------------------------------------------------------------
   Mobile
   --------------------------------------------------------------- */
@media (max-width: 40rem) {
  :root {
    --space-6: 3.5rem;
    --space-5: 2.5rem;
  }

  .hero h1 { max-width: none; }
  .button { flex: 1 1 auto; text-align: center; }
}
