/* HomeHero site. Colours follow the app's theme (lib/utils/theme_config.dart). */
:root {
  --brand: #8c4e00;
  --brand-strong: #6f3d00;
  --accent: #ff9800;
  --bg: #fdf8f2;
  --surface: #ffffff;
  --surface-2: #f6efe5;
  --tint: #ede0d1;
  --text: #211710;
  --muted: #6e5f4e;
  --line: #e7dccb;
  --field: #9c8a74;
  --focus: #8c4e00;
  --ok: #2e7d32;
  --error: #c62828;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(33 23 16 / 6%), 0 8px 24px rgb(33 23 16 / 8%);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ffb35c;
    --brand-strong: #ffc982;
    --bg: #17110b;
    --surface: #211912;
    --surface-2: #2a2018;
    --tint: #3a2c1f;
    --text: #f4ebe1;
    --muted: #bba994;
    --line: #3a2d21;
    --field: #7d6a55;
    --focus: #ffb35c;
    --ok: #81c784;
    --error: #ef9a9a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font: 17px/1.6 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 700; color: var(--brand); margin-bottom: 0.6em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  background: #8c4e00; color: #fff; font-weight: 600; text-decoration: none; font-size: 1rem;
  cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: #6f3d00; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-small { padding: 8px 16px; font-size: 0.92rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.nav-desktop { display: flex; gap: 4px; margin-left: 12px; }
.nav-desktop a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 8px; font-weight: 500; }
.nav-desktop a:hover, .nav-desktop a[aria-current] { color: var(--text); background: var(--surface-2); }
.header-cta { margin-left: auto; display: flex; gap: 8px; }
.nav-mobile { display: none; margin-left: auto; }
.nav-mobile summary { list-style: none; cursor: pointer; padding: 8px; border-radius: 8px; color: var(--text); }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile nav { position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 20px; display: grid; gap: 2px; box-shadow: var(--shadow); max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; }
.nav-mobile nav a:not(.btn) { padding: 12px 8px; color: var(--text); text-decoration: none; border-radius: 8px; }
.nav-mobile nav .btn { margin-top: 8px; }
@media (max-width: 900px) {
  .nav-desktop, .header-cta { display: none; }
  .nav-mobile { display: block; }
}

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.2rem; color: var(--muted); }
.alt { background: var(--surface-2); border-block: 1px solid var(--line); }

/* Hero */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 56ch; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 24px 0 0; list-style: none; color: var(--muted); font-size: 0.95rem; }
.hero-points li::before { content: '✓'; color: var(--ok); font-weight: 700; margin-right: 6px; }
.shot-stage { position: relative; }
.shot { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.shot-phone { position: absolute; right: 2%; bottom: 4%; width: 22%; min-width: 120px; border-radius: 22px; border: 6px solid #2a2018; box-shadow: var(--shadow); }
@media (max-width: 640px) { .shot-phone { display: none; } }

/* Cards and grids */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid > * { min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-bottom: 0.35em; }
.card p:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; display: block; transition: border-color 0.15s, transform 0.15s; }
.card-link:hover { border-color: var(--brand); color: inherit; transform: translateY(-2px); }
.icon-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--brand); margin-bottom: 14px; }
.icon-badge svg { width: 24px; height: 24px; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--tint); color: var(--brand); vertical-align: middle; }

/* Split feature rows */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; }
.split + .split { margin-top: 88px; }
.split.flip > :first-child { order: 2; }
.split ul { padding-left: 1.2em; }
.split li { margin-bottom: 0.4em; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.flip > :first-child { order: 0; }
}

/* Steps */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.steps .card::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #8c4e00; color: #fff; font-weight: 700; margin-bottom: 14px; }

/* Pricing */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.plan.featured { border: 2px solid var(--brand); position: relative; }
.plan.featured .tag { position: absolute; top: -12px; left: 24px; background: #8c4e00; color: #fff; }
.plan h3 { font-size: 1.3rem; margin: 0; }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; margin: 12px 0 0; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.plan .btn { width: 100%; }
.lifetime { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.96rem; }
caption { text-align: left; padding: 12px 16px; font-weight: 600; caption-side: top; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-2); font-weight: 700; }
tbody th { font-weight: 500; }
tbody tr:last-child td { border-bottom: 0; }
td.yes { color: var(--ok); font-weight: 600; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 32px 14px 0; list-style: none; position: relative; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 10px; font-size: 1.4rem; color: var(--brand); }
.faq details[open] summary::after { content: '−'; }
.faq details > div { padding: 0 0 16px; color: var(--muted); }

/* Prose (docs, blog, legal) */
.page-head { padding: 64px 0 24px; }
.page-head .lead { max-width: 62ch; }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 8px; }
.prose code, kbd { font-size: 0.9em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.prose blockquote, .note { margin: 1.4em 0; padding: 14px 18px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; }
.prose .note p:last-child { margin: 0; }
.prose-page { padding-bottom: 72px; }
.post-meta { color: var(--muted); font-size: 0.95rem; }
.back { display: inline-block; margin-bottom: 18px; text-decoration: none; }

.docs-layout { display: grid; grid-template-columns: 230px 1fr; gap: 48px; padding: 48px 0 80px; }
.docs-nav ul { list-style: none; padding: 0; margin: 0; position: sticky; top: 88px; }
.docs-nav a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.docs-nav a:hover { background: var(--surface-2); color: var(--text); }
.docs-nav a[aria-current] { background: var(--tint); color: var(--brand); font-weight: 600; }
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; gap: 16px; padding-top: 24px; }
  .docs-nav ul { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .docs-nav a { border: 1px solid var(--line); }
}

/* Forms */
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form input { flex: 1 1 180px; }
input, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--field); border-radius: 10px; padding: 10px 14px; width: 100%; }
textarea { min-height: 160px; resize: vertical; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.form-status { flex-basis: 100%; margin: 4px 0 0; font-size: 0.92rem; min-height: 1.4em; }
.form-status[data-state='ok'] { color: var(--ok); }
.form-status[data-state='error'] { color: var(--error); }

/* CTA band */
.cta-band { background: #8c4e00; color: #fff; border-radius: 22px; padding: 48px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: #f6e3cc; }
.cta-band .btn { background: #fff; color: #6f3d00; }
.cta-band .btn:hover { background: #fdf0df; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 45%); }
@media (max-width: 560px) { .cta-band { padding: 32px 24px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; margin-top: 40px; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid li a { color: var(--muted); text-decoration: none; }
.footer-grid li a:hover { color: var(--text); }
.footer-h { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; color: var(--muted); }
.footer-bottom a { color: var(--muted); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
