/* AI CarScan — one palette with the App Store media
   (marketing/app-store/video/src/theme.ts): night navy, the app's accent blue. */

:root {
    --bg: #03050A;
    --bg2: #071022;
    --navy: #0A2342;
    --ink: #F4F7FC;
    --ink2: rgba(226, 234, 255, 0.70);
    --ink3: rgba(226, 234, 255, 0.6);
    --line: rgba(150, 185, 255, 0.14);
    --blue: #4F8EF7;
    --blue-deep: #2B6CD8;
    --cyan: #6FD3FF;
    --glow: #8FBDFF;
    --amber: #FF9F0A;
    --green: #30D158;
    --surface: rgba(20, 30, 52, 0.55);

    --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

    --wrap: 1120px;
    --gutter: 20px;
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--text);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--glow); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.narrow { max-width: 760px; }

/* ─── Type ─────────────────────────────────────────────────────────────── */

h1, h2, h3 { font-family: var(--display); margin: 0; color: var(--ink); }
h1 { font-size: clamp(48px, 8vw, 88px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; }
h2 { font-size: clamp(34px, 5vw, 56px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; }
h3 { font-size: 22px; font-weight: 650; letter-spacing: -0.015em; }
h1 em, h2 em {
    font-style: normal;
    color: var(--blue);
    text-shadow: 0 0 40px rgba(79, 142, 247, 0.35);
}

.eyebrow {
    margin: 0 0 16px;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--glow);
}
.eyebrow-amber { color: var(--amber); }
.tm { font-size: 0.32em; font-weight: 500; vertical-align: super; margin-left: 0.08em; color: var(--ink3); text-shadow: none; }
.eyebrow-green { color: var(--green); }

.lede { font-size: 20px; color: var(--ink2); max-width: 34em; margin: 24px 0 0; }
.section-lede { font-size: 19px; color: var(--ink2); max-width: 40em; margin: 20px 0 0; }

/* ─── Buttons ──────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 26px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--blue), var(--blue-deep));
    color: #fff;
    font-family: var(--display);
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
    box-shadow: 0 10px 30px -8px rgba(79, 142, 247, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -8px rgba(79, 142, 247, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn-small { padding: 9px 18px; font-size: 15px; box-shadow: none; }

/* ─── Nav ──────────────────────────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(3, 5, 10, 0.72);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.brand b { color: var(--blue); font-weight: 800; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--ink2); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }

/* ─── Hero ─────────────────────────────────────────────────────────────── */

.hero { position: relative; padding: 72px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 36px; }
.cta-note { color: var(--ink3); font-size: 14px; }

.glow { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.glow-a { width: 720px; height: 720px; right: -160px; top: -120px; background: radial-gradient(circle, rgba(43, 108, 216, 0.38), transparent 65%); }
.glow-b { width: 900px; height: 500px; left: 50%; top: 10%; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(43, 108, 216, 0.3), transparent 65%); }

.hero-phone { position: relative; justify-self: center; width: min(340px, 100%); }
.score-card {
    position: absolute;
    right: -56px;
    top: 44%;
    width: 168px;
    padding: 18px 0 16px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(20, 32, 60, 0.92), rgba(8, 14, 28, 0.94));
    border: 1px solid var(--line);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 60px -10px rgba(79, 142, 247, 0.35);
    text-align: center;
}
.score-card svg { margin: 0 auto; }
.score-num { position: absolute; left: 0; right: 0; top: 54px; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.03em; }
.score-num span { display: block; font-size: 13px; font-weight: 500; color: var(--ink3); letter-spacing: 0; margin-top: 4px; }
.score-label { margin-top: -6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink2); }

.pulse-divider { width: min(1200px, calc(100% - 2 * var(--gutter))); margin: 72px auto 0; opacity: 0.5; }

/* ─── Phone frame ──────────────────────────────────────────────────────── */

.phone {
    margin: 0;
    padding: 9px;
    border-radius: 52px;
    background: linear-gradient(160deg, #2a3242, #0c1018 40%, #1b2230);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 120px -40px rgba(79, 142, 247, 0.5);
}
.phone img { border-radius: 43px; width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover; background: #121212; }

/* ─── Sections ─────────────────────────────────────────────────────────── */

.section { position: relative; padding: 112px 0; }
.section + .section { border-top: 1px solid var(--line); }

.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.step-n { display: block; font-family: var(--mono); color: var(--blue); font-size: 14px; letter-spacing: 0.1em; margin-bottom: 18px; }
.steps p { color: var(--ink2); margin: 10px 0 0; font-size: 16px; }

.feature { display: grid; grid-template-columns: 1fr 300px; gap: 72px; align-items: center; justify-content: center; max-width: 920px; margin: 0 auto; }
.feature + .feature { margin-top: 120px; }
.feature-flip { grid-template-columns: 300px 1fr; }
.feature-flip .phone { order: -1; }
.feature-copy p:not(.eyebrow) { color: var(--ink2); font-size: 18px; margin: 20px 0 0; max-width: 30em; }

/* The film's backdrop is the page's own night navy, so it sits on the page
   unframed; the mask feathers its edges into the background. */
.film-video {
    width: 100%;
    margin-top: 32px;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%);
    mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%);
}

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.plan { padding: 30px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.plan-pro { border-color: rgba(79, 142, 247, 0.55); box-shadow: 0 0 0 1px rgba(79, 142, 247, 0.25), 0 30px 80px -40px rgba(79, 142, 247, 0.6); }
.price { font-family: var(--display); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; margin: 10px 0 18px; }
.price span { font-size: 16px; font-weight: 500; color: var(--ink3); letter-spacing: 0; }
.plan ul { list-style: none; margin: 0; padding: 0; }
.plan li { position: relative; padding-left: 26px; color: var(--ink2); font-size: 16px; }
.plan li + li { margin-top: 10px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 12px; height: 6px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: translateY(-50%) rotate(-45deg); }
.fine { color: var(--ink3); font-size: 14px; margin: 28px 0 0; max-width: 52em; }

details { border-bottom: 1px solid var(--line); }
details:first-of-type { margin-top: 40px; border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 22px 36px 22px 0; position: relative; font-family: var(--display); font-weight: 600; font-size: 19px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--blue); font-size: 24px; font-weight: 400; transition: transform 0.2s ease; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { color: var(--ink2); margin: 0 0 22px; max-width: 42em; }

.final { text-align: center; overflow: hidden; }
.final .wrap { display: flex; flex-direction: column; align-items: center; }
.final-logo { width: min(420px, 80%); margin-bottom: 48px; }
.final .btn { margin-top: 36px; }

.footer { border-top: 1px solid var(--line); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer .brand { font-size: 16px; }
.footer nav { display: flex; gap: 24px; }
.footer nav a { color: var(--ink2); text-decoration: none; font-size: 15px; }
.footer nav a:hover { color: var(--ink); }
.footer p { margin: 0 0 0 auto; color: var(--ink3); font-size: 13px; }

/* ─── Long-form pages (privacy, terms, support) ───────────────────────── */

.prose { color: var(--ink2); }
.prose h1 { font-size: clamp(38px, 6vw, 56px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 20px; }
.prose h2 { font-size: 24px; letter-spacing: -0.02em; margin: 8px 0 14px; }
.prose h3 { font-size: 18px; margin: 28px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.table-scroll { overflow-x: auto; margin: 0 0 16px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 600; background: var(--surface); }

/* ─── Small screens ────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-inner .btn { margin-left: auto; }
    .hero { padding-top: 48px; }
    .hero-grid { grid-template-columns: 1fr; gap: 56px; }
    .hero-phone { width: min(280px, 72vw); }
    .score-card { right: -28px; width: 140px; transform: scale(0.85); transform-origin: right center; }
    .steps, .plans { grid-template-columns: 1fr; }
    .section { padding: 80px 0; }
    .feature, .feature-flip { grid-template-columns: 1fr; gap: 40px; }
    .feature .phone, .feature-flip .phone { order: 0; width: min(260px, 70vw); justify-self: center; }
    .feature + .feature { margin-top: 88px; }
    .footer p { margin-left: 0; width: 100%; }
}

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