/* ========================================================================== */
/* QualCheck marketing site — shared brand system                             */
/* Source of truth: apps/web/src/index.css (live "Editorial" theme).          */
/* Warm cream paper · oceanic-teal primary · amber accent · Newsreader serif  */
/* headlines over Geist body · tight radii · hairline borders · whitespace.   */
/* Fonts are self-hosted (latin, woff2) under assets/fonts/ — no third-party  */
/* requests, and compatible with the strict CloudFront CSP (font-src 'self'). */
/* ========================================================================== */

/* Newsreader — serif headlines */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-v26-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-v26-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/newsreader-v26-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/newsreader-v26-latin-700.woff2") format("woff2");
}

/* Geist — sans body / UI */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/geist-v5-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/geist-v5-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/geist-v5-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/geist-v5-latin-700.woff2") format("woff2");
}

/* Geist Mono — eyebrows / labels */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/geist-mono-v6-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/geist-mono-v6-latin-500.woff2") format("woff2");
}

:root {
  /* Type */
  --font-sans:
    "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
  --font-serif:
    "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Surfaces */
  --paper: #fcfaf6; /* warm cream page bg */
  --white: #ffffff; /* cards */
  --panel: #f3f0ea; /* quiet warm panel */
  --accent-bg: #f8efe2; /* warm accent surface */
  --navy: #0a1f2c; /* dark shell / footer */
  --navy-soft: #122c3b; /* dark card on navy */

  /* Ink */
  --ink: #0a1319; /* near-black text */
  --ink-soft: #52595e; /* muted text */
  --ink-faint: #8a9096; /* faintest text */
  --on-dark: #ffffff;
  --on-dark-soft: #aebcc6;

  /* Brand */
  --teal: #00657f; /* primary — CTAs, links, action */
  --teal-hover: #00536d;
  --teal-ink: #14627a; /* teal text on pale */
  --teal-pale: #d4ecf5;
  --amber: #ea951e; /* the "pop", sparing */
  --amber-pale: #f5e2c5;
  --amber-ink: #8a5a1a;
  --green-pale: #d6ecd4;
  --green-ink: #2f6b3a;
  --violet-pale: #e3dcf5;
  --violet-ink: #4a3a8a;
  --red: #d33c33;
  --red-pale: #f5d4d4;
  --red-ink: #8a2a2a;

  /* Lines */
  --border: #dde2e6; /* hairline */
  --border-strong: #c8cfd4;
  --divider: #e3dcc9;

  /* Geometry */
  --r-pill: 4px;
  --r-control: 8px;
  --r-card: 10px;

  /* Elevation — near-flat, navy-tinted */
  --shadow-sm: 0 1px 2px rgb(10 31 44 / 0.05);
  --shadow: 0 1px 0 rgb(10 31 44 / 0.04), 0 1px 2px rgb(10 31 44 / 0.05);
  --shadow-lg: 0 2px 4px rgb(10 31 44 / 0.05), 0 12px 32px rgb(10 31 44 / 0.08);

  /* Rhythm */
  --container: 1120px;
  --container-narrow: 760px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* --- reset ---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-feature-settings: "tnum";
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}

/* --- type ----------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.06;
  color: var(--ink);
}
h1 {
  font-size: clamp(2.4rem, 5vw, 3.9rem);
}
h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.7rem);
}
h3 {
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}
p {
  color: var(--ink-soft);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow.muted {
  color: var(--ink-faint);
}

.lead {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.serif {
  font-family: var(--font-serif);
}
.text-teal {
  color: var(--teal);
}
.text-amber {
  color: var(--amber);
}
.center {
  text-align: center;
}

/* --- layout --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.narrow {
  max-width: var(--container-narrow);
}
.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.section-sm {
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.divide-top {
  border-top: 1px solid var(--border);
}

/* --- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding-inline: 1.3rem;
  border-radius: var(--r-control);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition:
    background 160ms var(--ease),
    border-color 160ms var(--ease),
    transform 160ms var(--ease),
    color 160ms var(--ease);
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--teal);
  color: #fcfaf6;
  box-shadow:
    0 1px 0 rgb(0 0 0 / 0.08),
    0 2px 8px rgb(0 101 127 / 0.18);
}
.btn-primary:hover {
  background: var(--teal-hover);
}
.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--accent-bg);
  border-color: var(--border-strong);
}
.btn-ghost {
  color: var(--ink);
  padding-inline: 0.6rem;
}
.btn-ghost:hover {
  color: var(--teal);
}
.btn-lg {
  height: 50px;
  padding-inline: 1.6rem;
  font-size: 1rem;
}
.btn-on-dark {
  background: var(--white);
  color: var(--navy);
}
.btn-on-dark:hover {
  background: var(--accent-bg);
}
.btn-outline-dark {
  background: transparent;
  color: var(--on-dark);
  border-color: rgb(255 255 255 / 0.28);
}
.btn-outline-dark:hover {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.5);
}

.arrow {
  transition: transform 160ms var(--ease);
}
.btn:hover .arrow,
.link-arrow:hover .arrow {
  transform: translateX(3px);
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--teal);
  font-weight: 500;
}

/* --- pills ---------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 22px;
  padding-inline: 0.55rem;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--panel);
  color: var(--ink-soft);
}
.pill-teal {
  background: var(--teal-pale);
  color: var(--teal-ink);
}
.pill-amber {
  background: var(--amber-pale);
  color: var(--amber-ink);
}
.pill-green {
  background: var(--green-pale);
  color: var(--green-ink);
}
.pill-violet {
  background: var(--violet-pale);
  color: var(--violet-ink);
}
.pill-red {
  background: var(--red-pale);
  color: var(--red-ink);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-pill);
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink-soft);
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* --- cards ---------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 1.6rem;
}
.card-quiet {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 1.6rem;
}

/* --- nav ------------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(252 250 246 / 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand .mark {
  width: 26px;
  height: 26px;
}
.brand-logo {
  display: block;
  height: 30px;
  width: auto;
}
.footer .brand-logo {
  height: 28px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-links .text-link {
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-radius: var(--r-control);
}
.nav-links .text-link:hover {
  color: var(--ink);
}

/* --- footer --------------------------------------------------------------- */
.footer {
  background: var(--navy);
  color: var(--on-dark-soft);
  padding-block: 3.5rem 2.5rem;
}
.footer a {
  color: var(--on-dark-soft);
}
.footer a:hover {
  color: var(--white);
}
/* keep the solid button readable — the footer link colours must not bleed in */
.footer .btn-on-dark,
.footer .btn-on-dark:hover {
  color: var(--navy);
}
.footer .btn-outline-dark,
.footer .btn-outline-dark:hover {
  color: var(--on-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
}
.footer .brand {
  color: var(--white);
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.82rem;
  color: var(--on-dark-soft);
}

/* --- helpers -------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1.25rem;
}
.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
.stack-sm {
  display: grid;
  gap: 0.5rem;
}
.stack {
  display: grid;
  gap: 1rem;
}
.stack-lg {
  display: grid;
  gap: 1.5rem;
}
.flex {
  display: flex;
  gap: 0.75rem;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}
.measure {
  max-width: 60ch;
}

/* hairline number badge used in "how it works" steps */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 500;
}

/* editorial underline accent for headings */
.rule {
  width: 48px;
  height: 2px;
  background: var(--teal);
  opacity: 0.55;
  border-radius: 2px;
}

/* reveal on load (respects reduced motion) */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 520ms var(--ease) forwards;
}
.reveal.d1 {
  animation-delay: 60ms;
}
.reveal.d2 {
  animation-delay: 130ms;
}
.reveal.d3 {
  animation-delay: 200ms;
}
.reveal.d4 {
  animation-delay: 270ms;
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cols-3 {
    grid-template-columns: 1fr;
  }
  .cols-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .nav-links .hide-sm {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .cols-4 {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}
