/* =====================================================================
   base.css — design tokens, reset, typography, layout utilities
   ===================================================================== */

/* ---------- Design tokens (light) ---------- */
:root {
  /* Brand */
  --primary: #0a6cff;
  --primary-600: #0057e0;
  --primary-700: #0046b8;
  --primary-50: #eef5ff;
  --primary-100: #dbe9ff;
  --accent: #00c2a8;
  --accent-600: #00a58f;
  --accent-50: #e6faf7;
  --cta: #ff6b35;
  --cta-600: #f05a22;
  --cta-50: #fff1eb;

  /* Status */
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #e11d48;

  /* Neutrals */
  --bg: #f6f9fe;
  --bg-alt: #eef3fb;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --text: #0f1b33;
  --text-2: #43506b;
  --muted: #74819a;
  --border: #e3e9f3;
  --border-strong: #cfd8e7;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  --grad-soft: linear-gradient(135deg, #eaf2ff 0%, #e6faf7 100%);
  --grad-cta: linear-gradient(135deg, #ff8a4c 0%, var(--cta) 100%);
  --grad-dark: linear-gradient(135deg, #0b1a3a 0%, #062a3a 100%);

  /* Typography */
  --font-head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.2rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-xl: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  --fs-2xl: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  --fs-3xl: clamp(2.2rem, 1.6rem + 2.6vw, 3.75rem);
  --lh-tight: 1.15;
  --lh-normal: 1.6;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --section-y: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
  --container: 1240px;

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(15, 27, 51, 0.06);
  --sh-sm: 0 2px 8px rgba(15, 27, 51, 0.06), 0 1px 2px rgba(15, 27, 51, 0.04);
  --sh-md: 0 10px 30px -10px rgba(15, 27, 51, 0.15), 0 4px 10px -4px rgba(15, 27, 51, 0.06);
  --sh-lg: 0 24px 60px -20px rgba(10, 60, 140, 0.28), 0 8px 20px -8px rgba(15, 27, 51, 0.08);
  --sh-glow: 0 10px 30px -8px rgba(10, 108, 255, 0.55);
  --sh-glow-cta: 0 10px 30px -8px rgba(255, 107, 53, 0.55);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.18s;
  --dur: 0.35s;
  --dur-slow: 0.7s;

  /* Layout */
  --header-h: 80px;
  --topbar-h: 38px;
  --mobile-bar-h: 64px;

  color-scheme: light;
}

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

* {
  margin: 0;
}

html {
  overflow-x: clip; /* slide-in animations never cause sideways scrolling */
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

html:not(.lenis) {
  scroll-behavior: smooth;
}

/* Lenis smooth-scroll helpers */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* "clip" (unlike "hidden") keeps the sticky header working; "hidden" is the fallback for old browsers */
  overflow-x: hidden;
  overflow-x: clip;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}

/* Very fine film grain over the whole page — gives a premium, printed feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.no-scroll {
  overflow: hidden;
}

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

img {
  height: auto;
}

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

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

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: var(--lh-tight);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: break-word;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p {
  overflow-wrap: break-word;
}

::selection {
  background: var(--primary);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* The hidden attribute always wins over component display rules */
[hidden] {
  display: none !important;
}

/* ---------- Accessibility ---------- */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--dur) var(--ease-out);
}

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

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

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

.section--alt {
  background: var(--bg-alt);
}

.section--soft {
  background: var(--grad-soft);
}

.section-head {
  max-width: 720px;
  margin: 0 auto var(--sp-7);
  text-align: center;
}

.section-head--left {
  margin-inline: 0;
  text-align: left;
}

.section-head p {
  margin-top: var(--sp-3);
  color: var(--text-2);
  font-size: var(--fs-md);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: var(--sp-4);
  border-radius: var(--r-pill);
  background: var(--primary-50);
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow svg {
  width: 16px;
  height: 16px;
}

.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-muted { color: var(--muted); }
.text-center { text-align: center; }

.grid {
  display: grid;
  gap: var(--sp-5);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.wrap { flex-wrap: wrap; }

.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }

/* Lucide icons default size */
[data-lucide],
.lucide {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Main content offset when the mobile bottom bar is shown */
@media (max-width: 767px) {
  body {
    padding-bottom: var(--mobile-bar-h);
  }
}
