/* LensDesk site. Dark first, light via prefers-color-scheme. No external resources. */

:root {
  --bg: #0b0f17;
  --bg-2: #111827;
  --surface: #161f2e;
  --surface-2: #1d2939;
  --text: #e6ebf3;
  --muted: #a7b3c6;
  --line: #2a3648;
  --accent: #4d8dff;
  --accent-2: #7b5cff;
  --accent-ink: #ffffff;
  --grad: linear-gradient(135deg, #1f5fd6 0%, #5a3fe0 100%);
  --grad-text: linear-gradient(135deg, #4d8dff 0%, #7b5cff 100%);
  --ok: #3ddc97;
  --warn: #ffb547;
  --rec: #ff5a6e;
  --focus: #9cc2ff;
  --radius: 14px;
  --max: 1080px;
  color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fc;
    --bg-2: #eef2f9;
    --surface: #ffffff;
    --surface-2: #f0f4fb;
    --text: #111827;
    --muted: #4b5870;
    --line: #d5deeb;
    --accent: #1f5fd6;
    --accent-2: #5a3fe0;
    --grad-text: var(--grad);
    --ok: #0f7a4e;
    --warn: #8a5300;
    --rec: #b3263b;
    --focus: #1f5fd6;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 12px; top: -48px;
  background: var(--surface); color: var(--text);
  padding: 8px 12px; border-radius: 8px; z-index: 10;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 1.2em; margin: 0 0 14px; }
li { margin-bottom: 6px; }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px;
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* Header and nav */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
/* Menu: checkbox toggle, no JS. */
.nav-area { position: relative; }
.nav-check { position: absolute; opacity: 0; pointer-events: none; }
.nav-btn {
  display: inline-block; cursor: pointer; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--text); font-weight: 600;
}
.nav-check:focus-visible ~ .nav-btn { outline: 3px solid var(--focus); outline-offset: 3px; }
.nav-links {
  position: absolute; right: 0; top: calc(100% + 8px);
  display: none; flex-direction: column; min-width: 200px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.nav-check:checked ~ .nav-links { display: flex; }
.nav-links a { padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.nav-links a:hover { background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 600; }

@media (min-width: 760px) {
  .nav-btn { display: none; }
  .nav-links {
    position: static; display: flex; flex-direction: row; gap: 4px;
    background: none; border: 0; box-shadow: none; padding: 0; min-width: 0;
  }
  .nav-links a { padding: 8px 12px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 20px; border-radius: 12px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; min-height: 44px;
}
.btn-primary { background: var(--grad); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(.92); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn[aria-disabled="true"] { opacity: .75; cursor: not-allowed; background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }

/* Mock app screenshot */
.mock {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.mock-bar {
  display: flex; align-items: center; gap: 6px; padding: 4px 4px 10px;
  color: var(--muted); font-size: .75rem;
}
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: inline-block; }
.mock-bar span { margin-left: auto; }
.grid-cams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cam {
  position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(77,141,255,.35), transparent 60%),
    linear-gradient(160deg, #1b2740 0%, #0d1320 100%);
  border: 1px solid var(--line);
}
.cam.wide { grid-column: span 2; aspect-ratio: 21 / 9; }
.cam .scene {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.45), transparent 40%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 4px);
}
.cam .person {
  position: absolute; left: 44%; bottom: 18%; width: 16%; height: 52%;
  border: 2px solid #3ddc97; border-radius: 6px; background: rgba(61,220,151,.08);
}
.cam .car {
  position: absolute; right: 12%; bottom: 14%; width: 26%; height: 26%;
  border: 2px solid #ffb547; border-radius: 6px; background: rgba(255,181,71,.07);
}
.badge {
  position: absolute; top: 8px; left: 8px; font-size: .68rem; font-weight: 700;
  letter-spacing: .04em; padding: 3px 7px; border-radius: 6px;
  background: rgba(0,0,0,.55); color: #fff;
}
.badge.rec { background: var(--rec); }
.badge.tag { top: auto; bottom: 8px; left: 8px; background: rgba(0,0,0,.55); color: #3ddc97; }
.badge.tag-warn { top: auto; bottom: 8px; left: 8px; background: rgba(0,0,0,.55); color: #ffb547; }
.cam .name {
  position: absolute; right: 8px; top: 8px; font-size: .68rem;
  background: rgba(0,0,0,.55); color: #fff; padding: 3px 7px; border-radius: 6px;
}
.cam .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--rec); margin-right: 5px; vertical-align: middle; }

/* Cards and grids */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.card .icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; margin-bottom: 14px; color: #fff; font-weight: 700;
}
.card p:last-child { margin-bottom: 0; }

.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.rev > :first-child { order: 2; } }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.pill-list li {
  margin: 0; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: .9rem;
}

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

/* Pricing */
.price-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .price-grid { grid-template-columns: 1fr 1fr 1fr; } }
.price {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column;
}
.price.best { border: 2px solid var(--accent); position: relative; }
.price .tag-best {
  position: absolute; top: -12px; left: 20px; background: var(--grad); color: #fff;
  font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.price .amount { font-size: 2.2rem; font-weight: 800; margin: 6px 0 4px; }
.price .amount small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.price ul { margin-top: 14px; }
.price .btn { margin-top: auto; }
.fine { font-size: .88rem; color: var(--muted); margin-top: 16px; }

/* Download */
.download { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .download { grid-template-columns: 1fr 1fr; } }

/* FAQ */
details.faq {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 18px; margin-bottom: 10px;
}
details.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq > div { padding: 0 0 16px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; background: var(--bg-2); }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text); }
.copy { margin-top: 28px; font-size: .88rem; color: var(--muted); }

/* Legal pages */
.doc { padding: 48px 16px 56px; max-width: 760px; }
.doc h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.doc h2 { font-size: 1.35rem; margin-top: 36px; }
.doc .updated { color: var(--muted); font-size: .92rem; margin-bottom: 28px; }
.doc table { min-width: 0; }
.todo { background: var(--surface-2); border: 1px dashed var(--warn); border-radius: 10px; padding: 10px 14px; color: var(--warn); font-size: .92rem; }

.notfound { padding: 96px 16px; text-align: center; }
.notfound .code { font-size: 5rem; font-weight: 800; }

@media (min-width: 760px) {
  .nav-check { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Utilities (replace inline styles; the CSP forbids style attributes) */
.mt-8 { margin-top: 8px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mt-32 { margin-top: 32px; }
.mt-56 { margin-top: 56px; }
.my-32 { margin: 32px 0; }
.lead-center { margin: 0 auto 24px; }
.note { font-weight: 500; font-size: .85rem; }
.cam .dot.on-rec { background: #fff; }
.split > * { min-width: 0; }
.card table { min-width: 0; }
@media (max-width: 420px) {
  th, td { padding: 10px 8px; }
  table.compare { font-size: .85rem; }
  table.compare th, table.compare td { padding: 10px 6px; }
}

/* Account portal */
[hidden] { display: none !important; }
.portal { padding: 32px 16px 56px; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.stat { font-size: 2rem; font-weight: 800; margin: 4px 0 12px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
label { font-weight: 600; }
input[type=email], input[type=text], input[type=number], select {
  min-height: 44px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg-2); color: var(--text); font: inherit;
}
.msg { min-height: 1.4em; }
.msg.error { color: var(--rec); }
.msg.ok { color: var(--ok); }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn-danger { background: var(--rec); color: #fff; }
dialog {
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius); max-width: min(92vw, 480px); padding: 20px;
}
dialog::backdrop { background: rgb(0 0 0 / .5); }
.google-btn { background: #fff; color: #1f2937; border: 1px solid #d5deeb; }
.plan-options { display: grid; gap: 12px; border: 0; padding: 0; margin: 0 0 16px; }
.plan-options label {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1px solid var(--line); border-radius: 10px; font-weight: 500;
}
@media (min-width: 640px) {
  .plan-options { grid-template-columns: 1fr 1fr; }
}
