/* =========================================================================
   2028 marketing site, design system
   Tokens mirror the Flutter app (app/lib/core/ui/theme/colors.dart +
   typography.dart): Hanken Grotesk, deep "lifted" green, cool-grey neutrals,
   first-class light AND dark themes (system-driven, like the app).
   ========================================================================= */

/* ---- Tokens: light (default) ---- */
:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --surface-variant: #EDEFF2;
  --border: #E2E5E9;
  --divider: #EDEFF2;

  --text: #16181C;
  --text-2: #565A61;
  --text-3: #6E737B;

  --primary: #0C8349;
  --primary-pressed: #0B7A45;
  --on-primary: #FFFFFF;
  --primary-surface: #E4F2EA;
  --on-primary-surface: #065C34;
  --primary-border: #C7E4D3;

  --danger: #C4362F;
  --danger-surface: #FBE9E7;
  --on-danger-surface: #A32B24;

  --amber: #B7791F;
  --amber-surface: #FBF0DC;
  --whatsapp: #25D366;
  --accent: #2563EB;

  --avatar-bg: #E2E5E9;
  --avatar-fg: #3E4249;

  /* hero / brand gradient */
  --brand-grad: linear-gradient(150deg, #0E9053 0%, #0B7A45 55%, #06381F 130%);

  /* elevation */
  --shadow-1: 0 1px 2px rgba(18,20,24,.06), 0 1px 3px rgba(18,20,24,.05);
  --shadow-2: 0 2px 8px rgba(18,20,24,.08), 0 4px 16px rgba(18,20,24,.06);
  --shadow-3: 0 8px 24px rgba(18,20,24,.12), 0 2px 8px rgba(18,20,24,.06);
  --ring: 0 0 0 4px rgba(12,131,73,.18);

  /* geometry */
  --r-sm: 8px;  --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-2xl: 28px;
  --container: 1080px;
  --container-narrow: 760px;

  --header-h: 64px;
  color-scheme: light;
}

/* ---- Tokens: dark ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C0D0F;
    --surface: #16181C;
    --surface-2: #1E2126;
    --surface-variant: #262A30;
    --border: #2A2E34;
    --divider: #212429;

    --text: #F2F3F5;
    --text-2: #AEB3BA;
    --text-3: #878C94;

    --primary: #32C27E;
    --primary-pressed: #178A50;
    --on-primary: #06240F;
    --primary-surface: #12251B;
    --on-primary-surface: #5FD39B;
    --primary-border: #1E4230;

    --danger: #F08279;
    --danger-surface: #2A1615;
    --on-danger-surface: #F6A9A2;

    --amber: #E0A63E;
    --amber-surface: #2A2213;
    --accent: #3B82F6;

    --avatar-bg: #262A30;
    --avatar-fg: #C6CAD0;

    --brand-grad: linear-gradient(150deg, #0C8349 0%, #095F38 60%, #06381F 130%);

    --shadow-1: 0 1px 2px rgba(0,0,0,.5);
    --shadow-2: 0 4px 16px rgba(0,0,0,.55);
    --shadow-3: 0 12px 32px rgba(0,0,0,.6);
    --ring: 0 0 0 4px rgba(50,194,126,.28);
    color-scheme: dark;
  }
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin-inline: auto; padding-inline: 24px; }
section { padding: 56px 0; }
.section-tight { padding: 32px 0; }

/* ---- Icon utility (MingCute line SVGs, recolored via mask -> currentColor) ---- */
.ic {
  display: inline-block;
  width: 1.25em; height: 1.25em;
  background-color: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat;
  mask: var(--ic) center / contain no-repeat;
  flex: none;
  vertical-align: -0.15em;
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
  max-width: var(--container); margin-inline: auto; padding-inline: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--text-2); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: var(--r-sm); }
.nav a:hover { color: var(--text); background: var(--surface-variant); text-decoration: none; }
.nav .nav-cta {
  color: var(--on-primary); background: var(--primary); margin-left: 6px;
}
.nav .nav-cta:hover { background: var(--primary-pressed); color: var(--on-primary); }

.mobile-menu-btn {
  margin-left: auto; display: none; width: 42px; height: 42px;
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-sm);
  cursor: pointer; padding: 0; align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.mobile-menu-btn span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 16px; line-height: 1;
  padding: 14px 22px; border-radius: var(--r-md); border: 1px solid transparent;
  cursor: pointer; transition: transform .1s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--primary-pressed); box-shadow: var(--shadow-2); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-variant); }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-block { width: 100%; }

/* ---- Eyebrow / pills ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--on-primary-surface); background: var(--primary-surface);
  border: 1px solid var(--primary-border);
  padding: 6px 12px; border-radius: 999px;
}

/* ---- Homepage hero ---- */
.hero { padding: 64px 0 32px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.2vw, 60px); font-weight: 800; letter-spacing: -0.03em; margin: 18px 0 0; }
.hero h1 .accent { color: var(--primary); }
.hero .lede { font-size: clamp(17px, 2vw, 20px); color: var(--text-2); margin-top: 18px; max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--text-3); display: flex; align-items: center; gap: 7px; }

/* ---- Phone mockup (CSS illustration, not a screenshot) ---- */
.phone {
  --pw: 300px;
  width: var(--pw); margin-inline: auto;
  border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #2A2E34, #16181C);
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(0,0,0,.25);
}
.phone-screen {
  border-radius: 32px; overflow: hidden; background: var(--surface); position: relative;
  border: 1px solid var(--border); aspect-ratio: 9 / 19.2;
  display: flex; flex-direction: column;
}
.phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 42%; height: 22px; background: #0C0D0F; border-radius: 0 0 14px 14px; z-index: 3; }
.pm-top { padding: 34px 18px 10px; }
.pm-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.pm-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.pm-list { padding: 4px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pm-row { display: flex; align-items: center; gap: 10px; background: var(--surface-variant); border-radius: var(--r-md); padding: 9px 11px; }
.pm-av { width: 34px; height: 34px; border-radius: 999px; background: var(--avatar-bg); color: var(--avatar-fg); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.pm-meta { min-width: 0; flex: 1; }
.pm-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-line { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.pm-dot { width: 7px; height: 7px; border-radius: 999px; flex: none; }
.pm-dot.ok { background: var(--primary); }
.pm-dot.wait { background: var(--amber); }
.pm-keypad { background: var(--surface-2); border-top: 1px solid var(--divider); padding: 12px 22px 16px; box-shadow: var(--shadow-2); }
.pm-num { text-align: center; font-size: 24px; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; padding: 4px 0 10px; }
.pm-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pm-key { aspect-ratio: 1; border-radius: 999px; background: var(--surface-variant); display: grid; place-items: center; font-size: 20px; font-weight: 600; color: var(--text); }
.pm-key.call { background: var(--primary); color: var(--on-primary); grid-column: 2; margin-top: 4px; }
.pm-bubbles { position: absolute; right: 12px; top: 96px; display: flex; flex-direction: column; gap: 10px; z-index: 2; }
.pm-bub { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-2); font-size: 18px; }
.pm-bub.call { background: var(--primary); }
.pm-bub.wa { background: var(--whatsapp); }
.pm-bub.sms { background: var(--accent); }
.pm-bub.pray { background: var(--surface); color: var(--primary); border: 1px solid var(--border); }

/* ---- Trust strip ---- */
.trust { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; color: var(--text-2); font-size: 14px; font-weight: 600; }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust .ic { color: var(--primary); }

/* ---- Section heading ---- */
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { color: var(--text-2); margin-top: 12px; font-size: 17px; }

/* ---- Feature grid ---- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 26px; box-shadow: var(--shadow-1); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature-card:hover { box-shadow: var(--shadow-2); border-color: var(--primary-border); }
.feature-ic {
  width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--primary-surface); color: var(--on-primary-surface); margin-bottom: 16px;
}
.feature-ic .ic { width: 24px; height: 24px; }
.feature-card h3 { font-size: 19px; }
.feature-card p { color: var(--text-2); margin-top: 8px; font-size: 15px; }
.feature-card.span-accent .feature-ic { background: var(--surface-variant); color: var(--text-2); }

/* ---- How it works / steps ---- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step-num {
  width: 34px; height: 34px; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; font-weight: 800; font-size: 15px; margin-bottom: 14px;
}
.step h3 { font-size: 17px; }
.step p { color: var(--text-2); font-size: 14px; margin-top: 6px; }

/* ---- CTA band ---- */
.cta-band {
  background: var(--brand-grad); color: #fff; border-radius: var(--r-2xl);
  padding: 48px; text-align: center; box-shadow: var(--shadow-2);
}
.cta-band h2 { font-size: clamp(26px, 3.4vw, 34px); color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); margin: 12px auto 24px; max-width: 46ch; }
.cta-band .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.22); }
.cta-band .btn-primary { background: #fff; color: var(--primary-pressed); }
.cta-band .btn-primary:hover { background: #EAF4EE; }

/* ---- Page hero (legal / support subpages) ---- */
.page-hero { padding: 52px 0 8px; border-bottom: 1px solid var(--divider); }
.page-hero .lede { color: var(--text-2); font-size: 18px; margin-top: 12px; max-width: 60ch; }
.page-hero h1 { font-size: clamp(30px, 4.5vw, 44px); margin-top: 14px; }

/* ---- Content card (legal prose) ---- */
.content-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 40px; box-shadow: var(--shadow-1); margin: 24px 0 8px;
}
.content-card h2 { font-size: 22px; margin-top: 32px; }
.content-card h2:first-child { margin-top: 0; }
.content-card h3 { font-size: 17px; margin-top: 22px; color: var(--text); }
.content-card p { color: var(--text-2); margin-top: 12px; }
.content-card ul, .content-card ol { color: var(--text-2); margin-top: 12px; padding-left: 22px; }
.content-card li { margin-top: 7px; }
.content-card li::marker { color: var(--primary); }
.content-card strong { color: var(--text); font-weight: 700; }
.content-card a { font-weight: 600; }
.last-updated { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--divider); color: var(--text-3); font-size: 14px; }

/* ---- Callout ---- */
.callout {
  background: var(--primary-surface); border: 1px solid var(--primary-border);
  border-radius: var(--r-md); padding: 16px 18px; margin-top: 20px;
}
.callout p { color: var(--on-primary-surface); margin: 0; }
.callout.warn { background: var(--amber-surface); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.callout.warn p { color: var(--amber); }

/* ---- Definition-ish table ---- */
.table-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--border); border-radius: var(--r-md); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--divider); vertical-align: top; }
table.data th { background: var(--surface-variant); color: var(--text); font-weight: 700; }
table.data td { color: var(--text-2); }
table.data tr:last-child td { border-bottom: none; }

/* ---- FAQ (support) ---- */
.faq { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--text-3); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--divider); }
.faq .faq-body { padding: 14px 18px 18px; color: var(--text-2); }
.faq .faq-body p + p { margin-top: 10px; }

/* ---- Anchor-list / mini TOC ---- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.toc a { font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--surface-variant); padding: 6px 11px; border-radius: 999px; }
.toc a:hover { color: var(--text); text-decoration: none; background: var(--border); }

/* ---- Steps list (delete-account) ---- */
.numbered { list-style: none; padding: 0; margin-top: 16px; counter-reset: n; }
.numbered li { position: relative; padding: 4px 0 16px 44px; counter-increment: n; color: var(--text-2); }
.numbered li::before {
  content: counter(n); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 999px; background: var(--primary-surface); color: var(--on-primary-surface);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; border: 1px solid var(--primary-border);
}
.numbered li strong { color: var(--text); }

/* ---- Contact card ---- */
.contact-card {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px;
}
.contact-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; }
.contact-item .ic { color: var(--primary); width: 22px; height: 22px; }
.contact-item h3 { font-size: 14px; margin-top: 10px; }
.contact-item a, .contact-item p { font-size: 14px; color: var(--text-2); margin-top: 4px; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 24px; }
.footer-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--text-2); font-weight: 500; font-size: 14px; padding: 5px 0; }
.footer-col a:hover { color: var(--primary); text-decoration: none; }
.footer-col p { color: var(--text-2); font-size: 14px; margin-top: 10px; max-width: 30ch; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
  padding: 20px 0 40px; border-top: 1px solid var(--divider); color: var(--text-3); font-size: 13px;
}

/* ---- Utilities ---- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--text-3); }
.wrap-tight > * + * { margin-top: 0; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-row { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  section { padding: 44px 0; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 16px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2); }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 12px 12px; font-size: 16px; }
  .nav .nav-cta { margin-left: 0; margin-top: 6px; text-align: center; }
  .mobile-menu-btn { display: inline-flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-row { grid-template-columns: 1fr 1fr; }
  .content-card { padding: 24px; }
  .cta-band { padding: 32px 22px; }
}

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
