/* =============================================================================
   style.css — design tokens, base styles, layout, header, hero, footer
   -----------------------------------------------------------------------------
   Mobile-first. Every colour, radius, shadow and spacing step is a CSS custom
   property, so the whole theme can be re-skinned from the :root block below.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root {
  /* Brand palette */
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-darker: #1e40af;
  --color-primary-soft: #eff6ff;
  --color-primary-border: #bfdbfe;

  --color-dark: #0f172a;
  --color-dark-2: #1e293b;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-2: #f1f5f9;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-muted-2: #94a3b8;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;

  --color-success: #16a34a;
  --color-success-soft: #ecfdf5;
  --color-warning: #f59e0b;
  --color-warning-soft: #fffbeb;
  --color-danger: #dc2626;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  --fs-3xl: clamp(1.875rem, 1.4rem + 2.2vw, 2.75rem);
  --fs-hero: clamp(2.125rem, 1.35rem + 3.6vw, 3.75rem);

  --lh-tight: 1.2;
  --lh-snug: 1.4;
  --lh-normal: 1.65;

  /* Space scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;
  --s-10: 72px;
  --s-11: 96px;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Elevation — deliberately soft */
  --sh-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --sh-sm: 0 1px 3px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-md: 0 4px 16px rgba(15, 23, 42, 0.07);
  --sh-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
  --sh-focus: 0 0 0 3px rgba(37, 99, 235, 0.28);

  /* Layout */
  --container: 1200px;
  --gutter: 16px;
  --header-h: 64px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 140ms var(--ease);
  --t-base: 220ms var(--ease);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--color-dark);
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

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

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

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

[hidden] {
  display: none !important;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.sr-only {
  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;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -160%);
  z-index: 200;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: transform var(--t-base);
}

.skip-link:focus {
  transform: translate(-50%, 0);
  color: #fff;
}

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

.section--tight {
  padding-block: var(--s-8);
}

.section--alt {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
}

.section-head__eyebrow {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.section-head__title {
  font-size: var(--fs-2xl);
}

.section-head__text {
  color: var(--color-muted);
  max-width: 62ch;
}

.section-head__link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lede {
  font-size: var(--fs-lg);
  color: var(--color-muted);
  line-height: var(--lh-snug);
}

/* Scroll reveal is opt-in: the `js` class is added by a tiny inline script in
   <head>. Without JavaScript every section stays visible. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ----------------------------------------------------------- demo notice */
.demo-bar {
  background: var(--color-warning-soft);
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: var(--fs-sm);
}

.demo-bar__inner {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  padding-block: 9px;
}

.demo-bar strong {
  font-weight: 700;
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.site-header.is-stuck {
  border-bottom-color: var(--color-border);
  box-shadow: var(--sh-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--color-dark);
  flex: none;
}

.brand:hover {
  color: var(--color-dark);
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.brand__mark svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.nav {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: var(--s-2);
}

.nav__link {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--color-muted);
  font-weight: 600;
  font-size: var(--fs-base);
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}

.nav__link:hover {
  background: var(--color-surface-2);
  color: var(--color-dark);
}

.nav__link.is-active {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
}

.icon-link {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.icon-link svg {
  width: 19px;
  height: 19px;
}

.icon-link:hover {
  color: var(--color-primary);
  border-color: var(--color-primary-border);
}

.icon-link__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-dark);
  cursor: pointer;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.nav-toggle .nav-toggle__close,
.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

/* Mobile nav panel */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  background: var(--color-surface);
  padding: var(--s-5) var(--gutter) var(--s-9);
  overflow-y: auto;
  /* Fades and drops from under the header. A horizontal slide would push the
     panel outside the viewport and create a horizontal scrollbar on phones. */
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
}

.mobile-nav.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--color-dark);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav__link:last-child {
  border-bottom: 0;
}

.mobile-nav__link.is-active {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.mobile-nav__link svg {
  width: 16px;
  height: 16px;
  color: var(--color-muted-2);
}

.mobile-nav__cta {
  margin-top: var(--s-5);
}

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative;
  background: var(--color-dark);
  color: #fff;
  overflow: hidden;
  padding-block: var(--s-9) var(--s-10);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 620px;
  height: 620px;
  top: -320px;
  right: -180px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.45) 0%, rgba(37, 99, 235, 0) 68%);
}

.hero::after {
  width: 460px;
  height: 460px;
  bottom: -280px;
  left: -160px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(56, 189, 248, 0) 70%);
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-5);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #e2e8f0;
}

.hero__eyebrow b {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 2px 10px;
  font-size: var(--fs-xs);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero__title {
  font-size: var(--fs-hero);
  color: #fff;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

.hero__title em {
  font-style: normal;
  color: #93c5fd;
}

.hero__text {
  font-size: var(--fs-lg);
  color: #cbd5e1;
  max-width: 56ch;
  line-height: var(--lh-snug);
}

/* Search card */
.search-card {
  width: 100%;
  max-width: 880px;
  margin-top: var(--s-2);
  background: var(--color-surface);
  border-radius: var(--r-xl);
  padding: var(--s-3);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
  display: grid;
  gap: var(--s-2);
  text-align: left;
}

.search-card__field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 54px;
  border-radius: var(--r-md);
  background: var(--color-surface-2);
  border: 1px solid transparent;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.search-card__field:focus-within {
  background: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: var(--sh-focus);
}

.search-card__field svg {
  width: 19px;
  height: 19px;
  color: var(--color-muted);
}

.search-card__field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: var(--fs-md);
}

.search-card__field input::placeholder {
  color: var(--color-muted-2);
}

.search-card .btn {
  height: 54px;
}

/* The search card as used inside a page header rather than over the hero. */
.search-card--inline {
  max-width: none;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--color-border);
}

.page-head__badge {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-1);
}

.hero__chips-label {
  color: #94a3b8;
  font-size: var(--fs-sm);
  width: 100%;
  margin-bottom: 2px;
}

/* ------------------------------------------------------------------ stats */
.stats {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--s-8) * -1);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--sh-md);
}

.stat {
  text-align: center;
  padding: var(--s-2);
}

.stat__value {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-dark);
  display: block;
}

.stat__label {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  font-weight: 500;
}

.stats__note {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--color-muted-2);
  margin-top: var(--s-3);
}

/* --------------------------------------------------------------- CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--color-dark);
  color: #fff;
  border-radius: var(--r-xl);
  padding: var(--s-8) var(--s-5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
}

.cta-band::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  top: -300px;
  right: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.5) 0%, rgba(37, 99, 235, 0) 70%);
}

.cta-band > * {
  position: relative;
  z-index: 1;
}

.cta-band__title {
  color: #fff;
  font-size: var(--fs-2xl);
  max-width: 20ch;
}

.cta-band__text {
  color: #cbd5e1;
  max-width: 56ch;
}

/* ------------------------------------------------------------- newsletter */
.newsletter {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--s-7) var(--s-5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  box-shadow: var(--sh-xs);
}

.newsletter__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: grid;
  place-items: center;
}

.newsletter__icon svg {
  width: 22px;
  height: 22px;
}

.newsletter__form {
  display: grid;
  gap: var(--s-2);
  width: 100%;
  max-width: 460px;
  margin-top: var(--s-2);
}

.newsletter__input {
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--fs-base);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.newsletter__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--sh-focus);
}

.newsletter__note {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  max-width: 52ch;
}

.newsletter__disclaimer {
  font-size: var(--fs-xs);
  color: var(--color-muted-2);
}

/* ----------------------------------------------------------------- footer */
.site-footer {
  background: var(--color-dark);
  color: #cbd5e1;
  padding-block: var(--s-9) var(--s-5);
  margin-top: var(--s-9);
}

.footer-grid {
  display: grid;
  gap: var(--s-7);
}

.footer-brand__text {
  color: #94a3b8;
  font-size: var(--fs-base);
  margin-top: var(--s-3);
  max-width: 40ch;
}

.site-footer .brand,
.site-footer .brand:hover {
  color: #fff;
}

.footer-col__title {
  color: #fff;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s-3);
}

.footer-col__list {
  display: grid;
  gap: 10px;
}

.footer-col__list a {
  color: #cbd5e1;
  font-size: var(--fs-base);
}

.footer-col__list a:hover {
  color: #fff;
}

.social-row {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-4);
  flex-wrap: wrap;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
  transition: background var(--t-fast), color var(--t-fast);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  background: var(--color-primary);
  color: #fff;
}

.footer-bottom {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  font-size: var(--fs-sm);
  color: #94a3b8;
}

.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
}

.footer-bottom a {
  color: #94a3b8;
}

.footer-bottom a:hover {
  color: #fff;
}

.footer-disclaimer {
  font-size: var(--fs-xs);
  color: #7c8ba1;
  max-width: 78ch;
  line-height: 1.6;
}

/* --------------------------------------------------- page header (inner) */
.page-head {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--s-7);
}

.page-head__inner {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.page-head__title {
  font-size: var(--fs-3xl);
  letter-spacing: -0.03em;
}

.page-head__text {
  color: var(--color-muted);
  max-width: 68ch;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--color-muted);
}

.breadcrumb svg {
  width: 13px;
  height: 13px;
  color: var(--color-muted-2);
}

.breadcrumb a {
  color: var(--color-muted);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb [aria-current] {
  color: var(--color-dark);
  font-weight: 600;
}

/* -------------------------------------------------------------- prose  */
.prose {
  max-width: 76ch;
}

.prose h2 {
  font-size: var(--fs-xl);
  margin-top: var(--s-8);
  margin-bottom: var(--s-3);
}

.prose h3 {
  font-size: var(--fs-lg);
  margin-top: var(--s-6);
  margin-bottom: var(--s-2);
}

.prose p {
  color: #334155;
  margin-bottom: var(--s-4);
}

.prose ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: var(--s-4);
  color: #334155;
}

.prose li {
  margin-bottom: var(--s-2);
}

.prose strong {
  color: var(--color-dark);
}

.prose > :first-child {
  margin-top: 0;
}

.callout {
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  background: var(--color-surface);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-5);
  color: #334155;
}

.callout--warn {
  border-left-color: var(--color-warning);
  background: var(--color-warning-soft);
}

/* ------------------------------------------------------------ reduced motion */
@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;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
