/* myestateaccess — marketing site
   ------------------------------------------------------------------
   Same tokens as the dashboards (apps/web/tailwind.config.js) so the
   three surfaces read as one product. Written by hand rather than with
   Tailwind: these are three static pages and a build step would buy
   nothing but a dependency.

   CONTRAST RULES, measured not assumed (see the audit in the README):
     lime  on canvas/card = 1.21:1  -> NEVER text on light. Background only.
     muted2 on canvas     = 2.97:1  -> dark backgrounds only.
     muted  on canvas     = 5.04:1  -> safe for body text.
   Every pair actually used in this file clears 4.5:1, or 3:1 for large
   text and UI borders. */

:root {
  --ink: #16181c;
  --ink-2: #23262b;
  --ink-3: #31353b;
  --canvas: #f7f9fb;
  --card: #ffffff;
  --field: #eef1f5;
  --line: #eceff3;
  --muted: #656c74;      /* 5.04:1 on canvas — body text safe */
  --muted-2: #8d9299;    /* dark backgrounds only */
  --lime: #cdf24a;
  --lime-soft: #eaf3d6;
  --lime-ink: #3f4a22;   /* 8.26:1 on lime-soft */
  --coral-soft: #ffe2dc;
  --coral-ink: #a33c2b;
  --hair: #f1f4f7;

  --radius-card: 20px;
  --radius-pane: 26px;
  --radius-chip: 999px;
  --measure: 68ch;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── skip link ─────────────────────────────────────────────────── */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--canvas);
  padding: 12px 20px; border-radius: 0 0 12px 0; font-weight: 700;
}
.skip:focus { left: 0; }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ── layout ────────────────────────────────────────────────────── */
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
section { padding-block: clamp(64px, 9vw, 112px); }
.tight { padding-block: clamp(48px, 6vw, 72px); }

h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(38px, 6vw, 62px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.7vw, 40px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 800; line-height: 1.3; }
p { margin: 0; max-width: var(--measure); text-wrap: pretty; }

.lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); line-height: 1.6; }
.eyebrow {
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 14px;
}
.eyebrow.on-dark { color: var(--lime); }

/* ── header ────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 249, 251, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; letter-spacing: -.02em; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; background: var(--lime);
  display: grid; place-items: center; flex: none;
}
.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14.5px;
  padding: 9px 14px; border-radius: var(--radius-chip);
}
.nav a:hover { color: var(--ink); background: var(--field); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--field); }

/* ── buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 26px; border-radius: var(--radius-chip);
  font-weight: 800; font-size: 15px; text-decoration: none; border: 0;
  cursor: pointer; transition: filter .15s ease, background .15s ease;
}
.btn-primary { background: var(--lime); color: var(--ink); }      /* 13.9:1 */
.btn-primary:hover { filter: brightness(.94); }
.btn-dark { background: var(--ink); color: var(--canvas); }        /* 16.8:1 */
.btn-dark:hover { filter: brightness(1.5); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px #d5dae0; }
.btn-ghost:hover { background: var(--field); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ── hero ──────────────────────────────────────────────────────── */
.hero { padding-top: clamp(48px, 6vw, 76px); padding-bottom: clamp(40px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero-figure { position: relative; }
.hero-figure img {
  width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover;
  border-radius: var(--radius-pane); display: block; background: var(--field);
}
.badge-float {
  position: absolute; left: -14px; bottom: 26px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px 18px; box-shadow: 0 18px 40px -22px rgba(22,24,28,.45);
}
.badge-float .code {
  font-weight: 800; font-size: 22px; letter-spacing: .12em; display: block;
}
.badge-float .meta { font-size: 12px; color: var(--muted); font-weight: 600; }

.trust { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; padding: 0; list-style: none; }
.trust li { font-size: 13.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tick { color: var(--lime-ink); background: var(--lime-soft); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800; }

/* ── cards & grids ─────────────────────────────────────────────── */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 28px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card-icon {
  width: 44px; height: 44px; border-radius: 14px; background: var(--lime-soft);
  color: var(--lime-ink); display: grid; place-items: center; margin-bottom: 18px;
  font-weight: 800; font-size: 16px;
}

/* ── steps ─────────────────────────────────────────────────────── */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--ink); color: var(--lime); font-weight: 800; font-size: 15px; margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15.5px; }

/* ── dark feature band ─────────────────────────────────────────── */
.band {
  background: var(--ink); color: var(--canvas);
  border-radius: 34px; padding: clamp(36px, 5vw, 64px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 4vw, 56px); align-items: center;
}
.band h2 { color: var(--canvas); margin-bottom: 18px; }
.band p { color: var(--muted-2); }                      /* 5.67:1 on ink */
.band img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-pane); display: block; background: var(--ink-2); }
.band-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.band-list li { display: flex; gap: 12px; font-size: 15px; color: var(--canvas); }
.band-list b { color: var(--lime); font-weight: 800; flex: none; }

/* ── split ─────────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius-pane); display: block; background: var(--field); }

/* ── stats ─────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 26px; }
.stat .n { font-size: 34px; font-weight: 800; letter-spacing: -.03em; display: block; }
.stat .l { font-size: 13.5px; color: var(--muted); font-weight: 600; margin-top: 4px; display: block; }

/* ── FAQ ───────────────────────────────────────────────────────── */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 24px; }
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 16.5px; padding: 20px 0; list-style: none;
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 700; color: var(--muted); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { color: var(--muted); font-size: 15.5px; padding-bottom: 22px; }

/* ── CTA ───────────────────────────────────────────────────────── */
.cta { background: var(--ink); color: var(--canvas); border-radius: 34px; padding: clamp(40px, 6vw, 72px); text-align: center; }
.cta h2 { color: var(--canvas); }
.cta p { color: var(--muted-2); margin-inline: auto; margin-top: 16px; }
.cta .btn-row { justify-content: center; }

/* ── forms ─────────────────────────────────────────────────────── */
.form { display: grid; gap: 16px; }
.field label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 15.5px; color: var(--ink);
  background: var(--card); border: 1.5px solid #d9dee4; border-radius: 14px;
  padding: 13px 16px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #7b828a; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: 13px; color: var(--muted); }
.notice { background: var(--lime-soft); color: var(--lime-ink); border-radius: 14px; padding: 14px 18px; font-size: 14px; font-weight: 600; }

/* ── footer ────────────────────────────────────────────────────── */
.site-foot { background: var(--ink); color: var(--muted-2); padding-block: 64px 40px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-foot h4 { color: var(--canvas); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 16px; }
.site-foot a { color: var(--muted-2); text-decoration: none; font-size: 14.5px; }
.site-foot a:hover { color: var(--canvas); text-decoration: underline; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.site-foot .brand { color: var(--canvas); }
.site-foot p { color: var(--muted-2); font-size: 14.5px; margin-top: 14px; }
.foot-base {
  margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between;
  font-size: 13px;
}
.credits { font-size: 12.5px; line-height: 1.7; }

/* ── responsive ────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .hero-grid, .band, .split, .foot-grid { grid-template-columns: 1fr; }
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .foot-grid { gap: 34px; }
  .band img, .split img { order: -1; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid-3, .steps, .grid-2, .stats, .two-up { grid-template-columns: 1fr; }
  .nav a { padding: 8px 9px; font-size: 14px; }
  .site-head .wrap { gap: 8px; }
  .badge-float { left: 8px; bottom: 12px; }
  /* Four nav items plus the brand overflow a 390px viewport by 32px. The CTA
     is the one to drop: it repeats the hero's primary button, which is the
     next thing on the page. */
  .nav .btn { display: none; }
  /* Sign in puts a fourth item back in that row. The brand mark is itself a
     link to "/", so Home is now the redundant one to drop — Sign in is how an
     admin actually gets into the product and has to stay reachable. */
  .nav a[href="/"] { display: none; }
  .brand span:last-child, .brand { font-size: 15px; }
}
@media (max-width: 400px) {
  .nav a { padding: 8px 7px; font-size: 13.5px; }
  /* At 320px the wordmark plus three nav items overflow by 45px. The mark is
     still a link to "/" and still identifies the site, so the word is what
     gives way — dropping a nav item would cost an actual destination. */
  .site-head .brand-word { display: none; }
}

/* `.nav a` is more specific than `.btn-*`, so without this the header CTA
   inherits muted grey on an ink background — measured at 3.34:1, a real AA
   failure that only shows up on the rendered page. */
.nav a.btn-dark { color: var(--canvas); }
.nav a.btn-dark:hover { color: var(--canvas); background: var(--ink); }
.nav a.btn-primary { color: var(--ink); }

/* Sign in leaves the marketing site for the dashboard, so it reads as an
   action rather than another page: full-strength ink against the muted nav. */
.nav a.nav-signin { color: var(--ink); font-weight: 700; }
.nav a.nav-signin:hover { background: var(--field); }

/* Footer section headings are h2 for correct document outline; this keeps the
   small visual size they had as h4. */
.site-foot h2.foot-h {
  color: var(--canvas); font-size: 13px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; margin: 0 0 16px;
}
.card h2.h-sm { font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
