/* ============================================================================
   ARIA Intel — marketing.css
   Shared design language for all public/marketing pages.
   Extracted 2026-10-02 from the app's flagship flows (letter wizard, settings,
   onboarding) so logged-out and logged-in read as ONE product.
   Source recipes: letter-wizard.js (tray + paper + spring), settings.html
   (tokens), onboarding.html (inputs, buttons, progress).
   ============================================================================ */

:root {
  /* type */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;

  /* brand ink + accent (Dialect A) */
  --navy: #0F1E45;
  --navy-2: #162559;
  --cyan: #17BBFA;
  --cyan-deep: #0fa8e0;
  --cyan-dim: rgba(23, 187, 250, .10);

  /* ground (light, warm-neutral — the app never ships dark pages) */
  --bg: #fafafa;
  --bg-cool: #f8fafc;
  --surface: #ffffff;
  --tray: #eef1f5;
  --border: #e2e8f0;
  --hairline-navy: rgba(15, 30, 69, .08);
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;

  /* signals — colour has a job: green = money, amber = timing, red = act */
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;

  /* radii (concentric: tray 12 holds paper 7; modal 14 holds buttons 9) */
  --rad-pill: 999px;
  --rad-sm: 8px;
  --rad: 12px;
  --rad-lg: 14px;
  --rad-hero: 20px;
  --rad-paper: 7px;

  /* shadows — always navy-tinted, never black */
  --shadow-paper: 0 1px 3px rgba(15, 30, 69, .10), 0 6px 18px rgba(15, 30, 69, .08);
  --shadow-card: 0 4px 24px rgba(15, 30, 69, .06);
  --shadow-hover: 0 10px 26px rgba(15, 30, 69, .14);
  --shadow-lg: 0 16px 40px rgba(15, 30, 69, .16);
  --focus-ring: 0 0 0 4px rgba(23, 187, 250, .10);

  /* motion — the wizard's signature spring */
  --ease-spring: cubic-bezier(.32, .72, 0, 1);
  --ease-std: cubic-bezier(.4, 0, .2, 1);

  /* layout */
  --gutter: 28px;
  --max-content: 1180px;
  --nav-h: 68px;
}

/* ---------------------------------------------------------------- base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--cyan-dim); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; color: var(--navy); }
.mk-h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.mk-h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; text-wrap: balance; }
.mk-sub { font-size: 16px; color: var(--muted); line-height: 1.65; max-width: 62ch; }
.mk-num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- layout ---- */
.mk-wrap { max-width: var(--max-content); margin: 0 auto; padding: 0 var(--gutter); }
.mk-section { padding: 72px 0; }
.mk-section-tight { padding: 48px 0; }

/* ---------------------------------------------------------------- nav ---- */
.mk-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.mk-nav-inner {
  max-width: var(--max-content); margin: 0 auto; padding: 0 var(--gutter);
  height: 100%; display: flex; align-items: center; gap: 28px;
}
.mk-logo { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.mk-logo em { font-style: normal; color: var(--cyan); }
.mk-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.mk-links > a, .mk-drop > button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 12px; border: 0; background: none;
  font-size: 14px; font-weight: 500; color: var(--muted);
  border-radius: var(--rad-sm);
  transition: color .15s, background .15s;
}
.mk-links > a:hover, .mk-drop > button:hover { color: var(--navy); background: var(--tray); }
.mk-links > a[aria-current="page"] { color: var(--navy); font-weight: 600; }

/* dropdown — keyboard accessible (focus-within), unlike the old hover-only nav */
.mk-drop { position: relative; }
.mk-drop-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rad); box-shadow: var(--shadow-lg);
  padding: 6px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s var(--ease-std), transform .18s var(--ease-std), visibility .18s;
}
.mk-drop:hover .mk-drop-menu,
.mk-drop:focus-within .mk-drop-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mk-drop-menu a {
  display: block; padding: 8px 10px; font-size: 13.5px; font-weight: 500;
  color: var(--muted); border-radius: var(--rad-sm);
}
.mk-drop-menu a:hover { background: var(--tray); color: var(--navy); }
.mk-drop svg { transition: transform .18s var(--ease-std); }
.mk-drop:hover svg, .mk-drop:focus-within svg { transform: rotate(180deg); }

.mk-nav-cta { display: flex; align-items: center; gap: 10px; }

/* hamburger (shown < 920px) */
.mk-burger {
  display: none; width: 40px; height: 40px; border: 1px solid var(--border);
  border-radius: var(--rad-sm); background: var(--surface);
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.mk-burger span {
  width: 16px; height: 2px; background: var(--navy); border-radius: 2px;
  transition: transform .3s var(--ease-spring), opacity .2s;
}
.mk-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mk-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mk-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* mobile menu panel */
.mk-mobile {
  display: none;
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49;
  background: var(--surface); padding: 20px var(--gutter) 40px;
  overflow-y: auto;
}
.mk-mobile.open { display: block; }
.mk-mobile a {
  display: block; padding: 12px 4px; font-size: 16px; font-weight: 600;
  color: var(--navy); border-bottom: 1px solid var(--border);
}
.mk-mobile .mk-mobile-group {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); padding: 18px 4px 6px; border: 0;
}
.mk-mobile .btn { margin-top: 20px; width: 100%; justify-content: center; }

/* ------------------------------------------------------------ buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px; border: 0; border-radius: 10px;
  font-size: 14.5px; font-weight: 700;
  transition: background .2s var(--ease-std), color .2s var(--ease-std),
              transform .2s var(--ease-spring), box-shadow .2s var(--ease-std);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--muted); border: 1.5px solid var(--border); padding: 9.5px 20px; }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-big { padding: 14px 30px; font-size: 15px; border-radius: var(--rad); }
.btn-on-navy { background: var(--cyan); color: var(--navy); }
.btn-on-navy:hover { background: #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, .25); transform: translateY(-1px); }

/* ------------------------------------------- tray + paper (the signature) ---- */
/* A recessed grey tray holding a white "paper" object. Concentric radii 12 -> 7.
   This is the letter wizard's own construction; reuse it for any framed object. */
.tray {
  background: var(--tray);
  border: 1px solid var(--hairline-navy);
  border-radius: var(--rad);
  padding: 10px;
}
.paper {
  background: var(--surface);
  border-radius: var(--rad-paper);
  box-shadow: var(--shadow-paper);
}
.tray-hover {
  transition: transform .5s var(--ease-spring), box-shadow .5s var(--ease-spring);
}
.tray-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.tray-hover:active { transform: translateY(-1px) scale(.98); }

/* --------------------------------------------------------------- cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-lg);
  box-shadow: var(--shadow-card);
}

/* --------------------------------------------------------------- pills ---- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: var(--rad-pill);
  font-size: 12px; font-weight: 700;
  background: var(--tray); color: var(--navy);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-navy { background: var(--navy); color: #fff; }

/* kicker — the app's cyan uppercase label. Use SPARINGLY (max 1 per 3 sections). */
.kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cyan);
}

/* --------------------------------------------------- navy island (stats) ---- */
/* Dark is an accent island, never a full page. White text at alpha, cyan numbers. */
.island {
  background: var(--navy);
  border-radius: var(--rad-hero);
  color: rgba(255, 255, 255, .7);
  box-shadow: var(--shadow-lg);
}
.island .island-num { color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.island .island-accent { color: var(--cyan); }

/* -------------------------------------------------------------- footer ---- */
.mk-footer { border-top: 1px solid var(--border); background: var(--bg-cool); }
.mk-footer-inner {
  max-width: var(--max-content); margin: 0 auto; padding: 44px var(--gutter) 28px;
}
.mk-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.mk-footer-head {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--faint); margin-bottom: 12px;
}
.mk-footer a { display: block; font-size: 13.5px; color: var(--muted); padding: 4px 0; transition: color .15s; }
.mk-footer a:hover { color: var(--navy); }
.mk-footer-brand p { font-size: 13.5px; color: var(--muted); max-width: 30ch; margin-top: 10px; }
.mk-footer-bottom {
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center;
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--faint);
}
.mk-footer-bottom a { display: inline; padding: 0; font-size: 12.5px; }
.mk-ogl { font-size: 11.5px; color: var(--faint); margin-top: 10px; }

/* ------------------------------------------------------------- reveal ---- */
/* Scroll entry: gentle fade-up on the standard ease. JS adds .in via
   IntersectionObserver (see aria-stats.js helper). Never window.onscroll. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-std), transform .6s var(--ease-std); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }

/* ------------------------------------------------------- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------- mobile ---- */
@media (max-width: 920px) {
  .mk-links { display: none; }
  .mk-nav-cta .btn-ghost { display: none; }
  .mk-burger { display: flex; }
}
@media (max-width: 768px) {
  :root { --gutter: 20px; }
  .mk-section { padding: 52px 0; }
  .mk-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  .mk-footer-grid { grid-template-columns: 1fr; }
}
