/* =========================================================
   #ГОТОВИМСMETRO — лендинг
   Значения цветов, размеров и сетки сняты из макета Figma.
   ========================================================= */

/* ---------- шрифт ----------
   CA Metro New — фирменный шрифт METRO, распространяется по лицензии.
   Положите файлы в /assets/fonts/ и подписи ниже заработают сами;
   пока их нет, используется запасная гарнитура. */
/* ---------- временная замена фирменного шрифта ----------
   Пока CA Metro New не передан, заголовки набираются Oswald (лицензия OFL,
   разрешена к самохостингу). Он узкий, как и оригинал, поэтому строки
   не разъезжаются. size-adjust подогнан так, чтобы ширина совпадала с макетом.
   Когда появится CA Metro New — просто положите его файлы в /assets/fonts/,
   он стоит первым в стеке и заменит замену автоматически. */
@font-face {
    font-family: 'Metro Fallback';
    src: url('../fonts/oswald-400-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
    font-weight: 400; font-display: swap; size-adjust: 100%;
}
@font-face {
    font-family: 'Metro Fallback';
    src: url('../fonts/oswald-400-latin.woff2') format('woff2');
    font-weight: 400; font-display: swap; size-adjust: 100%;
}
@font-face {
    font-family: 'Metro Fallback';
    src: url('../fonts/oswald-600-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
    font-weight: 700; font-display: swap; size-adjust: 100%;
}
@font-face {
    font-family: 'Metro Fallback';
    src: url('../fonts/oswald-600-latin.woff2') format('woff2');
    font-weight: 700; font-display: swap; size-adjust: 100%;
}
@font-face {
    font-family: 'Metro Fallback';
    src: url('../fonts/oswald-700-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
    font-weight: 800; font-display: swap; size-adjust: 100%;
}
@font-face {
    font-family: 'Metro Fallback';
    src: url('../fonts/oswald-700-latin.woff2') format('woff2');
    font-weight: 800; font-display: swap; size-adjust: 100%;
}
@font-face {
    font-family: 'Metro Fallback';
    src: url('../fonts/oswald-700-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
    font-weight: 900; font-display: swap; size-adjust: 100%;
}
@font-face {
    font-family: 'Metro Fallback';
    src: url('../fonts/oswald-700-latin.woff2') format('woff2');
    font-weight: 900; font-display: swap; size-adjust: 100%;
}

:root {
    --bg:          #091F42;   /* фон страницы */
    --blue:        #002D6E;   /* заливка карточек */
    --blue-card:   #003367;   /* карточки */
    --blue-logo:   #003D7C;   /* плашка логотипа */
    --blue-line:   #AAC7FF;   /* контуры карты и приглушённый текст */
    --glow:        0 0 10px rgba(164, 209, 255, .15);   /* свечение карточек */
    --hairline:    #DCDCDC;   /* тонкая обводка карточек */
    --yellow:      #FFE500;   /* акцент */
    --yellow-warm: #FFED00;
    --cream:       #E9E2CF;
    --white:       #FFFFFF;

    --font: 'CA Metro New', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-display: 'CA Metro New', 'Metro Fallback', 'Arial Narrow', sans-serif;
    --font-digits: 'Bebas Neue Pro', 'Metro Fallback', 'Arial Narrow', sans-serif;

    --container: 1240px;
    --gutter: 20px;
    --sidebar: 315px;
    --col-gap: 43px;

    --r-sm: 14px;
    --r-md: 16px;
    --r-lg: 22px;
}

*, *::before, *::after { box-sizing: border-box; }

/* атрибут hidden должен побеждать любые наши display: элементы скрываются из скрипта */
[hidden] { display: none !important; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;           /* ссылки на блоки страницы (#map, #steps, #prizes) прокручивают плавно */
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--white);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, blockquote, figure { margin: 0; }

.accent { color: var(--yellow); }

.container {
    width: min(100% - var(--gutter) * 2, var(--container));
    margin-inline: auto;
}

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--yellow); color: var(--blue); padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

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

/* =============== ШАПКА =============== */
.header { height: 84px; }
.header__inner { display: flex; align-items: center; height: 84px; }
.header__logo { flex: 0 0 auto; margin-right: 198px; }
.header__logo img { width: 193px; height: 52px; }

.nav__list { display: flex; gap: 32px; }
.nav__link { font-family: var(--font-display);
    font-size: 18px; line-height: 26px;
    text-transform: uppercase;
    text-decoration: none;
    padding-bottom: 4px;
    transition: color .15s;
}
.nav__link:hover { color: var(--yellow); }
.nav__link.is-active { color: var(--yellow); border-bottom: 2px solid var(--yellow); }

.burger {
    display: none;
    width: 36px; height: 36px;                     /* размеры из макета */
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 8px;
}
.burger span { display: block; width: 16px; height: 2px; background: var(--white); border-radius: 2px; }

.mobile-menu {
    position: fixed; top: 0; left: 0; right: 0; z-index: 40;
    height: 100dvh;                       /* панель во весь экран */
    background: var(--bg);                /* непрозрачная, как в макете */
    display: flex; flex-direction: column;
}
.mobile-menu__head { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 12px; }
.mobile-menu__logo img { width: 119px; height: 32px; }
.mobile-menu__close {
    position: relative; width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .6);
}
.mobile-menu__close::before,
.mobile-menu__close::after {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: 14px; height: 1.5px; margin: -0.75px 0 0 -7px;
    background: var(--white); border-radius: 1px;
}
.mobile-menu__close::before { transform: rotate(45deg); }
.mobile-menu__close::after  { transform: rotate(-45deg); }

.mobile-menu__list { display: flex; flex-direction: column; gap: 40px; padding: 42px 12px 0; }
.mobile-menu__link {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hairline);
    font-size: 20px; font-weight: 700; line-height: 21px;
    text-transform: uppercase; text-decoration: none;
}
.mobile-menu__link.is-active { color: var(--yellow); }
.mobile-menu__arrow {
    width: 18px; height: 12px; flex: none;
    background: currentColor;
    /* в меню стрелка прямая, диагональная — только на карточках блюд */
    -webkit-mask: url('../img/arrow-right.svg') no-repeat center / contain;
    mask: url('../img/arrow-right.svg') no-repeat center / contain;
}

/* =============== ПЕРВЫЙ ЭКРАН =============== */
.hero { padding-top: 37px; }
.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar);
    column-gap: var(--col-gap);
    align-items: start;
}
.hero__main { border-right: 1px solid rgba(255, 255, 255, .25); padding-right: 0; }

.hero__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 342px;
    align-items: start;
    padding-right: 42px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
}
.hero__brand { margin-top: 8px; }
.hero__title {
    font-family: var(--font-display);
    font-weight: 900; font-size: 62px; line-height: 74px;   /* в макете CAMetro-New-Black */
    white-space: nowrap;   /* трекинг в макете нулевой */
}
.hero__title .hash,
.footer__title .hash { font-family: var(--font-digits); font-weight: 700; }  /* решётка — Bebas Neue */
.hero__subtitle { font-size: 18px; line-height: 21px; margin-top: 4px; }

.hero__lead { border-left: 1px solid rgba(255, 255, 255, .25); padding-left: 28px; }
.hero__lead-title { color: var(--yellow); font-weight: 700; font-size: 22px; line-height: 26px; }
.hero__lead-text { font-size: 16px; line-height: 19px; margin-top: 10px; color: rgba(255, 255, 255, .9); }

/* ---------- карта ---------- */
.map { margin-top: 23px; position: relative; }
.map__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.map__hint { display: flex; align-items: center; gap: 8px; font-size: 18px; line-height: 22px; }
.map__hint-icon {
    /* курсор с «лучами» клика — контурная иконка из макета: 20px, белый 80%, линия 2 в сетке 24 (1,67px) */
    width: 20px; height: 20px; flex: none;
    fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}

.map__figure { position: relative; margin-top: 5px; }
.map__img { width: 100%; }

.map__counter {
    position: absolute; right: 0; top: -14px; z-index: 2;   /* иначе карта закрывает подпись */
    width: auto; text-align: center;
}
.map__counter-label,
.map__counter-unit { display: block; font-size: 16px; line-height: 19px; text-transform: uppercase; white-space: nowrap; }
.map__counter-value { display: flex; gap: 7px; justify-content: center; margin: 4px 0; }
.map__counter-value b {
    position: relative;
    display: grid; place-items: center;
    font-family: var(--font-digits);   /* в макете цифры набраны Bebas Neue Pro */
    width: 51px; height: 65px;
    /* «перекидное табло»: резкий излом градиента посередине */
    background: linear-gradient(180deg, #08162F 0%, #0D2753 50%, #050D1E 50.2%, #091A38 100%);
    border: 2.3px solid rgba(255, 255, 255, .4);   /* в макете обводка мягкая, не чисто белая */
    border-radius: 9px;
    box-shadow: 0 0 12px rgba(0, 0, 0, .5), inset 0 0 5px rgba(255, 255, 255, .2);
    font-size: 35px; font-weight: 400; line-height: 1;
}
.map__counter-value b::after {           /* тонкая линия разлома */
    content: ''; position: absolute; left: 2px; right: 2px; top: 50%;
    height: 1px; background: #000;
}

.map__pins { position: absolute; inset: 0; }
.map__city { position: absolute; left: var(--x); top: var(--y); display: flex; align-items: center; }
.map__pin {
    width: var(--pin); height: var(--pin); flex: none;
    background: rgba(255, 229, 0, .55);            /* город с блюдом — приглушённый жёлтый */
    -webkit-mask: url('../img/pin-location.svg') no-repeat center / contain;
    mask: url('../img/pin-location.svg') no-repeat center / contain;
    transition: transform .15s, background-color .15s;
}
/* под курсором — яркий жёлтый, как было */
.map__city:not(.map__city--off) .map__pin:hover,
.map__city:not(.map__city--off) .map__pin:focus-visible { background: var(--yellow); }
.map__pin:hover { transform: scale(1.15); }
/* город без блюда: серый и не кликается */
.map__city--off .map__pin { background: rgba(255, 255, 255, .45); }
.map__city--off .map__label { color: rgba(255, 255, 255, .6); }
.map__pin--plain { cursor: default; }
.map__pin--plain:hover { transform: none; }
.map__label {
    font-size: 14px; line-height: 17px; white-space: nowrap;
    margin-left: 1px; margin-top: 6px;
    text-shadow: 0 1px 4px rgba(0, 20, 60, .8);
}
.map__city.is-active .map__label { font-size: 16px; font-weight: 700; }
/* единственное исключение: у Ростова-на-Дону подпись под значком по центру, иначе она лезет на Рязань */
.map__city[data-code="rostov"] { flex-direction: column; align-items: flex-start; }
.map__city[data-code="rostov"] .map__label {
    margin: 2px 0 0;
    transform: translateX(calc(var(--pin) / 2 - 50%));   /* середина подписи под серединой значка */
}

/* карточка рецепта поверх карты */
.recipe-card {
    position: absolute; left: 44.5%; top: 18.7%;
    display: flex; gap: 10px;
    width: 31%; min-width: 260px;
}
.recipe-card__main {
    width: 190px; flex: none;
    background: var(--blue);
    border: 1px solid var(--yellow);
    border-radius: var(--r-md);
    box-shadow: var(--glow);
    overflow: hidden;
}
.recipe-card__main img { width: 100%; height: 140px; object-fit: cover; }
.recipe-card__body { padding: 10px 12px 12px; }
.recipe-card__title { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 22px; text-transform: uppercase; }
.recipe-card__chef { font-size: 14px; line-height: 17px; color: rgba(255, 255, 255, .8); margin-top: 2px; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    border-radius: 999px; padding: 8px 16px;
    font-size: 14px; line-height: 17px;
    transition: filter .15s;
}
.btn--yellow { background: var(--yellow); color: var(--blue); font-weight: 700; margin-top: 10px; white-space: nowrap; }
.btn--yellow:hover { filter: brightness(1.08); }

.recipe-card__side { display: flex; flex-direction: column; gap: 11px; }
.recipe-thumb {
    display: block; width: 70px;
    background: var(--blue);
    border: 1px solid var(--hairline);
    border-radius: 9px; overflow: hidden;
    text-align: left; padding-bottom: 5px;
}
.recipe-thumb img { width: 100%; height: 52px; object-fit: cover; }
.recipe-thumb__title { display: block; font-size: 6.6px; font-weight: 700; line-height: 8px; padding: 4px 4px 0; text-transform: uppercase; }
.recipe-thumb__chef { display: block; font-size: 5.2px; line-height: 6px; padding: 1px 4px 0; color: rgba(255, 255, 255, .8); }
.recipe-thumb:hover { border-color: var(--yellow); }

/* ---------- карусель блюд ---------- */
.carousel { position: relative; margin-top: 12px; }
.carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 60px) / 4);
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.dish { scroll-snap-align: start; }
.carousel__arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 11px; height: 30px;
    background: var(--white);
    -webkit-mask: url('../img/arrow-carousel.svg') no-repeat center / contain;
    mask: url('../img/arrow-carousel.svg') no-repeat center / contain;
}
.carousel__arrow--prev { left: -31px; transform: translateY(-50%) rotate(180deg); }
.carousel__arrow--next { right: -31px; }
.carousel__arrow:hover { background: var(--yellow); }
.carousel__arrow[disabled] { opacity: .3; cursor: default; }

.dish__btn {
    position: relative;
    display: flex; flex-direction: column;
    width: 100%; height: 229px;                   /* в макете все карточки ряда одной высоты */
    text-align: center;
    background: var(--blue);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    box-shadow: var(--glow);
    overflow: hidden;
    transition: border-color .15s, transform .15s;
}
.dish__btn:hover { transform: translateY(-2px); border-color: var(--yellow); }
.dish.is-active .dish__btn { border-color: var(--yellow); }
.dish__img { flex: none; width: 100%; height: 140px; object-fit: cover; }
.dish__body {
    flex: 1; min-height: 0;              /* занимает остаток карточки, без ручной арифметики */
    display: flex; flex-direction: column; justify-content: center;
    padding: 24px 10px;                  /* сверху и снизу поровну, как в макете */
}
.dish__title { font-family: var(--font-display); display: block; font-size: 18px; font-weight: 700; line-height: 22px; text-transform: uppercase; }
.dish.is-active .dish__title { color: var(--yellow); }
.dish__chef { display: block; font-size: 14px; line-height: 17px; margin-top: 2px; }
.dish__arrow {
    position: absolute; right: 14px; bottom: 10px;
    width: 12px; height: 12px;
    background: var(--yellow);
    -webkit-mask: url('../img/arrow-small.svg') no-repeat center / contain;
    mask: url('../img/arrow-small.svg') no-repeat center / contain;
}

/* ---------- колонка шефов ---------- */
.chefs__title { font-size: 22px; font-weight: 700; line-height: 26px; margin-top: 37px; }
.chefs__list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.chef {
    display: flex; align-items: center; gap: 14px;
    height: 88px;                  /* в макете все карточки строго одного размера */
    padding: 5px;
    /* вертикальный градиент из макета: сверху светлее, снизу темнее */
    background: linear-gradient(180deg, #005ABB 0%, #013F84 50%, #012F63 100%);
    border-radius: var(--r-md);
    box-shadow: 0 0 10px rgba(164, 209, 255, .15);   /* голубое свечение вокруг карточки */
    overflow: hidden;
}
/* фото шефа часто вырезано без фона — под ним синий квадрат из макета (#003367), а не градиент карточки */
.chef__photo { width: 78px; height: 78px; flex: none; border-radius: 14px; object-fit: cover; background: var(--blue-card); }
.chef__body { min-width: 0; }
.chef__name {
    font-family: var(--font-display);
    font-size: 18px; font-weight: 700; line-height: 22px; text-transform: uppercase;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chef__role {
    font-size: 14px; line-height: 17px; color: rgba(255, 255, 255, .8); margin-top: 2px;
    /* в макете описание умещается в две строки — не даём карточке разъезжаться */
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* =============== ОБЩИЕ ЗАГОЛОВКИ =============== */
.section-title {
    font-family: var(--font-display);
    font-weight: 900; font-size: 62px; line-height: 62px;
    text-transform: uppercase;
}

.back-link {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 700; line-height: 20px;
    letter-spacing: .35px; text-transform: uppercase; text-decoration: none;
    color: var(--blue-line);            /* в макете ссылка не белая */
}
.back-link:hover { color: var(--yellow); }

/* =============== КАК УЧАСТВОВАТЬ =============== */
.steps { padding-top: 130px; }
.steps__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
.steps__subtitle { font-size: 32px; line-height: 28px; margin-top: 26px; color: var(--blue-line); }

.deadline {
    display: flex; align-items: center; gap: 10px; flex: none;
    font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: .7px;
    color: var(--yellow-warm);          /* в макете подпись жёлтая */
    padding-top: 4px;
}
.deadline__icon {
    width: 24px; height: 24px; flex: none; border-radius: 50%;
    border: 2px solid var(--yellow); position: relative;
}
.deadline__icon::after {
    content: ''; position: absolute; left: 50%; top: 20%;
    width: 2px; height: 32%; background: var(--yellow); border-radius: 1px;
    transform-origin: bottom center;
}
.deadline__icon::before {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: 2px; height: 26%; background: var(--yellow); border-radius: 1px;
    transform: rotate(90deg); transform-origin: top center;
}

.steps__list {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
    margin-top: 96px;
}
.step {
    position: relative;
    min-height: 250px;                  /* высота плашки из макета */
    background: var(--blue);
    border: 1px solid var(--yellow-warm);
    border-radius: var(--r-md);
    padding: 63px 34px 16px;            /* отступы сняты с макета */
    text-align: center;
}
.step__num {
    position: absolute; left: 50%; top: -48px; transform: translateX(-50%);
    width: 95px; height: 95px; border-radius: 50%;   /* в макете круг 95px */
    background: var(--yellow-warm); color: var(--blue);
    display: grid; align-content: center; justify-items: center;
}
.step__num b { font-family: var(--font-display); font-weight: 900; font-size: 56px; line-height: 46px; }
.step__num i { font-style: normal; font-size: 20px; line-height: 20px; }
.step__title {
    font-family: var(--font-display);
    font-weight: 800; font-size: 34px; line-height: 38px; text-transform: uppercase;
}
.step__text { font-size: 24px; line-height: 28.8px; margin-top: 8px; }

.steps .back-link { margin-top: 66px; }

/* =============== ПРИЗОВОЙ ФОНД =============== */
.prizes { padding-top: 139px; }
.prizes__list {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    margin-top: 60px;
}
.prize {
    display: flex; flex-direction: column;
    background: var(--blue);
    border: 1px solid var(--yellow-warm);
    border-radius: var(--r-lg);
    padding: 0;                          /* в макете картинка идёт до краёв плашки */
    height: 279px;                       /* высота плашки из макета */
    overflow: hidden;
}
.prize__title { font-family: var(--font-display);
    font-size: 24px; font-weight: 700; line-height: 26px;
    text-transform: uppercase; text-align: center;
    padding: 22px 20px 0;
}
.prize__figure { position: relative; flex: 1; min-height: 0; display: grid; place-items: end center; margin-top: 8px; padding-bottom: 10px; }
.prize__figure img {
    /* процентный max-height внутри flex не срабатывает — ограничиваем в пикселях:
       279 плашка минус двухстрочный заголовок и нижний отступ */
    max-width: 100%; max-height: 185px; width: auto; object-fit: contain;
}
/* iPhone: два телефона рядом, как в макете — корпус слева, экран справа поверх, без наклона */
.prize__figure--stack { --phone-h: 210px; display: flex; align-items: flex-end; justify-content: center; }
.prize .prize__figure--stack img { height: var(--phone-h); width: auto; max-height: none; }
.prize__figure--stack img:first-child { margin-right: calc(var(--phone-h) * -0.46); }   /* нахлёст как в макете */
.prize__figure--stack img:last-child { position: relative; z-index: 1; }
.prize__badge {
    position: absolute; right: 20px; bottom: 8px;
    font-family: var(--font-display);
    font-weight: 800; font-size: 36px; line-height: 43px;
    color: var(--yellow-warm);
}
.prize__note { font-size: 14px; line-height: 17px; text-align: center; margin-top: 10px; }

.prizes .back-link { margin-top: 60px; }

/* =============== ПОДВАЛ =============== */
.footer { padding-top: 130px; padding-bottom: 56px; }
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.footer__title {
    font-family: var(--font-display);
    font-weight: 900; font-size: 62px; line-height: 74px;   /* как в шапке */
    white-space: nowrap;   /* трекинг в макете нулевой */
}
.footer__subtitle { font-size: 18px; line-height: 21px; margin-top: 2px; }
.footer__fish { width: 309px; height: auto; flex: none; }

.footer__legal { font-size: 24px; line-height: 28.8px; margin-top: 38px; color: var(--white); }
.footer__legal a { color: var(--yellow); }
.footer__copy { font-size: 22px; line-height: 26.4px; text-align: center; margin-top: 34px; color: rgba(255, 255, 255, .8); }

/* =============== МОДАЛЬНОЕ ОКНО РЕЦЕПТА =============== */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 15, 45, .78); }
.modal__window:focus { outline: none; }
.modal__window {
    position: relative;
    width: min(100%, 808px); max-height: calc(100dvh - 48px);
    overflow-y: auto;
    background: #173C78;                 /* заливка попапа из макета */
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 24px;
    padding: 28px 32px 32px;
}
.modal__head { padding-right: 56px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.modal__eyebrow { font-family: var(--font-display); font-weight: 800;  /* в макете CAMetro-New-ExtraBold */ font-size: 40px; line-height: 44px; text-transform: uppercase; }
.modal__close {
    position: absolute; top: 24px; right: 24px; z-index: 2;
    width: 40px; height: 40px; border-radius: 50%;
    background: none;                    /* в макете заливки нет */
    border: 1px solid rgba(255, 255, 255, .25);
    display: grid; place-items: center;
    transition: border-color .15s;
}
.modal__close span { display: none; }    /* крестик рисуем сами, чтобы совпал с макетом */
.modal__close::before,
.modal__close::after {
    content: ''; position: absolute;
    width: 16px; height: 1.5px; border-radius: 1px;
    background: var(--white);
}
.modal__close::before { transform: rotate(45deg); }
.modal__close::after  { transform: rotate(-45deg); }
.modal__close:hover { border-color: var(--yellow); }

.modal__body { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 32px; margin-top: 24px; align-items: start; }

.video { position: relative; border-radius: var(--r-md); overflow: hidden; }
.video__poster { width: 100%; height: 459px; object-fit: cover; }
.video__caption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 12px; font-size: 16px; font-weight: 700; background: linear-gradient(transparent, rgba(0, 20, 60, .85)); }

/* ---------- плеер браузера вместо фото шефа ---------- */
.video__player { display: none; }
.video.is-video {
    overflow: visible;
    /* ролик не выше 70% экрана: ширину считаем от высоты окна и пропорций кадра */
    width: min(100%, calc(70vh * var(--video-ar, .5625)));
    width: min(100%, calc(70dvh * var(--video-ar, .5625)));
    margin-inline: auto;
}
.video.is-video .video__poster { display: none; }
.video.is-video .video__player { display: block; }
.video__player video {
    display: block; width: 100%; height: auto;
    aspect-ratio: var(--video-ar, .5625);
    object-fit: cover;              /* пропорции плеера равны пропорциям ролика — подрезается только обложка */
    border-radius: var(--r-md);
    background: #000;
}
/* во весь экран — кадр целиком; правила раздельные: незнакомый браузеру псевдокласс ломает весь список */
.video__player video:fullscreen { object-fit: contain; border-radius: 0; }
.video__player video:-webkit-full-screen { object-fit: contain; border-radius: 0; }
/* подпись уводим под плеер, иначе она закрывает его управление */
.video.is-video .video__caption {
    position: static; background: none; padding: 10px 0 0;
}
.video__time { font-size: 14px; font-weight: 600; background: var(--blue-card); border-radius: 6px; padding: 3px 8px; }

.recipe__quote { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
.recipe__quote-mark {
    /* в макете кавычка набрана Cygre Light — её нет, берём гарнитуру с такой же формой «66» */
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 80px; line-height: 52px; font-weight: 400; color: var(--yellow);
}
.recipe__quote p { font-size: 16px; line-height: 19px; }
.recipe__title { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 38px; color: var(--yellow); text-transform: uppercase; margin-top: 22px; }
.recipe__subtitle { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 21px; color: var(--yellow); text-transform: uppercase; margin-top: 24px; }
.recipe__ingredients { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; margin-top: 10px; }
.recipe__ingredients li { font-size: 14px; line-height: 23px; }
.recipe__dish {
    display: block; width: 100%; max-width: 354px; max-height: 200px;
    object-fit: cover; border-radius: var(--r-sm);
    margin: 16px 0 0 auto;
}
.recipe__dish[src=""] { display: none; }

/* =============== ПЛАНШЕТ =============== */
@media (max-width: 1199px) {
    :root { --gutter: 32px; }
    .header__logo { margin-right: 0; }
    .nav { display: none; }
    .burger { display: flex; margin-left: auto; }

    .hero__grid { grid-template-columns: minmax(0, 1fr); row-gap: 34px; }
    .hero__main { border-right: 0; }
    .hero__top { grid-template-columns: minmax(0, 1fr); row-gap: 20px; padding-right: 0; }
    .hero__lead { border-left: 0; padding-left: 0; }
    .hero__title { font-size: 48px; line-height: 58px; }

    .chefs__title { margin-top: 0; }
    .chefs__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .map__hint-icon { stroke: var(--white); }   /* в макетах планшета и телефона иконка белая без прозрачности */

    .carousel__track { grid-auto-columns: calc((100% - 20px) / 2); }
    .carousel__arrow { display: none; }
    .recipe-card { width: 40%; min-width: 210px; }

    .steps { padding-top: 90px; }
    .steps__head { flex-direction: column; gap: 18px; }
    .section-title { font-size: 44px; line-height: 46px; }
    .steps__subtitle { font-size: 24px; line-height: 26px; margin-top: 14px; }
    .deadline { font-size: 22px; }
    .steps__list { grid-template-columns: minmax(0, 1fr); gap: 62px; margin-top: 62px; }

    .prizes { padding-top: 90px; }
    .prizes__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .footer { padding-top: 90px; }
    .footer__title { font-size: 44px; line-height: 52px; }
    .footer__fish { width: 220px; }
    .footer__legal { font-size: 16px; line-height: 20px; }
    .footer__copy { font-size: 16px; line-height: 20px; }

}

/* =============== МОБИЛЬНЫЙ =============== */
@media (max-width: 743px) {
    :root { --gutter: 12px; }
    .header, .header__inner { height: 60px; }
    .header__logo img { width: 120px; height: 32px; }

    .hero { padding-top: 20px; }
    .hero__title { font-size: 30px; line-height: 34px; }
    .hero__subtitle { font-size: 12px; line-height: 15px; }
    .hero__lead-title { font-size: 16px; line-height: 19px; }
    .hero__lead-text { font-size: 12px; line-height: 15px; }

    .chefs__list { grid-template-columns: minmax(0, 1fr); }

    .map__hint { font-size: 11px; line-height: 14px; gap: 3px; }
    /* пропорции мобильного макета (иконка 10px к тексту 8px, линия 0,5px), пересчитанные на наш кегль 11px */
    .map__hint-icon { width: 14px; height: 14px; stroke-width: 1.2; }
    .map__head { gap: 8px; }
    .map__counter { position: static; z-index: auto; display: flex; align-items: center; gap: 5px; flex: none; }
    .map__counter-value { margin: 0; gap: 3px; }
    .map__counter-value b { width: 26px; height: 33px; font-size: 18px; border-radius: 5px; border-width: 1.2px; }
    .map__counter-value { gap: 4px; }
    .map__counter-label, .map__counter-unit { font-size: 9px; line-height: 11px; max-width: 52px; white-space: normal; }
    .map__label { font-size: 7px; line-height: 9px; }
    .map__city { --pin: 14px !important; }
    .map__city.is-active { --pin: 20px !important; }
    .map__city.is-active .map__label { font-size: 8px; }
    /* плашка блюда над картой — шириной с кнопку внутри, чтобы не закрывала карту */
    /* плашка блюда над картой: ширина по кнопке внутри, по высоте — по центру карты */
    .recipe-card { width: min-content; min-width: 0; top: 50%; transform: translateY(-50%); }
    .recipe-card__main { width: min-content; }
    .recipe-card__main img { height: 58px; }
    .recipe-card__body { padding: 6px 8px 8px; }
    .recipe-card__title { font-size: 11px; line-height: 13px; }
    .recipe-card__chef { font-size: 8px; line-height: 10px; }
    .btn--yellow { font-size: 8px; padding: 5px 10px; margin-top: 6px; }
    /* мелкие плашки блюд остаются рядом с большой, но без подписей — только картинка */
    .recipe-card { gap: 8px; }
    .recipe-card__side { gap: 8px; }
    .recipe-thumb { width: 50px; padding-bottom: 0; }
    .recipe-thumb img { height: 36px; }
    .recipe-thumb__title,
    .recipe-thumb__chef { display: none; }

    .carousel__track { grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; }
    .dish__img { height: 132px; }   /* карточка теперь фиксированной высоты */
    .dish__title { font-size: 13px; line-height: 16px; }
    .dish__chef { font-size: 10px; line-height: 12px; }

    .section-title { font-size: 28px; line-height: 30px; }
    .steps__subtitle { font-size: 16px; line-height: 19px; }
    .deadline { font-size: 14px; }
    .deadline__icon { width: 18px; height: 18px; }
    .steps__list { gap: 55px; }              /* 20 из макета + вылет круга 35 */
    .step { min-height: 181px; padding: 63px 30px 28px; border-radius: 10px; }
    .step__num { width: 70px; height: 70px; top: -35px; }
    .step__num b { font-size: 42px; line-height: 34px; }
    .step__num i { font-size: 15px; line-height: 15px; }
    .step__title { font-size: 24px; line-height: 22px; }
    .step__text { font-size: 16px; line-height: 21px; margin-top: 4px; }

    .prizes__list { grid-template-columns: minmax(0, 1fr); gap: 21px; }
    .prize { height: 213px; border-radius: 22px; }
    .prize__title { font-size: 22px; line-height: 26px; padding-top: 12px; }
    .prize__figure img { max-height: 150px; }
    .prize__figure--stack { --phone-h: 160px; }

    .footer__top { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
    .footer__title { font-size: 26px; line-height: 30px; }
    .footer__subtitle { font-size: 12px; }
    .footer__fish { width: 160px; }
    .footer__legal { font-size: 11px; line-height: 14px; }
    .footer__copy { font-size: 11px; }

}

/* =============== ОКНО РЕЦЕПТА НА УЗКИХ ЭКРАНАХ =============== */
/* до 660px окно перестраивается в одну колонку; шире — десктопный вид: видео слева, рецепт справа */
@media (max-width: 659px) {
    .modal { padding: 10px; }
    .modal__window { padding: 18px; border-radius: var(--r-md); }
    .modal__body { grid-template-columns: minmax(0, 1fr); }
    .modal__eyebrow { font-size: 22px; line-height: 26px; }
    /* крестик по макету: круг 26px в 18px от верха и правого края, центр на уровне заголовка (31px).
       Прозрачная рамка 7px расширяет зону нажатия до 40px, сам круг рисует внутренняя тень */
    .modal__close {
        top: 11px; right: 11px; width: 40px; height: 40px;
        border: 7px solid transparent;
        box-shadow: inset 0 0 0 .66px rgba(255, 255, 255, .25);
        transition: box-shadow .15s;
    }
    .modal__close:hover { border-color: transparent; box-shadow: inset 0 0 0 .66px var(--yellow); }
    .video__poster { height: 240px; }
    .recipe__title { font-size: 20px; line-height: 23px; }
    .recipe__ingredients { display: block; }   /* одна колонка без шва между списками */
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }   /* кто отключил анимацию в системе, того переносим сразу */
    * { transition: none !important; animation: none !important; }
}
