:root {
    --page-parchment: #fbf4e9;
    --page-parchment-deep: #f5ead8;
    --site-pattern-url: none;
}

html {
    background-color: var(--page-parchment);
}

body {
    background-color: var(--page-parchment);
    background-image:
        linear-gradient(rgba(251, 244, 233, .88), rgba(251, 244, 233, .88)),
        var(--site-pattern-url);
    background-repeat: repeat, repeat;
    background-position: 0 0, center top;
    background-size: auto, 420px auto;
}

.site-main {
    background: transparent;
}

.hero {
    padding: 0;
    background: transparent;
}

.hero .container {
    width: min(calc(100% - 64px), 1380px);
    max-width: 1380px;
    padding-left: 0;
    padding-right: 0;
}

.hero__grid {
    display: block;
    min-height: 0;
}

.hero__content {
    display: none;
}

.hero__visual {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    line-height: 0;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
}

.hero__visual::after {
    content: '';
    position: absolute;
    inset: -1px;
    pointer-events: none;
    background:
        linear-gradient(90deg,
            var(--page-parchment) 0%,
            rgba(251,244,233,.72) 2.5%,
            transparent 7.5%,
            transparent 92.5%,
            rgba(251,244,233,.72) 97.5%,
            var(--page-parchment) 100%),
        linear-gradient(180deg,
            rgba(251,244,233,.58) 0%,
            transparent 8%,
            transparent 88%,
            rgba(251,244,233,.76) 97%,
            var(--page-parchment) 100%);
}

.hero__image {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: initial;
    object-position: center;
    border-radius: 0;
}

.products {
    position: relative;
    padding-top: 18px;
    padding-bottom: 24px;
    background: transparent;
}

.packshot {
    position: relative;
    width: 100%;
    min-height: 360px;
    display: grid;
    place-items: center;
    border: 1px dashed #cfc8bc;
    border-radius: 0;
    background: var(--page-parchment);
    box-shadow: none;
}

.packshot > * {
    display: none !important;
}

.packshot::before {
    content: 'Место под фотографию / коллаж';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    color: #817b72;
    background: rgba(255,255,255,.45);
    border: 1px solid #ddd6ca;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 550;
    letter-spacing: .01em;
}

@media (max-width: 900px) {
    body {
        background-size: auto, 320px auto;
    }

    .hero .container {
        width: calc(100% - 28px);
    }

    .hero__visual::after {
        background:
            linear-gradient(90deg,
                var(--page-parchment) 0%,
                transparent 5%,
                transparent 95%,
                var(--page-parchment) 100%),
            linear-gradient(180deg,
                transparent 0%,
                transparent 90%,
                var(--page-parchment) 100%);
    }

    .packshot {
        min-height: 300px;
    }
}

@media (max-width: 640px) {
    body {
        background-size: auto, 260px auto;
    }

    .hero .container {
        width: 100%;
    }

    .hero__visual::after {
        background:
            linear-gradient(90deg,
                var(--page-parchment) 0%,
                rgba(251,244,233,.36) 2.5%,
                transparent 8%,
                transparent 92%,
                rgba(251,244,233,.36) 97.5%,
                var(--page-parchment) 100%),
            linear-gradient(180deg,
                transparent 0%,
                transparent 88%,
                rgba(251,244,233,.58) 96%,
                var(--page-parchment) 100%);
    }

    .products {
        padding-top: 12px;
    }

    .packshot {
        min-height: 220px;
    }

    .packshot::before {
        font-size: 12px;
    }
}


/* Mobile hero: the illustration supports the offer instead of replacing it. */
@media (max-width: 640px) {
    .hero {
        padding: 18px 0 8px;
    }

    .hero .container {
        width: calc(100% - 28px);
    }

    .hero__grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hero__content {
        display: block;
        padding: 2px 2px 0;
    }

    .hero__content h1 {
        max-width: 370px;
        color: #167b45;
        font-size: clamp(31px, 8.3vw, 36px);
        line-height: 1.03;
        letter-spacing: -.025em;
    }

    .hero__lead {
        margin: 11px 0 14px;
        color: #46514c;
        font-size: 16px;
        line-height: 1.4;
    }

    .hero__contacts {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .hero__contacts a {
        min-height: 38px;
        padding: 0 11px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        border: 1px solid rgba(13, 143, 69, .18);
        border-radius: 9px;
        background: rgba(255, 253, 248, .52);
        color: #167b45;
        font-size: 13px;
        line-height: 1.2;
        font-weight: 550;
        text-decoration: none;
    }

    .hero__contacts a span {
        width: auto;
        opacity: .78;
    }

    .hero__visual {
        overflow: hidden;
        border: 1px solid rgba(167, 146, 112, .20);
        border-radius: 13px;
        background: rgba(255, 253, 248, .30);
        box-shadow: 0 8px 22px -20px rgba(72, 56, 36, .46);
    }

    .hero__visual::after {
        border-radius: inherit;
        background:
            linear-gradient(90deg,
                rgba(251,244,233,.44) 0%,
                transparent 7%,
                transparent 93%,
                rgba(251,244,233,.44) 100%),
            linear-gradient(180deg,
                rgba(251,244,233,.18) 0%,
                transparent 16%,
                transparent 82%,
                rgba(251,244,233,.52) 100%);
    }

    .hero__image {
        width: 100%;
        height: auto;
    }
}


/* Mobile hero: dissolve the illustration into the page pattern. */
@media (max-width: 640px) {
    .hero__visual {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .hero__visual::after {
        inset: -2px;
        border-radius: 0;
        background:
            linear-gradient(90deg,
                var(--page-parchment) 0%,
                rgba(251,244,233,.66) 3%,
                rgba(251,244,233,.18) 8%,
                transparent 14%,
                transparent 86%,
                rgba(251,244,233,.18) 92%,
                rgba(251,244,233,.66) 97%,
                var(--page-parchment) 100%),
            linear-gradient(180deg,
                var(--page-parchment) 0%,
                rgba(251,244,233,.40) 5%,
                transparent 13%,
                transparent 84%,
                rgba(251,244,233,.48) 94%,
                var(--page-parchment) 100%);
    }

    .hero__image {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        -webkit-mask-image: radial-gradient(
            ellipse 112% 104% at 50% 50%,
            #000 74%,
            rgba(0,0,0,.96) 80%,
            rgba(0,0,0,.72) 88%,
            rgba(0,0,0,.28) 96%,
            transparent 100%
        );
        mask-image: radial-gradient(
            ellipse 112% 104% at 50% 50%,
            #000 74%,
            rgba(0,0,0,.96) 80%,
            rgba(0,0,0,.72) 88%,
            rgba(0,0,0,.28) 96%,
            transparent 100%
        );
    }
}


/* Desktop hero: softly dissolve the rectangular image edges into the pattern. */
@media (min-width: 901px) {
    .hero__visual {
        overflow: visible;
    }

    .hero__image {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        -webkit-mask-image: radial-gradient(
            ellipse 112% 108% at 50% 50%,
            #000 80%,
            rgba(0,0,0,.97) 84%,
            rgba(0,0,0,.82) 90%,
            rgba(0,0,0,.48) 96%,
            transparent 100%
        );
        mask-image: radial-gradient(
            ellipse 112% 108% at 50% 50%,
            #000 80%,
            rgba(0,0,0,.97) 84%,
            rgba(0,0,0,.82) 90%,
            rgba(0,0,0,.48) 96%,
            transparent 100%
        );
    }
}


/* Mobile hero composition: centered copy with a restrained divider. */
@media (max-width: 640px) {
    .hero__content {
        text-align: center;
    }

    .hero__content h1 {
        max-width: 390px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .hero__content h1::after {
        content: '';
        display: block;
        width: 72px;
        height: 1px;
        margin: 15px auto 0;
        background: rgba(13, 143, 69, .34);
    }

    .hero__lead {
        max-width: 330px;
        margin: 13px auto 15px;
        text-align: center;
    }

    .hero__contacts {
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero__contacts a {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 390px) {
    .hero__contacts {
        max-width: 100%;
    }

    .hero__contacts a {
        flex: 1 1 100%;
        width: 100%;
        max-width: 280px;
    }
}
