:root {
    --urban-black: #071320;
    --urban-ink: #0b1b2f;
    --urban-panel: #10243d;
    --urban-panel-soft: #16304d;

    --urban-white: #f8fbff;
    --urban-silver: #d7e4f3;
    --urban-muted: #9eb3ca;

    --urban-line: rgba(173, 203, 235, .12);
    --urban-line-strong: rgba(173, 203, 235, .28);
    
    --urban-font: "Manrope", "Segoe UI", Arial, sans-serif;
    --urban-font-display: "Oswald", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    --urban-accent: #c6a574;
    --urban-focus: #e8c994;
    --home-content-gutter: clamp(16px, 4vw, 64px);
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--urban-black);
    color: var(--urban-white);
    font-family: var(--urban-font);
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

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

a:hover {
    color: inherit;
}

img,
svg {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

::selection {
    background: var(--urban-white);
    color: var(--urban-black);
}

.site-main {
    overflow: hidden;
}

.content-shell {
    width: min(100% - 32px, 1440px);
    margin-inline: auto;
}

.section-pad {
    padding: clamp(40px, 5vw, 88px) 0;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--urban-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: clamp(32px, 5vw, 72px);
}

.section-heading h2 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2rem, 5vw, 5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0;
    text-wrap: balance;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

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

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .home-hero__scroll { animation: none; }
    .preloader__shield,
    .preloader__logo,
    .preloader__corner,
    .preloader__bar-fill,
    .preloader__trace { animation: none !important; }
    .preloader__bar-fill { width: 100%; transform: none; opacity: 0.6; }
    .preloader__shield { opacity: 1; transform: none; filter: none; }
    .preloader__trace { display: none; }
    .market-card,
    .service-list article,
    .why-us article,
    .review-video,
    .button { transition-duration: 0.01ms; }
}

*, *::before, *::after {
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Shared typography, form controls, and focus states */
html { scroll-padding-top: 88px; }
body, button, input, select, textarea { font-family: var(--urban-font); }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
h1,
.section-heading h2,
.home-hero h1,
.intro-band h2,
.feature-banner h2,
.dark-split h2,
.cta-section h2,
.about-page h2,
.service-page h2,
.car-summary__header h2,
.car-description h2,
.request-section h2,
.catalog-empty h2 {
    font-family: var(--urban-font-display);
    font-weight: 600;
}
p { text-wrap: pretty; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--urban-focus);
    outline-offset: 3px;
}
input, select, textarea { min-width: 0; }

/* ==========================================================================
   PRELOADER — Urban Motors v2
   Палитра: #09192d (фон), var(--urban-line), var(--urban-white), var(--urban-muted)
   ========================================================================== */

.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;

    /* Тот же глубокий синий, что .video-reviews и .catalog-preview */
    background: #09192d;

    opacity: 1;
    visibility: visible;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ── Рамка ───────────────────────────────────────────────────────── */

.preloader__frame {
    position: relative;
    width: clamp(220px, 30vw, 300px);
    padding: 12px 24px 24px;
    border: 0;
    background: transparent;
    text-align: center;
    overflow: visible;
}

.preloader__shield {
    display: block;
    width: clamp(108px, 15vw, 148px);
    height: auto;
    margin: 0 auto 8px;
    transform-origin: center 55%;
    animation: preloaderShieldAssembly 3s cubic-bezier(0.2, 0.75, 0.25, 1) infinite;
    will-change: transform, opacity, filter;
}

@keyframes preloaderShieldAssembly {
    0% {
        opacity: 0;
        transform: translateY(22px) scale(0.68) rotate(-8deg);
        filter: drop-shadow(0 0 0 rgba(215, 228, 243, 0));
    }
    38% {
        opacity: 1;
        transform: translateY(-3px) scale(1.04) rotate(0);
        filter: drop-shadow(0 0 18px rgba(215, 228, 243, 0.32));
    }
    52%, 88% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0);
        filter: drop-shadow(0 0 8px rgba(215, 228, 243, 0.18));
    }
    100% {
        opacity: 0;
        transform: translateY(-5px) scale(1.02) rotate(0);
        filter: drop-shadow(0 0 0 rgba(215, 228, 243, 0));
    }
}

/* ── Уголки с "дыханием" ─────────────────────────────────────────── */

.preloader__corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 1px solid var(--urban-white, #fff);
    opacity: 0.5;
    animation: preloaderPulse 2.4s ease-in-out infinite;
}

.preloader__corner--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.preloader__corner--tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; animation-delay: 0.3s; }
.preloader__corner--bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; animation-delay: 0.9s; }
.preloader__corner--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; animation-delay: 0.6s; }

@keyframes preloaderPulse {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 1; }
}

/* ── Бегущая обводка по периметру ────────────────────────────────── */

.preloader__trace {
    position: absolute;
    background: var(--urban-white, #fff);
    pointer-events: none;
    opacity: 0.9;
}

.preloader__trace--top {
    top: 0; left: -100%;
    width: 100%; height: 1px;
    animation: preloaderTraceTop 2.4s linear infinite;
}
.preloader__trace--right {
    top: -100%; right: 0;
    width: 1px; height: 100%;
    animation: preloaderTraceRight 2.4s linear infinite;
    animation-delay: 0.6s;
}
.preloader__trace--bottom {
    bottom: 0; right: -100%;
    width: 100%; height: 1px;
    animation: preloaderTraceBottom 2.4s linear infinite;
    animation-delay: 1.2s;
}
.preloader__trace--left {
    bottom: -100%; left: 0;
    width: 1px; height: 100%;
    animation: preloaderTraceLeft 2.4s linear infinite;
    animation-delay: 1.8s;
}

@keyframes preloaderTraceTop {
    0%   { left: -100%; }
    25%  { left: 100%; }
    100% { left: 100%; }
}
@keyframes preloaderTraceRight {
    0%   { top: -100%; }
    25%  { top: 100%; }
    100% { top: 100%; }
}
@keyframes preloaderTraceBottom {
    0%   { right: -100%; }
    25%  { right: 100%; }
    100% { right: 100%; }
}
@keyframes preloaderTraceLeft {
    0%   { bottom: -100%; }
    25%  { bottom: 100%; }
    100% { bottom: 100%; }
}

/* ── Логотип UM (blur-up) ────────────────────────────────────────── */

.preloader__logo {
    font-family: inherit;
    font-size: clamp(2.6rem, 4.4vw, 3.8rem);
    font-weight: 800;
    letter-spacing: 0.2em;
    line-height: 1;
    color: var(--urban-white, #fff);
    margin-left: 0.2em;
    animation: preloaderLogo 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes preloaderLogo {
    0%, 100% {
        opacity: 0.45;
        filter: blur(3px);
        letter-spacing: 0.28em;
    }
    50% {
        opacity: 1;
        filter: blur(0);
        letter-spacing: 0.2em;
    }
}

/* ── Полоса загрузки ─────────────────────────────────────────────── */

.preloader__bar {
    position: relative;
    width: 100%;
    height: 1px;
    margin: 34px 0 22px;
    background: var(--urban-line, rgba(255, 255, 255, 0.12));
    overflow: hidden;
}

.preloader__bar-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 42%;
    background: var(--urban-white, #fff);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
    animation: preloaderSlide 1.6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes preloaderSlide {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(340%); }
}

/* ── Мета-строка: подпись + проценты ────────────────────────────── */

.preloader__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.preloader__label {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--urban-muted, rgba(255, 255, 255, 0.55));
    margin-left: 0.42em;
}

.preloader__value {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--urban-silver, rgba(255, 255, 255, 0.75));
    font-variant-numeric: tabular-nums;
}

/* ── Блокировка скролла ──────────────────────────────────────────── */

body.is-loading {
    overflow: hidden;
}

/* ===== Кастомные уведомления (toast) ===== */
.um-toast-container {
    position: fixed;
    top: 24px;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 99999;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;

    width: min(560px, calc(100vw - 32px));
    pointer-events: none;
}

.um-toast {
    position: relative;
    overflow: hidden;
    width: 100%;

    display: flex;
    align-items: center;
    gap: 16px;

    padding: 20px 24px;

    border: 1px solid var(--urban-line);
    border-left: 4px solid var(--urban-white);
    border-radius: 0;

    background: linear-gradient(180deg, #10243d, #071320);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .55);

    color: var(--urban-white);
    font-size: 1rem;
    line-height: 1.5;

    pointer-events: auto;

    opacity: 0;
    transform: translateY(-16px);
    transition: opacity 260ms ease, transform 320ms cubic-bezier(.16, 1, .3, 1);
}

.um-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.um-toast.is-leaving {
    opacity: 0;
    transform: translateY(-16px);
}

.um-toast__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.um-toast__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.um-toast__body {
    flex: 1;
    min-width: 0;
}

.um-toast__message {
    margin: 0;
    word-wrap: break-word;
    font-size: 1rem;
}

/* Прогресс-бар автозакрытия */
.um-toast__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: .35;
    transform-origin: left center;
    animation: um-toast-progress linear forwards;
}

@keyframes um-toast-progress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Варианты */
.um-toast--success { border-left-color: #4ade80; }
.um-toast--success .um-toast__icon { color: #4ade80; }

.um-toast--error { border-left-color: #ff7a7a; }
.um-toast--error .um-toast__icon { color: #ff7a7a; }

.um-toast--info { border-left-color: #7ab7ff; }
.um-toast--info .um-toast__icon { color: #7ab7ff; }

@media (max-width: 560px) {
    .um-toast-container {
        top: 12px;
        left: 12px;
        right: 12px;
        width: auto;
        gap: 10px;
    }

    .um-toast {
        padding: 16px 18px;
        gap: 12px;
        font-size: .92rem;
    }

    .um-toast__icon {
        width: 20px;
        height: 20px;
    }

    .um-toast__message {
        font-size: .92rem;
    }
}
