/* Vendor landing pages styles (/cameras/<vendor>/ et al).
 *
 * Standalone stylesheet - vendor pages do NOT load the main app CSS bundle
 * (175KB with maplibre / chart / player styles) to keep first paint fast
 * on landing pages indexed by search engines. Brand tokens are duplicated
 * here from src/styles/tokens.css; when the design system changes, this
 * file needs a manual sync (low frequency, acceptable cost).
 *
 * Dark-mode default (per CLAUDE.md product convention). prefers-color-scheme
 * light override gives bone palette. No explicit toggle UI on vendor pages -
 * the user can switch theme on the main app, and we follow OS otherwise.
 */

:root {
    /* Brand core - mirrored from src/styles/tokens.css */
    --vp-black: #000000;
    --vp-bone: #f5f4f1;
    --vp-orange: #ff9000;
    --vp-orange-hot: #ffa31a;

    --vp-ash-1: #1a1a1a;
    --vp-ash-2: #222222;
    --vp-ash-3: #2a2a2a;
    --vp-ash-4: #3a3a3a;
    --vp-ash-6: #8a8a8a;

    --vp-stone-1: #eceae3;
    --vp-stone-2: #dcd8cd;
    --vp-stone-3: #bdb7a6;
    --vp-stone-5: #2d2a23;

    /* Dark default semantic surfaces */
    --bg: var(--vp-black);
    --bg-elev: var(--vp-ash-1);
    --bg-card: var(--vp-ash-2);
    --fg: #ffffff;
    --fg-dim: var(--vp-ash-6);
    --border: var(--vp-ash-3);
    --border-strong: var(--vp-ash-4);
    --accent: var(--vp-orange);
    --accent-hot: var(--vp-orange-hot);

    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: var(--vp-bone);
        --bg-elev: #ffffff;
        --bg-card: #ffffff;
        --fg: #0e0e0e;
        --fg-dim: #6f6a5c;
        --border: var(--vp-stone-2);
        --border-strong: var(--vp-stone-3);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    /* Prevent horizontal scroll from edge-cases. */
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    color: var(--accent-hot);
    text-decoration: underline;
}

/* ----- Header ----- */
.vp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elev);
}

.vp-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--fg);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.vp-brand:hover {
    color: var(--fg);
    text-decoration: none;
}
.vp-brand-icon {
    width: 22px;
    height: 22px;
}

.vp-back {
    font-size: 14px;
    color: var(--fg-dim);
}
.vp-back:hover {
    color: var(--accent);
}

/* ----- Main layout ----- */
.vp-main {
    flex: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 56px 32px 80px;
    width: 100%;
}

@media (max-width: 640px) {
    .vp-header {
        padding: 12px 16px;
    }
    .vp-main {
        padding: 32px 16px 48px;
    }
}

/* ----- Hero ----- */
.vp-h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.vp-lead {
    font-size: clamp(16px, 1.8vw, 19px);
    line-height: 1.5;
    color: var(--fg-dim);
    margin-bottom: 28px;
    max-width: 65ch;
}

.vp-cta {
    display: inline-block;
    background: var(--accent);
    color: #000000;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background 120ms;
}
.vp-cta:hover {
    background: var(--accent-hot);
    color: #000000;
    text-decoration: none;
}
.vp-cta--secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    margin-top: 12px;
}
.vp-cta--secondary:hover {
    background: var(--accent);
    color: #000000;
}

/* ----- Sections ----- */
.vp-section {
    margin-top: 48px;
}

.vp-h2 {
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.vp-h3 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-dim);
    margin-bottom: 12px;
}

.vp-section p {
    margin-bottom: 12px;
    max-width: 65ch;
}

/* ----- Models list ----- */
.vp-models {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px;
}
.vp-models li {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    font-family: var(--font-mono);
    color: var(--fg);
}

.vp-note {
    font-size: 14px;
    color: var(--fg-dim);
    font-style: italic;
}

/* ----- Format facts (dl) ----- */
.vp-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px 24px;
    margin: 16px 0;
    font-size: 14px;
}
.vp-facts dt {
    font-weight: 600;
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 12px;
    align-self: center;
}
.vp-facts dd {
    color: var(--fg);
}
.vp-facts code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--border);
}

@media (max-width: 540px) {
    .vp-facts {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }
    .vp-facts dd {
        margin-bottom: 8px;
    }
}

/* ----- Steps ----- */
.vp-steps {
    list-style: none;
    counter-reset: step;
    margin: 12px 0;
}
.vp-steps li {
    counter-increment: step;
    padding: 12px 0 12px 44px;
    position: relative;
    border-bottom: 1px solid var(--border);
}
.vp-steps li:last-child {
    border-bottom: none;
}
.vp-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* ----- FAQ ----- */
.vp-faq {
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
    background: var(--bg-card);
}
.vp-faq summary {
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 600;
    list-style: none;
    user-select: none;
    position: relative;
    padding-right: 40px;
}
.vp-faq summary::-webkit-details-marker {
    display: none;
}
.vp-faq summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
    color: var(--accent);
    font-weight: 400;
}
.vp-faq[open] summary::after {
    content: "−";
}
.vp-faq summary:hover {
    color: var(--accent);
}
.vp-faq p {
    padding: 0 18px 18px;
    color: var(--fg-dim);
    line-height: 1.6;
}

/* ----- Vendor grid (on /cameras/ index page) ----- */
.vp-vendor-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.vp-vendor-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--fg);
    text-decoration: none;
    transition: border-color 120ms, transform 120ms;
}
.vp-vendor-card:hover {
    border-color: var(--accent);
    color: var(--fg);
    text-decoration: none;
    transform: translateY(-1px);
}
.vp-vendor-card-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.vp-vendor-card-hint {
    font-size: 13px;
    color: var(--fg-dim);
    line-height: 1.4;
}

/* ----- Other vendors aside ----- */
.vp-other-vendors {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.vp-other-vendors ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.vp-other-vendors li a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--fg);
    font-size: 14px;
    font-weight: 500;
    transition: border-color 120ms, color 120ms;
}
.vp-other-vendors li a:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* ----- Footer ----- */
.vp-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--border);
    color: var(--fg-dim);
    font-size: 13px;
    text-align: center;
    background: var(--bg-elev);
}
.vp-footer a {
    color: var(--fg-dim);
}
.vp-footer a:hover {
    color: var(--accent);
}
.vp-footer span {
    margin: 0 8px;
}
