@charset "UTF-8";
@import url(font.css);

/* ============================================================
   ПЕРЕМЕННЫЕ
   ============================================================ */
:root {
    --c-primary: #04859D;
    --c-secondary: #206876;
    --c-deep: #015666;
    --c-accent: #7FD1E0;

    --c-ink: #10262B;
    --c-text: #33484E;
    --c-muted: #6E858C;

    --c-line: #DCE6E9;
    --c-bg: #F1F5F6;
    --c-white: #FFFFFF;

    --radius: 3px;

    --shadow-sm: 0 1px 2px rgba(1, 86, 102, .06);
    --shadow-md: 0 6px 24px rgba(1, 86, 102, .08);

    --tr: .25s ease;
}

/* ============================================================
   БАЗА / СБРОС
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Rubik', 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--c-text);
    background-color: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--tr), background-color var(--tr), border-color var(--tr);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: top;
    border: 0;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
}

input,
textarea,
select {
    outline: none;
    font: inherit;
    color: inherit;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}

::selection {
    background: var(--c-primary);
    color: #fff;
}

/* ============================================================
   КАРКАС СТРАНИЦЫ
   ============================================================ */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: auto;
}

.content {
    flex: 1 0 auto;
}

.footer {
    flex: 0 0 auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   ШАПКА
   ============================================================ */
.header {
    background-color: var(--c-deep);
    color: #fff;
    border-bottom: 3px solid var(--c-primary);
    box-shadow: var(--shadow-sm);
}

.header__top {
    display: flex;
    align-items: center;
    gap: 28px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
}

.header__top-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.header__top-logo-img {
    display: block;
    height: 46px;
    width: auto;
    max-width: 100%;
}

.header__top-title {
    flex: 1 1 auto;
    min-width: 0;
}

.header__top-title-text {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: .2px;
    color: #fff;
}

.header__top-info {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header__top-info-link {
    display: inline-block;
    padding: 9px 18px;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: var(--radius);
}

.header__top-info-link:hover {
    background-color: var(--c-primary);
    border-color: var(--c-primary);
}

.header__top-info-link:active {
    background-color: var(--c-secondary);
    border-color: var(--c-secondary);
}

/* ============================================================
   ОСНОВНОЙ БЛОК
   ============================================================ */
.main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 20px 64px;
}

/* --- Общие карточки-секции --- */
.about,
.recipe {
    background-color: var(--c-white);
    border-left: 4px solid var(--c-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 34px 38px;
    margin-bottom: 26px;
}

.recipe {
    margin-bottom: 0;
}

/* ============================================================
   СЕКЦИЯ "О БЛЮДЕ"
   ============================================================ */
.about-header {
    font-size: 26px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: .2px;
    color: var(--c-deep);
    margin-bottom: 18px;
}

.about-text {
    max-width: 92ch;
    font-size: 16px;
    line-height: 1.8;
    color: var(--c-text);
}

/* --- Картинка итогового блюда --- */
.about-image {
    margin-top: 24px;
    text-align: center;
}

.about-image img {
    display: inline-block;
    max-width: 100%;
    width: 100%;
    max-width: 600px;
    /* Ограничиваем ширину, чтобы не растягивалась */
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--c-line);
}

/* ============================================================
   СЕКЦИЯ "РЕЦЕПТ"
   ============================================================ */
.recipe-title {
    font-size: 26px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: .2px;
    color: var(--c-deep);
    padding-bottom: 16px;
    border-bottom: 2px solid var(--c-line);
    margin-bottom: 20px;
}

.recipe-subtitle {
    font-size: 19px;
    font-weight: 500;
    letter-spacing: .2px;
    color: var(--c-secondary);
    margin: 30px 0 10px;
}

.recipe-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--c-text);
    margin: 14px 0;
}

/* --- Список ингредиентов --- */
ul.recipe-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 36px;
    margin: 6px 0 10px;
}

.recipe-list-item {
    position: relative;
    padding: 9px 0 9px 24px;
    font-size: 15.5px;
    line-height: 1.5;
    border-bottom: 1px solid var(--c-line);
    transition: color var(--tr);
}

.recipe-list-item::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 17px;
    width: 7px;
    height: 7px;
    background-color: var(--c-primary);
    border-radius: 1px;
    transition: background-color var(--tr);
}

.recipe-list-item:hover {
    color: var(--c-deep);
}

.recipe-list-item:hover::before {
    background-color: var(--c-deep);
}

/* --- Нумерованные шаги --- */
ol.recipe-list {
    counter-reset: step;
    margin: 6px 0 10px;
}

.recipe-list-num-item {
    position: relative;
    counter-increment: step;
    padding: 14px 0 14px 56px;
    font-size: 15.5px;
    line-height: 1.65;
    border-bottom: 1px solid var(--c-line);
}

.recipe-list-num-item::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--c-deep);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .5px;
    border-radius: var(--radius);
    transition: background-color var(--tr);
}

.recipe-list-num-item:hover::before {
    background-color: var(--c-primary);
}

.recipe-list-item:last-child,
.recipe-list-num-item:last-child {
    border-bottom: none;
}

/* --- Текст и картинки внутри шагов --- */
.recipe-step-text {
    margin-bottom: 4px;
}

.recipe-step-image {
    margin-top: 16px;
    text-align: center;
}

.recipe-step-image img {
    display: inline-block;
    width: 100%;
    max-width: 480px;
    /* Комфортный размер для шагов */
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--c-line);
    box-shadow: var(--shadow-sm);
}

/* Отступ между двумя картинками в одном шаге */
.recipe-step-image+.recipe-step-image {
    margin-top: 12px;
}

/* ============================================================
   ПОДВАЛ
   ============================================================ */
.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 24px 20px;
    background-color: var(--c-deep);
    border-top: 3px solid var(--c-primary);
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    letter-spacing: .3px;
    text-align: center;
}

.footer a {
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .35);
}

.footer a:hover {
    color: var(--c-accent);
    border-color: var(--c-accent);
}

/* ============================================================
   АДАПТИВ
   ============================================================ */

/* --- Планшеты --- */
@media (max-width: 1024px) {
    .header__top {
        gap: 20px;
    }

    .header__top-logo-img {
        height: 40px;
    }

    .header__top-title-text {
        font-size: 18px;
    }

    .header__top-info-link {
        padding: 8px 14px;
        font-size: 13px;
    }

    .about,
    .recipe {
        padding: 28px 26px;
    }

    .about-header,
    .recipe-title {
        font-size: 22px;
    }

    ul.recipe-list {
        gap: 0 24px;
    }

    .recipe-step-image img {
        max-width: 100%;
    }
}

/* --- Мобильные --- */
@media (max-width: 767px) {
    body {
        font-size: 15px;
    }

    .header__top {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px;
    }

    .header__top-logo-img {
        height: 36px;
    }

    .header__top-title-text {
        font-size: 17px;
    }

    .header__top-info {
        width: 100%;
    }

    .header__top-info-link {
        flex: 1 1 auto;
        padding: 11px 12px;
        font-size: 13px;
        text-align: center;
    }

    .main {
        padding: 22px 14px 44px;
    }

    .about,
    .recipe {
        padding: 22px 18px;
        border-left-width: 3px;
        border-radius: 0;
        box-shadow: var(--shadow-sm);
        margin-bottom: 18px;
    }

    .about-header,
    .recipe-title {
        font-size: 19px;
        line-height: 1.4;
    }

    .about-header {
        margin-bottom: 14px;
    }

    .recipe-title {
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .recipe-subtitle {
        font-size: 17px;
        margin: 24px 0 8px;
    }

    .about-text,
    .recipe-text {
        font-size: 15px;
        line-height: 1.7;
    }

    ul.recipe-list {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .recipe-list-item {
        padding-left: 22px;
        font-size: 14.5px;
    }

    .recipe-list-item::before {
        top: 16px;
    }

    .recipe-list-num-item {
        padding: 12px 0 12px 46px;
        font-size: 14.5px;
        line-height: 1.6;
    }

    .recipe-list-num-item::before {
        width: 30px;
        height: 30px;
        font-size: 12px;
        top: 11px;
    }

    .recipe-step-image img {
        max-width: 100%;
        margin-top: 8px;
    }

    .footer {
        min-height: 56px;
        padding: 20px 14px;
        font-size: 13px;
    }
}

/* --- Узкие телефоны --- */
@media (max-width: 420px) {
    .header__top-info {
        flex-direction: column;
        gap: 8px;
    }

    .header__top-info-link {
        width: 100%;
    }

    .about-header,
    .recipe-title {
        font-size: 17.5px;
    }

    .recipe-subtitle {
        font-size: 16px;
    }

    .recipe-list-num-item {
        padding-left: 42px;
    }
}

/* --- Пользователи, отключившие анимации --- */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}