/* AutoClip public page. No frameworks, no trackers. Light and dark; phone first. */
:root {
  --bg: #f5f1e8; --bg-tint: #ece6d8; --surface: #fffdf8; --ink: #14201b; --ink-soft: #46544d; --line: #d8d0bd;
  --accent: #0f5c47; --accent-ink: #ffffff; --accent-soft: #d6e9df; --warn: #8a5a00; --warn-bg: #fbefd2; --bad: #9b1c1c; --bad-bg: #f9dedb;
  --ok-bg: #dcefe4; --focus: #0b57d0; --shadow: 0 1px 2px rgba(20,32,27,.06), 0 12px 32px -12px rgba(20,32,27,.18);
  --display: "Fraunces", Georgia, "Times New Roman", serif; --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px; color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c1411; --bg-tint: #111c18; --surface: #15201c; --ink: #e8efe9; --ink-soft: #a9b8af; --line: #2a3b34;
  --accent: #5fd3a8; --accent-ink: #062117; --accent-soft: #17382d; --warn: #f0c36a; --warn-bg: #2d2410; --bad: #ff9c94; --bad-bg: #351614;
  --ok-bg: #12301f; --focus: #8ab4ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0c1411; --bg-tint: #111c18; --surface: #15201c; --ink: #e8efe9; --ink-soft: #a9b8af; --line: #2a3b34;
    --accent: #5fd3a8; --accent-ink: #062117; --accent-soft: #17382d; --warn: #f0c36a; --warn-bg: #2d2410; --bad: #ff9c94; --bad-bg: #351614;
    --ok-bg: #12301f; --focus: #8ab4ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6); color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 700; }
h1 em { font-style: italic; color: var(--accent); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: .18em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--bg-tint); padding: .08em .35em; border-radius: 5px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; z-index: 50; }
.skip:focus { left: .75rem; }
.eyebrow { font: 600 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.fine { font-size: .9rem; color: var(--ink-soft); }
.note { color: var(--ink-soft); margin-top: 1.5rem; max-width: 60ch; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 52ch; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.25rem var(--display); color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { width: 1.9rem; height: 1.9rem; }
.bm-bg { fill: var(--accent); } .bm-car { fill: var(--bg); } .bm-wheel { fill: var(--accent); stroke: var(--bg); stroke-width: 1; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:hover { color: var(--accent); }
.nav .nav-cta { background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; border-radius: 999px; font-weight: 600; }
.nav .nav-cta:hover { color: var(--accent-ink); filter: brightness(1.08); }
.theme-btn { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.theme-btn svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; grid-area: 1/1; }
.theme-btn .icon-moon { fill: currentColor; stroke: none; }
.theme-btn .icon-sun { display: none; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: none; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .icon-moon { display: none; }
  :root:not([data-theme]) .theme-btn .icon-sun { display: block; }
}
@media (max-width: 760px) { .nav a:not(.nav-cta) { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem); background:
  radial-gradient(60rem 28rem at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 4rem; } }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1.2rem; }
.hero-art { margin: 0; }
.hero-art figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .7rem; }
.scene { width: 100%; height: auto; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--surface); }
.s-before-sky { fill: #aeb7b3; } .s-before-ground { fill: #6e7773; } .s-clutter { fill: #8b9490; } .s-pole { fill: #4f5753; } .s-puddle { fill: #8a9490; opacity: .7; }
.s-after-wall { fill: var(--accent-soft); } .s-after-floor { fill: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.s-after-arc { fill: color-mix(in srgb, var(--accent) 22%, var(--surface)); } .s-shadow { fill: #000; opacity: .22; }
.car-body { fill: #b3321f; } .car-glass { fill: #243238; opacity: .92; } .car-tyre { fill: #151a18; } .car-hub { fill: #c9d1cc; }
.car-before { filter: saturate(.7) brightness(.9); }
.s-divider { stroke: var(--surface); stroke-width: 3; }
.s-label { font: 700 14px var(--body); fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.45); stroke-width: 4px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 1rem var(--body); padding: .85rem 1.4rem; border-radius: 999px; border: 2px solid transparent; text-decoration: none; cursor: pointer; min-height: 3rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn[disabled] { opacity: .55; cursor: not-allowed; filter: none; }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tint { background: var(--bg-tint); }
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.2rem; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; position: relative; }
.step-n { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 1rem var(--display); margin-bottom: .8rem; }
.steps p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
.cards { display: grid; gap: 1.1rem; margin-top: 2rem; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; border-top: 4px solid var(--accent); }
.card p { margin: 0; color: var(--ink-soft); }
.plain-list { padding-left: 1.2rem; color: var(--ink-soft); } .plain-list li { margin-bottom: .6rem; }

/* ---------- demo ---------- */
.demo-wrap { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .demo-wrap { grid-template-columns: 1fr 1.3fr; gap: 4rem; align-items: start; } }
.demo-app { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.1rem, 3vw, 2rem); box-shadow: var(--shadow); min-height: 12rem; }
.demo-status { display: flex; align-items: center; gap: .8rem; color: var(--ink-soft); margin: 0; }
.callout { border-radius: 12px; padding: .9rem 1.1rem; margin: 0 0 1.2rem; border: 1px solid transparent; }
.callout p { margin: .8rem 0 0; }
.callout-ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.callout-wait { background: var(--warn-bg); color: var(--ink); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.callout-bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.drops { display: grid; gap: 1rem; }
@media (min-width: 560px) { .drops { grid-template-columns: 1fr 1fr; } }
.drop-field { position: relative; }
.file-input { position: absolute; inset: 0 0 auto 0; height: 11rem; width: 100%; opacity: 0; cursor: pointer; }
.drop { display: grid; place-content: center; justify-items: center; gap: .3rem; text-align: center; height: 11rem; padding: 1rem; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink-soft); position: relative; overflow: hidden; transition: border-color .15s, background .15s; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.file-input:focus-visible + .drop { outline: 3px solid var(--focus); outline-offset: 3px; }
.drop.has-file { border-style: solid; border-color: var(--accent); }
.drop-title { font: 600 1rem var(--body); color: var(--ink); position: relative; }
.drop-hint { font-size: .9rem; position: relative; max-width: 100%; overflow-wrap: anywhere; }
.drop-prev { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.help { font-size: .88rem; color: var(--ink-soft); margin: .5rem 0 0; }
.field { margin-top: 1.2rem; }
.field label { display: block; font-weight: 600; margin-bottom: .4rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
input[type="email"], textarea { width: 100%; font: inherit; padding: .8rem 1rem; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
input[type="email"]:focus, textarea:focus { border-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 1.4rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.spinner { width: 1.1rem; height: 1.1rem; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; flex: none; }
.spinner-big { width: 2.6rem; height: 2.6rem; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.working { display: flex; gap: 1.2rem; align-items: center; padding: 1.5rem 0; }
.working-title { font: 600 1.2rem var(--display); margin: 0 0 .3rem; } .working-sub { margin: 0; color: var(--ink-soft); }
.result-h { font-size: 1.5rem; }
.compare { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: #000; --pos: 50%; touch-action: pan-y; }
.compare img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; display: block; margin: 0 auto; background: #000; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-before img { height: 100%; max-height: none; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); pointer-events: none; }
.tag { position: absolute; top: .6rem; background: rgba(0,0,0,.65); color: #fff; font: 700 .72rem var(--body); letter-spacing: .1em; text-transform: uppercase; padding: .25rem .55rem; border-radius: 6px; }
.tag-l { left: .6rem; } .tag-r { right: .6rem; }
.slider-label { display: block; margin: 1rem 0 .3rem; font-size: .92rem; color: var(--ink-soft); }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 2rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1rem 0; }
.confirm-box { border: 2px solid var(--accent); border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1.4rem; background: var(--accent-soft); }

/* ---------- developers, access, faq, footer ---------- */
.dev-grid, .access-wrap { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .dev-grid, .access-wrap { grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: start; } }
.code { background: #0e1613; color: #d9e6df; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.code pre { margin: 0; padding: 1.3rem 1.4rem; overflow-x: auto; font: .88rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code code { background: none; padding: 0; color: inherit; font-size: inherit; }
.access-form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.1rem, 3vw, 2rem); box-shadow: var(--shadow); }
.access-form .field:first-of-type { margin-top: 0; }
.faq { max-width: 52rem; }
details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
summary { cursor: pointer; font: 600 1.1rem var(--display); }
summary::marker { color: var(--accent); }
details p { margin: .8rem 0 0; color: var(--ink-soft); }
.foot { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation-duration: 3s; }
  * { transition: none !important; }
}
