/*
  site.css — the marketing website. Hand-written, no framework, no preprocessor,
  no web font (a web font is a third-party origin AND a render-blocking request;
  both are barred by BUILD_PLAN §9).

  The tokens are deliberately the same values as web/css/shell.css so the app
  and the site look like one product. They are duplicated rather than shared
  because the two are separate binaries on separate origins, and a shared
  build step would be the first dependency this project has ever had.

  ACCESSIBILITY CONTRACT (WCAG 2.2 AA, audience 50+)
  --------------------------------------------------
  Every foreground/background pair is checked to at least 4.5:1 body / 3:1
  large. Ratios are annotated so a colour change cannot quietly break them:
    --c-ink        on --c-bg       #1a1d1b on #ffffff  ~15.9:1
    --c-ink-muted  on --c-bg       #4a5450 on #ffffff   ~8.7:1
    --c-ink-muted  on --c-bg-sunk  #4a5450 on #f4f6f5   ~8.2:1
    --c-on-brand   on --c-brand    #ffffff on #0f5132   ~7.6:1
  Focus is never colour-only and never removed. Body text is never below 16px.
*/

:root {
  --c-brand: #0f5132;
  --c-brand-dark: #0a3a24;
  --c-brand-soft: #e6f0ea;

  --c-bg: #ffffff;
  --c-bg-sunk: #f4f6f5;
  --c-ink: #1a1d1b;
  --c-ink-muted: #4a5450;
  --c-border: #cfd6d2;
  --c-on-brand: #ffffff;
  --c-focus: #0b3d99;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  --font-body: 1rem;
  --font-lede: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --font-h3: 1.125rem;
  --font-h2: clamp(1.375rem, 1.2rem + 0.9vw, 1.75rem);
  --font-h1: clamp(1.875rem, 1.4rem + 2.2vw, 2.75rem);

  --radius: 10px;
  --wrap: 68rem;
  --wrap-narrow: 44rem;
}

/* ---------------------------------------------------------------- reset */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font: var(--font-body)/1.6 system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--space-3); text-wrap: balance; }
h1 { font-size: var(--font-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--font-h2); margin-top: var(--space-6); }
h3 { font-size: var(--font-h3); }
p  { margin: 0 0 var(--space-4); text-wrap: pretty; }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
li { margin-bottom: var(--space-1); }

a { color: var(--c-brand-dark); text-underline-offset: 2px; }
a:hover { color: var(--c-brand); }

/* Never remove focus. 3px outline + 2px offset clears 3:1 on both the white
   page and the dark header. */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.site-header :focus-visible { outline-color: #ffd166; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--space-4); top: -3rem;
  background: var(--c-brand); color: var(--c-on-brand);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius);
  text-decoration: none; z-index: 10; transition: top 120ms ease-in;
}
.skip:focus { top: var(--space-2); color: var(--c-on-brand); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- layout */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--space-4); }
.wrap.narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--space-8); }
.section-sunk { background: var(--c-bg-sunk); }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--c-brand); margin-bottom: var(--space-2);
}

.lede { font-size: var(--font-lede); color: var(--c-ink-muted); }
.muted { color: var(--c-ink-muted); }
.small { font-size: 0.875rem; }

/* ---------------------------------------------------------------- header */

.site-header {
  background: var(--c-brand); color: var(--c-on-brand);
  position: sticky; top: 0; z-index: 5;
}
.header-inner {
  display: flex; align-items: center; gap: var(--space-4);
  justify-content: space-between; min-height: 4rem;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--c-on-brand); text-decoration: none;
  font-weight: 700; font-size: 1.0625rem;
}
.brand:hover { color: var(--c-on-brand); }
/* A drawn roundel rather than the app's raster icons: no image request on the
   critical path, and it stays sharp at every zoom level. */
.brand-mark {
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--c-on-brand);
  box-shadow: inset 0 0 0 0.28rem var(--c-brand), inset 0 0 0 0.45rem var(--c-on-brand);
}

.site-nav ul {
  display: flex; align-items: center; gap: var(--space-4);
  list-style: none; margin: 0; padding: 0;
}
.site-nav li { margin: 0; }
.site-nav a {
  color: var(--c-on-brand); text-decoration: none;
  padding: var(--space-2); border-radius: 6px;
}
.site-nav a:hover { text-decoration: underline; color: var(--c-on-brand); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid rgba(255,255,255,0.5);
  border-radius: 6px; padding: var(--space-2); cursor: pointer;
  color: var(--c-on-brand); min-width: 44px; min-height: 44px;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: currentColor;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top:  6px; }

@media (max-width: 46rem) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; width: 100%;
    border-top: 1px solid rgba(255,255,255,0.25);
    padding-top: var(--space-2); margin-top: var(--space-2);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { display: block; padding: var(--space-3) var(--space-2); }
  .header-inner { flex-wrap: wrap; padding-block: var(--space-2); }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  min-height: 44px;              /* WCAG target size */
  border-radius: var(--radius);
  border: 2px solid transparent;
  font: inherit; font-weight: 600;
  text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn-primary { background: var(--c-brand); color: var(--c-on-brand); }
.btn-primary:hover { background: var(--c-brand-dark); color: var(--c-on-brand); }
.btn-ghost {
  background: var(--c-bg); color: var(--c-brand-dark);
  border-color: var(--c-border);
}
.btn-ghost:hover { border-color: var(--c-brand); background: var(--c-brand-soft); }
.btn-sm { padding: 0.4rem 0.85rem; min-height: 40px; font-size: 0.9375rem; }
.site-header .btn-primary { background: var(--c-on-brand); color: var(--c-brand); }
.site-header .btn-primary:hover { background: var(--c-brand-soft); color: var(--c-brand-dark); }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ---------------------------------------------------------------- hero */

.hero { padding-block: var(--space-8); background: var(--c-brand-soft); }
.hero-inner { max-width: var(--wrap-narrow); }
.hero h1 { margin-bottom: var(--space-4); }

/* ---------------------------------------------------------------- blocks */

.features { list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.feature { border-top: 3px solid var(--c-brand-soft); padding-top: var(--space-4); margin: 0; }
.feature p { color: var(--c-ink-muted); margin-bottom: 0; }

.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 1.75rem; margin-bottom: var(--space-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.45em;
  width: 0.85rem; height: 0.45rem;
  border-left: 2px solid var(--c-brand); border-bottom: 2px solid var(--c-brand);
  transform: rotate(-45deg);
}

.steps li { margin-bottom: var(--space-3); }

.callout {
  background: var(--c-brand-soft);
  border-left: 4px solid var(--c-brand);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
}
.callout p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- pricing */

.tiers { list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.tier {
  border: 2px solid var(--c-border); border-radius: var(--radius);
  padding: var(--space-5); margin: 0; background: var(--c-bg);
  display: flex; flex-direction: column;
}
.tier-featured { border-color: var(--c-brand); }
.tier-price { margin-bottom: var(--space-3); }
.tier-price .amount { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.tier-price .period { color: var(--c-ink-muted); }
.tier-summary { color: var(--c-ink-muted); }
.tier .ticks { flex: 1; }

.faqs { border-top: 1px solid var(--c-border); }
.faq { border-bottom: 1px solid var(--c-border); padding: var(--space-3) 0; }
.faq summary {
  cursor: pointer; font-weight: 600; padding: var(--space-2) 0;
  min-height: 44px; display: flex; align-items: center;
}
.faq summary:hover { color: var(--c-brand); }
.faq p { color: var(--c-ink-muted); margin: var(--space-2) 0 var(--space-3); }

.cta-panel {
  background: var(--c-bg-sunk); border-radius: var(--radius);
  padding: var(--space-6); max-width: var(--wrap-narrow);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--c-brand-dark); color: var(--c-on-brand);
  padding-block: var(--space-6); margin-top: var(--space-8);
}
.footer-inner { display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.footer-name { font-weight: 700; margin-bottom: var(--space-1); }
.footer-links { list-style: none; padding: 0; }
.footer-links a { color: var(--c-on-brand); }
.footer-contact a { color: var(--c-on-brand); }
.site-footer .muted { color: #cfe0d6; }
