/* ===== Tokens ===== */
:root {
  --canvas: #eef4fa;
  --surface-1: #ffffff;
  --surface-2: #dbeaf6;
  --hairline: #bdd0df;
  --hairline-soft: #d7e4ee;
  --ink: #08213d;
  --ink-muted: #41566a;
  --ink-subtle: #607385;
  --ink-tertiary: #8194a5;
  --inverse-canvas: #061a33;
  --brand-blue: #02539c;
  --brand-blue-deep: #003c79;
  --brand-blue-soft: #2f75b6;
  --accent: #f16024;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-xxl: 24px;
  --r-pill: 9999px;

  --s-xxs: 4px;
  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-xxl: 48px;
  --s-section: 96px;

  --container: 1240px;

  --font-sans: 'Inter', 'Saans Fallback', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  background:
    linear-gradient(180deg, #f7fbff 0%, var(--canvas) 420px, #f5f8fb 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--ink); color: var(--canvas); }

/* ===== Type ===== */
.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ink-muted);
  display: inline-block;
}
.display-xl {
  font-size: clamp(38px, 7vw, 84px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.display-lg {
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.028em;
  margin: 0;
  text-wrap: balance;
}
.display-md {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
.headline {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}
.body-lg { font-size: 18px; line-height: 1.55; letter-spacing: -0.003em; color: var(--ink-muted); }
.body-sm { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0; }

/* ===== Layout ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}
.section {
  padding-top: clamp(64px, 9vw, 120px);
  padding-bottom: clamp(64px, 9vw, 120px);
}
.section--tight { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, #ffffff 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 240ms ease, background 240ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--hairline-soft); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
}
.brand__mark {
  width: 188px;
  height: 54px;
  border-radius: var(--r-sm);
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: none;
}
.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(20%) sepia(84%) saturate(1997%) hue-rotate(190deg) brightness(90%) contrast(102%);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__links a {
  font-size: 14px;
  color: var(--ink-muted);
  transition: color 160ms ease;
  position: relative;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
  white-space: nowrap;
}
.btn--primary { background: var(--brand-blue); color: var(--surface-1); }
.btn--primary:hover { transform: translateY(-1px); background: var(--brand-blue-deep); }
.btn--secondary { background: var(--surface-1); color: var(--ink); border-color: var(--hairline); }
.btn--secondary:hover { transform: translateY(-1px); border-color: var(--brand-blue); color: var(--brand-blue); }
.btn--ghost { color: var(--ink); }
.btn--ghost:hover { background: var(--surface-2); }
.btn__arrow { transition: transform 200ms ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-1);
  color: var(--ink);
  padding: 0;
  place-items: center;
  align-content: center;
  gap: 5px;
}
.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: var(--r-pill);
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}
.nav.is-menu-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-menu-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none;
}

@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: grid; }
  .mobile-menu {
    display: flex;
    flex-direction: column;
    max-height: 0;
    border-top: 1px solid transparent;
    background: color-mix(in srgb, #ffffff 96%, transparent);
    overflow: hidden;
    transition: max-height 240ms ease, border-color 220ms ease;
  }
  .mobile-menu > a {
    min-height: 0;
    padding: 0 clamp(20px, 4vw, 40px);
    opacity: 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    transform: translateY(-6px);
    transition: opacity 160ms ease, transform 160ms ease, padding 220ms ease;
  }
  .nav.is-menu-open .mobile-menu {
    max-height: 360px;
    border-top-color: var(--hairline-soft);
  }
  .nav.is-menu-open .mobile-menu > a {
    padding-top: 14px;
    padding-bottom: 14px;
    opacity: 1;
    transform: none;
  }
  .mobile-menu__cta {
    margin: 8px clamp(20px, 4vw, 40px) 18px;
    padding-left: 16px !important;
    padding-right: 16px !important;
    border-radius: var(--r-md);
    background: var(--brand-blue);
    color: #fff !important;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }
  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .display-xl {
    font-size: clamp(34px, 11.5vw, 50px);
    line-height: 1.04;
    text-wrap: auto;
  }
  .display-lg {
    font-size: clamp(30px, 10vw, 42px);
    line-height: 1.08;
    text-wrap: auto;
  }
  .body-lg {
    font-size: 16px;
    line-height: 1.55;
  }
  .nav__inner {
    min-height: 76px;
    gap: 12px;
  }
  .brand__mark {
    width: 146px;
    height: 42px;
  }
  .nav__cta { display: none; }
}

@media (max-width: 390px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
  .brand__mark {
    width: 128px;
    height: 38px;
  }
}
