/*
 * Общая визуальная оболочка публичной Запечки.
 *
 * Файл загружается сразу после site-polish.css и содержит:
 *
 * - фон и размеры общей страницы;
 * - шапку и публичную навигацию;
 * - главную страницу;
 * - общие карточки и кнопки;
 * - глобальный footer;
 * - оформление страницы обратной связи;
 * - адаптивные правила этих компонентов.
 *
 * Порядок подключения важен:
 *
 *     app.css
 *     site-polish.css
 *     site-shell.css
 *
 * Не подключать site-shell.css перед site-polish.css.
 */

/* ==========================================================
   ZAPECHKA BIG VISUAL RELEASE V1
   Shared typography, cards, controls, footer and mobile rhythm.
   This intentionally stays in one global stylesheet so public pages
   receive a consistent interface without a frontend build system.
   ========================================================== */

:root {
    --page-width: 1180px;
    --content-readable: 760px;
    --surface-raised: rgba(255, 255, 255, .92);
    --surface-tint: #fff7f1;
    --line-soft: #eadcd2;
    --shadow-card: 0 14px 38px rgba(81, 49, 28, .08);
    --shadow-hover: 0 20px 48px rgba(81, 49, 28, .13);
}

body {
    line-height: 1.55;
    background:
        radial-gradient(circle at 93% -3%, rgba(255, 213, 190, .78) 0, transparent 29rem),
        radial-gradient(circle at 4% 22%, rgba(255, 238, 224, .72) 0, transparent 25rem),
        var(--background);
}

.site-header {
    position: relative;
    z-index: 5;
    width: min(var(--page-width), calc(100% - 40px));
    min-height: 92px;
    margin: 0 auto;
    padding: 18px 0;
}

.site-header::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(207, 169, 142, .55), transparent);
}

.container {
    width: min(var(--page-width), calc(100% - 40px));
}

.public-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    padding: 5px;
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(234, 220, 210, .9);
    border-radius: 999px;
    box-shadow: 0 7px 22px rgba(81, 49, 28, .04);
}

.public-nav-link {
    min-height: 38px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.public-nav-link:hover {
    color: var(--accent-hover);
    background: var(--accent-soft);
}

.public-nav-link-active {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 5px 14px rgba(201, 83, 47, .22);
}

.public-nav-link-active:hover {
    color: #fff;
    background: var(--accent-hover);
}

main.container {
    padding-bottom: 76px;
}

.home-main {
    padding-top: clamp(30px, 5vw, 66px);
}

.home-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 6vw, 70px);
    border: 1px solid rgba(234, 220, 210, .92);
    border-radius: 32px;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, .95), rgba(255, 247, 241, .91));
    box-shadow: var(--shadow-card);
}

.home-hero::after {
    content: "";
    position: absolute;
    top: -130px;
    right: -110px;
    width: 310px;
    height: 310px;
    border: 38px solid rgba(244, 199, 181, .32);
    border-radius: 50%;
    pointer-events: none;
}

.home-hero > * {
    position: relative;
    z-index: 1;
}

.home-eyebrow,
.home-section-kicker,
.contact-kicker {
    color: #a74b31;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.home-title {
    max-width: 760px;
    margin: 12px 0 18px;
    font-size: clamp(45px, 6.5vw, 78px);
    line-height: .96;
}

.home-lead {
    max-width: 650px;
    margin: 0;
    color: #655b55;
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.65;
}

.home-section {
    margin-top: clamp(52px, 7vw, 94px);
}

.home-section-head {
    gap: 18px;
    margin-bottom: 24px;
}

.home-section-title {
    margin: 5px 0 0;
    font-size: clamp(31px, 4vw, 48px);
    line-height: 1.04;
}

.home-section-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    text-underline-offset: 4px;
}

.home-section-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Recipe cards and catalogue surfaces. */
.recipe-card,
.home-recipe-card,
.cuisine-directory-card,
.collection-card,
.discovery-card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-card);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.recipe-card:hover,
.home-recipe-card:hover,
.cuisine-directory-card:hover,
.collection-card:hover,
.discovery-card:hover {
    border-color: #e4c8b8;
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.recipe-card-title,
.home-recipe-title {
    line-height: 1.13;
    text-wrap: balance;
}

.recipe-card-title a,
.home-recipe-title a {
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.recipe-card-meta,
.home-recipe-meta,
.recipe-description,
.recipe-card-description {
    color: var(--muted);
    line-height: 1.58;
}

/* Shared controls: clear focus, tactile hover and comfortable touch targets. */
.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid transparent;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.button,
.btn,
.home-search-submit,
.auth-primary-button,
.contact-submit,
.public-profile-retry {
    min-height: 46px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.button:hover:not(:disabled),
.btn:hover:not(:disabled),
.home-search-submit:hover:not(:disabled),
.contact-submit:hover:not(:disabled),
.public-profile-retry:hover:not(:disabled) {
    box-shadow: 0 10px 23px rgba(189, 75, 40, .19);
    transform: translateY(-2px);
}

.button:active:not(:disabled),
.btn:active:not(:disabled),
.home-search-submit:active:not(:disabled),
.contact-submit:active:not(:disabled),
.public-profile-retry:active:not(:disabled) {
    box-shadow: none;
    transform: translateY(0);
}

input,
select,
textarea {
    border-color: var(--line-soft);
    border-radius: 13px;
    background: rgba(255, 255, 255, .94);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #d9bfae;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(232, 100, 61, .12);
}

/* Footer lives globally, not in contact.css: it is injected on every page. */
.site-footer {
    margin-top: auto;
    padding: 36px 0 30px;
    color: #685c55;
    border-top: 1px solid var(--line-soft);
    background: rgba(255, 247, 241, .86);
}

.site-footer-inner {
    display: grid;
    grid-template-columns: auto minmax(190px, 1fr) auto;
    align-items: center;
    gap: 18px 34px;
}

.site-footer-brand .brand-wordmark {
    font-size: 32px;
}

.site-footer-note,
.site-footer-copy {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

.site-footer-copy {
    color: #8b7d74;
    text-align: right;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 18px;
}

.site-footer-nav a {
    color: #655750;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    text-underline-offset: 4px;
}

.site-footer-nav a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Contact page now feels like part of the same product. */
.contact-page {
    max-width: 900px;
    padding-top: clamp(32px, 6vw, 72px);
}

.contact-intro {
    max-width: 650px;
    margin-bottom: 28px;
}

.contact-intro h1,
.contact-card h2 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -.04em;
    line-height: 1.04;
}

.contact-intro h1 {
    margin: 8px 0 13px;
    font-size: clamp(43px, 6vw, 66px);
}

.contact-card {
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid var(--line-soft);
    border-radius: 28px;
    background: var(--surface-raised);
    box-shadow: var(--shadow-card);
}

.contact-card h2 {
    margin-top: 0;
    font-size: clamp(28px, 3.5vw, 38px);
}

.contact-fields {
    gap: 18px;
}

.contact-fields label {
    gap: 7px;
    color: #51463f;
    font-size: 14px;
    font-weight: 750;
}

.contact-fields input,
.contact-fields select,
.contact-fields textarea {
    min-height: 48px;
    padding: 12px 14px;
    color: var(--text);
    font: inherit;
}

.contact-fields textarea {
    min-height: 156px;
    resize: vertical;
}

/* Smaller screens retain spaciousness and avoid edge-to-edge card fatigue. */
@media (max-width: 700px) {
    .site-header,
    .container {
        width: min(100% - 28px, var(--page-width));
    }

    .site-header {
        min-height: 0;
        padding-top: 14px;
    }

    .home-hero {
        padding: 30px 22px;
        border-radius: 25px;
    }

    .home-hero::after {
        top: -150px;
        right: -155px;
        width: 270px;
        height: 270px;
    }

    .home-title {
        font-size: clamp(42px, 12vw, 61px);
    }

    .home-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer-inner {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 16px;
    }

    .site-footer-nav {
        justify-content: flex-start;
    }

    .site-footer-copy {
        text-align: left;
    }
}

@media (max-width: 520px) {
    main.container {
        padding-bottom: 48px;
    }

    .public-nav {
        width: 100%;
    }

    .public-nav-link {
        padding-inline: 13px;
    }

    .home-lead {
        font-size: 17px;
    }

    .recipe-card:hover,
    .home-recipe-card:hover,
    .cuisine-directory-card:hover,
    .collection-card:hover,
    .discovery-card:hover {
        transform: none;
    }

    .contact-page {
        padding-top: 28px;
    }

    .contact-card {
        padding: 23px 18px;
        border-radius: 22px;
    }

    .site-footer {
        padding-block: 29px 24px;
    }
}
