:root {
  --ink: #0f1419;
  --ink-soft: #3d4852;
  --muted: #6b7785;
  --line: #e4e8ec;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --brand: #1a7f6b;
  --brand-dark: #126653;
  --brand-soft: #e8f5f1;
  --accent: #f4a259;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,32,.04), 0 8px 28px rgba(16,24,32,.08);
  --maxw: 1080px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 750; }
p { margin: 0 0 1rem; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* nav */
header.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand .dot { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--brand), var(--accent)); display: inline-block; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-weight: 550; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; cursor: pointer; border: 1px solid transparent; border-radius: 10px; padding: 11px 20px; text-decoration: none; transition: transform .04s ease, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; border-radius: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; font-size: .82rem; padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero p.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 36ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-note { margin-top: 14px; font-size: .9rem; color: var(--muted); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 28px; } .hero p.lead { max-width: none; } }

/* before/after slider */
.ba { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); user-select: none; touch-action: none; background: #ddd; cursor: ew-resize; }
.ba .b { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ba .after-clip { position: absolute; inset: 0; overflow: hidden; width: 50%; pointer-events: none; }
.ba .after-clip .a { position: absolute; left: 0; top: 0; object-fit: cover; max-width: none; display: block; }
.ba .handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); transform: translateX(-1px); pointer-events: none; }
.ba .knob { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; color: var(--brand-dark); font-size: 14px; }
.ba .tag { position: absolute; bottom: 12px; padding: 4px 10px; border-radius: 7px; font-size: .72rem; font-weight: 650; color: #fff; background: rgba(15,20,25,.6); letter-spacing: .03em; }
.ba .tag.before { left: 12px; }
.ba .tag.after { right: 12px; background: rgba(26,127,107,.85); }

/* logos / proof strip */
.strip { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.strip .wrap { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-weight: 600; font-size: .9rem; }

/* sections */
section { padding: 64px 0; }
.section-head { max-width: 60ch; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 800px) { .grid-3 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; }
.card .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; margin-bottom: 14px; font-size: 20px; }

/* compliance band */
.band { background: linear-gradient(180deg, var(--brand-soft), #fff); border-top: 1px solid var(--line); }
.band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 800px) { .band .wrap { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.checklist .ok { color: var(--brand); font-weight: 800; }
.checklist .no { color: var(--danger); font-weight: 800; }

/* pricing */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 820px; margin: 0 auto; }
@media (max-width: 760px) { .prices { grid-template-columns: 1fr; } }
.price { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; background: #fff; box-shadow: var(--shadow); position: relative; }
.price.featured { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow); }
.price .amt { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; }
.price .per { color: var(--muted); font-size: .95rem; }
.price .pack { color: var(--ink-soft); margin: 6px 0 18px; font-weight: 600; }
.price .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }

/* faq */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 12px 0 0; color: var(--ink-soft); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--ink-soft); text-decoration: none; margin-left: 18px; }

/* ---- app ---- */
.app-main { padding: 32px 0 80px; min-height: calc(100vh - 64px); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.credits-pill { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; padding: 7px 14px; border-radius: 999px; font-size: .92rem; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg-soft); padding: 48px 24px; text-align: center; transition: border-color .15s, background .15s; cursor: pointer; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop h3 { margin-bottom: 6px; }
.controls { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 18px 0 0; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink-soft); }
.seg button.on { background: var(--brand); color: #fff; }

.results { margin-top: 30px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.shot .ba { border-radius: 0; box-shadow: none; }
.shot .pending { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--bg-soft); color: var(--muted); gap: 10px; text-align: center; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shot .foot { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shot .foot .name { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.shot .actions { display: flex; gap: 8px; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 11px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--ink-soft); }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.badge { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); }
.badge.det { background: #eef1f4; color: var(--ink-soft); }

/* auth modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15,20,25,.45); display: none; place-items: center; z-index: 50; padding: 20px; }
.modal-bg.show { display: grid; }
.modal { background: #fff; border-radius: var(--radius); padding: 30px; max-width: 420px; width: 100%; box-shadow: var(--shadow); }
.modal h3 { margin-bottom: 6px; }
.modal input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; margin: 14px 0; }
.modal .dev-link { font-size: .82rem; word-break: break-all; background: var(--bg-soft); padding: 10px; border-radius: 8px; margin-top: 12px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow); z-index: 60; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.hidden { display: none !important; }
