/* NuKey Auto site styles. Shared by index, support and privacy pages. */

:root {
    --violet: #62539A;
    --lilac: #CFBCFF;
    --night: #16121F;
    --night-2: #221C30;
    --ink: #241F33;
    --muted: #5E5873;
    --paper: #F7F5FB;
    --surface: #FFFFFF;
    --line: #E3DDF0;
    --link: #5B4A9E;
    --radius-lg: 28px;
    --radius-sm: 12px;
    --wrap: 1120px;
    --display: 'Poppins', system-ui, sans-serif;
    --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #ECE7F7;
        --muted: #B3ABC8;
        --paper: #121019;
        --surface: #1C1826;
        --line: #2E2840;
        --link: #CFBCFF;
    }
}

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

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

body {
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}

a { color: var(--link); }
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 3px solid var(--lilac);
    outline-offset: 3px;
    border-radius: 6px;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }

code {
    font-size: 0.9em;
    background: var(--line);
    padding: 1px 6px;
    border-radius: 6px;
    overflow-wrap: anywhere;
}

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

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--night) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.1rem;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 20px; margin-left: auto; list-style: none; }
.nav-links a { color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--lilac); color: #21183D; }
.btn-primary:hover { background: #DCCEFF; }
.btn-outline { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45); }
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.btn-small { padding: 8px 14px; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero: the car dashboard at night */
.hero {
    background: radial-gradient(120% 90% at 85% 10%, #3A2E5E 0%, var(--night-2) 45%, var(--night) 100%);
    color: #fff;
    padding: 72px 0 88px;
}
.hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 56px;
    align-items: center;
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.hero .lede { font-size: 1.2rem; color: rgba(255, 255, 255, 0.82); max-width: 34ch; margin-bottom: 32px; }

.dash { display: flex; flex-direction: column; gap: 16px; }
.dash-screen {
    border-radius: var(--radius-lg);
    padding: 14px;
    background: #0B0910;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 80px rgba(0, 0, 0, 0.55);
}
.dash-screen img { display: block; width: 100%; height: auto; border-radius: 16px; }
.states { display: flex; flex-wrap: wrap; gap: 8px; }
.states button {
    font: inherit;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
}
.states button[aria-pressed="true"] { background: var(--lilac); border-color: var(--lilac); color: #21183D; }

/* Sections */
.section { padding: 88px 0; }
.section-head { max-width: 60ch; margin-bottom: 40px; }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 1.1rem; }

/* Phone gallery */
.phones {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}
.phones figure { margin: 0; }
.phones img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 24px;
    background: var(--night);
    box-shadow: 0 16px 40px rgba(22, 18, 31, 0.18);
}
.phones figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--muted); }

/* Features: plain columns, no cards */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.features h3 { margin-bottom: 8px; }
.features p { color: var(--muted); }
.features svg { width: 28px; height: 28px; color: var(--violet); margin-bottom: 14px; }
@media (prefers-color-scheme: dark) { .features svg { color: var(--lilac); } }

/* Setup steps: a real sequence, so numbered */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.steps li { counter-increment: step; }
.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--violet);
    color: #fff;
    font-family: var(--display);
    font-weight: 600;
    margin-bottom: 14px;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); }
.more { margin-top: 32px; }

/* Open source band */
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.band h3 { font-size: 1.4rem; margin-bottom: 10px; }
.band p { color: var(--muted); margin-bottom: 20px; max-width: 46ch; }
.band .btn-primary { background: var(--violet); color: #fff; }
.band .btn-primary:hover { background: #4F4282; }

/* Footer */
.footer { background: var(--night); color: rgba(255, 255, 255, 0.7); padding: 56px 0 40px; font-size: 0.95rem; }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer h2 { font-size: 1rem; color: #fff; margin-bottom: 12px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .legal { margin-top: 40px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); }

/* Text pages (support, privacy) */
.page-head { background: var(--night); color: #fff; padding: 56px 0 48px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
.page-head p { color: rgba(255, 255, 255, 0.75); margin-top: 8px; }
.prose { max-width: 720px; margin: 0 auto; padding: 56px 24px 80px; }
.prose h2 { font-size: 1.5rem; margin: 48px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-bottom: 6px; }
.prose p + p { margin-top: 12px; }
.prose .note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; margin-bottom: 12px; }
.prose ol { padding-left: 1.4em; display: grid; gap: 16px; }
.prose ol li::marker { font-family: var(--display); font-weight: 600; color: var(--violet); }
details { border-bottom: 1px solid var(--line); }
details summary {
    cursor: pointer;
    padding: 16px 0;
    font-family: var(--display);
    font-weight: 600;
    list-style-position: outside;
}
details[open] summary { color: var(--link); }
details p { padding: 0 0 18px; color: var(--muted); }
.contact { margin-top: 56px; }
.contact .btn-primary { background: var(--violet); color: #fff; margin-top: 16px; }

/* Responsive */
@media (max-width: 900px) {
    .hero .wrap, .band .wrap { grid-template-columns: 1fr; gap: 40px; }
    .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .features, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer .cols { grid-template-columns: 1fr 1fr; }
    .footer .cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .nav-links li:not(:last-child) { display: none; }
    .hero { padding: 48px 0 64px; }
    .section { padding: 64px 0; }
    .features, .steps { grid-template-columns: 1fr; gap: 28px; }
    .phones { gap: 16px; }
    .wrap, .prose { padding-left: 16px; padding-right: 16px; }
}
