/* Madali — brand tokens mirrored from lib/core/theme/madali_tokens.dart */
:root {
  --ink: #2A2420;
  --ink2: #3B332C;
  --ink3: #55483E;
  --mute: #877B6E;
  --paper: #FBF6F1;
  --paper-elev: #FDFBF8;
  --card: #FFFFFF;
  --surface2: #F5EEE6;
  --hair: #EBE0D6;
  --green: #17935A;
  --green-deep: #0C5C39;
  --green-bright: #2FB575;
  --green-tint: #E3F1E8;
  --guava: #E1516B;
  --mango: #E0961F;
  --radius: 16px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ── Header ─────────────────────────────────────────── */
header.site {
  padding: 22px 0;
  border-bottom: 1px solid var(--hair);
  background: var(--paper);
}
header.site .wrap { display: flex; align-items: center; gap: 16px; }
.brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--green-deep);
  font-weight: 800; font-size: 21px; letter-spacing: -0.02em;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.brand span i { color: var(--guava); font-style: normal; }
nav.site { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
nav.site a {
  color: var(--ink3); text-decoration: none; font-size: 15.5px; font-weight: 500;
}
nav.site a:hover { color: var(--green-deep); }

@media (max-width: 720px) {
  header.site { padding: 16px 0; }
  header.site .wrap {
    flex-direction: column; align-items: flex-start; gap: 12px;
  }
  nav.site { margin-left: 0; gap: 20px; }
  nav.site a { font-size: 15px; }
}

/* ── Hero ───────────────────────────────────────────── */
.hero { padding: 76px 0 60px; }
.hero h1 {
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  max-width: 15ch;
  font-weight: 800;
}
.hero p.lede {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--ink3);
  max-width: 54ch;
  margin: 0 0 32px;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px;
  text-decoration: none; font-weight: 650; font-size: 16.5px;
  transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-deep); color: #fff; }
.btn-primary:hover { background: var(--green); }
.btn-quiet { color: var(--green-deep); border: 1.5px solid var(--hair); }
.btn-quiet:hover { border-color: var(--green); }
.note { font-size: 15px; color: var(--mute); margin-top: 18px; }

/* ── Sections ───────────────────────────────────────── */
section { padding: 58px 0; }
section.tinted { background: var(--paper-elev); border-block: 1px solid var(--hair); }
h2 {
  font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.02em;
  margin: 0 0 14px; font-weight: 750;
}
h3 { font-size: 19px; margin: 0 0 7px; font-weight: 700; }
.sub { color: var(--ink3); max-width: 60ch; margin: 0 0 34px; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--hair);
  border-radius: var(--radius); padding: 26px;
}
.card p { margin: 0; color: var(--ink3); font-size: 16px; }
.dot {
  width: 34px; height: 34px; border-radius: 10px; background: var(--green-tint);
  display: grid; place-items: center; margin-bottom: 14px;
  font-size: 17px;
}

/* ── Planner strip ──────────────────────────────────── */
.planner {
  background: var(--green-tint); border: 1px solid #CFE5D8;
  border-radius: 22px; padding: 38px;
}
.planner h2 { margin-bottom: 10px; }
.planner p { color: var(--ink2); max-width: 58ch; }
.tag {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--green-deep); margin-bottom: 10px;
}

/* ── Footer ─────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--hair); padding: 40px 0 54px;
  color: var(--mute); font-size: 15px;
}
footer.site a { color: var(--ink3); text-decoration: none; margin-right: 20px; }
footer.site a:hover { color: var(--green-deep); }
.foot-links { margin-bottom: 14px; }

/* ── Legal / long-form pages ────────────────────────── */
.doc { padding: 52px 0 70px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 40px); letter-spacing: -0.025em; margin: 0 0 6px; }
.doc .eff { color: var(--mute); font-size: 15.5px; margin: 0 0 34px; }
.doc h2 { font-size: 23px; margin: 38px 0 12px; }
.doc h3 { font-size: 17.5px; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--ink2); font-size: 16.5px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 9px; }
.doc a { color: var(--green-deep); }
.doc code {
  background: var(--surface2); padding: 2px 6px; border-radius: 5px;
  font-size: 15px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.doc .steps { counter-reset: step; list-style: none; padding-left: 0; }
.doc .steps li {
  counter-increment: step; position: relative; padding-left: 38px; margin-bottom: 14px;
}
.doc .steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--green-tint); color: var(--green-deep);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.callout {
  background: var(--card); border: 1px solid var(--hair);
  border-left: 4px solid var(--green); border-radius: 12px;
  padding: 18px 20px; margin: 22px 0;
}
.callout p { margin: 0; }

.planner-cta { margin-top: 14px; }
.sub-last { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
