/* Landing page, legal pages and 404. The dashboard has its own (app/app.css)
   with the same tokens. Brand colours and usage: docs/BRAND.md */
:root {
  color-scheme: light;
  --bg: #f6f8fc; --bg-soft: #eef3fc; --fg: #0f172a; --muted: #475569;
  --card: #ffffff; --border: #dfe6f1; --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 8px 24px rgb(30 58 138 / .08);
  --accent: #1d4ed8; --accent-fg: #ffffff; --accent-soft: #dbeafe; --link: #1d4ed8; --brand-blue: #2563eb; --brand-teal: #0d9488; --brand-dot: #14b8a6;
  --ok: #15803d; --bad: #b91c1c;
  --blob-1: #3b82f6; --blob-2: #93c5fd; --blob-3: #1e40af; --shape-line: #60a5fa;
  --radius: 14px; --header-h: 72px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #070d1f; --bg-soft: #0b1530; --fg: #e8eefc; --muted: #9fb0d0;
    --card: #0e1830; --border: #1c2a4a; --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px rgb(0 0 0 / .35);
    --accent: #60a5fa; --accent-fg: #06102a; --accent-soft: #12224a; --link: #93c5fd; --brand-blue: #60a5fa; --brand-teal: #2dd4bf; --brand-dot: #2dd4bf;
    --ok: #4ade80; --bad: #f87171;
    --blob-1: #2563eb; --blob-2: #1d4ed8; --blob-3: #60a5fa; --shape-line: #3b82f6;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070d1f; --bg-soft: #0b1530; --fg: #e8eefc; --muted: #9fb0d0;
  --card: #0e1830; --border: #1c2a4a; --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px rgb(0 0 0 / .35);
  --accent: #60a5fa; --accent-fg: #06102a; --accent-soft: #12224a; --link: #93c5fd; --brand-blue: #60a5fa; --brand-teal: #2dd4bf; --brand-dot: #2dd4bf;
  --ok: #4ade80; --bad: #f87171;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Header: sticky; the letters of the logo fold into the mark on scroll (site.js) */
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid transparent; transition: background-color .3s, border-color .3s; }
.site-header.scrolled { background: color-mix(in srgb, var(--bg) 85%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom-color: var(--border); }
.topnav { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: var(--header-h); }
.brand { position: relative; display: inline-flex; align-items: center; gap: 10px; color: var(--brand-blue); text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: -.01em; }
.brand .mark { display: inline-flex; flex: none; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.brand svg { width: 34px; height: 34px; overflow: visible; }
.mark-dashes, .mark-loop { stroke: var(--brand-blue); }
.mark-dot { fill: var(--brand-dot); transform-box: fill-box; transform-origin: center; }
.brand .r, .brand .l { color: var(--brand-blue); }
.brand b, .brand .p { color: var(--brand-teal); font-weight: 700; }
.brand .word { display: inline-flex; }
.brand .l { display: inline-block; transition: transform .55s cubic-bezier(.65, 0, .35, 1), opacity .4s ease; transition-delay: calc(var(--i) * 18ms); }
.site-header.compact .brand .l { transform: translateX(var(--dx, -60px)) scale(.2); opacity: 0; }
.site-header.compact .brand .mark { transform: scale(1.08); }
.site-header.instant .brand .l, .site-header.instant .brand .mark { transition: none; }
.mark-loop { stroke-dasharray: 100; stroke-dashoffset: 0; }
.mark-dashes { opacity: .45; transform-box: fill-box; transform-origin: center; }
/* Each time the logo folds or unfolds: the dot appears, the loop closes
   around it, then the ring of dashes fades in around everything */
.mark.beat .mark-dot { animation: dot-in .4s cubic-bezier(.34, 1.56, .64, 1) both; }
.mark.beat .mark-loop { animation: draw .75s cubic-bezier(.65, 0, .35, 1) .15s both; }
.mark.beat .mark-dashes { animation: dashes-in .6s ease-out .8s both; }
@keyframes dot-in { from { transform: scale(0); } }
@keyframes dashes-in { from { opacity: 0; transform: scale(.92); } }
@keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.topnav nav { display: flex; align-items: center; gap: 18px; }
.topnav nav a { color: var(--fg); text-decoration: none; font-weight: 500; font-size: .9375rem; }
.topnav nav a:hover { color: var(--link); }
.theme-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--fg); cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* Hero with moving shapes */
.hero { position: relative; overflow: hidden; margin-top: calc(-1 * var(--header-h)); padding-top: var(--header-h); background: linear-gradient(180deg, var(--bg-soft), var(--bg)); border-bottom: 1px solid var(--border); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 40px 16px 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--link); font-size: .8125rem; font-weight: 600; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: beat 1.6s ease-in-out infinite; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 16px; }
h1 em { font-style: normal; color: var(--link); }
p.lead { color: var(--muted); font-size: 1.125rem; margin: 0 0 24px; max-width: 34em; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: .9375rem; }
.hero-points li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 6px; }

.shapes { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .45; animation: drift 26s ease-in-out infinite alternate; }
.blob.b1 { width: 420px; height: 420px; background: var(--blob-1); top: -160px; right: -80px; }
.blob.b2 { width: 320px; height: 320px; background: var(--blob-2); bottom: -140px; left: -100px; animation-duration: 32s; animation-direction: alternate-reverse; }
.blob.b3 { width: 220px; height: 220px; background: var(--blob-3); top: 35%; left: 42%; opacity: .25; animation-duration: 22s; }

@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 40px) scale(1.12); } }
@keyframes beat { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .5; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mark-loop { stroke-dashoffset: 0; }
}

/* Cards and the instant scanner */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.scanner { padding: 24px; }
.scanner h2 { margin: 0 0 4px; font-size: 1.125rem; }
.scanner p { margin: 0 0 16px; color: var(--muted); font-size: .9375rem; }
form { display: grid; gap: 12px; }
label { font-size: .875rem; color: var(--muted); font-weight: 500; }
input, button { font: inherit; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--fg); width: 100%; }
input::placeholder { color: var(--muted); opacity: .7; }
button { background: var(--accent); color: var(--accent-fg); border: 0; cursor: pointer; font-weight: 600; }
button:hover { filter: brightness(1.08); }
button[disabled] { opacity: .6; cursor: wait; }
#result { margin-top: 20px; }
#result:empty { display: none; }
.row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ok { color: var(--ok); } .bad { color: var(--bad); }
ul { padding-left: 20px; }

/* Sections */
section.block { padding: 72px 0; }
section.block.alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2.title { font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 8px; }
p.sub { color: var(--muted); margin: 0 0 32px; max-width: 40em; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.feature { padding: 22px; }
.feature h3 { margin: 14px 0 6px; font-size: 1.0625rem; }
.feature p { margin: 0; color: var(--muted); font-size: .9375rem; }
.icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--link); }
.icon svg { width: 22px; height: 22px; }

.shots { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.shot { margin: 0; overflow: hidden; }
.shot img { display: block; width: 100%; }
.shot figcaption { padding: 12px 16px; font-size: .875rem; color: var(--muted); border-top: 1px solid var(--border); }
.shot .dark-only { display: none; }
:root[data-theme="dark"] .shot .dark-only { display: block; }
:root[data-theme="dark"] .shot .light-only { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot .dark-only { display: block; }
  :root:not([data-theme="light"]) .shot .light-only { display: none; }
}

/* Pricing */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 760px; }
.plan { display: flex; flex-direction: column; padding: 26px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan h3 { margin: 0; font-size: 1.125rem; }
.plan .who { margin: 0 0 16px; color: var(--muted); font-size: .875rem; }
.plan .price { margin: 0; font-size: 2.25rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.plan .price span { font-size: 1rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.plan .annual { margin: 4px 0 16px; font-size: .875rem; color: var(--muted); }
.plan ul { margin: 0 0 24px; padding-left: 20px; flex: 1; }
.plan li { margin: 4px 0; }
.cta { display: block; text-align: center; padding: 11px 12px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); font-weight: 600; text-decoration: none; }
.cta:hover { filter: brightness(1.08); }
.yearly { display: block; text-align: center; margin-top: 10px; font-size: .875rem; }
.fine { font-size: .875rem; color: var(--muted); margin-top: 16px; max-width: 760px; }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

/* Legal pages and 404 */
.legal { padding-bottom: 56px; }
.legal > * { max-width: 760px; }
.legal h1 { font-size: 2rem; margin-top: 16px; }
.legal h2 { font-size: 1.125rem; margin: 32px 0 8px; }
.legal li { margin: 4px 0; }
.notfound { max-width: 560px; padding: 48px 16px 96px; text-align: center; }
.notfound .code { font-size: 4.5rem; font-weight: 800; letter-spacing: -.04em; color: var(--link); margin: 0; line-height: 1; }

footer.site { border-top: 1px solid var(--border); font-size: .875rem; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 24px; padding-bottom: 40px; }
footer.site a { color: var(--muted); }
footer.site .brand { font-size: 1rem; margin-right: auto; }
footer.site .brand svg { width: 26px; height: 26px; }
footer.site .brand { gap: 8px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding: 24px 16px 64px; }
    .shots { grid-template-columns: 1fr; }
  section.block { padding: 56px 0; }
}
@media (max-width: 480px) {
  .topnav nav { gap: 12px; }
  .topnav nav .hide-sm { display: none; }
}
