/* =========================================================
   ВЫСОТА — кинематографичный premium UI
   Палитра: midnight blue → royal → sky → white
   ========================================================= */
/* Кастомные шрифты для надписи «Высота» (лого + главный экран). Оба с кириллицей. */
@font-face {
    font-family: 'Comforter';
    src: url('/static/fonts/Comforter-Regular.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Comforter Brush';
    src: url('/static/fonts/ComforterBrush-Regular.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}

:root {
    /* Шрифт надписи «Высота». Чтобы переключить на брашевый — поставь 'Comforter Brush'. */
    --font-vysota: 'Comforter', cursive;
    --midnight: #0a1535;
    --deep:     #102257;
    --primary:  #1e3a8a;
    --primary-2:#1d4ed8;
    --primary-light: #3b82f6;
    --primary-glow:  #60a5fa;
    --sky:      #93c5fd;
    --sky-soft: #dbeafe;
    --sky-lightest: #eff6ff;
    --text:     #0f172a;
    --text-light: #475569;
    --muted:    #64748b;
    --bg:       #ffffff;
    --bg-alt:   #f6f9ff;
    --border:   #cbd5e1;
    --border-soft: #e2e8f0;
    --danger:   #dc2626;
    --danger-bg:#fee2e2;
    --success:  #16a34a;
    --success-bg:#dcfce7;

    --shadow-sm: 0 2px 10px rgba(30, 58, 138, 0.06);
    --shadow-md: 0 10px 30px rgba(30, 58, 138, 0.12);
    --shadow-lg: 0 24px 60px rgba(30, 58, 138, 0.20);
    --shadow-xl: 0 40px 90px rgba(10, 21, 53, 0.35);

    --radius: 18px;
    --radius-sm: 10px;
    --radius-lg: 26px;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
    background: #05081c;
    /* Фирменный скроллбар (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) rgba(219, 234, 254, 0.4);
}
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: #fff;
    background-color: #05081c; /* запасной тёмный фон; основной фон — на фикс-слое .fx-bg */
    min-height: 100vh;
    min-height: 100svh;   /* svh не меняется при показе/скрытии адресной строки */
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: color .2s var(--ease); }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
code { background: var(--sky-soft); padding: 2px 6px; border-radius: 4px; font-size: 90%; }
::selection { background: var(--primary-glow); color: #fff; }

.container { max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 820px; }

/* =========================================================
   Прогресс-бар прокрутки
   ========================================================= */
.scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px;
    z-index: 200; pointer-events: none; background: transparent;
}
.scroll-progress span {
    display: block; height: 100%; width: 100%;
    transform: scaleX(0); transform-origin: left center;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--sky));
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
}

/* =========================================================
   Фоновые эффекты (мягкое сияние + glow за курсором)
   ========================================================= */
.fx-bg {
    position: fixed; inset: -60px; overflow: hidden;
    pointer-events: none;
    /* Ночное небо + лёгкое тёмное затемнение (чтобы белый текст читался поверх ярких туманностей).
       inset: -60px — запас, чтобы при сдвиге мышью не было видно краёв.
       will-change включаем только для мыши (см. ниже) — на тач-устройствах он лишь тратит память. */
    background:
        linear-gradient(180deg, rgba(4,8,28,0.45), rgba(4,8,28,0.55)),
        url("/static/css/background.jpg") center / cover no-repeat;
    background-color: #05081c;
    opacity: 0.6;
}
@media (hover: hover) and (pointer: fine) {
    .fx-bg { will-change: transform; }
}
/* С фоновым изображением отдельные «облака» не нужны — текстуру даёт картинка. */
.fx-bg::before { display: none; }
.fx-aurora { display: none; }
.cursor-glow {
    position: absolute; top: 0; left: 0;
    width: 520px; height: 520px; margin: -260px 0 0 -260px;
    border-radius: 50%; opacity: 0;
    transition: opacity .6s var(--ease);
    will-change: transform;
    background: radial-gradient(circle, rgba(96,165,250,0.16), transparent 60%);
}

/* Плёночное зерно поверх всего */
.grain {
    position: fixed; inset: 0; z-index: 60; pointer-events: none;
    opacity: 0.05; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* =========================================================
   Анимации
   ========================================================= */
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scale-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes title-in { from { opacity: 0; transform: translateY(28px); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes aurora {
    0%   { transform: translate3d(0,0,0) scale(1) rotate(0deg); }
    50%  { transform: translate3d(2%,-2%,0) scale(1.08) rotate(2deg); }
    100% { transform: translate3d(-2%,1%,0) scale(1.05) rotate(-2deg); }
}
@keyframes smoke {
    0%   { transform: translate(0, 40px) scale(0.9); opacity: 0; }
    25%  { opacity: 0.6; }
    75%  { opacity: 0.4; }
    100% { transform: translate(40px, -340px) scale(1.7); opacity: 0; }
}
@keyframes ember-rise {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    12%  { opacity: 1; }
    85%  { opacity: 0.7; }
    100% { transform: translateY(-88vh) translateX(var(--drift, 0)); opacity: 0; }
}
@keyframes scroll-dot {
    0%   { opacity: 0; transform: translateY(-4px); }
    30%  { opacity: 1; }
    60%  { opacity: 1; transform: translateY(8px); }
    100% { opacity: 0; transform: translateY(12px); }
}
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* Появление при скролле */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 340ms; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 380ms; }
.reveal-stagger.is-visible > *:nth-child(n+9) { transition-delay: 420ms; }

/* =========================================================
   Шапка
   ========================================================= */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: background .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.is-scrolled {
    background: rgba(7, 11, 33, 0.82);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; min-height: 74px;
    transition: min-height .35s var(--ease);
}
.site-header.is-scrolled .site-header__inner { min-height: 62px; }

.site-logo { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; transition: transform .3s var(--ease-spring); }
.site-logo:hover { transform: translateY(-1px); }
.site-logo__title {
    color: #fff; font-weight: 400; font-size: 36px;
    letter-spacing: 0.5px; font-style: normal; line-height: 1;
    font-family: var(--font-vysota);
    -webkit-text-fill-color: #fff; background: none;
    text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}
.site-logo__sub { color: rgba(191,219,254,0.9); font-size: 12px; font-weight: 500; }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
    color: rgba(255,255,255,0.9); font-weight: 500; padding: 9px 18px; border-radius: 999px;
    transition: background .25s var(--ease), color .25s var(--ease);
}
.site-nav a:hover { background: rgba(255,255,255,0.14); color: #fff; }
.site-actions { display: flex; gap: 12px; align-items: center; }

/* Шапка вверху прозрачная (виден небесно-голубой фон), логотип и меню — фирменные тёмные.
   При прокрутке шапка становится матовой белой (правила .is-scrolled выше). */
body.page-gradient .site-header:not(.is-scrolled) {
    background: transparent;
    border-color: transparent; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
}

/* =========================================================
   Подвал — контакты, адрес, часы, соцсети
   ========================================================= */
.site-footer {
    margin-top: 110px; padding: 64px 0 32px;
    background: linear-gradient(135deg, var(--midnight) 0%, var(--deep) 55%, var(--primary) 100%);
    color: #fff; position: relative; overflow: hidden;
}
.site-footer::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 18% 30%, rgba(96,165,250,0.35) 0%, transparent 50%),
        radial-gradient(circle at 82% 90%, rgba(147,197,253,0.22) 0%, transparent 50%);
    pointer-events: none;
}
.site-footer::after {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(147,197,253,0.6), transparent);
}
.site-footer > * { position: relative; }
.site-footer .site-logo__title { background: linear-gradient(135deg, #fff 0%, var(--sky) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.site-footer .site-logo__sub { color: var(--sky); }

.footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 36px;
    padding-bottom: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

.footer-col__title {
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--sky); margin: 0 0 16px;
}
.footer-about { margin: 14px 0 0; color: rgba(219,234,254,0.7); font-size: 14px; line-height: 1.6; max-width: 280px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-list li { color: rgba(219,234,254,0.85); font-size: 14px; line-height: 1.5; }
.footer-list a { color: #fff; opacity: 0.85; transition: opacity .2s var(--ease); }
.footer-list a:hover { opacity: 1; color: #fff; }
.footer-list__label { display: block; color: rgba(147,197,253,0.7); font-size: 12px; margin-bottom: 2px; }
.footer-hours { display: flex; justify-content: space-between; gap: 12px; }
.footer-hours span:last-child { color: #fff; font-weight: 600; }

.footer-socials { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
    color: #fff; opacity: 0.9;
    transition: transform .25s var(--ease-spring), background .25s var(--ease), border-color .25s var(--ease);
}
.footer-social:hover { transform: translateY(-3px); background: rgba(255,255,255,0.18); border-color: rgba(147,197,253,0.5); color: #fff; }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    color: rgba(219,234,254,0.55); font-size: 13px;
}

/* =========================================================
   HERO — кинематографичный экран
   ========================================================= */
.hero {
    position: relative; isolation: isolate;
    min-height: 92vh;
    min-height: 92svh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; overflow: hidden;
    /* Фон берётся из общего градиента body — он покрывает всю страницу единым полотном */
    background: transparent;
}
.hero__bg { position: absolute; inset: -80px; z-index: 0; overflow: hidden; will-change: transform; }
.hero__aurora { display: none; /* убрано: яркость 0.5+ давала видимую линию на границе hero/content */ }
.hero__smoke { display: none; /* убрано: screen-blend дополнительно осветлял hero */}
.smoke { position: absolute; bottom: -15%; border-radius: 50%; filter: blur(55px); opacity: 0; mix-blend-mode: screen; }
.smoke--1 { left: 8%;  width: 280px; height: 280px; background: radial-gradient(circle, rgba(191,219,254,0.5), transparent 65%);  animation: smoke 17s ease-in-out infinite; }
.smoke--2 { left: 42%; width: 360px; height: 360px; background: radial-gradient(circle, rgba(147,197,253,0.45), transparent 65%); animation: smoke 21s ease-in-out infinite 3s; }
.smoke--3 { left: 74%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(96,165,250,0.4), transparent 65%);  animation: smoke 19s ease-in-out infinite 6s; }
.hero__embers { display: none; }
.ember {
    position: absolute; bottom: -12px; width: 3px; height: 3px; border-radius: 50%;
    background: #dbeafe; box-shadow: 0 0 8px 2px rgba(147,197,253,0.8);
    opacity: 0; animation: ember-rise linear infinite;
}

.hero__inner { position: relative; z-index: 2; padding: 0 20px; max-width: 900px; will-change: transform; }
.hero__eyebrow {
    display: inline-block; color: rgba(255,255,255,0.92); letter-spacing: 0.3em; text-transform: uppercase;
    font-size: 12px; font-weight: 600; margin-bottom: 22px;
    padding: 7px 18px; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px;
    background: rgba(255,255,255,0.08); backdrop-filter: blur(6px);
    animation: title-in .8s var(--ease-out) both;
}
.hero__title {
    font-family: var(--font-vysota);
    font-style: normal; font-weight: 400;
    font-size: clamp(88px, 18vw, 240px); line-height: 1; margin: 0 0 14px; letter-spacing: 0;
    color: #fff; -webkit-text-fill-color: #fff; background: none;
    text-shadow: 0 6px 44px rgba(0,0,0,0.55), 0 2px 12px rgba(96,165,250,0.35);
    animation: title-in 1s var(--ease-out) both;
}
.hero__sub { color: rgba(226,238,255,0.92); font-size: clamp(16px, 2.2vw, 22px); margin: 0 0 38px; text-shadow: 0 2px 16px rgba(0,0,0,0.5); animation: title-in 1s var(--ease-out) .15s both; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; animation: title-in 1s var(--ease-out) .3s both; }

.hero__scroll {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2;
    width: 26px; height: 42px; border: 2px solid rgba(255,255,255,0.45); border-radius: 14px;
    display: flex; justify-content: center; padding-top: 8px;
}
.hero__scroll span { width: 4px; height: 8px; border-radius: 2px; background: rgba(255,255,255,0.85); animation: scroll-dot 1.7s ease-in-out infinite; }

/* =========================================================
   Секции
   ========================================================= */
.section { padding: 72px 0; position: relative; }
.section--alt { background: transparent; }
.section__title {
    color: #fff; font-size: clamp(26px, 4vw, 38px); margin: 0 0 36px;
    font-weight: 800; letter-spacing: -0.5px; display: inline-block; position: relative;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.section__title::after { content: ""; position: absolute; bottom: -10px; left: 0; width: 54px; height: 3px; background: linear-gradient(90deg, #fff, var(--sky)); border-radius: 2px; }
.page-title { color: #fff; font-size: clamp(28px, 5vw, 44px); margin: 0 0 30px; font-weight: 800; letter-spacing: -0.5px; text-shadow: 0 2px 20px rgba(0,0,0,0.5); animation: fade-up .6s var(--ease-out) both; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.back-link { color: rgba(255,255,255,0.82); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; text-shadow: 0 1px 10px rgba(0,0,0,0.5); transition: color .2s var(--ease), gap .2s var(--ease); }
.back-link:hover { color: #fff; gap: 10px; }

/* =========================================================
   Кнопки  (текст НЕ меняет цвет при наведении)
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border-radius: 13px; font-size: 15px; font-weight: 600;
    border: none; text-align: center; text-decoration: none; cursor: pointer;
    position: relative; overflow: hidden; will-change: transform;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), text-shadow .3s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:hover { text-decoration: none; }
/* Наведение: цвет/фон кнопки НЕ меняем — только мягкое белое свечение текста */
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%); color: #fff; box-shadow: 0 6px 18px rgba(30,58,138,0.30); }
.btn-primary:hover { transform: translateY(-2px); text-shadow: 0 0 16px rgba(255,255,255,0.85), 0 0 6px rgba(255,255,255,0.6); }
.btn-ghost { background: rgba(219,234,254,0.6); color: var(--primary); backdrop-filter: blur(8px); }
.btn-ghost:hover { transform: translateY(-2px); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { transform: translateY(-2px); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 16px 34px; font-size: 17px; border-radius: 15px; }
.btn-block { display: flex; width: 100%; }

.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.5); transform: scale(0); animation: ripple-anim 0.6s linear; pointer-events: none; }

/* =========================================================
   Формы
   ========================================================= */
.field { display: flex; flex-direction: column; gap: 6px; }
.field--inline { flex-direction: row; align-items: center; gap: 12px; }
.field-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field-hint { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea {
    padding: 12px 16px; border: 1.5px solid var(--border-soft); border-radius: 12px;
    font-size: 15px; outline: none; background: #fff; color: var(--text);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease); font-family: inherit; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(59,130,246,0.12); }
.field input:disabled { background: var(--bg-alt); color: var(--muted); }
.field textarea { resize: vertical; min-height: 88px; }
.field input[type="file"] { padding: 10px 14px; }
.checkbox { display: flex; align-items: center; gap: 10px; user-select: none; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-grid-2 { grid-template-columns: 1fr; } }
.form-card { background: rgba(255,255,255,0.72); backdrop-filter: blur(12px); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow-md); }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar { margin-bottom: 20px; display: flex; gap: 8px; }
.filter-bar select { padding: 10px 14px; border: 1.5px solid var(--border-soft); border-radius: 10px; }
.img-preview { margin-bottom: 8px; }
.img-preview img { max-height: 200px; border-radius: 10px; border: 1px solid var(--border-soft); }

/* =========================================================
   Алерты
   ========================================================= */
.alert { padding: 14px 16px; border-radius: 12px; font-size: 14px; animation: scale-in .3s var(--ease-spring); }
.alert-error { background: var(--danger-bg); color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: var(--success-bg); color: #166534; border: 1px solid #bbf7d0; }

/* =========================================================
   Авторизация (логин админки)
   ========================================================= */
.auth-wrap {
    min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
    background:
        radial-gradient(ellipse at 30% 25%, rgba(96,165,250,0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 75%, rgba(37,99,235,0.4) 0%, transparent 50%),
        linear-gradient(180deg, var(--midnight) 0%, var(--deep) 100%);
}
.auth-back { align-self: flex-start; max-width: 440px; width: 100%; margin-bottom: 16px; color: rgba(255,255,255,0.7); }
.auth-back:hover { color: #fff; }
.auth-card { background: rgba(255,255,255,0.9); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.6); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 440px; box-shadow: var(--shadow-xl); animation: scale-in .5s var(--ease-spring) both; }
.auth-title { margin: 0 0 8px; color: var(--primary); font-size: 32px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-sub { margin: 0 0 28px; color: var(--muted); }
.auth-form { display: flex; flex-direction: column; gap: 18px; }

/* =========================================================
   3D-блик на карточках (вставляется через JS)
   ========================================================= */
.tilt-glare {
    position: absolute; inset: 0; border-radius: inherit; z-index: 3; pointer-events: none;
    opacity: 0; transition: opacity .3s var(--ease);
    background: radial-gradient(circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,0.45), transparent 45%);
    mix-blend-mode: soft-light;
}
.is-tilting .tilt-glare { opacity: 1; }

/* =========================================================
   Промо-карточки
   ========================================================= */
.promos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 22px; }
.promo-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border-soft);
    border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit;
    box-shadow: 0 10px 30px rgba(30,58,138,0.12);
    transition: box-shadow .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease); position: relative;
}
.promo-card::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease); background: linear-gradient(135deg, rgba(96,165,250,0) 0%, rgba(96,165,250,0.08) 100%); }
.promo-card:hover { box-shadow: var(--shadow-lg); border-color: transparent; text-decoration: none; }
.promo-card:hover::before { opacity: 1; }
.promo-card__media { aspect-ratio: 16/9; overflow: hidden; background: var(--sky-soft); position: relative; }
.promo-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.promo-card:hover .promo-card__media img { transform: scale(1.08); }
.promo-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; position: relative; z-index: 2; }
.promo-card__title { margin: 0; color: var(--primary); font-size: 20px; font-weight: 700; }
.promo-card__text { margin: 0; color: var(--text-light); font-size: 14px; line-height: 1.5; }
.promo-card__more { color: var(--primary); font-weight: 600; font-size: 14px; margin-top: auto; display: inline-flex; align-items: center; gap: 4px; transition: gap .2s var(--ease); }
.promo-card:hover .promo-card__more { gap: 10px; }

/* =========================================================
   Категории  (без box-shadow; белое свечение текста на hover)
   ========================================================= */
.cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.cat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%); color: #fff;
    border-radius: var(--radius); aspect-ratio: 4/3; overflow: hidden; position: relative;
    display: flex; align-items: flex-end; justify-content: center;
}
/* На плитках категорий не показываем белый блик 3D — только свечение текста */
.cat-card .tilt-glare { display: none; }
.cat-card:hover { text-decoration: none; }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: opacity .4s var(--ease), transform .6s var(--ease); }
.cat-card:hover img { opacity: 0.55; transform: scale(1.1); }
.cat-card__name {
    position: relative; z-index: 2; padding: 16px 16px 18px; font-weight: 700; font-size: 18px;
    text-align: center; width: 100%;
    text-shadow: 0 2px 8px rgba(0,0,0,0.45);
    transition: text-shadow .4s var(--ease);
    background: linear-gradient(180deg, transparent 0%, rgba(10,21,53,0.72) 80%);
}
.cat-card:hover .cat-card__name {
    text-shadow: 0 0 18px rgba(255,255,255,0.9), 0 0 6px rgba(255,255,255,0.75), 0 2px 8px rgba(0,0,0,0.4);
}

/* Sticky-полоса категорий (без фона, скрытый скроллбар) */
.cats-strip { position: sticky; top: 74px; z-index: 40; display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; margin: -4px 0 28px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cats-strip::-webkit-scrollbar { display: none; }
.cats-strip__item { flex-shrink: 0; padding: 9px 17px; border-radius: 999px; background: #fff; color: var(--primary); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; box-shadow: 0 4px 14px rgba(30,58,138,0.10); transition: background .25s var(--ease), color .25s var(--ease), transform .15s var(--ease); }
.cats-strip__item:hover { background: var(--sky-soft); text-decoration: none; transform: translateY(-1px); }
.cats-strip__item.is-active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; text-shadow: 0 0 14px rgba(255,255,255,0.85), 0 0 4px rgba(255,255,255,0.6); }

/* =========================================================
   Карточки товаров
   ========================================================= */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.product-card {
    background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column; text-decoration: none; color: inherit; position: relative;
    box-shadow: 0 10px 30px rgba(30,58,138,0.12);
    transition: box-shadow .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.product-card:hover { box-shadow: var(--shadow-lg); border-color: transparent; text-decoration: none; }
.product-card__media { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--sky-soft), var(--sky-lightest)); display: block; overflow: hidden; position: relative; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-card:hover .product-card__media img { transform: scale(1.1); }
.product-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-style: italic; font-size: 32px; opacity: 0.35; font-weight: 700; letter-spacing: 1px; background: linear-gradient(135deg, var(--sky-soft), var(--sky-lightest)), radial-gradient(circle at 50% 50%, rgba(96,165,250,0.2) 0%, transparent 70%); }
.product-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; position: relative; z-index: 2; }
.product-card__title { margin: 0; font-size: 17px; color: var(--text); font-weight: 600; line-height: 1.3; }
.product-card__volume { color: var(--muted); font-size: 12px; display: inline-block; background: var(--sky-soft); padding: 2px 8px; border-radius: 6px; align-self: flex-start; margin-top: 2px; }
.product-card__desc { color: var(--muted); font-size: 13px; margin: 4px 0 0; line-height: 1.5; }
.product-card__footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; gap: 8px; }
.product-card__price { color: var(--primary); font-weight: 800; font-size: 18px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.product-card__price-alt { color: var(--muted); font-weight: 500; font-size: 13px; -webkit-text-fill-color: var(--muted); }

/* =========================================================
   Страница товара
   ========================================================= */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; background: rgba(255,255,255,0.72); backdrop-filter: blur(8px); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-md); animation: scale-in .5s var(--ease-out) both; }
@media (max-width: 720px) { .product-detail { grid-template-columns: 1fr; padding: 22px; gap: 24px; } }
.product-detail__media { background: var(--sky-soft); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-md); }
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__info { display: flex; flex-direction: column; justify-content: center; }
.product-detail__title { color: var(--primary); margin: 0 0 12px; font-size: clamp(24px, 4vw, 38px); font-weight: 800; letter-spacing: -0.5px; }
.product-detail__volume { color: var(--primary); margin-bottom: 16px; background: var(--sky-soft); padding: 4px 12px; border-radius: 999px; align-self: flex-start; font-size: 13px; font-weight: 500; }
.product-detail__desc { color: var(--text); margin-bottom: 20px; line-height: 1.6; }
.product-detail__price { color: var(--primary); font-weight: 800; font-size: clamp(28px, 4vw, 42px); margin-bottom: 20px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* =========================================================
   Промо — детали
   ========================================================= */
.promo-detail { animation: fade-up .6s var(--ease-out) both; }
.promo-detail__media { margin-bottom: 24px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.promo-detail__title { color: #fff; margin: 0 0 12px; font-size: clamp(26px, 4.5vw, 40px); font-weight: 800; letter-spacing: -0.5px; -webkit-text-fill-color: #fff; background: none; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.promo-detail__lead { color: rgba(226,238,255,0.9); font-size: 18px; margin: 0 0 20px; line-height: 1.55; text-shadow: 0 1px 10px rgba(0,0,0,0.4); }
.promo-detail__body {
    background: rgba(10, 16, 34, 0.58);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    padding: 26px 28px;
    color: rgba(236, 241, 255, 0.94);   /* светлый текст на тёмной панели */
    font-size: 16px; line-height: 1.85;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   Дашборд админки
   ========================================================= */
.dash-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; }
@media (max-width: 900px) { .dash-layout { grid-template-columns: 1fr; } }
.dash-sidebar { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); align-self: flex-start; position: sticky; top: 90px; }
.dash-sidebar--admin { background: linear-gradient(160deg, var(--midnight) 0%, var(--primary) 100%); color: #fff; border-color: var(--primary); position: relative; overflow: hidden; }
.dash-sidebar--admin::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 25%, rgba(96,165,250,0.4) 0%, transparent 50%); pointer-events: none; }
.dash-sidebar--admin > * { position: relative; }
.dash-sidebar--admin .dash-sidebar__name, .dash-sidebar--admin .dash-sidebar__phone { color: #fff; }
.dash-sidebar--admin .dash-nav a { color: #fff; opacity: 0.85; }
.dash-sidebar--admin .dash-nav a:hover { opacity: 1; background: rgba(255,255,255,0.12); }
.dash-sidebar__user { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-soft); }
.dash-sidebar--admin .dash-sidebar__user { border-bottom-color: rgba(255,255,255,0.2); }
.dash-sidebar__name { font-weight: 700; font-size: 18px; }
.dash-sidebar__phone { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-nav a { padding: 10px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; transition: background .2s var(--ease), padding-left .2s var(--ease); }
.dash-nav a:hover { background: var(--sky-soft); text-decoration: none; padding-left: 18px; }
.dash-nav__admin { color: var(--primary) !important; font-weight: 700 !important; }
.dash-main { min-width: 0; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 28px; }
.dash-card { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 12px; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.dash-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dash-card__title { color: var(--primary); margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; top: -50%; right: -50%; width: 100px; height: 100px; background: radial-gradient(circle, var(--sky-soft) 0%, transparent 70%); transition: transform .5s var(--ease); }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat:hover::before { transform: scale(2); }
.stat__val { color: var(--primary); font-size: 32px; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; position: relative; }
.stat__lbl { color: var(--muted); font-size: 13px; margin-top: 4px; position: relative; }

/* =========================================================
   Таблицы
   ========================================================= */
.orders-table, .admin-table { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.orders-table__head, .admin-table__head { display: grid; padding: 14px 18px; background: var(--sky-lightest); color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; border-bottom: 1px solid var(--border-soft); }
.orders-table__row, .admin-table__row { display: grid; padding: 14px 18px; align-items: center; border-bottom: 1px solid var(--border-soft); gap: 8px; transition: background .2s var(--ease); }
.orders-table__row:hover, .admin-table__row:hover { background: var(--sky-lightest); }
.orders-table__row:last-child, .admin-table__row:last-child { border-bottom: none; }
.orders-table__head, .orders-table__row { grid-template-columns: 0.6fr 1fr 1.2fr 0.8fr 1fr 0.6fr; }
.admin-table__head, .admin-table__row { grid-template-columns: 0.5fr 1.4fr 1fr 0.8fr 0.6fr 1fr; }
.admin-table--products .admin-table__head, .admin-table--products .admin-table__row { grid-template-columns: 60px 1.6fr 1fr 1fr 0.6fr 1fr; }
.admin-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { display: inline; }
@media (max-width: 760px) { .orders-table__head, .admin-table__head { display: none; } .orders-table__row, .admin-table__row { grid-template-columns: 1fr; padding: 16px 18px; } }

/* =========================================================
   Бейджи
   ========================================================= */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-new { background: var(--sky-soft); color: var(--primary); }
.badge-confirmed { background: #fef3c7; color: #92400e; }
.badge-ready { background: #ddd6fe; color: #5b21b6; }
.badge-done { background: var(--success-bg); color: #166534; }
.badge-cancelled { background: var(--danger-bg); color: #991b1b; }

/* =========================================================
   Мобильная адаптация — отключаем тяжёлое
   ========================================================= */
@media (max-width: 700px) {
    .site-nav { display: none; }
    /* ГЛАВНАЯ ПРИЧИНА РЫВКОВ: при свайпе адресная строка прячется, 100vh меняется,
       и фикс-слой заново растягивает картинку (cover). Держим высоту по lvh —
       она постоянна, поэтому пересчёта во время жеста нет. */
    .fx-bg {
        inset: 0 0 auto 0; height: 100vh; height: 100lvh;
        will-change: auto; transform: translateZ(0); /* отдельный слой композиции — без перерисовок */
    }
    .hero__bg, .hero__inner { will-change: auto; }   /* параллакса нет — слои не нужны */
    /* Карточки за пределами экрана не рисуем: на меню из 78 позиций это главный выигрыш */
    .product-card { content-visibility: auto; contain-intrinsic-size: auto 340px; }
    /* Мягкие тени вместо тяжёлых: большой радиус размытия дорог при прокрутке */
    .product-card, .promo-card { box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
    /* Размытие фона под липкой шапкой пересчитывается на каждом кадре прокрутки —
       на телефоне это главная причина рывков. Заменяем плотной заливкой. */
    .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(7, 11, 33, 0.90); }
    .site-header.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; }
    /* То же самое у карточек контента: размывать фон-картинку при скролле дорого */
    .product-detail, .promo-detail__body, .form-card, .auth-card,
    .btn-ghost, .hero__eyebrow { backdrop-filter: none; -webkit-backdrop-filter: none; }
    /* без размытия фото просвечивает сквозь панель — повышаем плотность */
    .promo-detail__body { background: rgba(10, 16, 34, 0.88); padding: 20px 18px; }
    .site-header__inner { min-height: 60px; }
    .site-logo__title { font-size: 30px; }
    .hero { min-height: 88vh; min-height: 88svh; }
    .hero__title { font-size: clamp(72px, 22vw, 110px); background: none; -webkit-text-fill-color: #fff; color: #fff; }
    .section { padding: 48px 0; }
    .cats-strip { top: 60px; }
    .dash-sidebar { position: static; }
    .grain { display: none; }
}

/* На тач-устройствах :hover «залипает» после нажатия и держит перерисовку
   (особенно масштабирование картинок). Гасим — на телефоне он всё равно не нужен. */
@media (hover: none) {
    .product-card:hover, .promo-card:hover, .cat-card:hover,
    .stat:hover, .dash-card:hover, .btn:hover { transform: none; }
    .product-card:hover .product-card__media img,
    .promo-card:hover .promo-card__media img,
    .cat-card:hover img { transform: none; }
}

/* Уважение к prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
    .ember, .smoke, .fx-aurora, .hero__aurora { display: none !important; }
}

/* =========================================================
   Тёмная тема задаёт body { color: #fff }. Поэтому КАЖДЫЙ блок со светлым
   фоном должен явно вернуть тёмный текст — иначе содержимое без своего класса
   (ячейки таблиц, обычный текст) становится белым по белому.
   ========================================================= */
.form-card,
.auth-card,
.product-detail,
.dash-card,
.stat,
.orders-table,
.admin-table,
.product-card,
.promo-card,
.dash-sidebar:not(.dash-sidebar--admin) {
    color: var(--text);
}

/* =========================================================
   Скроллбар — фирменный градиент (WebKit/Blink)
   ========================================================= */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: rgba(219, 234, 254, 0.35); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
    background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }
