/* =====================================================================
   TyeImportXpress, design system
   ---------------------------------------------------------------------
   0. Tokens          5. Cards
   1. Reset & base    6. Sections
   2. Typography      7. Forms & filters
   3. Layout          8. Vehicle detail
   4. Buttons/chrome  9. Footer, utilities, motion
   ===================================================================== */

/* ------------------------------------------------------------------ 0 */
:root {
    /* surfaces, warm-shifted near-blacks, never pure #000 */
    --ink:        #08090c;
    --ink-2:      #0b0d11;
    --surface:    #101319;
    --surface-2:  #161a22;
    --surface-3:  #1d222c;
    --surface-4:  #262c38;

    --line:       rgba(255, 255, 255, .075);
    --line-2:     rgba(255, 255, 255, .13);
    --line-3:     rgba(255, 255, 255, .22);

    --text:       #edeff3;
    --text-2:     #a2a9b6;
    --text-3:     #6d7480;
    --text-4:     #4b515c;

    /* one loud voice, everything else whispers */
    --accent:     #84cc16;
    --accent-lo:  #a3e635;
    --accent-hi:  #65a30d;
    --amber:      #ffb443;
    --jade:       #34d8a0;
    --azure:      #52a8ff;
    --rose:       #ff5d7a;

    --accent-glow: 132 204 22;

    /* The brand green is bright (relative luminance ~.51), so white text on
       it lands around 1.9:1 and is unreadable. Anything sitting ON the
       accent uses this near-black instead, which clears 10:1. */
    --on-accent:  #0c1408;

    /* type */
    --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --f-serif:   'Instrument Serif', Georgia, 'Times New Roman', serif;
    --f-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --f-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

    /* rhythm */
    --gut:     clamp(1.25rem, 4vw, 2.5rem);
    --shell:   1320px;
    --shell-w: min(var(--shell), 100% - var(--gut) * 2);

    --r-sm: 8px;
    --r:    14px;
    --r-lg: 22px;
    --r-xl: 32px;

    /* motion */
    --e-out:   cubic-bezier(.16, 1, .3, 1);
    --e-in-out:cubic-bezier(.65, 0, .35, 1);
    --e-spring:cubic-bezier(.34, 1.56, .64, 1);
    --t-fast: .18s;
    --t:      .34s;
    --t-slow: .7s;

    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow-2: 0 10px 30px -12px rgba(0,0,0,.7);
    --shadow-3: 0 30px 80px -24px rgba(0,0,0,.85);

    --nav-h: 76px;
}

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

* { margin: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
    background: var(--ink);
    color: var(--text);
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.62;
    font-feature-settings: 'cv05' 1, 'ss03' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Film grain. Fixed, additive, very low opacity, it stops the large
   dark fields from banding on cheap panels and gives the page texture. */
body::after {
    content: '';
    position: fixed;
    inset: -50%;
    z-index: 9999;
    pointer-events: none;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 6s steps(6) infinite;
}
@keyframes grain {
    0%,100% { transform: translate(0,0) }
    20%  { transform: translate(-3%, 4%) }
    40%  { transform: translate(2%, -5%) }
    60%  { transform: translate(-4%, -2%) }
    80%  { transform: translate(4%, 3%) }
}

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

/* Loading placeholder, scoped to photographs only.
   This must never be global: it paints a surface behind every image, and
   anything with transparency (logos, badges, icons) shows it straight
   through as a solid box. */
.card-media img,
.gallery-main img,
.thumb img,
.hero-bg img,
.thumb-xs { background: var(--surface-2); }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: var(--on-accent); }

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

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb {
    background: var(--surface-4);
    border-radius: 99px;
    border: 3px solid var(--ink-2);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* ------------------------------------------------------------------ 2 */
h1, h2, h3, h4, h5 {
    font-family: var(--f-display);
    font-weight: 700;
    line-height: .96;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.d1 { font-size: clamp(2.9rem, 8.2vw, 7rem);  font-variation-settings: 'wdth' 112; }
.d2 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); font-variation-settings: 'wdth' 108; }
.d3 { font-size: clamp(1.7rem, 3.4vw, 2.8rem); }
.d4 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); letter-spacing: -.025em; }

/* The one flourish: an italic serif word dropped into a grotesque
   headline. Used sparingly, once per section at most. */
.ital {
    font-family: var(--f-serif);
    font-weight: 400;
    font-style: italic;
    letter-spacing: -.015em;
    font-variation-settings: normal;
    padding-right: .06em;
}
.accent { color: var(--accent); }

.eyebrow {
    font-family: var(--f-mono);
    font-size: .695rem;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: .7rem;
}
.eyebrow::before {
    content: '';
    width: 26px;
    height: 1px;
    background: var(--accent);
    flex: none;
}
.eyebrow.is-center { justify-content: center; }

.lede {
    font-size: clamp(1rem, 1.25vw, 1.135rem);
    color: var(--text-2);
    max-width: 62ch;
    line-height: 1.65;
    text-wrap: pretty;
}

.mono {
    font-family: var(--f-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ 3 */
.shell { width: var(--shell-w); margin-inline: auto; }
.shell-narrow { width: min(880px, 100% - var(--gut) * 2); margin-inline: auto; }

.section { padding-block: clamp(4.5rem, 9vw, 9rem); position: relative; }
.section-sm { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section + .section { padding-top: 0; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem 3rem;
    flex-wrap: wrap;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-head > div { max-width: 60ch; }
.section-head .d2 { margin-top: 1rem; }
.section-head .lede { margin-top: 1.1rem; }

.rule {
    height: 1px;
    background: linear-gradient(90deg, var(--line-2), transparent);
    border: 0;
}

/* Oversized ghost word bleeding off the section edge. */
.ghost-word {
    position: absolute;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: clamp(7rem, 22vw, 20rem);
    line-height: .8;
    letter-spacing: -.06em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,.035);
    pointer-events: none;
    user-select: none;
    z-index: 0;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ 4 */
.btn {
    --btn-bg: var(--accent);
    --btn-fg: var(--on-accent);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .95rem 1.6rem;
    border-radius: 99px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--f-display);
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .005em;
    white-space: nowrap;
    isolation: isolate;
    overflow: hidden;
    transition: transform var(--t) var(--e-out),
                box-shadow var(--t) var(--e-out),
                background var(--t) var(--e-out);
    will-change: transform;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%),
                rgba(255,255,255,.25), transparent 65%);
    opacity: 0;
    transition: opacity var(--t) var(--e-out);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -10px rgba(var(--accent-glow) / .65);
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(0) scale(.985); }

.btn svg { width: 17px; height: 17px; flex: none; }
.btn-arrow svg { transition: transform var(--t) var(--e-out); }
.btn:hover .btn-arrow svg,
.btn:hover > svg:last-child { transform: translateX(4px); }

.btn-ghost {
    --btn-bg: transparent;
    --btn-fg: var(--text);
    border: 1px solid var(--line-2);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover {
    border-color: var(--line-3);
    background: rgba(255,255,255,.045);
    box-shadow: none;
}

.btn-light { --btn-bg: var(--text); --btn-fg: var(--ink); }
.btn-light:hover { box-shadow: 0 12px 28px -12px rgba(255,255,255,.35); }

.btn-sm { padding: .62rem 1.1rem; font-size: .8rem; }
.btn-lg { padding: 1.12rem 2rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* Text link with a rule that draws itself in. */
.link-u {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-family: var(--f-display);
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    padding-bottom: 3px;
}
.link-u::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--t) var(--e-out);
}
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }
.link-u svg { width: 15px; height: 15px; transition: transform var(--t) var(--e-out); }
.link-u:hover svg { transform: translateX(3px); }

/* --- pills / badges --------------------------------------------------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .34rem .72rem;
    border-radius: 99px;
    font-family: var(--f-mono);
    font-size: .655rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    border: 1px solid var(--line-2);
    color: var(--text-2);
    background: rgba(255,255,255,.03);
    backdrop-filter: blur(6px);
    white-space: nowrap;
}
.pill-dot { width: 5px; height: 5px; border-radius: 99px; background: currentColor; flex: none; }

.pill-local  { color: var(--jade);  border-color: color-mix(in srgb, var(--jade) 34%, transparent);  background: color-mix(in srgb, var(--jade) 9%, transparent); }
.pill-import { color: var(--azure); border-color: color-mix(in srgb, var(--azure) 34%, transparent); background: color-mix(in srgb, var(--azure) 9%, transparent); }
.pill-hot    { color: var(--accent);border-color: color-mix(in srgb, var(--accent) 38%, transparent);background: color-mix(in srgb, var(--accent) 11%, transparent); }
.pill-amber  { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 34%, transparent); background: color-mix(in srgb, var(--amber) 9%, transparent); }
.pill-solid  { background: var(--accent); color: var(--on-accent); border-color: transparent; }

.pill-live .pill-dot { animation: pulse-dot 2s var(--e-in-out) infinite; }
@keyframes pulse-dot {
    0%,100% { box-shadow: 0 0 0 0 currentColor; opacity: 1 }
    70%     { box-shadow: 0 0 0 5px transparent; opacity: .75 }
}

/* ------------------------------------------------------------- header */
.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 900;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    transition: height var(--t) var(--e-out), background var(--t), border-color var(--t);
    border-bottom: 1px solid transparent;
}
.nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--ink) 78%, transparent);
    backdrop-filter: blur(18px) saturate(1.5);
    opacity: 0;
    transition: opacity var(--t) var(--e-out);
}
.nav.is-stuck { --nav-h: 64px; border-bottom-color: var(--line); }
.nav.is-stuck::before { opacity: 1; }
.nav.is-hidden { transform: translateY(-100%); }
.nav { transition: transform .45s var(--e-out), height var(--t) var(--e-out), border-color var(--t); }

.nav-inner {
    position: relative;
    width: var(--shell-w);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--f-display);
    font-weight: 800;
    font-size: 1.06rem;
    letter-spacing: -.045em;
    font-variation-settings: 'wdth' 108;
    flex: none;
}
.brand-mark {
    width: 30px; height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, var(--accent), var(--accent-hi));
    box-shadow: 0 4px 14px -4px rgba(var(--accent-glow) / .7);
    flex: none;
}
.brand-mark svg { width: 17px; height: 17px; }

/* When a real logo file is supplied it replaces the drawn mark. The
   gradient plate is dropped so the artwork sits on its own. */
.brand-mark.is-image {
    background: #fff;
    box-shadow: 0 2px 10px -3px rgba(0, 0, 0, .6);
    overflow: hidden;
    padding: 0;
}
.brand-mark.is-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.brand em { font-style: normal; color: var(--text-3); font-weight: 500; }

.nav-links {
    display: flex;
    align-items: center;
    gap: .15rem;
    margin-left: auto;
    list-style: none;
    padding: 0;
}
.nav-link {
    position: relative;
    padding: .5rem .85rem;
    border-radius: 8px;
    font-size: .865rem;
    font-weight: 500;
    color: var(--text-2);
    transition: color var(--t-fast);
}
.nav-link:hover { color: var(--text); }
.nav-link::after {
    content: '';
    position: absolute;
    left: .85rem; right: .85rem; bottom: .25rem;
    height: 1.5px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t) var(--e-out);
}
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after { transform: scaleX(1); }

.nav-cta { display: flex; align-items: center; gap: .6rem; flex: none; }

.nav-toggle {
    display: none;
    width: 42px; height: 42px;
    border-radius: 10px;
    border: 1px solid var(--line-2);
    place-items: center;
}
.nav-toggle span {
    display: block;
    width: 17px; height: 1.5px;
    background: var(--text);
    transition: transform var(--t) var(--e-out), opacity var(--t-fast);
}
.nav-toggle span + span { margin-top: 4px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* mobile drawer */
.nav-drawer {
    position: fixed;
    inset: var(--nav-h) 0 0;
    z-index: 890;
    background: var(--ink);
    padding: 2rem var(--gut) 3rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t) var(--e-out), transform var(--t) var(--e-out), visibility var(--t);
    overflow-y: auto;
}
.nav-drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.nav-drawer a {
    font-family: var(--f-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -.03em;
    padding: .75rem 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-2);
    transition: color var(--t-fast), padding-left var(--t) var(--e-out);
}
.nav-drawer a:hover, .nav-drawer a.is-active { color: var(--text); padding-left: .5rem; }
.nav-drawer .btn { margin-top: 1.5rem; }

/* ------------------------------------------------------------------ 5 */
/* --- vehicle card ---------------------------------------------------- */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--t) var(--e-out),
                border-color var(--t),
                box-shadow var(--t) var(--e-out);
    will-change: transform;
}
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%),
                rgba(255,255,255,.07), transparent 68%);
    opacity: 0;
    transition: opacity var(--t) var(--e-out);
}
.card:hover {
    transform: translateY(-5px);
    border-color: var(--line-2);
    box-shadow: var(--shadow-3);
}
.card:hover::after { opacity: 1; }

.card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--surface-2);
}
.card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .85s var(--e-out), filter var(--t);
    filter: saturate(.94);
}
.card:hover .card-media img { transform: scale(1.06); filter: saturate(1.06); }

.card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8,9,12,.82) 0%, rgba(8,9,12,.15) 38%, transparent 62%);
}

.card-tags {
    position: absolute;
    inset: .85rem .85rem auto;
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    z-index: 2;
}

.card-body { padding: 1.15rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }

.card-title {
    font-family: var(--f-display);
    font-size: 1.035rem;
    font-weight: 650;
    letter-spacing: -.028em;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--t-fast);
}
.card:hover .card-title { color: var(--accent-lo); }

.card-sub {
    font-family: var(--f-mono);
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-top: .38rem;
}

.card-price { margin-top: .9rem; display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.card-price b {
    font-family: var(--f-display);
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
}
.card-price small { font-family: var(--f-mono); font-size: .66rem; color: var(--text-3); letter-spacing: .06em; }
.card-price .conv { color: var(--text-3); font-size: .78rem; font-variant-numeric: tabular-nums; }

/* spec strip: mono micro-data, the "instrument cluster" detail */
.card-specs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 1rem;
    padding-top: .95rem;
    border-top: 1px solid var(--line);
}
.card-specs div { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.card-specs dt,
.card-specs .k {
    font-family: var(--f-mono);
    font-size: .565rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--text-4);
}
.card-specs dd,
.card-specs .v {
    font-size: .755rem;
    font-weight: 500;
    color: var(--text-2);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.card-link { position: absolute; inset: 0; z-index: 3; }

/* landed-cost teaser on import cards */
.card-landed {
    margin-top: .8rem;
    padding: .6rem .75rem;
    border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--azure) 7%, transparent);
    border: 1px solid color-mix(in srgb, var(--azure) 20%, transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    font-size: .74rem;
}
.card-landed span { color: var(--text-3); font-family: var(--f-mono); font-size: .615rem; letter-spacing: .1em; text-transform: uppercase; }
.card-landed b { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }

/* grid */
.grid-cars {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: clamp(1rem, 1.6vw, 1.4rem);
}
.grid-cars.is-loading { opacity: .4; pointer-events: none; transition: opacity var(--t); }

/* ------------------------------------------------------------------ 6 */
/* --- hero ------------------------------------------------------------ */
.hero {
    position: relative;
    min-height: min(100svh, 940px);
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-h) + clamp(2rem, 6vh, 5rem));
    padding-bottom: clamp(3rem, 7vh, 6rem);
    overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    /* The interest sits in the upper-middle band of the frame; holding the
       crop there keeps the cranes visible at every viewport height. */
    object-position: 62% 46%;
    /* The photograph is already very dark (mean luminance ~22/255), so it
       can run near full strength. Knocking it back the way a bright image
       would need just turns it into mud. */
    opacity: .78;
    filter: saturate(.72) contrast(1.06);
    transform: scale(1.04);
}
/* Darken hard behind the headline (left), let the artwork breathe on the
   right. An even scrim would either wash out the type or hide the art. */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, var(--ink) 4%, rgba(8,9,12,.88) 34%, rgba(8,9,12,.42) 68%, rgba(8,9,12,.58) 100%),
        linear-gradient(to top, var(--ink) 1%, transparent 42%);
}

/* moving light sweep behind the headline */
.hero-glow {
    position: absolute;
    z-index: 0;
    width: 62vw; height: 62vw;
    max-width: 820px; max-height: 820px;
    left: -12%; top: 8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-glow) / .2), transparent 62%);
    filter: blur(60px);
    animation: drift 18s var(--e-in-out) infinite alternate;
    pointer-events: none;
}
@keyframes drift {
    to { transform: translate3d(14%, -8%, 0) scale(1.16); }
}

/* hairline grid, the "engineering drawing" layer */
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, var(--line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--line) 1px, transparent 1px);
    background-size: clamp(60px, 8vw, 110px) clamp(60px, 8vw, 110px);
    mask-image: radial-gradient(90% 70% at 50% 40%, #000 20%, transparent 78%);
    opacity: .55;
}

.hero-inner { position: relative; z-index: 2; width: var(--shell-w); margin-inline: auto; }
/* The headline breaks itself, each .line is block-level, so it needs no
   max-width. (A `ch` cap here would resolve against the 16px container,
   not the display size, and crush the type.) */
.hero-copy { max-width: 100%; }
.hero h1 { margin-top: 1.5rem; }
.hero .lede { margin-top: 1.7rem; max-width: 52ch; }

.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2.2rem; }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2.4rem;
    margin-top: clamp(2.5rem, 5vh, 4rem);
    padding-top: 1.8rem;
    border-top: 1px solid var(--line);
    max-width: 640px;
}
.hero-stats div { display: flex; flex-direction: column; gap: .2rem; }
.hero-stats b {
    font-family: var(--f-display);
    font-size: clamp(1.5rem, 2.6vw, 2.05rem);
    font-weight: 700;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.hero-stats span {
    font-family: var(--f-mono);
    font-size: .625rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-3);
}

.scroll-cue {
    position: absolute;
    left: 50%; bottom: 1.6rem;
    transform: translateX(-50%);
    z-index: 3;
    display: grid;
    place-items: center;
    gap: .55rem;
    font-family: var(--f-mono);
    font-size: .6rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-4);
}
.scroll-cue i {
    display: block;
    width: 1px; height: 38px;
    background: linear-gradient(to bottom, var(--line-3), transparent);
    position: relative;
    overflow: hidden;
}
.scroll-cue i::after {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 12px;
    background: var(--accent);
    animation: cue 2.2s var(--e-in-out) infinite;
}
@keyframes cue {
    0%   { transform: translateY(-14px); opacity: 0 }
    35%  { opacity: 1 }
    100% { transform: translateY(40px); opacity: 0 }
}

/* --- search console -------------------------------------------------- */
.console {
    position: relative;
    z-index: 5;
    margin-top: clamp(-3rem, -4vw, -2rem);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--line-2);
    border-radius: var(--r-xl);
    padding: clamp(1.1rem, 2vw, 1.5rem);
    backdrop-filter: blur(22px) saturate(1.4);
    box-shadow: var(--shadow-3);
}
.console-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}

/* segmented control with a sliding indicator */
.segmented {
    position: relative;
    display: inline-flex;
    padding: 4px;
    border-radius: 99px;
    background: var(--ink-2);
    border: 1px solid var(--line);
    gap: 2px;
}
.segmented::before {
    content: '';
    position: absolute;
    top: 4px; bottom: 4px;
    left: var(--seg-x, 4px);
    width: var(--seg-w, 0px);
    border-radius: 99px;
    background: var(--surface-3);
    border: 1px solid var(--line-2);
    transition: left .42s var(--e-spring), width .42s var(--e-spring);
    z-index: 0;
}
.segmented button, .segmented a {
    position: relative;
    z-index: 1;
    padding: .55rem 1.1rem;
    border-radius: 99px;
    font-family: var(--f-display);
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-3);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: color var(--t-fast);
    white-space: nowrap;
}
.segmented [aria-selected="true"], .segmented .is-active { color: var(--text); }
.segmented .count {
    font-family: var(--f-mono);
    font-size: .625rem;
    padding: .1rem .38rem;
    border-radius: 5px;
    background: rgba(255,255,255,.07);
    color: var(--text-3);
}

.console-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: .6rem;
    align-items: end;
}

.field { display: flex; flex-direction: column; gap: .42rem; min-width: 0; }
.field > label {
    font-family: var(--f-mono);
    font-size: .6rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-4);
    padding-left: .1rem;
}

.input, .select, textarea.input {
    width: 100%;
    padding: .82rem 1rem;
    border-radius: var(--r);
    background: var(--ink-2);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: .88rem;
    transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
    appearance: none;
}
.input::placeholder { color: var(--text-4); }
.input:hover, .select:hover { border-color: var(--line-2); }
.input:focus, .select:focus, textarea.input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(var(--accent-glow) / .12);
}
textarea.input { resize: vertical; min-height: 120px; line-height: 1.6; }

.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d7480' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .85rem center;
    background-size: 15px;
    padding-right: 2.4rem;
    cursor: pointer;
}
.select option { background: var(--surface); color: var(--text); }

.field-error { border-color: color-mix(in srgb, var(--rose) 60%, transparent) !important; }
.error-text { color: var(--rose); font-size: .76rem; margin-top: .3rem; }

/* --- marquee --------------------------------------------------------- */
.marquee {
    position: relative;
    overflow: hidden;
    border-block: 1px solid var(--line);
    padding-block: 1.15rem;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
    display: flex;
    gap: 3.2rem;
    width: max-content;
    animation: marquee 42s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--f-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--text-4);
    transition: color var(--t-fast);
    white-space: nowrap;
}
.marquee-item:hover { color: var(--text); }
.marquee-item i { width: 4px; height: 4px; border-radius: 99px; background: var(--accent); flex: none; }

/* --- split / compare panel ------------------------------------------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
}
.split > div { background: var(--surface); padding: clamp(1.6rem, 3vw, 2.6rem); }
.split-b { background: var(--ink-2) !important; }

.split h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin-top: .9rem; }
.split p { color: var(--text-2); margin-top: .9rem; font-size: .93rem; }

.checklist { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .7rem; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; color: var(--text-2); }
.checklist svg { width: 17px; height: 17px; flex: none; margin-top: 3px; }

/* --- process steps --------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.step {
    counter-increment: step;
    background: var(--ink);
    padding: clamp(1.5rem, 3vw, 2.4rem) max(var(--gut), (100vw - var(--shell)) / 2);
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.2fr);
    gap: clamp(1rem, 3vw, 3rem);
    align-items: start;
    transition: background var(--t);
    position: relative;
}
.step:hover { background: var(--surface); }
.step::before {
    content: counter(step, decimal-leading-zero);
    font-family: var(--f-mono);
    font-size: .8rem;
    letter-spacing: .1em;
    color: var(--accent);
    padding-top: .3rem;
}
.step h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
.step p { color: var(--text-2); font-size: .91rem; }
.step-meta {
    font-family: var(--f-mono);
    font-size: .63rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-4);
    margin-top: .8rem;
    display: flex;
    gap: .5rem;
    align-items: center;
}

/* --- stat band ------------------------------------------------------- */
.stat-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.stat {
    background: var(--surface);
    padding: clamp(1.4rem, 2.5vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: .35rem;
    transition: background var(--t);
}
.stat:hover { background: var(--surface-2); }
.stat b {
    font-family: var(--f-display);
    font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat span { font-family: var(--f-mono); font-size: .625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.stat p { font-size: .82rem; color: var(--text-3); margin-top: .35rem; }

/* --- shop by make ----------------------------------------------------
   Typographic cards rather than manufacturer logos: those marks are
   trademarked, and a wordmark grid in our own type reads as one system
   instead of thirteen competing brand identities. */
.make-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: clamp(.75rem, 1.2vw, 1rem);
}

/* White card.
   The marks are all drawn for a light ground, so putting the whole card
   on white means the artwork sits on the surface it was designed for and
   needs no plate, no filter and no per-brand fiddling. */
.make-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: 1.35rem 1.25rem 1.15rem;
    min-height: 152px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: var(--r-lg);
    background: #fff;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    transition: transform var(--t) var(--e-out),
                box-shadow var(--t) var(--e-out),
                border-color var(--t);
}
.make-card::before {
    /* oversized initial bleeding off the corner */
    content: attr(data-initial);
    position: absolute;
    right: -.18em;
    bottom: -.34em;
    z-index: -1;
    font-family: var(--f-display);
    font-weight: 800;
    font-size: 6.4rem;
    line-height: 1;
    letter-spacing: -.06em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 0, 0, .05);
    transition: -webkit-text-stroke-color var(--t), transform var(--t) var(--e-out);
    pointer-events: none;
}
.make-card:hover {
    transform: translateY(-4px);
    background: #d3d8de;
    border-color: rgba(0, 0, 0, .18);
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .7);
}
.make-card:hover::before {
    -webkit-text-stroke-color: color-mix(in srgb, var(--accent-hi) 26%, transparent);
    transform: translate(-4px, -4px);
}

/* Badge.
   The marks all ship on transparent backgrounds, so they need no plate:
   knocking them back to a single flat tone lets seventeen unrelated brand
   identities sit in one grid without turning it into a colour riot, and
   it matches the restraint of the rest of the page. brightness(0) crushes
   the artwork to black, invert(1) lifts it to white, so the result is the
   same weight whatever the source file looked like. */
/* A disc, not a tile.
   These marks are mid-luminance with internal light/dark detail, so
   flattening them to one tone turns each into a featureless blob, and
   leaving them bare loses the dark ones against the card. They need a
   light ground. A soft off-white disc reads as a badge rather than a
   sticker, and the muted tone stops seventeen white squares punching
   holes in the layout. */
/* Monogram: the default mark.
   Set in the display face at the same optical weight for every make, so
   seventeen cards read as one system instead of seventeen borrowed brand
   identities. The hairline ring and the top highlight give it just enough
   relief to read as a badge plate rather than a letter in a box. */
/* Same white tile as a real badge, so a grid that is part uploaded and
   part not still reads as one set rather than two. */
.make-monogram {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    flex: none;

    font-family: var(--f-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1;
    color: #4b5563;

    background: #f1f3f5;
    border: 1px solid rgba(0, 0, 0, .07);
    transition: color var(--t) var(--e-out),
                background var(--t) var(--e-out),
                transform var(--t) var(--e-out);
}
/* The card goes grey on hover, so the tile has to go white to keep any
   separation, otherwise the two tones merge and the mark floats. */
.make-card:hover .make-monogram {
    color: #2a2f38;
    background: #fff;
    transform: translateY(-2px);
}

/* White tile.
   The supplied marks are drawn on white, so a white tile lets the plate
   and the artwork's own ground merge into one shape instead of showing a
   seam. No filter: these files are clean, and anything applied here would
   only push their brand colours off. */
/* No plate needed now the card itself is white: the mark sits straight on
   the card, which is the ground it was drawn for. */
.make-badge {
    height: 52px;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    flex: none;
}
.make-badge img {
    max-height: 52px;
    max-width: 112px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: left center;
    transition: transform var(--t) var(--e-out);
}
.make-card:hover .make-badge img {
    transform: scale(1.05);
    transform-origin: left center;
}
.make-card:hover .make-badge img {
    opacity: 1;
    transform: scale(1.05);
    transform-origin: left center;
}



/* With a badge present the ghost initial would fight it, so dial it back. */
.make-card.has-logo::before { opacity: .45; }

.make-card h3 {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.15;
    color: #12151b;
}
.make-card .make-counts {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .5rem;
    margin-top: .7rem;
}
.make-card .make-from {
    margin-top: auto;
    padding-top: .9rem;
    font-family: var(--f-mono);
    font-size: .68rem;
    letter-spacing: .06em;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}
.make-card .make-from b { color: #12151b; font-weight: 600; }

.make-tally {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-family: var(--f-mono);
    font-size: .625rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7280;
}
.make-tally i { width: 5px; height: 5px; border-radius: 99px; flex: none; }
.make-tally b { color: #12151b; font-weight: 600; }
/* Darker than the on-dark palette: the light tokens are near-invisible
   against a white card. */
.make-tally.is-local i  { background: #0f9d76; }
.make-tally.is-import i { background: #2563eb; }
.make-tally.is-source i { background: #9ca3af; }
.make-tally.is-source   { color: #9ca3af; }

/* A brand we can source but hold nothing in sits back from the ones with
   real stock, so the grid still leads with what is actually available. */
.make-card:has(.is-source) .make-badge img,
.make-card:has(.is-source) .make-monogram { opacity: .55; }
.make-card:has(.is-source):hover .make-badge img,
.make-card:has(.is-source):hover .make-monogram { opacity: 1; }

/* model chips on a make landing page */
.model-strip { display: flex; flex-wrap: wrap; gap: .5rem; }
.model-chip {
    display: inline-flex;
    align-items: baseline;
    gap: .5rem;
    padding: .55rem .9rem;
    border-radius: 99px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: .85rem;
    color: var(--text-2);
    transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.model-chip:hover { border-color: var(--line-3); color: var(--text); transform: translateY(-2px); }
.model-chip span {
    font-family: var(--f-mono);
    font-size: .64rem;
    color: var(--text-4);
    font-variant-numeric: tabular-nums;
}

/* --- services -------------------------------------------------------- */
/* Exactly three across: there are six services, so a 3-wide grid fills
   two clean rows. auto-fit would give four columns on a wide screen and
   leave a two-cell hole on the second row. */
.svc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
}
@media (max-width: 980px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .svc-grid { grid-template-columns: 1fr; } }
.svc {
    background: var(--surface);
    padding: clamp(1.5rem, 2.6vw, 2.1rem);
    display: flex;
    flex-direction: column;
    gap: .9rem;
    transition: background var(--t);
}
.svc:hover { background: var(--surface-2); }
.svc-icon {
    width: 44px; height: 44px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
    flex: none;
}
.svc-icon svg { width: 21px; height: 21px; color: var(--accent); }
.svc h3 { font-size: 1.1rem; letter-spacing: -.025em; }
.svc p { color: var(--text-3); font-size: .89rem; }

/* --- testimonials ---------------------------------------------------- */
.quotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 1.2rem;
}
.quote {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform var(--t) var(--e-out), border-color var(--t);
}
.quote:hover { transform: translateY(-3px); border-color: var(--line-2); }
.quote blockquote { font-size: .95rem; color: var(--text-2); line-height: 1.7; flex: 1; }
.quote blockquote::before { content: '“'; font-family: var(--f-serif); font-size: 2.6rem; color: var(--accent); line-height: 0; vertical-align: -.35em; margin-right: .1em; }
.quote footer { display: flex; align-items: center; gap: .8rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.avatar {
    width: 40px; height: 40px;
    border-radius: 99px;
    display: grid; place-items: center;
    background: var(--surface-3);
    font-family: var(--f-display);
    font-weight: 700;
    font-size: .88rem;
    color: var(--text-2);
    flex: none;
    object-fit: cover;
}
.quote cite { font-style: normal; font-weight: 600; font-size: .875rem; display: block; }
.quote small { color: var(--text-4); font-size: .72rem; font-family: var(--f-mono); letter-spacing: .05em; }

.stars { display: inline-flex; gap: 2px; color: var(--amber); }
.stars svg { width: 14px; height: 14px; }

/* --- accordion ------------------------------------------------------- */
.acc { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.4rem 0;
    text-align: left;
    font-family: var(--f-display);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--text-2);
    transition: color var(--t-fast);
}
.acc-btn:hover { color: var(--text); }
.acc-item.is-open .acc-btn { color: var(--text); }
.acc-icon {
    position: relative;
    width: 22px; height: 22px;
    flex: none;
    border-radius: 99px;
    border: 1px solid var(--line-2);
    display: grid;
    place-items: center;
    transition: background var(--t), border-color var(--t), transform var(--t) var(--e-out);
}
.acc-icon::before, .acc-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    transition: transform var(--t) var(--e-out), opacity var(--t-fast);
}
.acc-icon::before { width: 9px; height: 1.5px; }
.acc-icon::after  { width: 1.5px; height: 9px; }
.acc-item.is-open .acc-icon { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: rotate(180deg); }
.acc-item.is-open .acc-icon::after { transform: scaleY(0); }

.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--e-out); }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel p { color: var(--text-3); font-size: .92rem; padding-bottom: 1.5rem; max-width: 72ch; }
.acc-panel p + p { padding-top: .8rem; }

/* --- CTA band -------------------------------------------------------- */
.cta {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    padding: clamp(2.5rem, 6vw, 5rem);
    background: linear-gradient(135deg, var(--surface-2), var(--ink-2));
    border: 1px solid var(--line-2);
    text-align: center;
    isolation: isolate;
}
.cta::before {
    content: '';
    position: absolute;
    inset: -40% -10% auto;
    height: 160%;
    z-index: -1;
    background: radial-gradient(ellipse at 50% 0%, rgba(var(--accent-glow) / .22), transparent 62%);
}
.cta .d2 { margin-top: 1rem; }
.cta .lede { margin: 1.2rem auto 0; text-align: center; }
.cta .hero-actions { justify-content: center; }

/* ------------------------------------------------------------------ 7 */
.layout-filters {
    display: grid;
    grid-template-columns: 268px 1fr;
    gap: clamp(1.5rem, 3vw, 2.6rem);
    align-items: start;
}

.filters {
    position: sticky;
    top: calc(var(--nav-h) + 20px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    max-height: calc(100svh - var(--nav-h) - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h2 { font-size: .95rem; letter-spacing: -.02em; }

.fgroup { display: flex; flex-direction: column; gap: .7rem; }
.fgroup > h3 {
    font-family: var(--f-mono);
    font-size: .6rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--text-4);
    font-weight: 500;
}
.fgroup + .fgroup { padding-top: 1.4rem; border-top: 1px solid var(--line); }

.check {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .845rem;
    color: var(--text-2);
    cursor: pointer;
    padding: .18rem 0;
    transition: color var(--t-fast);
}
.check:hover { color: var(--text); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check i {
    width: 17px; height: 17px;
    border-radius: 5px;
    border: 1px solid var(--line-2);
    display: grid;
    place-items: center;
    flex: none;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.check i::after {
    content: '';
    width: 9px; height: 9px;
    background: var(--on-accent);
    clip-path: polygon(14% 45%, 0 60%, 39% 100%, 100% 22%, 85% 8%, 38% 71%);
    transform: scale(0);
    transition: transform var(--t) var(--e-spring);
}
.check input:checked + i { background: var(--accent); border-color: var(--accent); }
.check input:checked + i::after { transform: scale(1); }
.check input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.check .n { margin-left: auto; font-family: var(--f-mono); font-size: .66rem; color: var(--text-4); }

.range-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: center; }
.range-pair span { color: var(--text-4); font-size: .8rem; }

/* toolbar above the grid */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.2rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
}
.toolbar-count { font-family: var(--f-mono); font-size: .76rem; color: var(--text-3); letter-spacing: .04em; }
.toolbar-count b { color: var(--text); font-weight: 600; }
.toolbar-right { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.chips { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .34rem .5rem .34rem .75rem;
    border-radius: 99px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: .76rem;
    color: var(--text-2);
}
.chip button {
    width: 16px; height: 16px;
    border-radius: 99px;
    display: grid;
    place-items: center;
    color: var(--text-4);
    transition: background var(--t-fast), color var(--t-fast);
}
.chip button:hover { background: var(--rose); color: #fff; }
.chip svg { width: 9px; height: 9px; }

/* pagination */
.pager { display: flex; gap: .35rem; justify-content: center; align-items: center; margin-top: 3rem; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 40px; height: 40px;
    padding-inline: .7rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-family: var(--f-mono);
    font-size: .78rem;
    border: 1px solid var(--line);
    color: var(--text-3);
    transition: all var(--t-fast);
}
.pager a:hover { border-color: var(--line-3); color: var(--text); background: var(--surface); }
.pager .is-current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.pager .gap { border: 0; }

/* empty state */
.empty {
    text-align: center;
    padding: clamp(3rem, 8vw, 6rem) 1.5rem;
    border: 1px dashed var(--line-2);
    border-radius: var(--r-xl);
    background: var(--surface);
}
.empty svg { width: 48px; height: 48px; margin: 0 auto 1.2rem; color: var(--text-4); }
.empty h3 { font-size: 1.35rem; }
.empty p { color: var(--text-3); margin-top: .7rem; max-width: 46ch; margin-inline: auto; font-size: .92rem; }

/* ------------------------------------------------------------------ 8 */
.vd-head { padding-top: calc(var(--nav-h) + 2.2rem); }

.crumbs {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--f-mono);
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-4);
    flex-wrap: wrap;
}
.crumbs a { transition: color var(--t-fast); }
.crumbs a:hover { color: var(--accent); }

.vd-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}

.vd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: clamp(1.5rem, 3vw, 2.8rem);
    align-items: start;
    margin-top: 2rem;
}

.gallery { display: flex; flex-direction: column; gap: .7rem; }
.gallery-main {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .g-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .55s var(--e-out), transform .8s var(--e-out);
}
.gallery-main .g-slide.is-active { opacity: 1; transform: none; }

.g-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px; height: 42px;
    border-radius: 99px;
    display: grid;
    place-items: center;
    background: rgba(8,9,12,.62);
    border: 1px solid var(--line-2);
    backdrop-filter: blur(10px);
    color: var(--text);
    z-index: 3;
    transition: background var(--t-fast), transform var(--t-fast);
}
.g-nav:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.g-prev { left: .9rem; }
.g-next { right: .9rem; }
.g-nav svg { width: 17px; height: 17px; }

.g-counter {
    position: absolute;
    right: .9rem; bottom: .9rem;
    z-index: 3;
    font-family: var(--f-mono);
    font-size: .68rem;
    padding: .3rem .6rem;
    border-radius: 7px;
    background: rgba(8,9,12,.72);
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .55rem; }
.thumb {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    opacity: .5;
    transition: opacity var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
    cursor: pointer;
}
.thumb:hover { opacity: .85; transform: translateY(-2px); }
.thumb.is-active { opacity: 1; border-color: var(--accent); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* sticky buy panel */
.buy {
    position: sticky;
    top: calc(var(--nav-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.4rem;
}
.panel-accent { border-color: color-mix(in srgb, var(--accent) 28%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface)); }

.price-big {
    font-family: var(--f-display);
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.price-note { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-top: .5rem; }
/* Keeps the Estimate badge on the price's baseline, and lets it drop
   below on a narrow sidebar rather than squeezing the figure. */
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem; }

.spec-table { display: grid; gap: 0; }
.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .72rem 0;
    border-bottom: 1px solid var(--line);
    font-size: .865rem;
}
.spec-row:last-child { border-bottom: 0; }
.spec-row dt, .spec-row .k { color: var(--text-3); font-size: .8rem; }
.spec-row dd, .spec-row .v { margin: 0; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

/* landed-cost breakdown */
/* Itemised cost table. No public page renders one any more, the breakdown
   is an enquiry now. Kept because the written quote is still itemised and
   this is what an admin-side quote view would be built from. */
.breakdown { display: grid; gap: 0; }
.bd-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: baseline;
    padding: .7rem 0;
    border-bottom: 1px solid var(--line);
    font-size: .87rem;
}
.bd-row .l { color: var(--text-2); display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.bd-row .pct { font-family: var(--f-mono); font-size: .62rem; color: var(--text-4); background: var(--surface-2); padding: .1rem .35rem; border-radius: 4px; }
.bd-row .usd { font-family: var(--f-mono); font-size: .78rem; color: var(--text-4); font-variant-numeric: tabular-nums; text-align: right; min-width: 82px; }
.bd-row .jmd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; min-width: 96px; }
.bd-row.is-sub { background: rgba(255,255,255,.022); margin-inline: -1.4rem; padding-inline: 1.4rem; }
.bd-row.is-sub .l { font-weight: 600; color: var(--text); }
.bd-row.is-total {
    border-bottom: 0;
    padding-top: 1.1rem;
    margin-top: .4rem;
    border-top: 1px solid var(--line-2);
}
.bd-row.is-total .l { font-family: var(--f-display); font-size: 1rem; font-weight: 700; color: var(--text); }
.bd-row.is-total .jmd { font-family: var(--f-display); font-size: 1.32rem; font-weight: 700; letter-spacing: -.035em; color: var(--accent); }

.note {
    display: flex;
    gap: .65rem;
    padding: .85rem 1rem;
    border-radius: var(--r);
    background: color-mix(in srgb, var(--amber) 7%, transparent);
    border: 1px solid color-mix(in srgb, var(--amber) 22%, transparent);
    font-size: .79rem;
    color: var(--text-2);
    line-height: 1.55;
}
.note svg { width: 16px; height: 16px; flex: none; color: var(--amber); margin-top: 2px; }
.note-plain { background: var(--surface-2); border-color: var(--line); }
.note-plain svg { color: var(--text-3); }

/* The counterpart to .checklist: what a price does NOT cover. Marked with
   a dash rather than a cross, which reads as a warning it is not. */
.exclist { display: grid; gap: .55rem; }
.exclist li {
    display: flex;
    gap: .65rem;
    font-size: .88rem;
    color: var(--text-3);
    line-height: 1.5;
}
.exclist li::before {
    content: '';
    flex: none;
    width: 10px;
    height: 1px;
    margin-top: .65rem;
    background: var(--text-4);
}

/* The headline price split into its parts. Two or three rows, the last
   ruled off as the total, so the number can be checked at a glance. */
.price-split { display: grid; gap: 0; }
.price-split > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--line);
    font-size: .86rem;
}
.price-split dt { color: var(--text-3); }
.price-split dd { font-variant-numeric: tabular-nums; color: var(--text-2); }
.price-split .is-total { border-bottom: 0; border-top: 1px solid var(--line-2); padding-top: .6rem; }
.price-split .is-total dt { color: var(--text); font-weight: 600; }
.price-split .is-total dd { color: var(--text); font-weight: 700; }

/* the ask that replaced the line-by-line breakdown on a vehicle page */
.cost-ask {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.1rem;
    padding: 1.2rem 1.3rem;
    border-radius: var(--r);
    background: color-mix(in srgb, var(--accent) 7%, var(--surface-2));
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.cost-ask > div:first-child { flex: 1 1 15rem; }
@media (max-width: 520px) {
    .cost-ask .btn { flex: 1 1 100%; justify-content: center; }
}

/* feature tags */
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
    padding: .34rem .7rem;
    border-radius: 7px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: .78rem;
    color: var(--text-2);
}

/* ------------------------------------------------------------------ 9 */
.footer {
    border-top: 1px solid var(--line);
    background: var(--ink-2);
    margin-top: clamp(4rem, 8vw, 8rem);
    padding-top: clamp(3rem, 6vw, 5rem);
    position: relative;
    overflow: hidden;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: clamp(1.8rem, 4vw, 3.5rem);
    padding-bottom: 3rem;
}
.footer h4 {
    font-family: var(--f-mono);
    font-size: .625rem;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-4);
    margin-bottom: 1.1rem;
}
.footer ul { list-style: none; padding: 0; display: grid; gap: .6rem; }
.footer a { color: var(--text-3); font-size: .875rem; transition: color var(--t-fast), transform var(--t-fast); display: inline-block; }
.footer a:hover { color: var(--text); transform: translateX(3px); }
.footer-about p { color: var(--text-3); font-size: .88rem; max-width: 38ch; margin-top: 1.1rem; }

.socials { display: flex; gap: .5rem; margin-top: 1.4rem; }
.socials a {
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--text-3);
    transition: all var(--t-fast);
}
.socials a:hover { color: var(--text); border-color: var(--line-3); background: var(--surface); transform: translateY(-2px); }
.socials svg { width: 16px; height: 16px; }

.footer-base {
    border-top: 1px solid var(--line);
    padding-block: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .78rem;
    color: var(--text-4);
}
.footer-base a { font-size: .78rem; }

/* Build credit. Set apart from the legal links by a hairline so it does
   not read as another policy page. */
.footer-by {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding-left: 1.2rem;
    border-left: 1px solid var(--line-2);
    color: var(--text-4);
}
.footer-by a {
    color: var(--text-3);
    transition: color var(--t-fast);
}
.footer-by a:hover { color: var(--accent); }

@media (max-width: 560px) {
    .footer-by { padding-left: 0; border-left: 0; width: 100%; }
}

/* giant brand watermark */
.footer-mark {
    font-family: var(--f-display);
    font-weight: 800;
    font-size: clamp(3.6rem, 15vw, 14rem);
    line-height: .78;
    letter-spacing: -.055em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,.055);
    text-align: center;
    user-select: none;
    pointer-events: none;
    margin-bottom: -.12em;
    padding-top: 1rem;
}

/* --- flash toasts ---------------------------------------------------- */
.toasts {
    position: fixed;
    right: 1.1rem; bottom: 1.1rem;
    z-index: 1200;
    display: grid;
    gap: .6rem;
    max-width: min(400px, calc(100vw - 2.2rem));
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .95rem 1.1rem;
    border-radius: var(--r);
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow-3);
    font-size: .865rem;
    animation: toast-in .5s var(--e-spring) both;
    white-space: pre-line;
}
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.toast-success { border-color: color-mix(in srgb, var(--jade) 40%, transparent); }
.toast-success svg { color: var(--jade); }
.toast-error { border-color: color-mix(in srgb, var(--rose) 40%, transparent); }
.toast-error svg { color: var(--rose); }
.toast button { margin-left: auto; color: var(--text-4); flex: none; }
.toast button:hover { color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.97) } }

/* --- scroll reveal ---------------------------------------------------
   Everything here is scoped to .js, which app.js sets on <html> before
   first paint. No JavaScript, or JavaScript that fails, means the
   content is simply visible, rather than permanently transparent. */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .85s var(--e-out), transform .85s var(--e-out);
    transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-reveal="fade"]  { transform: none; }
.js [data-reveal="left"]  { transform: translateX(-26px); }
.js [data-reveal="right"] { transform: translateX(26px); }
.js [data-reveal="scale"] { transform: scale(.96); }

/* headline mask reveal, line by line */
.reveal-lines .line { display: block; overflow: hidden; }
.js .reveal-lines .line > span {
    display: block;
    transform: translateY(105%);
    transition: transform 1.05s var(--e-out);
    transition-delay: var(--d, 0ms);
}
.js .reveal-lines.is-in .line > span { transform: none; }

/* progress bar at the very top of the viewport */
.progress {
    position: fixed;
    inset: 0 0 auto;
    height: 2px;
    z-index: 1000;
    background: var(--accent);
    transform-origin: left;
    transform: scaleX(var(--p, 0));
    pointer-events: none;
}

/* --- utilities ------------------------------------------------------- */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.stack   { display: grid; gap: var(--gap, 1rem); }
.row     { display: flex; align-items: center; gap: var(--gap, .75rem); flex-wrap: wrap; }
.row-end { margin-left: auto; }
.center  { text-align: center; }
.muted   { color: var(--text-3); }
.mt-1 { margin-top: .5rem } .mt-2 { margin-top: 1rem } .mt-3 { margin-top: 1.5rem }
.mt-4 { margin-top: 2rem }  .mt-5 { margin-top: 3rem }
.hide { display: none !important; }

/* ------------------------------------------------------- responsive */
@media (max-width: 1100px) {
    .console-form { grid-template-columns: repeat(2, 1fr); }
    .console-form .field:last-of-type, .console-form > .btn { grid-column: 1 / -1; }
    .vd-layout { grid-template-columns: 1fr; }
    .buy { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
    .nav-links { display: none; }
    .nav-toggle { display: grid; }
    .nav-cta .btn-hide-sm { display: none; }

    /* The header CTA is wider than the space left once the brand is in,
       and it was pushing the hamburger off the right edge entirely: the
       button rendered, just outside the viewport. Both actions live in
       the drawer, so drop it here. */
    .nav-cta .btn-nav-cta { display: none; }

    /* Let the brand shrink rather than force the row to overflow. */
    .nav-inner { gap: 1rem; }
    .brand { min-width: 0; overflow: hidden; }
    .nav-cta { margin-left: auto; }
    .layout-filters { grid-template-columns: 1fr; }
    .filters {
        position: fixed;
        inset: 0;
        z-index: 950;
        max-height: none;
        border-radius: 0;
        transform: translateY(100%);
        transition: transform .45s var(--e-out);
        padding-top: 1.5rem;
    }
    .filters.is-open { transform: none; }
    .split { grid-template-columns: 1fr; }
    .step { grid-template-columns: 54px 1fr; }
    .step > :last-child { grid-column: 2; }
}

@media (max-width: 640px) {
    :root { --nav-h: 64px; }
    .hero-copy { max-width: 100%; }
    .hero-stats { gap: 1.5rem 2rem; }
    .console-form { grid-template-columns: 1fr; }
    .grid-cars { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
    .card-specs { grid-template-columns: repeat(2, 1fr); gap: .8rem 1rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .bd-row { grid-template-columns: 1fr auto; }
    .bd-row .usd { display: none; }
    .toasts { right: .7rem; left: .7rem; bottom: .7rem; max-width: none; }
}

/* --------------------------------------------------- motion & themes */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    [data-reveal] { opacity: 1 !important; transform: none !important; }
    .reveal-lines .line > span { transform: none !important; }
    body::after { animation: none; }
}

@media print {
    .nav, .footer, .toasts, .scroll-cue, .progress, .buy .btn { display: none !important; }
    body { background: #fff; color: #000; }
    body::after { display: none; }
    .card, .panel { border-color: #ccc; break-inside: avoid; }
}
