/*
  The public landing page. One stylesheet, every color a token from
  brand-tokens.css (standard 149: no hex literal here). The marketing site keeps
  the navy palette; this page does not opt into .aide-app.

  Mobile first: a single column that opens into a grid at 720px. No script, no
  webfont download; Inter if the machine has it, the system face if not.
*/

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h2 { font-size: 1.75rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
a { color: var(--blue-dark); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
}
.skip:focus { left: 1rem; z-index: 10; }

main > section, .site-header, .site-footer {
  width: min(100% - 2.5rem, 1080px);
  margin-left: auto;
  margin-right: auto;
}
main > section { padding: 3rem 0; border-top: 1px solid var(--line); }
main > section:first-child { border-top: 0; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 1rem 0;
}
/* The product lockup at a 28px capital D; its box is 160 x 28 (aspect from the kit manifest). */
.brand img { display: block; height: 28px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-left: auto; }
.site-nav a { text-decoration: none; color: var(--navy); font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: var(--blue-dark); text-decoration: underline; }
.nav-signin { color: var(--blue-dark); }

/* Buttons: the .button contract with primary and quiet modifiers (standard 149 section 2). */
.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  border: 1.5px solid var(--indigo);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}
.button.primary { background: var(--indigo); color: var(--white); }
.button.primary:hover { background: var(--navy); border-color: var(--navy); }
.button.quiet { background: var(--white); color: var(--indigo); }
.button.quiet:hover { background: var(--soft); }

/* Hero */
.hero { padding-top: 2rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(1.6rem, 1rem + 2.4vw, 2.5rem); max-width: 22em; font-weight: 700; }
.lede { font-size: 1.15rem; color: var(--ink); max-width: 44em; margin-top: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.hero-facts {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero-facts strong { display: block; color: var(--navy); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Problem */
.problem h2 { font-size: 1.45rem; max-width: 30em; }
.problem p { max-width: 44em; }

/* Function cards */
.section-lede { color: var(--muted); margin-bottom: 1.5rem; }
.cards {
  list-style: none;
  counter-reset: fn;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
.card {
  counter-increment: fn;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1rem;
}
.card h3::before {
  content: counter(fn, decimal-leading-zero);
  display: block;
  color: var(--blue-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}
.card p { margin: 0; color: var(--ink); font-size: 0.97rem; }

/* How it works */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.step { position: relative; padding-left: 3.25rem; }
.step-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.step p { margin: 0; }

/* Diagnostic */
.diagnostic {
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem !important;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.diagnostic p { max-width: 44em; }

/* Security */
.security-grid { display: grid; gap: 2rem; }
.never { columns: 2; padding-left: 1.2rem; margin: 0 0 1rem; }
.never li { break-inside: avoid; padding: 0.15rem 0; color: var(--ink); }
.note { color: var(--muted); font-size: 0.95rem; }
.latency { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin-top: 0.5rem; }
.latency caption { text-align: left; color: var(--muted); font-size: 0.85rem; padding-bottom: 0.5rem; caption-side: top; }
.latency th, .latency td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--grid); }
.latency th { color: var(--navy); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.latency td:nth-child(n+2), .latency th:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Evidence, price, contact */
.evidence p, .price p, .contact p { max-width: 44em; }
.price-line { font-size: 1.35rem; color: var(--navy); }
.contact-line { font-size: 1.15rem; }
.pending { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 0.25rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  display: grid;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer img { height: 24px; width: auto; display: block; margin-bottom: 0.75rem; }
.site-footer p { max-width: 44em; margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer nav a { color: var(--blue-dark); }

@media (min-width: 720px) {
  .hero-facts { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding-left: 0; padding-top: 3.25rem; }
  .security-grid { grid-template-columns: 1fr 1.4fr; }
  .site-footer { grid-template-columns: 1fr auto; align-items: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
