/* ==========================================================================
   Будь Здоров — основные стили
   Структура: шрифты → токены → база → компоненты → секции → анимации → адаптив
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
    font-family: 'PF Agora Serif Pro';
    src: url('../../fonts/PFAgoraSerifPro-Regular.woff2') format('woff2'),
         url('../../fonts/PFAgoraSerifPro-Regular.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'PF Agora Serif Pro';
    src: url('../../fonts/PFAgoraSerifPro-Bold.woff2') format('woff2'),
         url('../../fonts/PFAgoraSerifPro-Bold.ttf') format('truetype');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'PF Agora Serif Pro';
    src: url('../../fonts/PFAgoraSerifPro-Italic.woff2') format('woff2'),
         url('../../fonts/PFAgoraSerifPro-Italic.ttf') format('truetype');
    font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
    --brand-red: #E30016;
    --brand-yellow: #FFCB23;

    --red: #D10015;
    --red-hover: #B00012;
    --red-soft: rgba(227, 0, 22, 0.08);
    --yellow: #FFC21A;
    --yellow-hover: #FFD54A;
    --green: #22A559;

    --bg: #FFFDF9;
    --bg-alt: #FFF5EA;
    --surface: #FFFFFF;
    --surface-2: #FFF8F0;
    --ink: #221B17;
    --ink-2: #4A413B;
    --muted: #7A6F67;
    --line: rgba(34, 27, 23, 0.09);
    --glass: rgba(255, 253, 249, 0.72);
    --shadow-sm: 0 1px 2px rgba(60, 30, 10, 0.06), 0 2px 8px rgba(60, 30, 10, 0.05);
    --shadow: 0 2px 6px rgba(60, 30, 10, 0.05), 0 12px 32px rgba(60, 30, 10, 0.09);
    --shadow-lg: 0 8px 20px rgba(60, 30, 10, 0.08), 0 30px 60px rgba(60, 30, 10, 0.14);
    --footer-bg: #231C18;

    --font-heading: 'PF Agora Serif Pro', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --container: 1180px;
    --gutter: clamp(16px, 4vw, 32px);
    --header-h: 76px;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    color-scheme: light;
}

:root[data-theme="dark"] {
    --red: #FF4155;
    --red-hover: #FF5C6D;
    --red-soft: rgba(255, 65, 85, 0.12);
    --yellow: #FFC93D;
    --yellow-hover: #FFD970;
    --green: #3DDC84;

    --bg: #13100E;
    --bg-alt: #1A1613;
    --surface: #1F1A17;
    --surface-2: #26201C;
    --ink: #F6EFE9;
    --ink-2: #D8CEC6;
    --muted: #A99C92;
    --line: rgba(255, 240, 225, 0.09);
    --glass: rgba(19, 16, 14, 0.72);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.3), 0 30px 60px rgba(0, 0, 0, 0.45);
    --footer-bg: #0D0B0A;

    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 8px);
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.4s ease, color 0.4s ease;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

::selection { background: var(--brand-yellow); color: #221B17; }

:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
    border-radius: 8px;
}

.nowrap { white-space: nowrap; }

.ic {
    width: 1.15em; height: 1.15em; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: fixed; top: 8px; left: 8px; z-index: 3000;
    padding: 10px 16px; border-radius: 10px;
    background: var(--ink); color: var(--bg);
    transform: translateY(-150%); transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--surface);
    --btn-fg: var(--ink);
    position: relative; isolation: isolate; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
    min-height: 48px; padding: 0.8em 1.5em;
    border-radius: 999px;
    background: var(--btn-bg); color: var(--btn-fg);
    font-weight: 600; font-size: 1rem; line-height: 1.2; white-space: nowrap;
    transition: transform 0.25s var(--ease-out), translate 0.35s var(--ease-out), box-shadow 0.25s, background-color 0.25s, color 0.25s;
    user-select: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.08s; }

.btn-red { --btn-bg: var(--brand-red); --btn-fg: #fff; box-shadow: 0 6px 20px -6px rgba(227, 0, 22, 0.55); }
.btn-red:hover { --btn-bg: #C70013; box-shadow: 0 10px 28px -8px rgba(227, 0, 22, 0.6); }

.btn-yellow { --btn-bg: var(--yellow); --btn-fg: #221B17; box-shadow: 0 6px 22px -6px rgba(255, 194, 26, 0.7); }
.btn-yellow:hover { --btn-bg: var(--yellow-hover); box-shadow: 0 12px 30px -8px rgba(255, 194, 26, 0.75); }

.btn-glass {
    --btn-bg: rgba(255, 255, 255, 0.14); --btn-fg: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn-glass:hover { --btn-bg: rgba(255, 255, 255, 0.24); }

.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--red); --btn-fg: var(--red); }

.btn-lg { min-height: 56px; padding: 0.95em 1.9em; font-size: 1.05rem; }
.btn-sm { min-height: 40px; padding: 0.55em 1.1em; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* волна от точки нажатия (span.ripple добавляет main.js) */
.ripple {
    position: absolute; z-index: -1; pointer-events: none;
    width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    background: currentColor; opacity: 0.28;
    transform: scale(0);
    animation: ripple 0.65s var(--ease-out) forwards;
}

/* бегущий блик по кнопке */
.btn-shine::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: shine 4.5s ease-in-out 2s infinite;
}

.icon-btn {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; border-radius: 50%;
    color: var(--ink);
    transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.icon-btn:hover { background: var(--red-soft); color: var(--red); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn .ic { width: 22px; height: 22px; }
.icon-btn-sm { width: 36px; height: 36px; }
.icon-btn-sm .ic { width: 18px; height: 18px; }

.round-btn {
    display: inline-grid; place-items: center;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease-out), opacity 0.2s;
}
.round-btn:hover { background: var(--red); color: #fff; border-color: transparent; }
.round-btn:active { transform: scale(0.92); }
.round-btn:disabled { opacity: 0.35; pointer-events: none; }

/* ---------- Open status chip ---------- */
.open-status {
    display: inline-flex; align-items: center; gap: 0.55em;
    font-size: 0.85rem; font-weight: 600; color: var(--ink-2);
}
.open-status i {
    position: relative; width: 9px; height: 9px; border-radius: 50%;
    background: var(--muted); flex-shrink: 0;
}
.open-status.is-open i { background: var(--green); }
.open-status.is-open i::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: var(--green); animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.open-status.is-closed i { background: var(--red); }

/* ---------- Theme switch (View Transitions) ---------- */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1200;
    pointer-events: none;
}
.scroll-progress span {
    display: block; height: 100%; width: 100%;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow));
    transform-origin: 0 50%; transform: scaleX(0);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 12px var(--gutter) 0;
    padding-top: max(12px, env(safe-area-inset-top));
    pointer-events: none;
}
/* Панель из «жидкого стекла»: почти прозрачная, фон под ней размыт и насыщен,
   по краям светлые блики, сверху слева — блик-линза. Всегда на месте. */
.header-bar {
    position: relative; isolation: isolate;
    pointer-events: auto;
    max-width: calc(var(--container) + 40px);
    margin-inline: auto;
    height: 64px;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0 10px 0 20px;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 18px rgba(255, 255, 255, 0.06),
        0 10px 30px -12px rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    backdrop-filter: blur(14px) saturate(170%);
    transition: background 0.4s, border-color 0.4s, box-shadow 0.4s, height 0.35s var(--ease-out);
    animation: headerIn 0.8s var(--ease-out) 0.95s backwards;
}
.header-bar::before {
    content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
    background:
        radial-gradient(60% 140% at 10% -40%, rgba(255, 255, 255, 0.38), transparent 60%),
        radial-gradient(40% 120% at 94% 140%, rgba(255, 255, 255, 0.16), transparent 60%);
}
.js:not(.intro-go) .header-bar { animation-play-state: paused; }
.header.scrolled .header-bar {
    height: 58px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.34) 45%, rgba(255, 255, 255, 0.5));
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(255, 255, 255, 0.4),
        inset 0 0 22px rgba(255, 255, 255, 0.3),
        0 12px 34px -14px rgba(60, 30, 10, 0.35);
}
:root[data-theme="dark"] .header.scrolled .header-bar {
    background: linear-gradient(120deg, rgba(70, 56, 47, 0.55), rgba(30, 24, 20, 0.36) 45%, rgba(56, 45, 38, 0.5));
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 12px 34px -14px rgba(0, 0, 0, 0.7);
}
:root[data-theme="dark"] .header.scrolled .header-bar::before { opacity: 0.35; }

/* логотип в шапке: раз в 4 секунды по нему пробегает блик; клик — оборот и наверх */
.header-logo { position: relative; display: block; line-height: 0; }
.header-logo::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    -webkit-mask: url(../../img/svg/logo.svg) 0 0 / 100% 100% no-repeat;
    mask: url(../../img/svg/logo.svg) 0 0 / 100% 100% no-repeat;
    background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, 0.85) 50%, transparent 62%) no-repeat;
    background-size: 260% 100%;
    background-position: 100% 0;
    animation: headerGlint 4s ease-in-out 2.6s infinite;
}
.header-logo.spin { animation: logoSpin 0.9s linear; }
.header-logo img {
    height: 44px; width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
    transition: height 0.35s var(--ease-out), transform 0.3s var(--ease-spring);
}
.header.scrolled .header-logo img { height: 38px; filter: none; }
.header-logo:hover img { transform: rotate(-4deg) scale(1.04); }

.nav { position: relative; display: flex; align-items: center; gap: 2px; }
.nav a {
    position: relative; z-index: 1;
    padding: 8px 14px; border-radius: 999px;
    font-size: 0.92rem; font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.25s;
}
.nav a:hover { color: #fff; }
.nav a.active { color: #221B17; }
.nav-indicator {
    position: absolute; top: 50%; left: 0; z-index: 0;
    height: 36px; width: 0; border-radius: 999px;
    background: var(--brand-yellow);
    transform: translate(var(--x, 0), -50%);
    opacity: 0;
    transition: transform 0.45s var(--ease-out), width 0.45s var(--ease-out), opacity 0.3s;
}
.nav-indicator.on { opacity: 1; }
/* стеклянная «капля» под пунктом меню при наведении — перетекает между пунктами */
.nav-hover {
    position: absolute; top: 50%; left: 0; z-index: 0;
    height: 38px; width: 0; border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.8),
        inset 0 -3px 8px rgba(255, 255, 255, 0.12),
        0 6px 16px -6px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(4px) saturate(180%) brightness(1.08);
    backdrop-filter: blur(4px) saturate(180%) brightness(1.08);
    transform: translate(var(--hx, 0), -50%) scale(0.8);
    opacity: 0; pointer-events: none;
    transition: transform 0.5s var(--ease-spring), width 0.5s var(--ease-spring), opacity 0.25s;
}
.nav-hover.on { opacity: 1; transform: translate(var(--hx, 0), -50%) scale(1); }
.header.scrolled .nav-hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.55));
    border-color: #fff;
    box-shadow:
        inset 0 1px 1px #fff,
        inset 0 -3px 8px rgba(34, 27, 23, 0.05),
        0 6px 18px -8px rgba(60, 30, 10, 0.4);
}
:root[data-theme="dark"] .header.scrolled .nav-hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.28), 0 6px 18px -8px rgba(0, 0, 0, 0.6);
}
.header.scrolled .nav a { color: var(--ink-2); }
.header.scrolled .nav a:hover { color: var(--ink); }
.header.scrolled .nav a.active { color: #221B17; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.header:not(.scrolled) .icon-btn { color: #fff; }
.header:not(.scrolled) .icon-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle .ic { position: absolute; transition: transform 0.5s var(--ease-spring), opacity 0.3s; }
.theme-toggle .ic-moon { transform: translateY(140%) rotate(-90deg); opacity: 0; }
:root[data-theme="dark"] .theme-toggle .ic-sun { transform: translateY(-140%) rotate(90deg); opacity: 0; }
:root[data-theme="dark"] .theme-toggle .ic-moon { transform: none; opacity: 1; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    position: relative; isolation: isolate;
    min-height: 100vh; min-height: 100svh;
    display: grid; place-items: center;
    padding: calc(var(--header-h) + 24px) var(--gutter) 140px;
    text-align: center; color: #fff;
    overflow: hidden;
    background: #1b120d;
}
.hero-media { position: absolute; inset: 0; z-index: -3; will-change: transform; }
.hero-media img {
    width: 100%; height: 100%; object-fit: cover;
    transform: scale(1.15);
    animation: kenburns 3s var(--ease-out) forwards;
}
.hero-shade {
    position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(ellipse 70% 55% at 50% 48%, rgba(20, 8, 2, 0.15), rgba(20, 8, 2, 0.55) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.1) 35%, rgba(0, 0, 0, 0.2) 65%, rgba(0, 0, 0, 0.65) 100%);
}
.hero-grain {
    position: absolute; inset: -50%; z-index: -1; pointer-events: none;
    opacity: 0.09; 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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1s steps(4) infinite;
}
/* Пар над горячими блюдами: струйки поднимаются и тают (текстура — SVG-шум) */
.hero-steam {
    --steam-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 400'%3E%3Cdefs%3E%3Cfilter id='f' filterUnits='userSpaceOnUse' x='0' y='0' width='200' height='400'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.01 0.022' numOctaves='2' seed='9'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='45'/%3E%3CfeGaussianBlur stdDeviation='8'/%3E%3C/filter%3E%3ClinearGradient id='g' x1='0' y1='1' x2='0' y2='0'%3E%3Cstop offset='0' stop-color='white' stop-opacity='0'/%3E%3Cstop offset='.3' stop-color='white' stop-opacity='.85'/%3E%3Cstop offset='.75' stop-color='white' stop-opacity='.35'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M96 385C120 330 76 270 104 200S132 90 92 20' fill='none' stroke='url(%23g)' stroke-width='30' stroke-linecap='round' filter='url(%23f)'/%3E%3C/svg%3E");
    --steam-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 400'%3E%3Cdefs%3E%3Cfilter id='f' filterUnits='userSpaceOnUse' x='0' y='0' width='200' height='400'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.008 0.018' numOctaves='2' seed='2'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='65'/%3E%3CfeGaussianBlur stdDeviation='9'/%3E%3C/filter%3E%3ClinearGradient id='g' x1='0' y1='1' x2='0' y2='0'%3E%3Cstop offset='0' stop-color='white' stop-opacity='0'/%3E%3Cstop offset='.3' stop-color='white' stop-opacity='.85'/%3E%3Cstop offset='.75' stop-color='white' stop-opacity='.35'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M104 385C84 300 130 250 98 170S86 70 112 20' fill='none' stroke='url(%23g)' stroke-width='38' stroke-linecap='round' filter='url(%23f)'/%3E%3C/svg%3E");
    position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.hero-steam i {
    position: absolute; bottom: 2%;
    width: clamp(150px, 19vw, 300px); aspect-ratio: 3 / 5;
    background: var(--steam-a) center / 100% 100% no-repeat;
    transform-origin: 50% 100%;
    opacity: 0;
    animation: steamRise 9s ease-in-out infinite;
}
.hero-steam i:nth-child(1) { left: 2%; animation-delay: 1.4s; }
.hero-steam i:nth-child(2) { left: 22%; animation-delay: 4.4s; animation-duration: 10s; background-image: var(--steam-b); }
.hero-steam i:nth-child(3) { left: 42%; animation-delay: 2.6s; animation-duration: 11s; --o: 0.36; }
.hero-steam i:nth-child(4) { left: 61%; animation-delay: 6s; background-image: var(--steam-b); }
.hero-steam i:nth-child(5) { left: 80%; animation-delay: 3.4s; animation-duration: 10.5s; }
/* «Свет включается», когда логотип собрался */
.hero-dim {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: #0E0806; opacity: 0;
    animation: lightsOn 1.3s ease 0.75s backwards;
}

/* Заставка ждёт загрузки фото: до сигнала все анимации первого экрана на паузе */
.js:not(.intro-go) .hero,
.js:not(.intro-go) .hero * { animation-play-state: paused !important; }

.hero-content { position: relative; max-width: 860px; }
.hero-chip {
    padding: 8px 16px 8px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    color: #fff; margin-bottom: 1.4rem;
    animation: fadeUp 0.8s var(--ease-out) 1.2s both;
}
.hero-chip.open-status { color: #fff; }

/* ---------- Логотип-конструктор ----------
   Две самостоятельные детали (img/svg/logo-icon.svg и logo-word.svg — у каждой
   своя красная подложка и жёлтая обводка, как у наклейки) летят навстречу
   и сталкиваются, затем их подменяет цельный logo.svg. Движение считает
   main.js по законам физики; без JS и при «уменьшить движение» сразу виден
   цельный логотип. */
.hero-logo {
    position: relative;
    width: min(440px, 78vw); aspect-ratio: 427.56 / 213;
    margin: 0 auto 1.4rem;
    user-select: none; -webkit-user-select: none;
    transition: scale 0.5s var(--ease-spring), rotate 0.5s var(--ease-spring);
}
.js:not(.intro-go) .hero-logo { opacity: 0; }
.js .hero-logo { cursor: pointer; } /* клик — собрать заново */
@media (hover: hover) {
    .hero-logo:hover { scale: 1.03; rotate: -1.5deg; }
}
.logo-body { position: absolute; inset: 0; }
.logo-body > img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.5));
    -webkit-user-drag: none;
}
.logo-piece { opacity: 0; }
.logo-icon { z-index: 1; transform-origin: 12% 55%; }
.logo-full { z-index: 2; }
/* вспышка в точке удара */
.logo-flash {
    position: absolute; z-index: 3; left: 19.5%; top: 50%;
    width: 34%; aspect-ratio: 1; margin: -17% 0 0 -17%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 236, 170, 0.55) 30%, rgba(255, 203, 35, 0) 68%);
    opacity: 0; pointer-events: none;
}
/* блик пробегает по логотипу, когда он встал на место, и потом раз в 7 секунд */
.logo-shine {
    position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none;
    -webkit-mask: url(../../img/svg/logo.svg) 0 0 / 100% 100% no-repeat;
    mask: url(../../img/svg/logo.svg) 0 0 / 100% 100% no-repeat;
}
.logo-shine::before {
    content: ''; position: absolute; top: -10%; bottom: -10%; left: 0; width: 18%;
    background: linear-gradient(100deg, transparent 10%, rgba(255, 255, 255, 0.6) 50%, transparent 90%);
    transform: translateX(-200%) skewX(-16deg);
    animation: logoGlint 7s ease-in-out 1.5s infinite;
}
/* «щелчок»: штрихи разлетаются от стыка сверху и снизу */
.logo-snap { position: absolute; z-index: 4; width: 0; height: 0; pointer-events: none; }
.logo-snap-top { left: 18.5%; top: 3%; }
.logo-snap-bottom { left: 23.5%; top: 96%; }
.logo-snap i {
    position: absolute; left: -2px; bottom: 0;
    width: 4px; height: 15px; border-radius: 2px;
    background: #FFE27A;
    transform-origin: 50% 100%;
    opacity: 0;
}
.hero-title {
    font-family: var(--font-heading); font-weight: 400;
    font-size: clamp(1.45rem, 3.6vw, 2.3rem); line-height: 1.25;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
    margin-bottom: 0.5rem;
}
.hero-title .word {
    display: inline-block;
    animation: wordUp 0.8s var(--ease-out) both;
}
.hero-title .word:nth-child(1) { animation-delay: 1.3s; }
.hero-title .word:nth-child(2) { animation-delay: 1.37s; }
.hero-title .word:nth-child(3) { animation-delay: 1.44s; }
.hero-title .word:nth-child(4) { animation-delay: 1.51s; color: var(--brand-yellow); }
.hero-title .word:nth-child(5) { animation-delay: 1.58s; }
.hero-tagline {
    font-family: var(--font-heading); font-style: italic;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    margin-bottom: 2.2rem;
    animation: fadeUp 0.8s var(--ease-out) 1.65s both;
}
.hero-actions {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
    animation: fadeUp 0.8s var(--ease-out) 1.8s both;
}

.hero-floaters { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.floater {
    position: absolute; width: clamp(38px, 5vw, 70px); height: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
    opacity: 0;
    translate: calc(var(--mx, 0) * var(--depth) * 1px) calc(var(--my, 0) * var(--depth) * 1px);
    transition: translate 0.6s var(--ease-out);
    animation: floaterIn 1s var(--ease-spring) forwards, bob 6s ease-in-out infinite;
}
.floater.f1 { top: 18%; left: 9%;  animation-delay: 1.9s, 2.9s; }
.floater.f2 { top: 16%; right: 10%; animation-delay: 2s, 3s; animation-duration: 1s, 7s; }
.floater.f3 { top: 56%; right: 6%;  animation-delay: 2.1s, 3.1s; animation-duration: 1s, 5.5s; }
.floater.f4 { top: 62%; left: 6%;   animation-delay: 2.2s, 3.2s; animation-duration: 1s, 6.5s; }
.floater.f5 { bottom: 20%; right: 22%; animation-delay: 2.3s, 3.3s; animation-duration: 1s, 8s; width: clamp(44px, 6vw, 84px); }
.floater.f6 { bottom: 24%; left: 21%; animation-delay: 2.4s, 3.4s; animation-duration: 1s, 7.5s; }

.hero-scroll {
    position: absolute; left: 50%; bottom: 96px; z-index: 2;
    width: 28px; height: 44px; margin-left: -14px;
    border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 16px;
    animation: fadeUp 0.8s var(--ease-out) 2.4s both;
}
.hero-scroll span {
    position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
    border-radius: 2px; background: #fff;
    animation: wheel 1.8s ease-in-out infinite;
}

.hero-swoosh, .footer-wave { position: relative; line-height: 0; }
.hero-swoosh { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; }
.hero-swoosh svg, .footer-wave svg { width: 100%; height: clamp(50px, 8vw, 120px); }
.swoosh-fill { fill: var(--bg-alt); transition: fill 0.4s; }
.swoosh-line { fill: none; }
.js .swoosh-line { stroke-dasharray: 1600; stroke-dashoffset: 1600; }
.swoosh-line.red { stroke: var(--brand-red); stroke-width: 3.5; opacity: 0.8; }
.swoosh-line.yellow { stroke: var(--brand-yellow); stroke-width: 2.5; opacity: 0.75; }
.hero-swoosh .swoosh-line { animation: draw 2s var(--ease-out) 1.2s forwards; }
.hero-swoosh .swoosh-line.yellow { animation-delay: 1.45s; }
.footer-wave.visible .swoosh-line { animation: draw 2s var(--ease-out) forwards; }
.footer-wave.visible .swoosh-line.yellow { animation-delay: 0.25s; }
.footer-wave .swoosh-fill { fill: var(--footer-bg); }

/* ==========================================================================
   MARQUEE
   ========================================================================== */
.marquee {
    position: relative; z-index: 2;
    background: var(--bg-alt);
    padding: 18px 0 30px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-list { display: flex; flex-shrink: 0; }
.marquee-list li {
    display: flex; align-items: center; gap: 14px;
    padding-right: 44px;
    font-family: var(--font-heading); font-weight: 700;
    font-size: clamp(1.25rem, 2.6vw, 1.9rem);
    color: var(--ink); white-space: nowrap;
    transform: skewX(var(--skew, 0deg)); /* наклон от скорости прокрутки */
}
.marquee-list li:nth-child(even) { color: var(--red); font-style: italic; font-weight: 400; }
.marquee-list img {
    width: clamp(30px, 3.6vw, 44px); height: clamp(30px, 3.6vw, 44px); object-fit: contain;
    transition: transform 0.4s var(--ease-spring);
}
.marquee-list li:hover img { transform: rotate(-14deg) scale(1.2); }

/* ==========================================================================
   SECTIONS — common
   ========================================================================== */
.section { position: relative; padding: clamp(64px, 10vw, 120px) 0; }
.about { background: var(--bg-alt); }
.services { background: var(--bg); }
.delivery { background: var(--bg); padding-top: 0; }
.gallery { background: var(--bg-alt); }
.kitchen { background: var(--bg); }
.reviews { background: var(--bg-alt); overflow: hidden; }
.contacts { background: var(--bg); }

.sec-head { text-align: center; max-width: 720px; margin: 0 auto clamp(36px, 6vw, 64px); }
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 5px 16px 5px 5px; border-radius: 999px;
    background: var(--surface); color: var(--ink-2);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    margin-bottom: 18px;
}
.eyebrow img {
    width: 30px; height: 30px; padding: 5px; border-radius: 50%;
    background: var(--bg-alt); object-fit: contain;
}
.js .visible .eyebrow img { animation: eyebrowPop 0.8s var(--ease-spring) 0.25s both; }
.sec-title {
    font-family: var(--font-heading); font-weight: 700;
    font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.12;
    letter-spacing: -0.01em; color: var(--ink);
    text-wrap: balance;
}
.sec-title em {
    position: relative; isolation: isolate; display: inline-block;
    font-style: italic; font-weight: 400; color: var(--red);
}
/* жёлтый мазок «от руки» под словом — прорисовывается слева направо */
.sec-title em::after {
    content: ''; position: absolute; z-index: -1;
    left: -3%; right: -5%; bottom: -0.2em; height: 0.42em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath fill='%23FFCB23' d='M3 11.2C45 8.8 120 7 197 5.8c1.2 0 1.4 2 .2 2.2C128 13.2 62 16.4 3.6 16.6c-3.2 0-3.6-5.3-.6-5.4Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
    pointer-events: none;
}
.js .sec-title em::after {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.45s;
}
.js .visible .sec-title em::after { clip-path: inset(0 0 0 0); }
/* слова заголовка (их расставляет main.js) поднимаются по очереди */
.sec-title .w { display: inline-block; }
.js .sec-title.split .w {
    opacity: 0; transform: translateY(0.5em) rotate(3deg);
    transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out);
    transition-delay: calc(0.12s + var(--i, 0) * 0.07s);
}
.js .visible .sec-title.split .w { opacity: 1; transform: none; }
.sec-lead {
    margin-top: 14px; color: var(--muted);
    font-size: clamp(1rem, 1.6vw, 1.12rem); text-wrap: balance;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid {
    display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
.about-media { position: relative; }
.about-media > img {
    width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.about-badge {
    position: absolute; right: -22px; bottom: -28px;
    width: 132px; height: 132px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--red); color: #fff;
    box-shadow: 0 12px 30px -8px rgba(227, 0, 22, 0.6);
}
.about-badge-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }
.about-badge-ring text {
    fill: #fff; font-family: var(--font-body); font-weight: 700;
    font-size: 10.5px;
}
.about-badge-core {
    display: grid; place-items: center; line-height: 1;
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--brand-yellow); color: #221B17;
}
.about-badge-core b { font-family: var(--font-heading); font-size: 1.8rem; }
.about-badge-core small { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-top: -10px; }

.about-text h3 {
    font-family: var(--font-heading); font-size: clamp(1.4rem, 2.6vw, 1.8rem);
    color: var(--red); margin-bottom: 14px;
}
.about-text p { color: var(--ink-2); margin-bottom: 14px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.feature {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s, border-color 0.3s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(227, 0, 22, 0.25); }
.feature-ic {
    display: grid; place-items: center; flex-shrink: 0;
    width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2);
}
.feature-ic img { width: 28px; height: 28px; object-fit: contain; transition: transform 0.4s var(--ease-spring); }
.feature:hover .feature-ic img { transform: rotate(-12deg) scale(1.15); }
.feature b { display: block; font-size: 1rem; line-height: 1.2; }
.feature small { color: var(--muted); font-size: 0.82rem; }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services-grid {
    display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px;
}
.service-card { grid-column: span 5; }
.service-card.s-wide { grid-column: span 7; }
.service-card {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: 420px; border-radius: var(--radius-lg);
    display: flex; align-items: flex-end;
    color: #fff; background: #2a1c14;
    box-shadow: var(--shadow);
    transition: transform 0.5s var(--ease-out), box-shadow 0.4s;
}
.service-card > img {
    position: absolute; inset: 0; z-index: -2;
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.9s var(--ease-out);
}
.service-card::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(20, 10, 4, 0) 25%, rgba(20, 10, 4, 0.55) 55%, rgba(20, 10, 4, 0.92) 100%);
}
.service-card::after {
    /* подсветка, следующая за курсором */
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(420px circle at var(--px, 50%) var(--py, 50%), rgba(255, 220, 140, 0.18), transparent 45%);
    opacity: 0; transition: opacity 0.3s;
}
.service-card:hover { box-shadow: var(--shadow-lg); }
.service-card:hover::after { opacity: 1; }
.service-card:hover > img { transform: scale(1.07); }
.service-body { position: relative; z-index: 2; padding: 28px; }
.service-ic {
    display: grid; place-items: center;
    width: 52px; height: 52px; border-radius: 16px;
    background: rgba(255, 255, 255, 0.92); margin-bottom: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.45s var(--ease-spring);
}
.service-ic img { width: 32px; height: 32px; object-fit: contain; }
.service-card:hover .service-ic { transform: rotate(-8deg) scale(1.08); }
.service-body h3 {
    font-family: var(--font-heading); font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    line-height: 1.2; margin-bottom: 8px;
}
.service-body p { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; max-width: 46ch; }
.service-link {
    position: relative; isolation: isolate; overflow: hidden;
    display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
    padding: 9px 16px; border-radius: 999px;
    background: var(--brand-yellow); color: #221B17; font-weight: 600; font-size: 0.9rem;
    transition: gap 0.3s var(--ease-out), transform 0.2s;
}
.service-link:hover { gap: 12px; }
.service-link:active { transform: scale(0.96); }

.carousel-dots { display: none; justify-content: center; gap: 6px; margin-top: 20px; }
.carousel-dots span {
    width: 8px; height: 8px; border-radius: 999px; background: var(--line);
    transition: width 0.35s var(--ease-out), background-color 0.3s;
}
.carousel-dots span.active { width: 26px; background: var(--red); }

/* ==========================================================================
   DELIVERY
   ========================================================================== */
.delivery-card {
    display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px);
    align-items: center;
    padding: clamp(28px, 5vw, 64px);
    border-radius: 36px;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 203, 35, 0.22), transparent 45%),
        radial-gradient(circle at 0% 100%, rgba(227, 0, 22, 0.1), transparent 50%),
        var(--surface-2);
    border: 1px solid var(--line);
    overflow: hidden;
}
.delivery-text .sec-title { margin-bottom: 16px; }
.delivery-text > p { color: var(--ink-2); font-size: 1.05rem; margin-bottom: 22px; }
.delivery-list { display: grid; gap: 12px; margin-bottom: 28px; }
.delivery-list li { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.js .delivery-list li {
    opacity: 0; transform: translateX(-16px);
    transition: opacity 0.6s, transform 0.6s var(--ease-out);
    transition-delay: calc(0.3s + var(--d, 0) * 0.12s);
}
.js .visible .delivery-list li { opacity: 1; transform: none; }
.tick {
    display: grid; place-items: center; flex-shrink: 0;
    width: 42px; height: 42px; border-radius: 13px;
    background: var(--brand-yellow); color: #221B17;
}
.delivery-media { position: relative; padding-bottom: 46px; }

/* Фургон на фото едет влево: кадр «открывается» справа налево,
   машина въезжает, тормозит с лёгким клевком и останавливается */
.van-frame {
    position: relative; overflow: hidden;
    aspect-ratio: 1200 / 754;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    background: #3B3F44;
}
.van-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.js .van-frame { clip-path: inset(0 0 0 100% round var(--radius-lg)); }
.js .visible .van-frame { animation: frameWipe 1s var(--ease-out) both; }
.js .visible .van-frame img { animation: vanArrive 1.6s linear both; }
.van-streaks { position: absolute; inset: 0; pointer-events: none; }
.van-streaks i {
    position: absolute; right: 0; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
    opacity: 0;
}
.js .visible .van-streaks i { animation: streak 0.75s var(--ease-out) both; }
.van-streaks i:nth-child(1) { top: 20%; width: 36%; animation-delay: 0.08s; }
.van-streaks i:nth-child(2) { top: 38%; width: 52%; animation-delay: 0.16s; }
.van-streaks i:nth-child(3) { top: 55%; width: 30%; animation-delay: 0.04s; }
.van-streaks i:nth-child(4) { top: 69%; width: 46%; animation-delay: 0.22s; }
.van-streaks i:nth-child(5) { top: 83%; width: 32%; animation-delay: 0.12s; }

/* Карточка «доставка в пути» — цикл 7 с, играет, только пока видна */
.tracker {
    --cycle: 7s;
    position: absolute; left: clamp(-28px, -2vw, -12px); bottom: 0; z-index: 2;
    width: min(320px, 88%);
    padding: 14px 16px 12px;
    border-radius: 20px;
    background: var(--glass);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
    font-size: 0.86rem; line-height: 1.3;
}
.js .tracker {
    opacity: 0; transform: translateY(22px) scale(0.96);
    transition: opacity 0.6s ease 0.9s, transform 0.8s var(--ease-spring) 0.9s;
}
.js .visible .tracker { opacity: 1; transform: none; }
.js .tracker:not(.playing),
.js .tracker:not(.playing) * { animation-play-state: paused !important; }

.tracker-status { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-weight: 700; color: var(--ink); }
.tracker-dot { position: relative; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.tracker-dot::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: var(--green); animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.tracker-msgs { display: grid; }
.tracker-msg {
    grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.tracker-msg-done { opacity: 0; color: var(--green); }
.tracker-msg .ic { width: 16px; height: 16px; stroke-width: 3; }

.tracker-route { display: flex; align-items: center; gap: 8px; }
.tracker-pt {
    position: relative; display: grid; place-items: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 50%;
}
.tracker-pt .ic { grid-area: 1 / 1; width: 17px; height: 17px; }
.tracker-from { background: var(--brand-red); color: #fff; box-shadow: 0 4px 12px -4px rgba(227, 0, 22, 0.6); }
.tracker-to {
    background: var(--surface-2); color: var(--ink-2);
}
.tracker-to .ic + .ic { opacity: 0; color: #fff; stroke-width: 3; }
.tracker-line {
    position: relative; flex: 1; height: 4px; border-radius: 2px;
    background: repeating-linear-gradient(90deg, rgba(120, 108, 98, 0.35) 0 7px, transparent 7px 12px);
    background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 22%, transparent) 0 7px, transparent 7px 12px);
}
.tracker-fill {
    position: absolute; inset: 0; border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow));
    transform-origin: 0 50%; transform: scaleX(0);
}
/* бегунок шириной во всю линию: сдвиг на 100% = доехал до гостя */
.tracker-van {
    position: absolute; left: 21px; right: 21px; bottom: 1px; height: 0;
}
.tracker-van svg {
    position: absolute; left: -21px; bottom: 0;
    width: 42px; height: 25px;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.18));
}
/* цикл трекера запускается заново при каждом появлении карточки на экране */
.visible .tracker-msg { animation: trackMsgOut var(--cycle) linear 1.2s infinite both; }
.visible .tracker-msg-done { animation-name: trackMsgIn; }
.visible .tracker-to { animation: trackArrive var(--cycle) linear 1.2s infinite both; }
.visible .tracker-to .ic:first-child { animation: trackHomeOut var(--cycle) linear 1.2s infinite both; }
.visible .tracker-to .ic + .ic { animation: trackCheckIn var(--cycle) linear 1.2s infinite both; }
.visible .tracker-fill { animation: trackFill var(--cycle) linear 1.2s infinite both; }
.visible .tracker-van { animation: trackRun var(--cycle) linear 1.2s infinite both; }
.visible .tracker-van svg { animation: vanBob 0.35s ease-in-out infinite alternate; }
.tracker-labels {
    display: flex; justify-content: space-between;
    margin-top: 6px; font-size: 0.74rem; font-weight: 600; color: var(--muted);
}

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(150px, 17vw, 220px);
    grid-auto-flow: dense; gap: 14px;
}
.g-item {
    position: relative; overflow: hidden; isolation: isolate;
    border-radius: var(--radius); background: var(--surface-2);
    box-shadow: var(--shadow-sm);
    cursor: zoom-in; text-align: left;
    transition: box-shadow 0.3s;
}
.g-big { grid-column: span 2; grid-row: span 2; }
.g-wide { grid-column: span 2; }
.g-tall { grid-row: span 2; }
.g-item img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s var(--ease-out), filter 0.5s;
}
/* параллакс внутри плитки при прокрутке (сдвиг считает main.js) */
.js .g-item img { scale: 1.12; translate: 0 var(--py, 0px); }
.g-item::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15, 8, 4, 0.75), transparent 55%);
    opacity: 0; transition: opacity 0.4s;
}
.g-cap {
    position: absolute; left: 16px; right: 56px; bottom: 14px; z-index: 2;
    color: #fff; font-weight: 600; font-size: 0.95rem; line-height: 1.3;
    opacity: 0; transform: translateY(12px);
    transition: opacity 0.4s, transform 0.4s var(--ease-out);
}
.g-zoom {
    position: absolute; right: 12px; bottom: 12px; z-index: 2;
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.9); color: #221B17;
    opacity: 0; transform: scale(0.6);
    transition: opacity 0.3s, transform 0.4s var(--ease-spring);
}
.g-zoom .ic { width: 16px; height: 16px; }
.g-item:hover { box-shadow: var(--shadow-lg); }
.g-item:hover img { transform: scale(1.06); }
.g-item:hover::after, .g-item:focus-visible::after { opacity: 1; }
.g-item:hover .g-cap, .g-item:focus-visible .g-cap { opacity: 1; transform: none; }
.g-item:hover .g-zoom, .g-item:focus-visible .g-zoom { opacity: 1; transform: none; }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
    position: fixed; inset: 0; width: 100%; height: 100%;
    max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
    background: rgba(10, 6, 4, 0.96); color: #fff;
    overscroll-behavior: contain;
}
/* minmax(0, 1fr): строка с фото не растягивается под размер картинки — фото целиком влезает в экран */
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; animation: lbIn 0.3s ease both; }
.lightbox.closing { animation: lbOut 0.25s ease both; }
.lightbox::backdrop { background: rgba(10, 6, 4, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox-stage {
    display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center;
    min-height: 0; overflow: hidden;
    padding: max(64px, env(safe-area-inset-top)) 72px 8px;
    touch-action: pan-y;
}
.lightbox-stage img {
    width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;
    border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    user-select: none; -webkit-user-drag: none;
    transition: transform 0.35s var(--ease-out), opacity 0.35s;
}
.lightbox-stage img.enter-next { animation: slideInR 0.4s var(--ease-out); }
.lightbox-stage img.enter-prev { animation: slideInL 0.4s var(--ease-out); }
.lightbox-bar {
    display: flex; justify-content: center; align-items: baseline; gap: 14px;
    padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
    font-weight: 500;
}
.lightbox-count { color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.lightbox-btn {
    position: absolute; display: grid; place-items: center;
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.12); color: #fff;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-btn:active { transform: scale(0.9); }
.lightbox-close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lightbox-prev { left: 14px; top: 50%; margin-top: -24px; }
.lightbox-next { right: 14px; top: 50%; margin-top: -24px; }

/* ==========================================================================
   KITCHEN
   ========================================================================== */
.kitchen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.kitchen-text > p { color: var(--ink-2); margin-bottom: 16px; font-size: 1.05rem; }
.brands { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.brands li {
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 8px 14px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--line);
    font-weight: 700; letter-spacing: 0.04em; font-size: 0.9rem;
}
.brands small { font-weight: 500; color: var(--muted); letter-spacing: 0; font-size: 0.78rem; }
.record {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 20px; margin: 22px 0;
    border-radius: var(--radius);
    background: linear-gradient(120deg, var(--brand-yellow), #FFE07A);
    color: #221B17;
    box-shadow: 0 10px 30px -10px rgba(255, 194, 26, 0.7);
}
.record p { font-size: 1rem; line-height: 1.5; }
.record-ic {
    display: grid; place-items: center; flex-shrink: 0;
    width: 52px; height: 52px; border-radius: 50%;
    background: #221B17; color: var(--brand-yellow);
}
.record-ic .ic { width: 26px; height: 26px; }
.record.visible .record-ic { animation: wiggle 1s var(--ease-out) 0.4s; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
    padding: 18px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line);
    position: relative; overflow: hidden;
}
.stat::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(var(--brand-red), var(--brand-yellow));
}
.stat b {
    display: block; font-family: var(--font-heading); font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; color: var(--red);
    font-variant-numeric: tabular-nums;
}
.stat > span { font-size: 0.86rem; color: var(--muted); font-weight: 500; }

.kitchen-media { position: relative; display: grid; gap: 16px; }
.kitchen-media img { width: 100%; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.k-main { aspect-ratio: 16 / 10; }
.kitchen-media .k-sub { aspect-ratio: 21 / 9; width: 82%; justify-self: end; margin-top: -60px; border: 6px solid var(--bg); translate: 0 var(--par, 0px); }

/* ==========================================================================
   REVIEWS
   ========================================================================== */
.reviews-wrap { position: relative; }
.reviews-track {
    display: grid; grid-auto-flow: column;
    grid-auto-columns: calc((100% - 24px) / 2);
    gap: 24px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-behavior: smooth; overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 8px 4px 24px; margin: -8px -4px 0;
}
.reviews-track::-webkit-scrollbar { display: none; }
.review {
    scroll-snap-align: start;
    display: flex; flex-direction: column;
    padding: clamp(22px, 3vw, 34px);
    border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.review:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.review-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.stars { display: flex; gap: 3px; color: var(--yellow); }
.stars .ic { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.review-q { width: 36px; height: 36px; color: var(--red); opacity: 0.18; fill: currentColor; stroke: none; }
.review blockquote {
    flex: 1; font-size: 1.05rem; line-height: 1.7; color: var(--ink-2);
    margin-bottom: 22px;
}
.review figcaption { display: flex; align-items: center; gap: 12px; }
.avatar {
    display: grid; place-items: center; flex-shrink: 0;
    width: 46px; height: 46px; border-radius: 50%;
    font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; color: #fff;
    background: linear-gradient(135deg, hsl(var(--h) 80% 55%), hsl(calc(var(--h) + 35) 85% 45%));
}
.review figcaption b { display: block; color: var(--ink); line-height: 1.3; }
.review figcaption small { color: var(--muted); font-size: 0.86rem; }

.reviews-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 8px; }
.reviews-controls .carousel-dots { display: flex; margin: 0; }
.reviews-yandex {
    display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-top: 40px;
}
.reviews-yandex iframe { border: 0; width: 150px; height: 50px; }

/* ==========================================================================
   CONTACTS
   ========================================================================== */
.contacts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: stretch; }
.contacts-card {
    padding: clamp(22px, 3.5vw, 36px);
    border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
    display: flex; flex-direction: column;
}
.open-status-lg {
    align-self: flex-start;
    padding: 8px 14px; border-radius: 999px; background: var(--surface-2);
    margin-bottom: 18px;
}
.contact-list { display: grid; gap: 6px; margin-bottom: 24px; }
.contact-list li {
    display: flex; align-items: center; gap: 14px;
    padding: 10px; margin: 0 -10px; border-radius: 16px;
    transition: background-color 0.2s;
}
.contact-list li:hover { background: var(--surface-2); }
.contact-ic {
    display: grid; place-items: center; flex-shrink: 0;
    width: 46px; height: 46px; border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-red), #FF4D5E); color: #fff;
    box-shadow: 0 6px 16px -6px rgba(227, 0, 22, 0.6);
}
.contact-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contact-body small {
    font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.contact-body > a, .contact-body > span { font-weight: 500; font-size: 1.02rem; color: var(--ink); }
.contact-body a:hover { color: var(--red); }
.contact-body > .contact-sub { font-size: 0.88rem; font-weight: 400; color: var(--muted); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.contact-actions .btn-lg { flex: 1 1 100%; }
.contact-actions .btn-ghost { flex: 1 1 0; }

.contacts-map {
    position: relative; min-height: 420px;
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); background: var(--surface-2);
    border: 1px solid var(--line);
}
.contacts-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-wave { background: var(--bg); margin-top: -1px; }
.footer { background: var(--footer-bg); color: rgba(255, 255, 255, 0.68); margin-top: -1px; }
.footer-main {
    max-width: var(--container); margin: 0 auto;
    padding: 36px var(--gutter) 40px;
    display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 32px;
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-logo { height: 50px; width: auto; }
.footer-motto { font-family: var(--font-heading); font-style: italic; color: rgba(255, 255, 255, 0.55); max-width: 260px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7);
    transition: background-color 0.25s, color 0.25s, transform 0.25s var(--ease-out);
}
.footer-social a:hover { background: #2AABEE; color: #fff; transform: translateY(-3px); }
.footer-col h4 {
    font-family: var(--font-heading); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--brand-yellow); margin-bottom: 12px;
}
.footer-col p, .footer-col a { display: block; font-size: 0.94rem; line-height: 1.95; }
.footer-col a { transition: color 0.2s, transform 0.2s; }
.footer-col a:hover { color: var(--brand-yellow); }
.footer-tg { display: inline-flex !important; align-items: center; gap: 6px; margin-top: 4px; }
.footer-tg .ic { width: 15px; height: 15px; }
.footer-bottom {
    max-width: var(--container); margin: 0 auto;
    padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.footer-copy { font-size: 0.82rem; color: rgba(255, 255, 255, 0.38); }
.footer-top { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; color: rgba(255, 255, 255, 0.5); transition: color 0.2s; }
.footer-top:hover { color: var(--brand-yellow); }

/* ---------- Back to top ---------- */
.to-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 900;
    display: grid; place-items: center;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
    opacity: 0; transform: translateY(20px) scale(0.8); pointer-events: none;
    transition: opacity 0.3s, transform 0.4s var(--ease-spring), color 0.2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--red); }
.to-top > .ic { position: relative; }
.to-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top-ring circle { fill: none; stroke: var(--line); stroke-width: 3; }
.to-top-ring .to-top-progress {
    stroke: var(--red); stroke-linecap: round;
    stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100);
}

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 2500;
    padding: 12px 20px; border-radius: 999px;
    background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.92rem;
    box-shadow: var(--shadow-lg);
    transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
    transition: transform 0.4s var(--ease-spring), opacity 0.3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ==========================================================================
   REVEAL ON SCROLL
   (только при включённом JS — без него контент виден сразу)
   ========================================================================== */
.js [data-reveal] {
    opacity: 0; transform: translateY(32px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), clip-path 1.2s var(--ease-out);
    transition-delay: calc(var(--d, 0) * 0.1s);
}
.js [data-reveal=""].from-top { transform: translateY(-32px); }
.js [data-reveal="right"] { transform: translateX(40px); }
.js [data-reveal="scale"] { transform: scale(0.92); }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="pop"] { transform: scale(0.4) rotate(-40deg); transition-timing-function: var(--ease-spring); }
.js [data-reveal="clip"] { transform: none; clip-path: inset(12% 12% 12% 12% round 28px); }
.js [data-reveal].visible { opacity: 1; transform: none; }
.js [data-reveal="clip"].visible { clip-path: inset(0 0 0 0 round 28px); }

/* ==========================================================================
   KEYFRAMES
   ========================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes wordUp { from { opacity: 0; transform: translateY(0.6em) rotate(4deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes logoGlint {
    0% { transform: translateX(-200%) skewX(-16deg); }
    14%, 100% { transform: translateX(660%) skewX(-16deg); }
}
@keyframes lightsOn { from { opacity: 0.9; } to { opacity: 0; } }
@keyframes steamRise {
    0%   { opacity: 0; transform: translateY(12%) scale(0.75, 0.6); }
    25%  { opacity: var(--o, 0.5); }
    70%  { opacity: calc(var(--o, 0.5) * 0.55); }
    100% { opacity: 0; transform: translateY(-55%) scale(1.25, 1.2) skewX(-6deg); }
}
@keyframes headerIn { from { opacity: 0; transform: translateY(-16px); } }
@keyframes headerGlint { 0% { background-position: 100% 0; } 22%, 100% { background-position: 0% 0; } }
@keyframes logoSpin {
    0%   { transform: none; animation-timing-function: cubic-bezier(0.3, 0, 0.2, 1); }
    70%  { transform: rotate(380deg) scale(1.12); animation-timing-function: cubic-bezier(0.4, 0, 0.3, 1); }
    100% { transform: rotate(360deg); }
}
@keyframes eyebrowPop { from { transform: scale(0.4) rotate(-50deg); } to { transform: none; } }
@keyframes kenburns { to { transform: scale(1.06); } }
@keyframes grain {
    0% { transform: translate(0, 0); } 25% { transform: translate(-5%, 3%); }
    50% { transform: translate(4%, -4%); } 75% { transform: translate(-3%, -2%); } 100% { transform: translate(0, 0); }
}
@keyframes floaterIn { from { opacity: 0; scale: 0.3; rotate: -30deg; } to { opacity: 0.95; scale: 1; rotate: 0deg; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(6deg); } }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shine { 0% { transform: translateX(-120%); } 30%, 100% { transform: translateX(120%); } }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes ripple { to { transform: scale(var(--s, 30)); opacity: 0; } }
@keyframes frameWipe {
    from { clip-path: inset(0 0 0 100% round var(--radius-lg)); }
    to   { clip-path: inset(0 0 0 0 round var(--radius-lg)); }
}
@keyframes vanArrive {
    0%   { transform: translateX(34%) scale(1.06); animation-timing-function: cubic-bezier(0.15, 0.55, 0.35, 1); }
    52%  { transform: translateX(-2.6%) scale(1.06) rotate(-0.7deg); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
    74%  { transform: translateX(0.7%) scale(1.06) rotate(0.2deg); animation-timing-function: ease-in-out; }
    100% { transform: scale(1.06); }
}
@keyframes streak {
    0%   { opacity: 0; transform: translateX(70%); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(-160%); }
}
/* цикл трекера: стоит → едет (8–60%) → доставлено (60–90%) → сброс */
@keyframes trackRun {
    0%, 8%    { transform: translateX(0); opacity: 1; animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
    60%, 90%  { transform: translateX(100%); opacity: 1; }
    95%       { transform: translateX(100%); opacity: 0; }
    96%       { transform: translateX(0); opacity: 0; }
    100%      { transform: translateX(0); opacity: 1; }
}
@keyframes trackFill {
    0%, 8%    { transform: scaleX(0); opacity: 1; animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
    60%, 90%  { transform: scaleX(1); opacity: 1; }
    95%       { transform: scaleX(1); opacity: 0; }
    96%, 100% { transform: scaleX(0); opacity: 1; }
}
@keyframes trackMsgOut {
    0%, 58%   { opacity: 1; transform: none; }
    63%, 93%  { opacity: 0; transform: translateY(-8px); }
    98%, 100% { opacity: 1; transform: none; }
}
@keyframes trackMsgIn {
    0%, 60%   { opacity: 0; transform: translateY(8px); }
    65%, 90%  { opacity: 1; transform: none; }
    95%, 100% { opacity: 0; transform: translateY(8px); }
}
@keyframes trackArrive {
    0%, 59%   { background-color: var(--surface-2); transform: none; }
    63%       { background-color: var(--green); transform: scale(1.22); }
    68%, 90%  { background-color: var(--green); transform: none; }
    95%, 100% { background-color: var(--surface-2); transform: none; }
}
@keyframes trackHomeOut {
    0%, 59%   { opacity: 1; transform: none; }
    62%, 93%  { opacity: 0; transform: scale(0.5); }
    97%, 100% { opacity: 1; transform: none; }
}
@keyframes trackCheckIn {
    0%, 60%   { opacity: 0; transform: scale(0.4) rotate(-30deg); }
    66%, 90%  { opacity: 1; transform: none; }
    94%, 100% { opacity: 0; transform: scale(0.6); }
}
@keyframes vanBob { to { transform: translateY(-1px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg) scale(1.1); } 40% { transform: rotate(12deg) scale(1.1); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbOut { to { opacity: 0; } }
@keyframes slideInR { from { opacity: 0; transform: translateX(60px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes slideInL { from { opacity: 0; transform: translateX(-60px) scale(0.96); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
    .nav a { padding: 8px 10px; font-size: 0.88rem; }
    .header-phone span { display: none; }
    .header-phone { width: 40px; padding: 0; }
}

@media (max-width: 900px) {
    /* Телефон и планшет: панели нет — логотип и переключатель темы висят поверх страницы,
       навигация — в нижней панели вкладок */
    :root { --header-h: 68px; }
    .header { padding-inline: 12px; }
    .header-bar, .header.scrolled .header-bar {
        height: 56px; padding: 0;
        background: none; border-color: transparent; box-shadow: none;
        -webkit-backdrop-filter: none; backdrop-filter: none;
        pointer-events: none;
    }
    .header-bar::before { display: none; }
    .nav, .header-phone { display: none; }
    .header-logo, .header-actions { pointer-events: auto; }
    .header-logo img, .header.scrolled .header-logo img { height: 42px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)); }
    /* переключатель темы — стеклянная капля */
    .theme-toggle, .header:not(.scrolled) .theme-toggle {
        color: #fff;
        background: radial-gradient(120% 120% at 30% 10%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0.16));
        border: 1px solid rgba(255, 255, 255, 0.42);
        box-shadow:
            inset 0 1px 1px rgba(255, 255, 255, 0.75),
            inset 0 -2px 6px rgba(255, 255, 255, 0.12),
            0 6px 18px -6px rgba(0, 0, 0, 0.45);
        -webkit-backdrop-filter: blur(10px) saturate(180%);
        backdrop-filter: blur(10px) saturate(180%);
    }
    .header.scrolled .theme-toggle {
        color: var(--ink);
        background: radial-gradient(120% 120% at 30% 10%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.5) 55%, rgba(255, 255, 255, 0.7));
        border-color: rgba(255, 255, 255, 0.9);
        box-shadow: inset 0 1px 1px #fff, 0 6px 18px -6px rgba(60, 30, 10, 0.4);
    }
    :root[data-theme="dark"] .header.scrolled .theme-toggle {
        background: radial-gradient(120% 120% at 30% 10%, rgba(255, 255, 255, 0.2), rgba(40, 32, 27, 0.5) 55%, rgba(60, 48, 40, 0.55));
        border-color: rgba(255, 255, 255, 0.16);
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 6px 18px -6px rgba(0, 0, 0, 0.7);
    }
    .theme-toggle:hover, .header:not(.scrolled) .theme-toggle:hover { background-color: transparent; }

    .about-grid, .kitchen-grid, .contacts-grid, .delivery-card { grid-template-columns: minmax(0, 1fr); }
    .js [data-reveal="right"] { transform: translateY(32px); }
    .about-badge { right: 12px; bottom: -26px; width: 112px; height: 112px; }
    .about-badge-core { width: 62px; height: 62px; }

    .kitchen-media { order: -1; }
    .delivery-media { order: -1; }

    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; gap: 10px; }
    .g-cap { opacity: 1; transform: none; font-size: 0.82rem; left: 12px; bottom: 10px; right: 12px; }
    .g-item::after { opacity: 0.85; }
    .g-zoom { display: none; }

    .reviews-track { grid-auto-columns: 82%; gap: 14px; }

    .contacts-map { min-height: 320px; }
    .footer-main { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

/* Услуги на телефоне — горизонтальная карусель со свайпом */
@media (max-width: 760px) {
    .services .container { padding-inline: 0; }
    .services .sec-head { padding-inline: var(--gutter); }
    .services-grid {
        display: grid; grid-auto-flow: column; grid-template-columns: none;
        grid-auto-columns: 84%;
        gap: 14px;
        overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
        padding: 6px var(--gutter) 14px;
        scroll-padding-inline: var(--gutter);
        scrollbar-width: none;
    }
    .services-grid::-webkit-scrollbar { display: none; }
    .service-card, .service-card.s-wide { grid-column: auto; min-height: 440px; scroll-snap-align: start; }
    .services .carousel-dots { display: flex; }
    .js .services-grid [data-reveal] { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
    .hero { padding-bottom: 120px; }
    .hero-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; margin: 0 auto; }
    .hero-scroll { display: none; }
    .floater { width: 40px; }
    .floater.f1 { top: 14%; left: 5%; }
    .floater.f2 { top: 13%; right: 6%; }
    .floater.f3 { top: auto; bottom: 16%; right: 8%; }
    .floater.f4 { top: auto; bottom: 14%; left: 8%; }
    .floater.f5, .floater.f6 { display: none; }
    .hero-steam i:nth-child(2), .hero-steam i:nth-child(4) { display: none; }
    .hero-steam i:nth-child(1) { left: -2%; }
    .hero-steam i:nth-child(5) { left: auto; right: -4%; }

    .feature-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .feature { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
    .feature b { font-size: 0.95rem; }

    .service-body { padding: 22px; }
    .delivery-card { border-radius: 28px; padding: 22px; }
    .delivery-media { padding-bottom: 78px; }
    .tracker { left: 0; right: 0; margin-inline: auto; width: min(320px, 92%); }
    .stats { gap: 8px; }
    .stat { padding: 14px 14px 14px 18px; }
    .k-sub { margin-top: -40px; }
    .reviews-controls .round-btn { display: none; }
    .lightbox-stage { padding: max(70px, env(safe-area-inset-top)) 12px 4px; }
    .lightbox-bar { min-height: 76px; padding-inline: 76px; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
    .lightbox-prev, .lightbox-next { top: auto; margin-top: 0; bottom: calc(14px + env(safe-area-inset-bottom)); }
    .contact-actions .btn-ghost { flex: 1 1 calc(50% - 5px); }
    .footer-main { grid-template-columns: 1fr; text-align: center; }
    .footer-brand { align-items: center; }
    .footer-bottom { justify-content: center; text-align: center; }
    .to-top { right: 16px; bottom: 16px; }
}

@media (hover: none) {
    .btn:hover, .feature:hover, .review:hover { transform: none; }
    .service-card::after { display: none; }
}

/* при печати показываем всё, что обычно появляется при прокрутке */
@media print {
    .js [data-reveal], .js .sec-title.split .w, .js .delivery-list li, .js .van-frame, .js .tracker { opacity: 1 !important; transform: none !important; clip-path: none !important; }
    .header, .tabbar, .to-top, .hero-floaters, .hero-steam { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
    .marquee-track { animation: none; }
    .floater { opacity: 0.9; }
    .js .hero-logo { cursor: default; }
    /* трекер — сразу в состоянии «доставлено» */
    .tracker * { animation: none !important; }
    .tracker .tracker-van { transform: translateX(100%); }
    .tracker .tracker-fill { transform: none; }
    .tracker .tracker-msg { opacity: 0; }
    .tracker .tracker-msg-done { opacity: 1; }
    .tracker .tracker-to { background-color: var(--green); }
    .tracker .tracker-to .ic:first-child { opacity: 0; }
    .tracker .tracker-to .ic + .ic { opacity: 1; }
}
