/*
 * Site design for every public page, the server-rendered ones (cart, checkout, order
 * confirmation, ECU shipping instructions, legal, 404) included; only the admin keeps the old
 * look. Loaded after styles.css on pages with <body class="theme">. Rules are scoped to .theme
 * so they win over the shared styles; responsive grid changes live in the media queries at the end.
 */

.theme {
    --ink: #0b0b0c;
    --ink-2: #111113;
    --ink-3: #19191c;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f3f2ee;
    --text-2: #b4b3ae;
    --text-3: #7f7e79;
    --gold-hover: #e3c45f;
    /* Shared components on this page (vehicle dialog, results, contact form) take Inter too */
    --font-heading: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --wrap: 1320px;
    --gutter: clamp(20px, 4vw, 48px);
    --section: clamp(96px, 11vw, 168px);
    background: var(--ink);
    color: var(--text);
    font-weight: 400;
}

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

/* --- Type --- */
.theme .kicker {
    margin: 0 0 18px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

.theme .sec-head {
    max-width: 1000px;
    margin-bottom: clamp(48px, 6vw, 72px);
}

.theme .sec-head h2,
.theme .mailin-copy h2 {
    margin: 0;
    font-size: clamp(2.25rem, 4.6vw, 4rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.035em;
    color: var(--text);
}

.theme .sec-intro {
    margin: 0;
    max-width: 46ch;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text-2);
}

.theme .sec-head .sec-intro {
    max-width: 60ch;
    margin-top: 20px;
}

.theme .muted {
    color: var(--text-2);
}

/* Subtler scroll reveal than the shared one */
.theme .reveal {
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.theme .reveal.visible {
    opacity: 1;
    transform: none;
}

/* --- Buttons and links --- */
.theme .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 26px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0;
    border-radius: 2px;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.theme .btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.theme .btn:hover svg {
    transform: translateX(3px);
}

.theme .btn-primary {
    color: var(--ink);
    background: var(--gold);
}

.theme .btn-primary:hover {
    background: var(--gold-hover);
}

.theme .btn-ghost {
    color: var(--text);
    background: rgba(11, 11, 12, 0.3);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.theme .btn-ghost:hover {
    box-shadow: inset 0 0 0 1px #fff;
}

.theme .link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--line-strong);
    transition: color 0.2s, border-color 0.2s;
}

.theme .link-arrow::after {
    content: '\2192';
    transition: transform 0.2s;
}

.theme .link-arrow:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.theme .link-arrow:hover::after {
    transform: translateX(3px);
}

/* --- Navigation --- */
.theme .navbar {
    padding: 22px 0;
}

.theme .navbar.scrolled {
    padding: 14px 0;
    background: rgba(11, 11, 12, 0.82);
    border-bottom: 1px solid var(--line);
}

.theme .nav-container {
    max-width: var(--wrap);
    padding: 0 var(--gutter);
}

/* Logo: the trimmed file (no transparent margin) at a larger size; a little smaller once scrolled */
.theme .nav-logo-img {
    height: 54px;
    transition: height 0.3s ease, opacity 0.3s ease;
}

.theme .navbar.scrolled .nav-logo-img {
    height: 46px;
}

.theme .nav-links a {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
    color: rgba(243, 242, 238, 0.82);
}

.theme .nav-links a:hover {
    color: #fff;
}

/* --- Hero --- */
.theme .hero {
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 100vh;
    min-height: 100svh;
    padding: 140px 0 136px;
    background-position: center 45%;
}

.theme .hero-overlay {
    background:
        linear-gradient(180deg, rgba(11, 11, 12, 0.6) 0%, rgba(11, 11, 12, 0) 24%, rgba(11, 11, 12, 0) 45%, rgba(11, 11, 12, 0.9) 100%),
        linear-gradient(90deg, rgba(11, 11, 12, 0.8) 0%, rgba(11, 11, 12, 0.45) 45%, rgba(11, 11, 12, 0) 75%);
}

.theme .hero-content {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
    text-align: left;
}

.theme .hero-title {
    max-width: none;
    margin: 0 0 28px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.5rem, 5.6vw, 5.5rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.045em;
    color: var(--text);
}

.theme .hero-title span {
    display: block;
    color: rgba(243, 242, 238, 0.66);
}

.theme .hero-lede {
    max-width: 54ch;
    margin: 0 0 36px;
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(243, 242, 238, 0.8);
}

.theme .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Phone-only background clip (see initAutoVideos in app.js); fades in over the photo once playing */
.theme .hero-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.theme .hero-video.is-playing {
    opacity: 1;
}

.theme .hero-video.is-playing ~ .hero-overlay {
    background: linear-gradient(180deg, rgba(11, 11, 12, 0.5) 0%, rgba(11, 11, 12, 0.35) 40%, rgba(11, 11, 12, 0.92) 100%);
}

/* Brand strip along the foot of the hero: two identical groups scroll for a seamless loop */
.theme .brand-marquee {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    overflow: hidden;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.theme .brand-marquee-track {
    display: flex;
    width: max-content;
    animation: home-marquee 60s linear infinite;
}

.theme .brand-marquee:hover .brand-marquee-track {
    animation-play-state: paused;
}

.theme .brand-marquee-group {
    display: flex;
    flex-shrink: 0;
}

.theme .brand-marquee-group span {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(243, 242, 238, 0.5);
}

.theme .brand-marquee-group span::after {
    content: '';
    width: 16px;
    height: 1px;
    background: var(--gold);
    opacity: 0.7;
}

@keyframes home-marquee {
    to { transform: translateX(-50%); }
}

/* --- Sound buttons on clips --- */
.theme .sound-toggle {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--text);
    background: rgba(11, 11, 12, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.theme .sound-toggle::before {
    content: '';
    width: 20px;
    height: 20px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M11 5 6 9H2v6h4l5 4V5z%22/%3E%3Cpath d=%22M22 9l-6 6M16 9l6 6%22/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M11 5 6 9H2v6h4l5 4V5z%22/%3E%3Cpath d=%22M22 9l-6 6M16 9l6 6%22/%3E%3C/svg%3E") center / contain no-repeat;
}

.theme .sound-toggle[aria-pressed="true"] {
    color: var(--ink);
    background: var(--gold);
    border-color: var(--gold);
}

.theme .sound-toggle[aria-pressed="true"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M11 5 6 9H2v6h4l5 4V5z%22/%3E%3Cpath d=%22M15.5 8.5a5 5 0 0 1 0 7%22/%3E%3Cpath d=%22M19 5a10 10 0 0 1 0 14%22/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M11 5 6 9H2v6h4l5 4V5z%22/%3E%3Cpath d=%22M15.5 8.5a5 5 0 0 1 0 7%22/%3E%3Cpath d=%22M19 5a10 10 0 0 1 0 14%22/%3E%3C/svg%3E");
}

.theme .sound-toggle:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* The hero's button shows only on phones, where its clip plays */
.theme .hero-sound {
    display: none;
    top: calc(96px + env(safe-area-inset-top, 0px));
    right: var(--gutter);
    bottom: auto;
    z-index: 4;
}

.theme .hero-sound.is-ready {
    display: grid;
}

.theme .media-frame {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: var(--ink-3);
    border-radius: 2px;
}

.theme .media-frame video,
.theme .media-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Key facts --- */
.theme .facts {
    background: var(--ink);
    border-bottom: 1px solid var(--line);
}

.theme .facts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.theme .fact {
    padding: 48px 32px;
    border-left: 1px solid var(--line);
}

.theme .fact:first-child {
    padding-left: 0;
    border-left: 0;
}

.theme .fact-value {
    margin: 0 0 12px;
    font-size: clamp(2.5rem, 4.4vw, 3.75rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--text);
}

.theme .fact-label {
    max-width: 26ch;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-2);
}

/* --- Sections --- */
.theme .tuning-section,
.theme .builds-section,
.theme .mailin-section,
.theme .reel-section,
.theme .brands-section,
.theme .stages-section,
.theme .why-section,
.theme .process-section,
.theme .contact-section,
.theme .gallery-section,
.theme .faq-section {
    padding: var(--section) 0;
    background: var(--ink);
}

.theme .builds-section,
.theme .reel-section,
.theme .why-section,
.theme .gallery-section,
.theme .contact-section {
    background: var(--ink-2);
}

/* Homepage: the vehicle selector follows straight on from the hero */
.theme.home .tuning-section {
    padding-top: clamp(56px, 6vw, 88px);
}

/* The shared contact section ends every page; a rule separates it from whatever comes before */
.theme .contact-section {
    border-top: 1px solid var(--line);
}

.theme .tuning-section::before,
.theme .why-section::before,
.theme .why-section::after {
    display: none;
}

/* Vehicle selector (shared component; colours only, layout stays responsive from styles.css) */
.theme .brand-grid {
    background: var(--line);
    border-color: var(--line);
    margin-bottom: 0;
}

.theme .results-panel.active {
    margin-top: 48px;
}

.theme .brand-tile {
    background: var(--ink);
}

.theme .brand-tile:hover,
.theme .brand-tile:focus-visible {
    background: var(--ink-3);
}

.theme .brand-tile img {
    opacity: 0.7;
}

.theme .brand-tile-other-title {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
}

.theme .results-inner {
    background: var(--ink-2);
    border-color: var(--line);
}

.theme .results-inner::before {
    height: 1px;
    background: var(--gold);
}

.theme .vm-submit,
.theme .add-to-cart-btn {
    background: var(--gold);
    border-radius: 2px;
}

/* Results: flat colours instead of gradients; gains in gold */
.theme .vehicle-name {
    letter-spacing: 0.04em;
}

.theme .factory-bar {
    background: #3a3a3e;
}

.theme .stage1-bar {
    background: rgba(212, 175, 55, 0.55);
}

.theme .stage2-bar {
    background: var(--gold);
}

.theme .gain-badge {
    color: var(--gold);
}

.theme .price-badge {
    color: var(--text);
    background: none;
    padding: 0 8px;
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.theme .stage-option {
    border-color: var(--line-strong);
    border-radius: 2px;
}

.theme .stage-option.active {
    background: rgba(212, 175, 55, 0.06);
}

.theme .book-btn {
    border-radius: 2px;
}

/* Cart confirmations under "Add to cart" */
.theme .purchase-msg {
    justify-content: flex-start;
    gap: 14px 20px;
    padding: 16px 18px;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-left: 2px solid var(--gold);
    border-radius: 2px;
}

.theme .purchase-msg-error {
    border-left-color: #ef4444;
}

.theme .purchase-msg p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.theme .purchase-msg .book-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 22px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ink);
    background: var(--gold);
    border: 0;
}

.theme .purchase-msg .book-btn:hover {
    background: var(--gold-hover);
}

.theme .purchase-msg .purchase-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-2);
    text-underline-offset: 4px;
}

.theme .purchase-msg .purchase-link:hover {
    color: var(--text);
}

/* --- Long-form copy: one readable column with subheadings --- */
.theme .article,
.theme .prose {
    max-width: 70ch;
}

.theme .article h3,
.theme .prose h3,
.theme .cards-title {
    margin: 0 0 14px;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.theme .article h3:not(:first-child) {
    margin-top: 48px;
}

.theme .article p,
.theme .prose p {
    margin: 0 0 1.1em;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-2);
}

.theme .prose a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.6);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.theme .prose a:hover {
    color: var(--gold);
    text-decoration-color: var(--gold);
}

.theme .prose {
    margin: 0 0 40px;
}

.theme .cards-title {
    margin: 0 0 20px;
    font-size: 1rem;
}

/* Explainer: the article beside its catalog figures (2 x 2, held in view on wide screens) */
.theme .explainer {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(48px, 6vw, 96px);
    align-items: start;
}

.theme .explainer-figures {
    position: sticky;
    top: 110px;
}

.theme .explainer .build-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme .explainer .build-card {
    min-height: 0;
    padding: 24px 22px 22px;
}

.theme .explainer .build-logo {
    top: 22px;
    right: 18px;
    height: 44px;
}

.theme .explainer .build-hp {
    margin: 32px 0 8px;
    font-size: clamp(2.5rem, 3.4vw, 3.25rem);
}

.theme .explainer .build-from {
    font-size: 0.82rem;
}

.theme .explainer .build-bar {
    margin-bottom: 20px;
}

/* --- Popular tunes --- */
.theme .build-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.theme .build-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    padding: 32px 28px 28px;
    background: var(--ink-2);
    transition: background-color 0.3s;
}

.theme .build-card:hover {
    background: var(--ink-3);
}

.theme .build-logo {
    position: absolute;
    top: 28px;
    right: 24px;
    width: auto;
    height: 72px;
    max-width: 45%;
    object-fit: contain;
    opacity: 0.12;
    pointer-events: none;
}

.theme .build-car {
    margin: 0 0 auto;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

.theme .build-car span {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .build-hp {
    margin: 56px 0 12px;
    font-size: clamp(3.5rem, 5.4vw, 5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--text);
}

.theme .build-hp small {
    margin-left: 6px;
    font-size: 0.32em;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-2);
}

.theme .build-from {
    margin: 0 0 20px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-2);
}

.theme .build-gain {
    margin-right: 6px;
    font-weight: 600;
    color: var(--gold);
}

/* Factory share in grey, the tune's gain in gold */
.theme .build-bar {
    height: 3px;
    margin-bottom: 28px;
    background: linear-gradient(90deg, var(--text-3) 0 var(--factory, 75%), var(--gold) var(--factory, 75%) 100%);
}

.theme .build-card .link-arrow {
    align-self: flex-start;
}

/* --- Mail-in --- */
.theme .mailin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(48px, 7vw, 112px);
    align-items: start;
}

.theme .mailin-media {
    position: sticky;
    top: 120px;
}

.theme .mailin-media .media-frame {
    aspect-ratio: 4 / 3;
}

.theme .mailin-copy .sec-intro {
    margin-top: 24px;
}

.theme .mailin-steps {
    margin: 48px 0 40px;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.theme .mailin-step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 16px;
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
}

.theme .step-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--gold);
}

.theme .mailin-step .step-num {
    grid-row: span 2;
    padding-top: 4px;
}

.theme .mailin-step h3,
.theme .addon h3,
.theme .why-item h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
}

.theme .mailin-step p,
.theme .addon p,
.theme .why-item p {
    margin: 0;
    font-size: 0.975rem;
    line-height: 1.65;
    color: var(--text-2);
}

/* --- Driver's-seat clips (3:4, shown at their own shape) --- */
.theme .reel-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.theme .reel-item {
    aspect-ratio: 3 / 4;
}

.theme .reel-item::after {
    content: '';
    position: absolute;
    inset: 60% 0 0;
    background: linear-gradient(180deg, transparent, rgba(11, 11, 12, 0.75));
    pointer-events: none;
}

.theme .reel-item figcaption {
    position: absolute;
    left: 20px;
    bottom: 28px;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
}

/* --- Brands --- */
.theme .brands-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}

.theme .brands-media {
    position: sticky;
    top: 110px;
}

.theme .brands-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 2px;
}

.theme .brand-list {
    border-top: 1px solid var(--line-strong);
}

.theme .brand-row {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 10px 32px;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.theme .brand-row-title {
    grid-row: span 2;
    margin: 0;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.theme .brand-row-title a {
    color: inherit;
    transition: color 0.2s;
}

.theme .brand-row-title a:hover {
    color: var(--gold);
}

.theme .brand-row-models {
    margin: 0;
    font-size: 0.975rem;
    line-height: 1.6;
    color: var(--text-2);
}

.theme .brand-row-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.theme .brand-row-links a {
    color: var(--gold);
    transition: color 0.2s;
}

.theme .brand-row-links a::after {
    content: ' \2192';
}

.theme .brand-row-links a:hover {
    color: var(--text);
}

/* --- Stages, over a darkened shop photo --- */
.theme .stages-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.theme .stages-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, var(--ink) 0%, rgba(11, 11, 12, 0.62) 30%, rgba(11, 11, 12, 0.62) 70%, var(--ink) 100%);
}

.theme .section-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.theme .section-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.theme .stage-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--line-strong);
}

.theme .stage-block {
    padding: 48px 56px 56px 0;
}

.theme .stage-block + .stage-block {
    padding: 48px 0 56px 56px;
    border-left: 1px solid var(--line-strong);
}

.theme .stage-block h3 {
    margin: 0 0 20px;
    font-size: clamp(3rem, 6vw, 5.25rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: var(--text);
}

.theme .stage-block p:not(.kicker) {
    max-width: 44ch;
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text-2);
}

.theme .addon-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 40px;
    margin-bottom: 48px;
    border-top: 1px solid var(--line-strong);
}

.theme .addon {
    padding-top: 32px;
}

/* --- Why us and process (existing copy, open layout) --- */
.theme .why-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 32px;
}

.theme .why-item {
    padding-top: 28px;
    border-top: 1px solid var(--line-strong);
}

.theme .why-item .step-num {
    display: block;
    margin-bottom: 40px;
}

.theme .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 64px;
    margin-top: 0;
}

.theme .process-step,
.theme .process-step:hover {
    padding: 32px 0 48px;
    background: none;
    border: 0;
    border-top: 1px solid var(--line-strong);
    border-radius: 0;
    transform: none;
}

.theme .process-number {
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--gold);
}

.theme .process-title {
    margin: 0 0 16px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--text);
}

.theme .process-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-2);
}

/* --- Contact --- */
.theme .contact-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .contact-value {
    font-size: 1.0625rem;
}

.theme .form-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

.theme .form-group input,
.theme .form-group textarea {
    background: var(--ink);
    border-color: var(--line-strong);
    border-radius: 2px;
}

.theme .submit-btn {
    min-height: 52px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    background: var(--gold);
    border-radius: 2px;
}

.theme .submit-btn:hover {
    background: var(--gold-hover);
    box-shadow: none;
    transform: none;
}

/* --- FAQ --- */
.theme .faq-layout {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}

.theme .faq-head {
    display: block;
    position: sticky;
    top: 120px;
    margin: 0;
}

.theme .faq-head .sec-intro {
    justify-self: start;
    margin-top: 20px;
}

.theme .faq-list {
    max-width: none;
    margin: 0;
    gap: 0;
    border-top: 1px solid var(--line-strong);
}

.theme .faq-item,
.theme .faq-item[open] {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

.theme .faq-q {
    padding: 26px 0;
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--text);
}

.theme .faq-a {
    max-width: 64ch;
    padding: 0 0 28px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-2);
}

.theme .faq-a a {
    color: var(--gold);
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
}

/* --- Footer and small controls --- */
.theme .footer {
    background: var(--ink);
    border-top: 1px solid var(--line);
}

.theme .footer .container {
    max-width: var(--wrap);
    padding: 0 var(--gutter);
}

.theme .back-to-top {
    color: var(--text);
    background: rgba(11, 11, 12, 0.8);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
}

/* In-page links land below the fixed nav */
html {
    scroll-padding-top: 96px;
}

.theme .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Nav: Tuning dropdown (hover or the chevron on desktop; expands in place in the phone menu) --- */
.theme .nav-links {
    align-items: center;
}

.theme .nav-links a[aria-current="page"] {
    color: var(--gold);
}

.theme .nav-has-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
}

.theme .nav-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    color: rgba(243, 242, 238, 0.7);
    background: none;
    border: 0;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
}

.theme .nav-menu-toggle svg {
    width: 16px;
    height: 16px;
}

.theme .nav-has-menu:hover .nav-menu-toggle,
.theme .nav-has-menu.is-open .nav-menu-toggle {
    color: #fff;
    transform: rotate(180deg);
}

.theme .nav-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: -24px;
    z-index: 20;
    width: 440px;
    padding: 24px 24px 18px;
    background: rgba(17, 17, 19, 0.97);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s, transform 0.18s, visibility 0s 0.18s;
}

/* Keeps the menu open while the pointer crosses the gap below the link */
.theme .nav-menu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -18px;
    height: 18px;
}

.theme .nav-has-menu:hover .nav-menu,
.theme .nav-has-menu:focus-within .nav-menu,
.theme .nav-has-menu.is-open .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.18s, transform 0.18s;
}

.theme .nav-menu-label {
    margin: 0 0 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .nav-menu-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.theme .nav-menu a {
    display: block;
    padding: 7px 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-2);
}

.theme .nav-menu a:hover {
    color: var(--gold);
}

.theme .nav-menu a::after {
    display: none;
}

.theme .nav-menu .nav-menu-all {
    padding-top: 14px;
    font-weight: 600;
    color: var(--text);
    border-top: 1px solid var(--line);
}

/* --- Inner-page header --- */
.theme .page-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 100vh;
    min-height: 100svh;
    padding: 160px 0 88px;
    overflow: hidden;
    background: var(--ink);
}

.theme .page-hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.theme .page-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 62%;
}

.theme .page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(11, 11, 12, 0.6) 0%, rgba(11, 11, 12, 0.12) 30%, rgba(11, 11, 12, 0.15) 60%, rgba(11, 11, 12, 0.9) 100%),
        linear-gradient(90deg, rgba(11, 11, 12, 0.82) 0%, rgba(11, 11, 12, 0.45) 40%, rgba(11, 11, 12, 0) 75%);
}

.theme .page-hero-content {
    width: 100%;
}

.theme .page-hero h1 {
    max-width: 16ch;
    margin: 0 0 24px;
    font-size: clamp(2.5rem, 5.4vw, 5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--text);
}

.theme .breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .breadcrumb li + li::before {
    content: '/';
    margin-right: 10px;
}

.theme .breadcrumb a {
    color: var(--text-2);
}

.theme .breadcrumb a:hover {
    color: var(--gold);
}

.theme .breadcrumb [aria-current] {
    color: var(--gold);
}

/* --- Tuning page sections --- */
.theme .hub-brands-section,
.theme .compare-section,
.theme .order-section {
    padding: var(--section) 0;
}

.theme .hub-brands-section,
.theme.tuning-page .faq-section {
    background: var(--ink-2);
}

.theme .compare-section,
.theme .order-section {
    background: var(--ink);
}

.theme .hub-brands {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.theme .hub-brand {
    display: flex;
    flex-direction: column;
    padding: 32px 28px 28px;
    background: var(--ink-2);
    scroll-margin-top: 110px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.theme .hub-brand:hover {
    background: var(--ink-3);
}

.theme .hub-brand:target {
    background: var(--ink-3);
    box-shadow: inset 0 0 0 1px var(--gold);
}

.theme .hub-brand-other {
    justify-content: flex-end;
    background: var(--ink);
}

.theme .hub-brand-other p {
    flex: 0 0 auto;
}

.theme .hub-brand-photo {
    display: block;
    margin: -32px -28px 24px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--ink-3);
}

.theme .hub-brand-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.theme .hub-brand:hover .hub-brand-photo img {
    transform: scale(1.04);
}

.theme .hub-brand-logo {
    width: auto;
    height: 48px;
    max-width: 150px;
    margin-bottom: 28px;
    object-fit: contain;
    object-position: left center;
    opacity: 0.8;
}

.theme .hub-brand h3 {
    margin: 0 0 10px;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.theme .hub-brand p {
    flex: 1;
    margin: 0 0 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-2);
}

.theme .hub-brand .hub-brand-links {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.theme .hub-brand-links a {
    color: var(--gold);
    transition: color 0.2s;
}

.theme .hub-brand-links a::after {
    content: ' \2192';
}

.theme .hub-brand-links a:hover {
    color: var(--text);
}

/* Comparison tables */
.theme .table-wrap {
    overflow-x: auto;
    border-top: 1px solid var(--line-strong);
}

.theme .compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.theme .compare-table th,
.theme .compare-table td {
    padding: 20px 24px 20px 0;
    text-align: left;
    vertical-align: top;
    line-height: 1.55;
    border-bottom: 1px solid var(--line);
}

.theme .compare-table td {
    color: var(--text-2);
}

.theme .compare-table thead th {
    padding-top: 28px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.theme .compare-table tbody th,
.theme .addons-table thead th {
    width: 28%;
    padding-top: 23px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .addons-table {
    min-width: 680px;
}

.theme .addons-table thead th {
    width: auto;
}

.theme .addons-table tbody th {
    width: 18%;
    padding-top: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--text);
}

.theme .table-title {
    margin: 72px 0 16px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.theme .table-note {
    max-width: 72ch;
    margin: 24px 0 0;
    font-size: 0.975rem;
    line-height: 1.65;
    color: var(--text-2);
}

.theme .table-note a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.6);
    text-underline-offset: 4px;
}

/* Ordering steps */
.theme .order-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 32px;
    margin: 0 0 40px;
    padding: 0;
    list-style: none;
}

.theme .order-steps li {
    padding-top: 28px;
    border-top: 1px solid var(--line-strong);
}

.theme .order-steps .step-num {
    display: block;
    margin-bottom: 32px;
}

.theme .order-steps h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
}

.theme .order-steps p {
    margin: 0;
    font-size: 0.975rem;
    line-height: 1.65;
    color: var(--text-2);
}

.theme .order-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    margin: 0;
}

/* Closing call to action */
.theme .cta-band {
    padding: clamp(72px, 9vw, 120px) 0;
    background: var(--ink);
    border-top: 1px solid var(--line);
}

.theme .cta-band-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 32px 64px;
}

.theme .cta-band h2 {
    margin: 0 0 12px;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}

.theme .cta-band p {
    max-width: 52ch;
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text-2);
}

/* --- Brand article pages --- */
.theme .brand-hero h1 {
    max-width: 14ch;
}

/* A phone clip in a page header sits with the photo, under the shade */
.theme .page-hero .hero-video {
    z-index: -2;
}

/* Header with a clip panel beside the text (larger screens only) */
.theme .has-panel {
    background: radial-gradient(ellipse at 75% 40%, rgba(212, 175, 55, 0.08), transparent 60%), var(--ink);
}

.theme .page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: 64px;
    align-items: end;
}

.theme .page-hero-panel {
    aspect-ratio: 3 / 4;
    margin: 0;
}

/* Header with only the brand mark */
.theme .is-logo {
    background: radial-gradient(ellipse at 78% 45%, rgba(212, 175, 55, 0.07), transparent 55%), var(--ink);
}

.theme .page-hero-logo {
    position: absolute;
    top: 50%;
    right: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + 48px));
    z-index: -1;
    width: auto;
    height: min(60vh, 520px);
    opacity: 0.08;
    transform: translateY(-42%);
    pointer-events: none;
}

/* Article layout: text column beside a sticky contents list and order card */
.theme .article-wrap {
    padding: var(--section) 0;
    background: var(--ink);
}

.theme .article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(48px, 7vw, 112px);
    align-items: start;
}

.theme .article-body {
    max-width: 72ch;
}

.theme .article-lead {
    margin: 0 0 64px;
    font-size: clamp(1.2rem, 1.6vw, 1.4rem);
    line-height: 1.6;
    letter-spacing: -0.01em;
    color: var(--text);
}

.theme .article-section {
    scroll-margin-top: 110px;
}

.theme .article-section + .article-section {
    margin-top: 64px;
}

.theme .article-section h2 {
    margin: 0 0 18px;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--text);
}

.theme .article-section p {
    margin: 0 0 1.15em;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-2);
}

.theme .article-section [data-hp-ref] {
    font-weight: 600;
    color: var(--text);
}

.theme .article-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.theme .article-list li {
    position: relative;
    padding: 16px 0 16px 28px;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-2);
    border-bottom: 1px solid var(--line);
}

.theme .article-list li::before {
    content: '+';
    position: absolute;
    top: 15px;
    left: 0;
    font-family: var(--font-mono);
    color: var(--gold);
}

.theme .article-list strong {
    font-weight: 600;
    color: var(--text);
}

/* Clips inside the article */
.theme .article-figure {
    margin: 36px 0 8px;
}

.theme .article-figure.is-portrait {
    max-width: 380px;
}

/* Photos inside the article */
.theme .article-figure.is-photo img,
.theme .is-photo-pair img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
}

.theme .article-figure.is-photo.is-portrait {
    max-width: 460px;
}

.theme .is-photo-pair img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.theme .figure-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.theme .figure-pair .media-frame {
    aspect-ratio: 3 / 4;
}

.theme .figure-pair .media-frame::after {
    content: '';
    position: absolute;
    inset: 60% 0 0;
    background: linear-gradient(180deg, transparent, rgba(11, 11, 12, 0.7));
    pointer-events: none;
}

.theme .frame-label {
    position: absolute;
    left: 16px;
    bottom: 26px;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
}

.theme .article-figure figcaption {
    margin-top: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-3);
}

/* Sidebar */
.theme .article-aside {
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.theme .toc-title {
    margin: 0 0 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 1px solid var(--line);
}

.theme .toc a {
    display: block;
    margin-left: -1px;
    padding: 6px 0 6px 16px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-2);
    border-left: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.theme .toc a:hover,
.theme .toc a.is-active {
    color: var(--text);
    border-left-color: var(--gold);
}

.theme .aside-card {
    padding: 24px;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 2px;
}

.theme .aside-card .kicker {
    margin-bottom: 10px;
}

.theme .aside-title {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
}

.theme .aside-card p:not(.kicker):not(.aside-title) {
    margin: 0 0 18px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-2);
}

.theme .aside-card .btn {
    width: 100%;
}

/* Order online */
.theme .order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: -16px 0 64px;
}

.theme .build-cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Other brands */
.theme .more-brands-section {
    padding: var(--section) 0;
    background: var(--ink-2);
}

.theme .more-brands {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.theme .more-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px 24px;
    background: var(--ink-2);
    transition: background-color 0.3s;
}

.theme .more-brand:hover {
    background: var(--ink-3);
}

.theme .more-brand-name {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
}

.theme .more-brand-name::after {
    content: ' \2192';
    color: var(--gold);
}

.theme .more-brand-models {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-2);
}

/* --- Gallery page --- */
.theme .gallery-grid-section {
    padding: var(--section) 0;
    background: var(--ink);
}

.theme .g-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.theme .g-chip {
    min-height: 40px;
    padding: 0 18px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-2);
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.theme .g-chip:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.4);
}

.theme .g-chip[aria-pressed="true"] {
    color: var(--ink);
    background: var(--gold);
    border-color: var(--gold);
}

.theme .g-chip:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.theme .g-count {
    margin: 0 0 0 auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* Row-by-row grid (keeps the original carousel first): portrait items span two rows, very wide
   ones two columns; photos fill their tile and open uncropped in the viewer */
.theme .g-grid {
    --g-gap: 16px;
    --g-cols: 3;
    display: grid;
    grid-template-columns: repeat(var(--g-cols), minmax(0, 1fr));
    grid-auto-rows: calc((min(100vw, var(--wrap)) - 2 * var(--gutter) - (var(--g-cols) - 1) * var(--g-gap)) / var(--g-cols) * 0.75);
    grid-auto-flow: dense;
    gap: var(--g-gap);
}

.theme .g-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: var(--ink-3);
    border-radius: 2px;
}

.theme .g-item.is-tall {
    grid-row: span 2;
}

.theme .g-item.is-wide {
    grid-column: span 2;
}

.theme .g-item[hidden] {
    display: none;
}

.theme .g-open {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: zoom-in;
}

.theme .g-open picture {
    display: block;
    width: 100%;
    height: 100%;
}

.theme .g-open img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out, ease);
}

.theme .g-item:hover .g-open img {
    transform: scale(1.035);
}

.theme .g-open:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.theme .g-media {
    position: absolute;
    inset: 0;
}

.theme .g-media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme .g-media .g-open {
    z-index: 1;
}

.theme .g-media .sound-toggle {
    z-index: 3;
}

.theme .g-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    margin: 0;
    padding: 36px 16px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text);
    background: linear-gradient(180deg, transparent, rgba(6, 6, 7, 0.78));
    pointer-events: none;
}

.theme .g-item.is-video figcaption {
    padding-right: 72px;
}

.theme .g-more {
    margin: 40px 0 0;
    color: var(--text-2);
}

.theme .g-more .link-arrow {
    margin-left: 8px;
}

/* Full-screen viewer */
.theme .g-lightbox {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    background: #060607;
    animation: pp-fade 0.2s ease-out both;
}

.theme .g-lightbox[hidden] {
    display: none;
}

body.g-lb-open {
    overflow: hidden;
}

.theme .g-lb-stage {
    grid-column: 2;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.theme .g-lb-media {
    display: flex;
    justify-content: center;
}

.theme .g-lb-media img,
.theme .g-lb-media video {
    display: block;
    max-width: min(100%, 1400px);
    max-height: calc(100vh - 140px);
    max-height: calc(100svh - 140px);
    width: auto;
    height: auto;
    border-radius: 2px;
    background: var(--ink-3);
}

.theme .g-lb-stage figcaption {
    display: flex;
    gap: 16px;
    align-items: baseline;
    color: var(--text);
    font-size: 0.95rem;
}

.theme .g-lb-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-3);
}

.theme .g-lb-btn {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.theme .g-lb-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

.theme .g-lb-btn svg {
    width: 22px;
    height: 22px;
}

.theme .g-lb-close {
    position: absolute;
    top: calc(16px + env(safe-area-inset-top, 0px));
    right: 16px;
}

.theme .g-lb-prev {
    grid-column: 1;
    grid-row: 1;
}

.theme .g-lb-next {
    grid-column: 3;
    grid-row: 1;
}

@media (max-width: 600px) {
    .theme .g-grid {
        --g-gap: 8px;
        --g-cols: 2;
    }
    .theme .g-item figcaption {
        padding: 28px 10px 8px;
        font-size: 0.72rem;
    }
    .theme .g-item.is-video figcaption {
        padding-right: 52px;
    }
    .theme .g-count {
        width: 100%;
        margin: 4px 0 0;
    }
    .theme .g-chip {
        min-height: 36px;
        padding: 0 14px;
    }
    .theme .g-media .sound-toggle {
        right: 8px;
        bottom: 8px;
        width: 36px;
        height: 36px;
    }
    .theme .g-lightbox {
        grid-template-columns: minmax(0, 1fr);
        padding: 0 8px;
    }
    .theme .g-lb-stage {
        grid-column: 1;
    }
    .theme .g-lb-prev,
    .theme .g-lb-next {
        position: absolute;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        grid-column: auto;
    }
    .theme .g-lb-prev {
        left: calc(50% - 64px);
    }
    .theme .g-lb-next {
        right: calc(50% - 64px);
    }
    .theme .g-lb-media img,
    .theme .g-lb-media video {
        max-height: calc(100svh - 200px);
    }
}

/* --- Mail-in page --- */
.theme .ship-section,
.theme .timing-section {
    padding: var(--section) 0;
}

.theme .ship-section {
    background: var(--ink-2);
}

.theme .timing-section {
    background: var(--ink);
}

.theme.mailin-page .compare-section {
    background: var(--ink-2);
}

.theme.mailin-page .faq-section {
    background: var(--ink);
}

.theme .ship-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}

.theme .ship-grid .table-title {
    margin-top: 0;
}

.theme .compare-table.send-table tbody th {
    width: 52%;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
}

.theme .compare-table.send-table thead th {
    padding-top: 20px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .checklist {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line-strong);
}

.theme .checklist li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-2);
    border-bottom: 1px solid var(--line);
}

.theme .checklist svg {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    color: var(--gold);
}

.theme .ship-link,
.theme .mailin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    margin: 32px 0 0;
}

.theme .mailin-step p a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.6);
    text-underline-offset: 4px;
}

/* Timeline bar: shipping (you) → calibration (us) → return (us) */
.theme .ship-timeline {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 4px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.theme .ship-timeline li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px 24px 22px;
    background: var(--ink-3);
    border-top: 3px solid var(--line-strong);
}

.theme .ship-timeline li.is-ours {
    border-top-color: var(--gold);
    background: rgba(212, 175, 55, 0.07);
}

.theme .tl-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .tl-value {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
}

.theme .tl-who {
    font-size: 0.9rem;
    color: var(--text-2);
}

.theme .is-ours .tl-who {
    color: var(--gold);
}

@media (max-width: 900px) {
    .theme .ship-grid,
    .theme .ship-timeline {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* --- FAQ page --- */
.theme .faq-main {
    max-width: 820px;
}

.theme .faq-search {
    position: relative;
    margin-bottom: 16px;
}

.theme .faq-search svg {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 20px;
    height: 20px;
    color: var(--text-3);
    transform: translateY(-50%);
    pointer-events: none;
}

.theme .faq-search input {
    width: 100%;
    min-height: 56px;
    padding: 0 18px 0 52px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text);
    background: var(--ink-2);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
}

.theme .faq-search input::placeholder {
    color: var(--text-3);
}

.theme .faq-search input:focus {
    outline: none;
    border-color: var(--gold);
}

.theme .faq-search-status {
    margin: 0 0 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .faq-group {
    margin-top: 56px;
}

.theme .faq-group[hidden],
.theme .faq-item[hidden] {
    display: none;
}

.theme .faq-group-intro {
    margin: 0 0 20px;
    color: var(--text-2);
}

.theme .faq-main .faq-list {
    max-width: none;
    margin: 0;
    border-top: 1px solid var(--line-strong);
}

.theme .faq-a a {
    color: var(--gold);
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
}

.theme .faq-empty {
    margin-top: 48px;
    padding: 28px;
    color: var(--text-2);
    background: var(--ink-2);
    border: 1px solid var(--line);
}

.theme .faq-empty a {
    color: var(--gold);
}

.theme .aside-card .btn + .btn {
    margin-top: 10px;
}

/* --- Contact page --- */
.theme .contact-cards-section {
    padding: clamp(56px, 7vw, 96px) 0;
    background: var(--ink);
}

.theme .contact-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.theme .contact-card {
    padding: 32px 28px;
    background: var(--ink);
}

.theme .contact-card-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 24px;
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 50%;
}

.theme .contact-card-icon svg {
    width: 20px;
    height: 20px;
}

.theme .contact-card-label {
    margin: 0 0 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .contact-card-value {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}

.theme .contact-card-value a:hover {
    color: var(--gold);
}

.theme .contact-card-note {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-2);
}

.theme .quick-section {
    padding: var(--section) 0;
    background: var(--ink-2);
}

.theme .quick-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.theme .quick-link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px 24px;
    background: var(--ink);
    border: 1px solid var(--line);
    transition: border-color 0.2s, background-color 0.2s;
}

.theme .quick-link:hover {
    background: var(--ink-3);
    border-color: rgba(212, 175, 55, 0.4);
}

.theme .quick-link-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
}

.theme .quick-link-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-2);
}

.theme .quick-link-cta {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gold);
}

@media (max-width: 1024px) {
    .theme .contact-cards,
    .theme .quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .theme .contact-cards,
    .theme .quick-links {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* --- Model pages (/{brand}-tuning/{model}) --- */
.theme .model-hero {
    padding: calc(130px + env(safe-area-inset-top, 0px)) 0 clamp(72px, 8vw, 120px);
    background: var(--ink);
}

/* Desktop: photo and figures on the left (they stay in view), title then options on the right.
   Narrow screens: title, photo and figures, then options. */
.theme .model-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "visual head" "visual buy";
    column-gap: clamp(40px, 5vw, 80px);
}

.theme .model-head {
    grid-area: head;
}

.theme .model-buy {
    grid-area: buy;
}

/* The chosen stage's figures sit over the photo (or the plain panel) */
.theme .model-visual {
    grid-area: visual;
    align-self: start;
    position: sticky;
    top: 100px;
    overflow: hidden;
    background: var(--ink-3);
    border-radius: 2px;
    isolation: isolate;
}

.theme .model-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(11, 11, 12, 0) 50%, rgba(11, 11, 12, 0.6) 70%, rgba(11, 11, 12, 0.94) 100%);
}

.theme .model-photo {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.theme .model-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--pos, 50% 50%);
    animation: pp-settle 2.2s var(--ease-out) both;
}

/* No verified photo of this model: its name, never a stand-in car */
.theme .model-photo-plain {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    padding: clamp(28px, 4vw, 48px);
    background:
        radial-gradient(120% 90% at 85% 0%, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0) 60%),
        repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 1px, rgba(255, 255, 255, 0) 1px 16px),
        var(--ink-3);
}

.theme .model-photo-make {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
}

.theme .model-photo-name {
    font-size: clamp(2.6rem, 5vw, 4.4rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.045em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.55);
}

.theme .model-figures {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    padding: clamp(28px, 3.6vw, 44px);
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.theme .model-figures-label {
    margin: 0 0 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

.theme .model-figures-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0 clamp(24px, 3.5vw, 44px);
}

.theme .model-figures-row[hidden] {
    display: none;
}

.theme .big-figure {
    margin: 0;
    font-size: clamp(3.4rem, 5.6vw, 5.6rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: var(--text);
}

/* Fixed-width digits, so the figures don't shift while they count; gold while they move */
.theme .big-figure span {
    font-variant-numeric: tabular-nums;
    transition: color 0.4s var(--ease-out);
}

.theme .big-figure span.is-counting {
    color: var(--gold);
}

.theme .big-figure small {
    margin-left: 6px;
    font-size: 0.26em;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-2);
}

.theme .model-figures-from {
    margin: 14px 0 0;
    font-size: 0.95rem;
    color: var(--text-2);
}

/* Title and price */
.theme .model-head .breadcrumb ol {
    margin-bottom: 20px;
}

.theme .model-head h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 3.4vw, 3.1rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--text);
}

.theme .model-fits {
    margin: 0 0 20px;
    font-size: 0.95rem;
    color: var(--text-2);
}

.theme .model-price {
    margin: 0 0 32px;
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}

/* Options */
.theme .model-field {
    margin: 0 0 28px;
    padding: 0;
    border: 0;
    min-width: 0;
}

.theme .model-field[hidden] {
    display: none;
}

.theme .model-field legend,
.theme .model-label {
    display: block;
    margin-bottom: 12px;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}

.theme .model-select select {
    height: 52px;
    background: var(--ink);
    border-color: var(--line-strong);
    border-radius: 2px;
}

.theme .model-select select:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.theme .model-select select[aria-invalid="true"] {
    border-color: #ef4444;
}

.theme .model-field .vm-error {
    margin-top: 8px;
}

.theme .stage-cards-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.theme .stage-card,
.theme .addon-check {
    position: relative;
    display: block;
    cursor: pointer;
}

.theme .stage-card input,
.theme .addon-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme .stage-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding: 18px 18px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    transition: border-color 0.2s, background-color 0.2s;
}

.theme .stage-card:hover .stage-card-body {
    border-color: rgba(255, 255, 255, 0.4);
}

.theme .stage-card input:checked + .stage-card-body {
    background: rgba(212, 175, 55, 0.07);
    border-color: var(--gold);
    box-shadow: inset 0 0 0 1px var(--gold);
}

.theme .stage-card input:focus-visible + .stage-card-body,
.theme .addon-check input:focus-visible ~ .addon-check-body {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.theme .stage-card-top,
.theme .addon-check-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 600;
    color: var(--text);
}

.theme .stage-card-name {
    font-size: 1.05rem;
}

.theme .stage-card-text,
.theme .addon-check-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-2);
}

.theme .stage-card-hp {
    margin-top: auto;
    padding-top: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--gold);
}

.theme .stage-card-note {
    font-size: 0.8rem;
    color: var(--gold);
}

/* Factory vs tuned bars for the chosen stage */
.theme .model-perf {
    display: grid;
    gap: 18px;
    margin: 4px 0 30px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.theme .perf-row[hidden] {
    display: none;
}

.theme .perf-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.theme .perf-label {
    font-weight: 600;
    color: var(--text);
}

.theme .perf-gain {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--gold);
}

.theme .perf-track {
    position: relative;
    height: 8px;
    background: var(--ink-3);
    border-radius: 999px;
    overflow: hidden;
}

.theme .perf-tuned,
.theme .perf-factory {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 999px;
    transition: width 1s var(--ease-out);
}

.theme .perf-tuned {
    background: var(--gold);
}

.theme .perf-factory {
    background: #55555b;
}

.theme .perf-note {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-3);
}

.theme .perf-note a,
.theme .spec-note a {
    color: var(--text-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.theme .spec-note {
    max-width: 80ch;
    margin: 20px 0 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-3);
}

.theme .perf-values {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-3);
}

.theme .addon-checks {
    display: grid;
    gap: 10px;
}

.theme .addon-check {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 2px;
    transition: border-color 0.2s, background-color 0.2s;
}

.theme .addon-check:hover {
    border-color: var(--line-strong);
}

.theme .addon-check:has(input:checked) {
    background: rgba(212, 175, 55, 0.06);
    border-color: rgba(212, 175, 55, 0.6);
}

.theme .addon-check-box {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 3px;
    transition: background-color 0.2s, border-color 0.2s;
}

.theme .addon-check input:checked + .addon-check-box {
    background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0b0c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
    border-color: var(--gold);
}

.theme .addon-check-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.theme .addon-check-price {
    color: var(--gold);
}

.theme .model-actions {
    display: grid;
    gap: 10px;
}

.theme .model-actions [hidden] {
    display: none;
}

.theme .model-add {
    width: 100%;
    min-height: 58px;
    gap: 0.3em;
    font-size: 1rem;
    border: 0;
    cursor: pointer;
}

.theme .model-add:disabled {
    opacity: 0.6;
    cursor: wait;
}

.theme .model-assure {
    display: grid;
    gap: 10px;
    margin: 28px 0 0;
    padding: 20px 0 0;
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-2);
    border-top: 1px solid var(--line);
}

.theme .model-assure strong {
    color: var(--text);
    font-weight: 600;
}

/* Sections below the buy box (backgrounds alternate) */
.theme .model-car,
.theme .model-specs,
.theme .model-how {
    padding: var(--section) 0;
}

.theme .model-car,
.theme .model-how,
.theme.model-page .more-brands-section {
    background: var(--ink-2);
}

.theme .model-specs,
.theme.model-page .faq-section {
    background: var(--ink);
}

/* About the car: the write-up, with the key facts beside it */
.theme .model-car-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}

.theme .model-car-text h2 {
    margin: 0 0 24px;
    font-size: clamp(1.9rem, 3.4vw, 2.8rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text);
}

.theme .model-car-text p:not(.kicker) {
    max-width: 64ch;
    margin: 0 0 1.1em;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-2);
}

.theme .model-car-text p:last-child {
    margin: 28px 0 0;
}

.theme .model-facts {
    padding: 28px 28px 12px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 2px;
}

.theme .model-facts h3 {
    margin: 0 0 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

.theme .model-facts dl {
    margin: 0;
}

.theme .model-facts dl div {
    display: grid;
    grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.theme .model-facts dl div:last-child {
    border-bottom: 0;
}

.theme .model-facts dt {
    font-size: 0.9rem;
    color: var(--text-3);
}

.theme .model-facts dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

/* This model on the dyno: continues the About block (same background), the clip beside a short note */
.theme .model-dyno {
    padding: 0 0 var(--section);
    background: var(--ink-2);
}

.theme .model-dyno-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
}

.theme .model-dyno-media {
    aspect-ratio: 4 / 3;
}

.theme .model-dyno-media video {
    object-position: var(--pos, 50% 50%);
}

.theme .model-dyno-text h2 {
    margin: 0 0 20px;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
}

.theme .model-dyno-text p:not(.kicker) {
    max-width: 60ch;
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-2);
}

/* Figures and prices by year */
.theme .spec-table tbody th {
    width: 16%;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
}

.theme .spec-table thead th {
    font-size: 1.1rem;
}

.theme .spec-table .muted {
    color: var(--text-3);
}

/* How it works: four steps in a row */
.theme .model-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.theme .model-steps li {
    padding: 22px 0 0;
    border-top: 1px solid var(--line-strong);
}

.theme .model-steps .step-num {
    display: block;
    margin-bottom: 14px;
}

.theme .model-steps h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.theme .model-steps p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-2);
}

.theme .model-how-more {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    margin: 44px 0 0;
}

/* Other models of the make */
.theme .siblings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 32px;
    background: var(--line);
    border: 1px solid var(--line);
}

.theme .sibling {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    background: var(--ink-2);
    transition: background-color 0.2s;
}

/* Brand pages: every model page of the make. Cards carry their own borders, so a short last row
   leaves no filled gap. */
.theme #models {
    margin-top: clamp(48px, 6vw, 72px);
}

.theme .model-index {
    gap: 0;
    background: none;
    border: 0;
}

.theme .model-index .sibling {
    margin: 0 -1px -1px 0;
    border: 1px solid var(--line);
}

.theme .sibling:hover {
    background: var(--ink-3);
}

.theme .sibling-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.theme .sibling-name::after {
    content: ' \2192';
    color: var(--gold);
}

.theme .sibling-meta {
    font-size: 0.9rem;
    color: var(--text-2);
}

@media (max-width: 1000px) {
    .theme .model-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas: "head" "visual" "buy";
    }
    .theme .model-visual {
        position: relative;
        top: auto;
        margin-bottom: 36px;
    }
    .theme .model-photo {
        aspect-ratio: 16 / 10;
    }
    .theme .model-photo img {
        object-position: var(--pos-wide, var(--pos, 50% 50%));
    }
    .theme .big-figure {
        font-size: clamp(3.4rem, 9vw, 5.6rem);
    }
    .theme .model-price {
        margin-bottom: 28px;
    }
    .theme .model-car-grid,
    .theme .model-dyno-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    /* The clip is 360 px wide: keep it from stretching across a tablet */
    .theme .model-dyno-media {
        max-width: 440px;
    }
    .theme .model-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 32px;
    }
    .theme .siblings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .theme .model-hero {
        padding-top: calc(104px + env(safe-area-inset-top, 0px));
    }
    .theme .model-photo {
        aspect-ratio: 1 / 1;
    }
    .theme .model-photo img {
        object-position: var(--pos, 50% 50%);
    }
    .theme .model-figures {
        padding: 22px 20px 22px;
    }
    .theme .big-figure {
        font-size: 3.2rem;
    }
    .theme .model-facts {
        padding: 22px 20px 6px;
    }
    .theme .stage-cards-row,
    .theme .model-steps,
    .theme .siblings {
        grid-template-columns: minmax(0, 1fr);
    }
    /* A brand's full model list stays two to a row, so 60 models are not 60 screens of scrolling */
    .theme .model-index {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .theme .model-index .sibling {
        gap: 4px;
        padding: 14px 14px 16px;
    }
    .theme .model-index .sibling-name {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    .theme .model-index .sibling-meta {
        font-size: 0.78rem;
    }
    /* The year table becomes one block per year: label on the left, figures on the right */
    .theme .model-specs .table-wrap {
        overflow: visible;
    }
    .theme .spec-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    .theme .spec-table tr {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
    }
    .theme .spec-table tbody th,
    .theme .spec-table td {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
        width: auto;
        padding: 8px 0;
        border: 0;
    }
    .theme .spec-table tbody th {
        display: block;
        font-size: 1.15rem;
    }
    .theme .spec-table td::before {
        content: attr(data-label);
        font-family: var(--font-mono);
        font-size: 0.72rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--text-3);
        padding-top: 4px;
    }
    .theme .purchase-msg .book-btn {
        justify-content: center;
    }
}

/* --- Page-load animation ---
 * The header photo settles from a slight zoom while a dark curtain lifts, the nav drops in and
 * the header text rises in sequence. Transforms and opacity only (no layout shift); visitors who
 * ask for reduced motion get the final state at once (styles.css shortens every animation). */
@keyframes pp-rise {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: none; }
}

@keyframes pp-drop {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: none; }
}

@keyframes pp-settle {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}

@keyframes pp-curtain {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes pp-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.theme {
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.theme .navbar {
    animation: pp-drop 0.7s var(--ease-out) 0.15s both;
}

/* Inner pages: photo settles, curtain lifts, text follows */
.theme .page-hero-media img {
    animation: pp-settle 2.2s var(--ease-out) both;
}

.theme .page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ink);
    pointer-events: none;
    animation: pp-curtain 1.1s ease-out both;
}

.theme .page-hero-content .breadcrumb,
.theme .page-hero-content .kicker,
.theme .page-hero-content h1,
.theme .page-hero-content .hero-lede,
.theme .page-hero-content .hero-actions,
.theme .page-hero-panel {
    animation: pp-rise 0.9s var(--ease-out) both;
}

.theme .page-hero-content .breadcrumb { animation-delay: 0.25s; }
.theme .page-hero-content .kicker { animation-delay: 0.35s; }
.theme .page-hero-content h1 { animation-delay: 0.45s; }
.theme .page-hero-content .hero-lede { animation-delay: 0.62s; }
.theme .page-hero-content .hero-actions { animation-delay: 0.78s; }
.theme .page-hero-panel { animation-delay: 0.5s; }

/* Homepage: the background photo moves to its own layer so it can settle */
.theme.home .hero {
    background: var(--ink);
}

.theme.home .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--ink) url('images/optimized/home/porsche-911-gt2-rs-and-gt3-991-at-dusk.webp') center 45% / cover no-repeat;
    animation: pp-settle 2.4s var(--ease-out) both;
}

.theme.home .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--ink);
    pointer-events: none;
    animation: pp-curtain 1.1s ease-out both;
}

.theme.home #hero .reveal {
    animation: pp-rise 0.9s var(--ease-out) both;
}

.theme.home #hero .kicker { animation-delay: 0.3s; }
.theme.home #hero .hero-title { animation-delay: 0.42s; }
.theme.home #hero .hero-lede { animation-delay: 0.6s; }
.theme.home #hero .hero-actions { animation-delay: 0.76s; }

.theme.home .brand-marquee {
    animation: pp-fade 1s ease-out 1s both;
}

.theme .hero-sound.is-ready {
    animation: pp-fade 0.6s ease-out both;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .theme .article-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .article-aside {
        position: relative;
        top: auto;
    }
    .theme .toc {
        display: none;
    }
    .theme .aside-card {
        max-width: 520px;
    }
    .theme .more-brands {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .theme .explainer {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .explainer-figures {
        position: relative;
        top: auto;
    }
    .theme .explainer .build-cards,
    .theme .build-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .theme .why-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 48px 32px;
    }
}

@media (max-width: 900px) {
    .theme .page-hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .page-hero-panel {
        display: none;
    }
    .theme .hub-brands {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .theme .order-steps {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
    .theme .mailin-layout,
    .theme .brands-layout,
    .theme .faq-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .mailin-media,
    .theme .brands-media,
    .theme .faq-head {
        position: relative;
        top: auto;
    }
    .theme .brands-media img {
        aspect-ratio: 16 / 10;
    }
    .theme .addon-list {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .facts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .theme .fact,
    .theme .fact:first-child {
        padding: 32px 20px 32px 0;
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .theme .fact:nth-child(even) {
        padding-left: 20px;
        border-left: 1px solid var(--line);
    }
    .theme .fact:nth-child(-n+2) {
        border-top: 0;
    }
}

@media (max-width: 768px) {
    /* Phone menu: Tuning expands in place */
    .theme .nav-links {
        align-items: stretch;
    }
    .theme .nav-has-menu {
        flex-wrap: wrap;
        gap: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    .theme .nav-has-menu > a {
        flex: 1;
        width: auto;
        border-bottom: 0;
    }
    .theme .nav-menu-toggle {
        width: 46px;
        height: 46px;
    }
    .theme .nav-has-menu:hover .nav-menu-toggle {
        transform: none;
    }
    .theme .nav-has-menu.is-open .nav-menu-toggle {
        transform: rotate(180deg);
    }
    .theme .nav-menu,
    .theme .nav-has-menu:hover .nav-menu,
    .theme .nav-has-menu:focus-within .nav-menu {
        position: static;
        display: none;
        width: 100%;
        padding: 0 0 10px 14px;
        background: none;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }
    .theme .nav-has-menu.is-open .nav-menu {
        display: block;
    }
    .theme .nav-menu-label {
        display: none;
    }
    .theme .nav-menu-list {
        grid-template-columns: minmax(0, 1fr);
        margin-bottom: 4px;
    }
    .theme .nav-menu a,
    .theme .nav-menu .nav-menu-all {
        min-height: 40px;
        padding: 9px 4px;
        font-size: 0.95rem;
        letter-spacing: 0;
        border: 0;
    }
    .theme .page-hero {
        padding: calc(120px + env(safe-area-inset-top, 0px)) 0 56px;
    }
    .theme .compare-table thead th {
        font-size: 1.2rem;
    }
    .theme .nav-logo-img,
    .theme .navbar.scrolled .nav-logo-img {
        height: 44px;
    }
    .theme .hero {
        padding: calc(110px + env(safe-area-inset-top, 0px)) 0 120px;
    }
    .theme .hero-lede {
        font-size: 1rem;
    }
    .theme .hero .kicker {
        letter-spacing: 0.1em;
    }
    .theme .process-grid,
    .theme .stage-split {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .stage-block,
    .theme .stage-block + .stage-block {
        padding: 36px 0;
        border-left: 0;
    }
    .theme .stage-block + .stage-block {
        border-top: 1px solid var(--line-strong);
    }
    .theme .brand-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .brand-row-title {
        grid-row: auto;
    }
    .theme .reel-track {
        display: flex;
        gap: 14px;
        max-width: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .theme .reel-track::-webkit-scrollbar {
        display: none;
    }
    .theme .reel-item {
        flex: 0 0 min(80vw, 340px);
        scroll-snap-align: center;
    }
}

@media (max-width: 560px) {
    .theme .more-brands {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .figure-pair {
        gap: 10px;
    }
    .theme .hub-brands {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .compare-table tbody th {
        width: 34%;
    }
    .theme .build-cards,
    .theme .why-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .build-card {
        min-height: 320px;
    }
    .theme .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .theme .brand-marquee-group span {
        gap: 28px;
        padding-right: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* No load sequence: everything appears at once (styles.css already shortens durations) */
    .theme *,
    .theme *::before,
    .theme *::after {
        animation-delay: 0s !important;
    }
    .theme .brand-marquee-track {
        animation: none;
    }
    .theme .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Server-rendered pages: cart, checkout, order confirmation, ECU shipping instructions,
 * legal documents, 404 and the contact-form result (server/src/templates/pages.ts; the commerce
 * app's own styles are in commerce.css, the legal documents' in legal.css) --- */

/* Compact header without a photo */
.theme .page-hero-compact {
    min-height: 0;
    padding: calc(150px + env(safe-area-inset-top, 0px)) 0 56px;
    background: radial-gradient(ellipse at 85% 0%, rgba(212, 175, 55, 0.08), transparent 55%), var(--ink);
    border-bottom: 1px solid var(--line);
}

.theme .page-hero-compact::before {
    display: none;
}

.theme .page-hero-compact h1 {
    max-width: 22ch;
    margin: 0;
    font-size: clamp(2.25rem, 4.4vw, 3.75rem);
}

.theme .page-hero-compact .hero-lede {
    margin: 20px 0 0;
}

/* Shorter photo header (ECU shipping instructions) and the 404 / contact-result header */
.theme .page-hero-short {
    min-height: 72vh;
    min-height: min(72svh, 760px);
}

.theme .page-hero-message {
    min-height: 86vh;
    min-height: 86svh;
}

.theme .page-hero-message .hero-lede {
    max-width: 48ch;
}

/* Cards linking on to the rest of the site */
.theme .next-section {
    padding: clamp(56px, 7vw, 96px) 0;
    border-top: 1px solid var(--line);
}

/* ECU shipping instructions */
.theme .shipping-section,
.theme .shipping-info-section {
    padding: clamp(72px, 9vw, 128px) 0;
    background: var(--ink);
}

.theme .shipping-section {
    padding-top: clamp(48px, 6vw, 88px);
}

.theme .shipping-info-section {
    background: var(--ink-2);
    border-top: 1px solid var(--line);
}

.theme .shipping-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.theme .shipping-step {
    padding: clamp(28px, 3vw, 40px);
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold);
}

.theme .shipping-step h2,
.theme .shipping-info-item h2,
.theme .shipping-packaging h3 {
    margin: 0 0 20px;
    font-size: clamp(1.375rem, 2.2vw, 1.75rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
}

.theme .shipping-step p,
.theme .shipping-info-item p,
.theme .shipping-packaging p {
    max-width: 62ch;
    margin: 0 0 16px;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-2);
}

.theme .shipping-step p:last-child,
.theme .shipping-info-item p:last-child {
    margin-bottom: 0;
}

.theme .shipping-step .shipping-callout {
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--text);
}

.theme .shipping-callout strong {
    font-weight: 600;
}

.theme .shipping-step .shipping-address {
    padding: 20px 22px;
    font-size: 1.1875rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
}

.theme .shipping-address strong {
    font-weight: 600;
}

.theme .shipping-packaging {
    max-width: 72ch;
    margin-top: clamp(48px, 6vw, 72px);
    padding-top: 32px;
    border-top: 1px solid var(--line-strong);
}

.theme .shipping-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px clamp(40px, 6vw, 96px);
}

.theme .shipping-info-item {
    padding-top: 28px;
    border-top: 1px solid var(--line-strong);
}

.theme .shipping-step a,
.theme .shipping-info-item a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.6);
    text-underline-offset: 4px;
    transition: color 0.2s;
}

.theme .shipping-step a:hover,
.theme .shipping-info-item a:hover {
    color: var(--gold);
}

.theme .shipping-info-item a[href^="tel:"] {
    white-space: nowrap;
}

.theme.shipping-page .cta-band h2 {
    margin: 0;
}

@media (max-width: 900px) {
    .theme .shipping-steps,
    .theme .shipping-info {
        grid-template-columns: minmax(0, 1fr);
    }
    .theme .shipping-info {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .theme .page-hero-compact {
        padding: calc(116px + env(safe-area-inset-top, 0px)) 0 40px;
    }
}
