:root {
    color-scheme: dark;
    --background: #000;
    --text: #fff7ea;
    --muted: #b8b2a8;
    --accent: #d7ff00;
    --line: #66635c;
    --header-height: 67px;
    font-family: Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    scroll-padding-top: calc(var(--header-height) + .5rem);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.shell {
    width: min(92%, 1560px);
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--background);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 64px;
    padding-top: 10px;
}

.header nav { display: flex; gap: clamp(1.25rem, 5vw, 5rem); }
.header a { text-decoration: none; font-weight: 700; }
.header nav a:hover { color: var(--accent); }
.header nav a[aria-current="location"] {
    color: var(--accent);
    text-decoration: underline 2px;
    text-underline-offset: .45em;
}
.wordmark img { display: block; width: clamp(4rem, 6vw, 5rem); height: auto; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .65rem 1.2rem;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: #111;
    font-weight: 800;
    text-decoration: none;
}

.button-outline { background: transparent; color: var(--text); }
.button:hover { background: #edff86; color: #111; }

.hero-layout {
    display: grid;
    grid-template-columns: minmax(19rem, 27%) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "intro media" "details media" "models models";
    column-gap: clamp(.75rem, 1.8vw, 2rem);
    padding-block: 1.35rem 1.5rem;
}

.hero-media {
    grid-area: media;
    position: relative;
    min-height: 0;
    aspect-ratio: 1200 / 734;
    align-self: center;
    overflow: hidden;
}

.hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("mask2.png") center / 100% 100% no-repeat;
    pointer-events: none;
}

.hero-media img,
.hero-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 69% center;
}

.hero-media video { opacity: 0; }
.video-ready .hero-media video { opacity: 1; }

.hero-intro { grid-area: intro; padding-bottom: .85rem; }
.eyebrow {
    margin: 0 0 .6rem;
    color: var(--accent);
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    font-weight: 900;
    text-transform: uppercase;
}
h1 {
    margin: 0;
    font-size: clamp(2.5rem, 3.65vw, 3.7rem);
    font-weight: 950;
    line-height: .96;
    letter-spacing: -.045em;
    text-transform: uppercase;
}

.hero-details { grid-area: details; display: grid; }
.vehicle-specs { grid-area: 1 / 1; min-width: 0; }
.vehicle-specs[hidden] { display: block; visibility: hidden; }
.vehicle-specs h2 {
    margin: 0 0 .55rem;
    font-size: clamp(1.25rem, 1.85vw, 1.9rem);
    font-weight: 900;
    text-transform: uppercase;
}
.vehicle-info { margin: 0 0 1rem; font-size: clamp(.83rem, 1vw, 1rem); }
.vehicle-info div {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: .45rem;
    padding: .42em .15rem;
    border-bottom: 1px solid var(--line);
}
.vehicle-info dt { color: var(--muted); }
.vehicle-info dd { margin: 0; font-weight: 700; }
.vehicle-actions { display: grid; justify-items: start; gap: .55rem; }
.vehicle-actions .button { padding: .65rem 1.5rem; border-radius: 9px; font-size: clamp(1rem, 1.4vw, 1.35rem); text-align: center; }

.models { grid-area: models; margin-top: clamp(1rem, 2vw, 2.25rem); }
.section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 .75rem;
    font-size: 1rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.models .section-label { font-size: clamp(.95rem, 1.35vw, 1.25rem); letter-spacing: .02em; }
.section-label::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.model-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.6rem, 1.3vw, 1.25rem); }
.model-list button {
    display: flex;
    align-items: center;
    gap: clamp(.28rem, .9vw, .7rem);
    min-height: 62px;
    padding: .7rem .45rem;
    border: 0;
    border-bottom: 3px solid var(--line);
    background: transparent;
    color: var(--text);
    text-align: start;
    font-size: clamp(.88rem, 1.48vw, 1.45rem);
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.model-icon { width: clamp(2rem, 4vw, 3.5rem); height: auto; flex-shrink: 0; }
.model-list button[aria-pressed="true"] { border-color: var(--accent); }
.model-list button[aria-pressed="true"],
.model-list button:hover { color: var(--accent); }

@media (max-width: 760px) {
    :root { --header-height: 105px; }
    .shell { width: calc(100% - 2rem); }
    .header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0 .75rem;
        padding-bottom: .35rem;
    }
    .header nav {
        grid-area: 2 / 1 / 3 / -1;
        justify-content: space-between;
        gap: .5rem;
        font-size: .875rem;
    }
    .header nav a { display: inline-flex; align-items: center; min-height: 44px; }
    .header .button { grid-area: 1 / 2; }
    .hero-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        grid-template-areas: "media" "models" "details";
        gap: .8rem;
        padding-block: .25rem 1rem;
        background: var(--background);
    }
    .hero-intro {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    .hero-media { width: 100%; }
    .hero-media::after { inset: -3px; }
    .hero-media img, .hero-media video { clip-path: inset(2px); }
    .models { margin-top: 0; }
    .model-list { display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
    .model-list button { min-height: 44px; padding: .35rem .42rem; font-size: .85rem; }
    .vehicle-info { font-size: .875rem; }
}

.configurator-entry { display: flex; justify-content: center; padding: .75rem .65rem 2rem; }
.configurator-entry-button { position: relative; text-align: center; }
.configurator-entry-button::after {
    content: '';
    position: absolute;
    inset: -5px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    pointer-events: none;
    animation: configurator-pulse 2s ease-in-out infinite;
}
@keyframes configurator-pulse {
    0%, 100% { opacity: .9; }
    50% { inset: -9px; opacity: .45; }
}
@media (prefers-reduced-motion: reduce) {
    .configurator-entry-button::after { animation: none; }
}
.catalog { padding-block: 2rem; }
.catalog-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem .75rem; }
.catalog-heading h2 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.catalog-availability { color: var(--accent); font-size: 1.3em; font-weight: 900; white-space: nowrap; }
.catalog-heading h2 span { font-weight: 500; }
.catalog-heading a { color: var(--accent); }
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.85rem, 2.5vw, 2rem);
    margin-top: 1.25rem;
}
.catalog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #292925;
    border-radius: 16px;
    background: linear-gradient(#151514, #080808);
}
.catalog-card h3 {
    flex: 0 0 auto;
    margin: 0;
    padding: 1rem 1rem .65rem;
    font-size: clamp(1.125rem, 1.8vw, 1.55rem);
    line-height: 1.15;
    text-transform: uppercase;
}
.catalog-card h3 span {
    display: -webkit-box;
    min-height: 2.3em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.catalog-photo { flex: 0 0 auto; height: clamp(14rem, 42svh, 29rem); background: #161615; }
.catalog-photo:focus-visible { outline-offset: -2px; }
.catalog-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.catalog-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-top: auto;
    padding: 1rem;
}
.catalog-price { margin: 0; color: var(--accent); font-size: 1.2rem; font-weight: 800; }
.catalog-details {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    min-height: 44px;
    padding-inline: 1rem;
    border-radius: 999px;
    background: var(--text);
    color: #111;
    font-weight: 700;
    text-decoration: none;
}
.catalog-details:hover { background: var(--accent); }

.product-page { padding-block: 1rem 4rem; }
.product-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    margin-bottom: .9rem;
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
}
.product-page h1 { font-size: clamp(1.8rem, 4vw, 3.5rem); overflow-wrap: anywhere; }
.product-layout {
    --gallery-height: clamp(18rem, 72svh, 38rem);
    --gallery-photo-width: calc(var(--gallery-height) * .75);
    --gallery-thumb-width: clamp(5.25rem, 17vw, 12.5rem);
    --gallery-rail-width: calc(var(--gallery-thumb-width) + .8rem);
    --gallery-width: calc(var(--gallery-photo-width) + var(--gallery-rail-width) + .45rem);
    display: grid;
    grid-template-columns: min(62%, var(--gallery-width)) minmax(0, 1fr);
    align-items: start;
    gap: clamp(.85rem, 1.5vw, 1.5rem);
    margin-top: 1rem;
}
.product-gallery {
    display: grid;
    grid-template-columns: minmax(0, var(--gallery-photo-width)) var(--gallery-rail-width);
    gap: .45rem;
}
.product-gallery-main {
    display: flex;
    align-items: start;
    justify-content: start;
    height: var(--gallery-height);
    overflow: hidden;
    border-radius: 8px;
}
.product-gallery-main:only-child { grid-column: 1 / -1; }
.product-gallery-main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left top;
}
.product-thumbnails {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: var(--gallery-height);
    overflow: hidden auto;
    padding: .2rem;
}
.product-thumbnails a {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #161615;
}
.product-thumbnails a[aria-current="true"] { border-color: var(--accent); }
.product-thumbnails a:focus-visible { outline-offset: -2px; }
.product-thumbnails img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-photo-dialog {
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: .75rem;
    border: 0;
    background: transparent;
    color: #fff;
}
.product-photo-dialog[open] { display: grid; place-items: center; }
.product-photo-dialog::backdrop { background: rgb(0 0 0 / 92%); }
.product-photo-frame { position: relative; }
.product-photo-frame img {
    display: block;
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
    object-fit: contain;
}
.product-photo-close {
    position: absolute;
    top: .35rem;
    right: .35rem;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 55%);
    border-radius: 50%;
    background: rgb(0 0 0 / 80%);
    color: inherit;
    cursor: pointer;
}
.product-summary { max-width: 36rem; }
.product-summary:only-child { grid-column: 1 / -1; }
.product-price { font-size: clamp(1.4rem, 3vw, 2rem); }
.product-reservation { display: grid; justify-items: start; gap: .65rem; margin-top: 1rem; }
.product-reservation .button { justify-content: start; gap: .6rem; text-align: start; }
.product-reservation .contact-icon { flex: 0 0 2rem; }
.product-reservation [aria-disabled="true"], .product-note { color: var(--muted); }
.product-reservation [aria-disabled="true"] { border-color: var(--line); background: transparent; }
.product-description { line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }

@media (max-width: 850px) {
    .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .product-layout {
        --gallery-height: clamp(14rem, 87vw, 32rem);
        --gallery-thumb-width: clamp(3.75rem, 23vw, 8.25rem);
        grid-template-columns: minmax(0, 1fr);
    }
    .product-gallery { justify-content: start; }
    .product-reservation { justify-items: stretch; }
}

@media (max-width: 480px) {
    .catalog-grid { grid-template-columns: 1fr; }
    .catalog-photo { height: clamp(12rem, 72vw, 21rem); }
    .catalog-card-bottom { padding: .85rem; }
}

.shop { padding-block: 1rem 4rem; }
.shop-locations {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: clamp(.85rem, 3vw, 1.75rem);
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.shop-locations > input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
}
.shop-locations > label {
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
    min-height: 44px;
    padding-inline: .15rem;
    border-bottom: 2px solid transparent;
    text-align: center;
    font-size: clamp(.875rem, 2vw, 1rem);
    font-weight: 700;
    cursor: pointer;
}
.shop-city-icon {
    flex: 0 0 var(--shop-icon-width);
    height: var(--shop-icon-height);
    background: var(--shop-icon) left bottom / contain no-repeat;
}
label[for="shop-moscow-option"] {
    --shop-icon: url("msk_w.jpg?v=2");
    --shop-icon-width: 28px;
    --shop-icon-height: 74.9px;
}
label[for="shop-spb-option"] {
    --shop-icon: url("spb_w.jpg?v=2");
    --shop-icon-width: 44.8px;
    --shop-icon-height: 72.8px;
}
#shop-moscow-option:checked + label { --shop-icon: url("msk_g.jpg?v=2"); }
#shop-spb-option:checked + label { --shop-icon: url("spb_g.jpg?v=2"); }
.shop-locations > input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 4px; }
.shop-locations > input:checked + label { border-color: var(--accent); color: var(--accent); }
.shop-location { display: none; flex: 0 0 100%; min-width: 0; }
#shop-moscow-option:checked ~ #shop-moscow,
#shop-spb-option:checked ~ #shop-spb { display: block; }
.shop-location h3 { margin: 1.25rem 0 0; }

@media (max-width: 480px) {
    .shop-locations { column-gap: .5rem; }
    .shop-locations > label {
        flex: 1 1 0;
        min-width: 0;
        gap: .25rem;
        overflow-wrap: anywhere;
    }
}

.shop-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    margin-top: 1.25rem;
}
.shop-address { font-style: normal; font-weight: 700; }
.shop-map { display: block; width: 100%; height: clamp(17rem, 37vw, 24rem); border: 0; border-radius: 12px; }
.contact-links { display: grid; gap: .75rem; align-content: start; margin: 1rem 0; padding: 0; list-style: none; }
.contact-link { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; color: var(--text); text-decoration: none; }
.contact-link:hover:not([aria-disabled]) { color: var(--accent); }
.contact-link[aria-disabled] { color: var(--muted); }
.contact-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid currentColor;
    border-radius: 50%;
}
.contact-icon::before { content: ''; display: block; width: .95rem; height: .95rem; background: currentColor; }
.contact-icon-telegram::before { clip-path: polygon(2% 43%, 100% 0, 78% 100%, 51% 72%, 38% 88%, 41% 62%, 83% 22%, 31% 58%); }
.contact-icon-max::before { border-radius: 50% 50% 50% 12%; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 60%, 25% 58%, 35% 71%, 69% 71%, 76% 34%, 37% 28%, 25% 58%, 0 60%); }
.contact-icon-phone::before { clip-path: polygon(9% 4%, 30% 0, 47% 26%, 34% 42%, 60% 66%, 75% 52%, 100% 70%, 94% 93%, 78% 100%, 48% 91%, 18% 63%, 2% 34%, 0 17%); }

@media (max-width: 700px) {
    .shop-grid { grid-template-columns: 1fr; }
}

.site-footer {
    padding-block: 1.75rem 2.25rem;
    border-top: 1px solid #302f2a;
    background: #0b0b0a;
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1.5rem clamp(1rem, 4vw, 3rem);
}
.footer-brand p { margin: .55rem 0 0; font-weight: 700; }
.footer-grid h2 { margin: 0 0 .65rem; font-size: 1.05rem; }
.footer-links { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-contacts { gap: .25rem; }

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
}
