/* HOME — public marketing site. Brand tokens mirror src/theme/index.ts (light palette).
   No framework, no web fonts: the page must paint fast on a phone. */

:root {
  --bg: #faf6f0;
  --surface: #fffdfa;
  --surface-alt: #f2ebe1;
  --border: #e4d9cb;
  --text: #2a241f;
  --muted: #6b5f56;
  --primary: #2e7d5b;
  --primary-dark: #26684c;
  --primary-soft: #ddede4;
  --primary-text: #ffffff;
  --accent: #bf4f27;
  --accent-soft: #f6e3db;
  --ai: #6d4fc2;
  --ai-soft: #eee9fa;
  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 24px;
  --shadow: 0 1px 2px rgba(91, 70, 54, 0.06), 0 8px 24px rgba(91, 70, 54, 0.07);
  --shadow-lg: 0 2px 4px rgba(91, 70, 54, 0.06), 0 18px 48px rgba(91, 70, 54, 0.12);
  --maxw: 1120px;
  --gutter: 20px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #24634a; }
:focus-visible { outline: 3px solid var(--ai); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 6.2vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4.4vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 1.15em; }
li { margin-bottom: 6px; }
.lead { font-size: clamp(1.05rem, 2.6vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; color: #fff; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(250, 246, 240, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 10px; min-height: 62px; flex-wrap: nowrap; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); text-decoration: none; font-size: 1.06rem; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: none; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text); text-decoration: none; padding: 8px 11px; border-radius: 999px; font-size: 0.95rem; font-weight: 600; }
.nav-links a:hover { background: var(--surface-alt); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu { margin-left: auto; position: relative; }
.menu[open] .menu-panel { display: block; }
.menu-toggle { display: inline-flex; list-style: none; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--text); cursor: pointer; }
.menu-toggle::-webkit-details-marker { display: none; }
.menu-panel { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: min(84vw, 300px); max-height: 74vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px 16px 14px; z-index: 60; }
.menu-panel a { display: block; padding: 11px 4px; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--border); }
.menu-panel .group { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 14px 4px 4px; font-weight: 700; }
.narrow-only { display: none; }
@media (max-width: 520px) {
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  .brand { font-size: 0.95rem; }
  .brand img { width: 26px; height: 26px; }
}
@media (max-width: 899px) {
  .nav-cta { margin-left: auto; }
  .nav-cta .btn-ghost { display: none; } /* "Log in" lives in the menu on phones */
  .nav-cta .btn { white-space: nowrap; padding: 9px 14px; font-size: 0.88rem; }
  .menu { margin-left: 0; }
}
@media (max-width: 379px) {
  .nav-cta { display: none; } /* very small phones: brand + menu only, the hero CTA is right below */
  .brand { font-size: 0.98rem; }
}
.menu-panel .btn { display: flex; width: 100%; margin: 12px 0 4px; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .menu { display: none !important; }
  .nav-cta { margin-left: 8px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform 0.12s ease, background 0.12s ease; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: #26684c; color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-alt); color: var(--text); }
.btn-ghost { background: transparent; color: var(--primary); padding: 10px 4px; }
.btn-sm { padding: 9px 16px; font-size: 0.92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.center .btn-row { justify-content: center; }

/* ---------- sections ---------- */
section { padding: 56px 0; }
section.tight { padding: 34px 0; }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-soft { background: var(--primary-soft); }
.band-ai { background: var(--ai-soft); }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary-dark); background: var(--primary-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.eyebrow.ai { color: var(--ai); background: #fff; }
@media (min-width: 760px) { section { padding: 76px 0; } }

/* ---------- hero ---------- */
.hero { padding-top: 34px; }
.hero-grid { display: grid; gap: 30px; align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-bottom: 22px; }
.hero-note { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; } .hero { padding-top: 56px; } }

/* device frames */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.shot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 8px; box-shadow: var(--shadow-lg); }
.shot img { border-radius: 16px; }
.shot figcaption { font-size: 0.82rem; color: var(--muted); text-align: center; padding: 8px 4px 4px; font-weight: 600; }
.shot.lift { transform: translateY(-16px); }
@media (max-width: 520px) { .shot.lift { transform: none; } }

/* ---------- cards ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.card .icon.ai { background: var(--ai-soft); color: var(--ai); }
.card .icon.accent { background: var(--accent-soft); color: var(--accent); }
.card a.more { display: inline-block; margin-top: 10px; font-weight: 700; text-decoration: none; }
.card a.more::after { content: ' →'; }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { color: inherit; border-color: #d6c7b4; }

/* problem list */
.chips { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .chips { grid-template-columns: repeat(2, 1fr); } }
.chip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 13px 16px; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
.chip b { color: var(--text); font-weight: 700; }

/* steps */
.steps { display: grid; gap: 18px; counter-reset: step; grid-template-columns: 1fr; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-left: 52px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }

/* split: copy + screenshot */
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 54px; } .split.reverse .split-media { order: -1; } }
.split-media img { border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--surface); }
.checklist { list-style: none; padding: 0; margin: 0 0 16px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.checklist svg { flex: 0 0 auto; margin-top: 3px; color: var(--primary); }

/* faq */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--primary); font-size: 1.3rem; font-weight: 700; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq .answer { padding: 0 18px 16px; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* cta band */
.cta-band { background: var(--primary-dark); color: #fff; border-radius: var(--radius-l); padding: 40px 24px; text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e3f0e9; max-width: 54ch; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary { background: #fff; color: var(--primary-dark); }
.cta-band .btn-primary:hover { background: #f1ffe9; color: var(--primary); }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.cta-band .btn-secondary:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* breadcrumbs + related */
.crumbs { font-size: 0.88rem; color: var(--muted); padding-top: 18px; }
.crumbs a { color: var(--muted); }
.related { display: flex; flex-wrap: wrap; gap: 10px; }
.related a { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 9px 15px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.94rem; }
.related a:hover { background: var(--surface-alt); }

/* pricing */
.plans { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .plans { grid-template-columns: repeat(2, 1fr); } }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 26px; }
.plan.featured { border-color: var(--ai); box-shadow: var(--shadow-lg); }
.price { font-size: 2.1rem; font-weight: 800; margin: 6px 0 2px; }
.price span { font-size: 1rem; font-weight: 600; color: var(--muted); }

/* prose (legal pages) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin-top: 34px; }
.prose li { color: var(--muted); }

/* footer */
footer { background: var(--surface); border-top: 1px solid var(--border); padding: 46px 0 34px; }
.foot-grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .foot-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.foot-grid h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.foot-grid a:hover { text-decoration: underline; }
.foot-grid a.btn { color: var(--primary-text); text-decoration: none; } /* the footer link colour must not override a button */
.foot-bottom { border-top: 1px solid var(--border); margin-top: 30px; padding-top: 18px; color: var(--muted); font-size: 0.88rem; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }

/* 404 */
.notfound { min-height: 58vh; display: flex; align-items: center; }
