/* ============================================================================
   famielle — marketing site design system
   Brand-consistent with the app (apps/mobile/src/theme/tokens.ts):
   trust-blue accent on calm light neutrals, generous whitespace, soft surfaces.
   Framework-free, accessible, responsive. ~one stylesheet, no build step.
   ========================================================================== */

:root {
  /* Palette (app-aligned) */
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-muted: #eef1f5;
  --ink: #16202b;          /* primary text — 15:1 on surface */
  --muted: #46566a;        /* secondary text — 7.5:1 */
  --faint: #6b7a8d;
  --border: #e3e7ec;
  --accent: #1d5fbf;       /* trust-forward blue (app accent) */
  --accent-dark: #174c99;
  --accent-soft: #e8f0fb;
  --calm: #1e7a44;         /* app success green — "handled" */
  --calm-soft: #e6f3ec;
  --warm: #e0734a;         /* sparing warm highlight */

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Spacing scale (8px base) */
  --s1: 0.5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem; --s5: 3rem; --s6: 4.5rem; --s7: 7rem;

  /* Shape */
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(22, 32, 43, 0.06), 0 1px 3px rgba(22, 32, 43, 0.04);
  --shadow-md: 0 8px 24px rgba(22, 32, 43, 0.08);
  --shadow-lg: 0 24px 60px rgba(22, 32, 43, 0.12);
  --ring: 0 0 0 3px rgba(29, 95, 191, 0.35);

  --maxw: 1120px;
  --maxw-text: 680px;
}

/* ----------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* skip link */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.75rem 1rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; color: #fff; }

/* --------------------------------------------------------------- layout --- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s3); }
.section { padding-block: var(--s7); }
.section--tight { padding-block: var(--s6); }
.center { text-align: center; }
.measure { max-width: var(--maxw-text); margin-inline: auto; }

/* ------------------------------------------------------------ typography -- */
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700;
  color: var(--accent);
}
.lede { font-size: clamp(1.1rem, 1.8vw, 1.32rem); color: var(--muted); }
.muted { color: var(--muted); }

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem; justify-content: center;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 0.92rem 1.5rem; border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-muted); color: var(--ink); }
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.06rem; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------------- nav -- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(247, 248, 250, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #3b82e6);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1rem;
  box-shadow: var(--shadow-sm);
}
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a:not(.btn) { color: var(--muted); font-weight: 500; font-size: 0.97rem; }
.nav__links a:not(.btn):hover { color: var(--ink); }
.nav__toggle { display: none; background: none; border: 0; padding: 0.4rem; cursor: pointer; color: var(--ink); }

@media (max-width: 800px) {
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.25rem;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: var(--s2) var(--s3) var(--s3); box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a:not(.btn) { padding: 0.7rem 0.25rem; border-bottom: 1px solid var(--border); }
  .nav__links .btn { margin-top: 0.6rem; }
  .nav__toggle { display: inline-flex; }
}

/* ------------------------------------------------------------------ hero -- */
.hero { position: relative; overflow: clip; padding-block: clamp(3.5rem, 8vw, 6.5rem) var(--s6); }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto -10%; height: 620px; z-index: -1;
  background:
    radial-gradient(680px 360px at 78% 8%, rgba(29, 95, 191, 0.12), transparent 70%),
    radial-gradient(520px 320px at 8% 0%, rgba(30, 122, 68, 0.08), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-top: 0.9rem; }
.hero .lede { margin-top: 1.2rem; max-width: 30ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.hero__note { margin-top: 1rem; font-size: 0.92rem; color: var(--faint); display: flex; align-items: center; gap: 0.5rem; }
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero .lede { max-width: 46ch; }
  .hero__visual { order: -1; }
}

/* phone / app mock */
.mock {
  width: min(360px, 86vw); margin-inline: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px;
  box-shadow: var(--shadow-lg); padding: 0.7rem; position: relative;
}
.mock__bar { height: 26px; display: flex; align-items: center; justify-content: center; }
.mock__notch { width: 96px; height: 7px; border-radius: 99px; background: var(--surface-muted); }
.mock__screen { background: var(--bg); border-radius: 20px; padding: 1rem; display: grid; gap: 0.7rem; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; font-weight: 600; padding: 0.3rem 0.6rem; border-radius: var(--r-pill); }
.chip--blue { background: var(--accent-soft); color: var(--accent-dark); }
.chip--green { background: var(--calm-soft); color: var(--calm); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 0.85rem 0.95rem; box-shadow: var(--shadow-sm);
}
.card__row { display: flex; align-items: flex-start; gap: 0.6rem; }
.card__dot { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.card__t { font-weight: 650; font-size: 0.92rem; }
.card__s { font-size: 0.8rem; color: var(--muted); }
.mock__arrow { text-align: center; color: var(--faint); font-size: 0.8rem; }

/* --------------------------------------------------------------- logos ---- */
.trust { padding-block: var(--s4); border-block: 1px solid var(--border); background: var(--surface); }
.trust p { text-align: center; color: var(--faint); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.trust__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem 2.6rem; margin-top: 1.1rem; }
.trust__row span { color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; }

/* --------------------------------------------------------------- steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-top: var(--s5); }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s3); box-shadow: var(--shadow-sm); }
.step__n { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; display: grid; place-items: center; margin-bottom: 0.9rem; }
.step h3 { margin-bottom: 0.4rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- features --- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-top: var(--s5); }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { padding: var(--s3); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 1rem; }
.feature h3 { margin-bottom: 0.45rem; }
.feature p { color: var(--muted); font-size: 0.97rem; }

/* --------------------------------------------------------------- privacy -- */
.privacy-band { background: linear-gradient(180deg, #0f1b2d, #16263f); color: #eaf0f7; border-radius: var(--r-lg); padding: clamp(2rem, 5vw, 3.5rem); box-shadow: var(--shadow-lg); }
.privacy-band .eyebrow { color: #8fb4ec; }
.privacy-band h2 { color: #fff; margin-top: 0.7rem; }
.privacy-band p { color: #b8c6d8; margin-top: 1rem; max-width: 56ch; }
.pledge { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; margin-top: var(--s4); }
@media (max-width: 640px) { .pledge { grid-template-columns: 1fr; } }
.pledge li { list-style: none; display: flex; gap: 0.7rem; align-items: flex-start; color: #dce5f0; }
.pledge svg { flex: none; color: #66d39a; margin-top: 2px; }
.pledge b { color: #fff; font-weight: 650; }

/* ----------------------------------------------------------------- faq ---- */
.faq { max-width: 760px; margin-inline: auto; margin-top: var(--s5); display: grid; gap: 0.75rem; }
.qa { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.qa__q { width: 100%; text-align: left; font: inherit; font-weight: 650; font-size: 1.04rem; color: var(--ink); background: none; border: 0; padding: 1.1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; }
.qa__q:hover { background: var(--surface-muted); }
.qa__icon { flex: none; transition: transform 0.2s ease; color: var(--accent); }
.qa[open] .qa__icon { transform: rotate(45deg); }
.qa__a { padding: 0 1.25rem 1.2rem; color: var(--muted); }
.qa summary { list-style: none; } .qa summary::-webkit-details-marker { display: none; }

/* ------------------------------------------------------------- cta band --- */
.cta {
  text-align: center; border-radius: var(--r-lg); padding: clamp(2.5rem, 6vw, 4.5rem) var(--s3);
  background: radial-gradient(800px 300px at 50% -10%, rgba(29,95,191,0.16), transparent 70%), var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.cta h2 { max-width: 18ch; margin-inline: auto; }
.cta .lede { margin-top: 1rem; }

/* waitlist form */
.waitlist { display: flex; gap: 0.6rem; max-width: 440px; margin: 1.7rem auto 0; flex-wrap: wrap; justify-content: center; }
.waitlist input {
  flex: 1 1 220px; font: inherit; font-size: 1rem; padding: 0.9rem 1.1rem; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
}
.waitlist input::placeholder { color: var(--faint); }
.waitlist__hint { font-size: 0.85rem; color: var(--faint); margin-top: 0.9rem; }

/* --------------------------------------------------------------- footer --- */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding-block: var(--s5) var(--s4); margin-top: var(--s6); }
.footer__grid { display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between; }
.footer__brand { max-width: 280px; }
.footer__brand p { color: var(--muted); font-size: 0.93rem; margin-top: 0.7rem; }
.footer__cols { display: flex; gap: var(--s5); flex-wrap: wrap; }
.footer__col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 0.8rem; }
.footer__col a { display: block; color: var(--muted); font-size: 0.95rem; padding: 0.2rem 0; }
.footer__col a:hover { color: var(--ink); }
.footer__legal { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--border); color: var(--faint); font-size: 0.86rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; }

/* --------------------------------------------------------- legal pages ---- */
.legal { padding-block: var(--s6); }
.legal__doc { max-width: 760px; margin-inline: auto; }
.legal__doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal__meta { color: var(--faint); margin-top: 0.6rem; font-size: 0.92rem; }
.legal__doc h2 { font-size: 1.4rem; margin-top: var(--s4); }
.legal__doc h3 { margin-top: var(--s3); }
.legal__doc p, .legal__doc li { color: var(--muted); margin-top: 0.8rem; }
.legal__doc ul { padding-left: 1.3rem; margin-top: 0.5rem; }
.legal__doc li { margin-top: 0.4rem; }
.legal__doc a { text-decoration: underline; }
.note {
  background: var(--accent-soft); border: 1px solid #cfe0f6; color: var(--accent-dark);
  border-radius: var(--r-md); padding: 1rem 1.2rem; margin-top: var(--s3); font-size: 0.95rem;
}
.note b { color: var(--accent-dark); }

/* ---------------------------------------------------------- reveal anim --- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
