:root {
    --green: #0b8f55;
    --green-dark: #06653d;
    --green-light: #eaf8f0;
    --lime: #b9ef4a;
    --white: #ffffff;
    --black: #112019;
    --gray: #66736c;
    --light: #f5f8f5;
    --border: #dce8df;
    --shadow: 0 18px 45px rgba(16, 45, 30, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, Arial, sans-serif;
    color: var(--black);
    background: var(--white);
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.section {
    padding: 110px 0;
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.header {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(220, 232, 223, 0.8);
    backdrop-filter: blur(16px);
}

.nav-wrapper {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--green-dark);
    white-space: nowrap;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--green);
    color: var(--white);
    font-size: 23px;
    font-weight: 800;
    transform: rotate(-8deg);
}

.logo strong {
    display: block;
    font-size: 18px;
    letter-spacing: 0.08em;
}

.logo small {
    display: block;
    color: var(--gray);
    font-size: 9px;
    line-height: 1.2;
    max-width: 160px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-left: auto;
}

.main-nav a {
    color: var(--black);
    font-size: 16px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.main-nav a:hover {
    color: var(--green);
}

.language-switcher {
    display: flex;
    gap: 5px;
}

.language-button {
    width: 31px;
    height: 31px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 17px;
    transition: 0.25s ease;
}

.language-button:hover,
.language-button.active {
    background: var(--green-light);
    border-color: var(--green);
    transform: translateY(-2px);
}

.mobile-menu-button {
    display: none;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px 0;
    background: var(--green-dark);
}

/* Hero */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    background:
        linear-gradient(100deg, rgba(4, 45, 27, 0.90), rgba(5, 100, 57, 0.35)),
        url("images/main-banner.webp") center / cover no-repeat;
    transform: translateZ(0);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 80px;
}

.hero-label,
.section-label {
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero-label {
    color: var(--lime);
}

.hero h1 {
    max-width: 780px;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 1.04;
    letter-spacing: -0.055em;
    margin-bottom: 28px;
}

.hero p {
    max-width: 620px;
    color: rgba(255,255,255,0.85);
    font-size: 18px;
    margin-bottom: 38px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 0 25px;
    border-radius: 100px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
}

.button-primary {
    background: var(--lime);
    color: var(--green-dark);
}

.button-primary:hover {
    background: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.14);
}

.button-outline {
    color: var(--white);
    border-color: rgba(255,255,255,0.55);
}

.button-outline:hover {
    background: var(--white);
    color: var(--green-dark);
}

.hero-statistics {
    display: flex;
    flex-wrap: wrap;
    gap: 45px;
    margin-top: 90px;
}

.hero-statistics strong,
.hero-statistics span {
    display: block;
}

.hero-statistics strong {
    color: var(--lime);
    font-size: 27px;
}

.hero-statistics span {
    color: rgba(255,255,255,0.75);
    font-size: 11px;
}

/* Intro and headings */

.intro {
    background: var(--light);
}

.intro-grid,
.markets-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

h2 {
    max-width: 670px;
    font-size: clamp(30px, 4vw, 53px);
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.intro p,
.section-heading > p {
    color: var(--gray);
    font-size: 16px;
}

.muted-text {
    margin-top: 20px;
    font-size: 13px !important;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    align-items: end;
    margin-bottom: 48px;
}

.section-heading > p {
    max-width: 380px;
}

/* Products */

.products-section {
    background: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.product-card {
    min-height: 290px;
    padding: 29px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.product-card:hover {
    border-color: var(--green);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.product-icon {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    margin-bottom: 25px;
    border-radius: 17px;
    background: var(--green-light);
    color: var(--green);
    font-size: 27px;
}

.product-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 1.25;
}

.product-card p {
    min-height: 95px;
    color: var(--gray);
    font-size: 13px;
}

.product-tag {
    display: inline-block;
    margin-top: 20px;
    padding: 6px 11px;
    border-radius: 50px;
    color: var(--green-dark);
    background: var(--green-light);
    font-size: 10px;
    font-weight: 700;
}

.product-tag.warning {
    color: #876200;
    background: #fff4c9;
}

/* Markets */

.markets {
    color: var(--white);
    background:
        linear-gradient(125deg, rgb(9 84 49 / 97%), rgb(38 118 83 / 91%));
}

.section-label.light {
    color: var(--lime);
}

.markets h2 {
    margin-bottom: 25px;
}

.markets-content > p {
    max-width: 570px;
    color: rgba(255,255,255,0.78);
}

.market-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    margin-top: 35px;
}

.market-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    background: rgba(255,255,255,0.08);
}

.market-item > span {
    font-size: 25px;
}

.market-item strong,
.market-item small {
    display: block;
}

.market-item strong {
    font-size: 14px;
}

.market-item small {
    color: rgba(255,255,255,0.65);
    font-size: 11px;
}

.markets-card {
    padding: 40px;
    border-radius: var(--radius);
    color: var(--black);
    background: var(--white);
    box-shadow: var(--shadow);
}

.markets-card-icon {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 50%;
    color: var(--green-dark);
    background: var(--lime);
    font-size: 25px;
    font-weight: 800;
}

.markets-card h3 {
    margin-bottom: 13px;
    font-size: 23px;
}

.markets-card p,
.markets-card li {
    color: var(--gray);
    font-size: 13px;
}

.markets-card ul {
    margin-top: 22px;
    padding-left: 18px;
}

/* About */

.about-section {
    background: var(--light);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.advantage {
    padding: 27px 22px;
    border-top: 2px solid var(--green);
}

.advantage-number {
    display: block;
    margin-bottom: 28px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
}

.advantage h3 {
    margin-bottom: 11px;
    font-size: 18px;
}

.advantage p {
    color: var(--gray);
    font-size: 13px;
}

/* Gallery */

.gallery-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: 230px 230px;
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--green-dark);
}

.gallery-item.gallery-large {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
    transition: 0.4s ease;
}

.gallery-item:hover img {
    opacity: 1;
    transform: scale(1.06);
}

.gallery-item span {
    position: absolute;
    right: 15px;
    bottom: 15px;
    left: 15px;
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
}

/* Contacts */

.contact-section {
    color: var(--white);
    background: linear-gradient(125deg, rgb(9 84 49 / 97%), rgb(38 118 83 / 91%));
}

.contact-info > p {
    max-width: 530px;
    margin-top: 25px;
    color: rgba(255,255,255,0.75);
}

.contact-details {
    display: grid;
    gap: 14px;
    margin-top: 35px;
}

.contact-details a,
.contact-details > span {
    display: flex;
    gap: 12px;
    align-items: center;
    color: rgba(255,255,255,0.88);
    font-size: 20px;
}

.contact-details a:hover {
    color: var(--lime);
}

.contact-details span span {
    width: 25px;
    color: var(--lime);
}

.contact-form {
    padding: 34px;
    border-radius: var(--radius);
    color: var(--black);
    background: var(--white);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.contact-form label {
    display: block;
    margin-bottom: 17px;
    color: var(--gray);
    font-size: 12px;
    font-weight: 600;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    display: block;
    margin-top: 7px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    color: var(--black);
    background: var(--light);
    font: inherit;
    font-size: 13px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--green);
}

.checkbox-label {
    display: flex !important;
    gap: 8px;
    align-items: flex-start;
}

.checkbox-label input {
    width: auto;
    margin-top: 3px;
}

.contact-form .button {
    width: 100%;
    border: 0;
}

/* .form-message — см. css/code_editor_styles.css */

/* Footer */

.footer {
    padding: 32px 0;
    background: linear-gradient(125deg, rgb(9 84 49 / 97%), rgb(30 66 50 / 91%));
    color: rgba(255,255,255,0.68);
    font-size: 11px;
}

.footer-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.footer-logo {
    color: var(--white);
}

.footer-logo small {
    color: rgba(255,255,255,0.55);
}

.footer p {
    max-width: 450px;
}

/* Mobile */

@media (max-width: 900px) {
    .main-nav {
        position: fixed;
        top: 78px;
        right: 20px;
        left: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 16px;
        border-radius: 18px;
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 13px 8px;
        border-bottom: 1px solid var(--border);
    }

    .mobile-menu-button {
        display: block;
    }

    .language-switcher {
        margin-left: auto;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
    }

    .advantages-grid {
        grid-template-columns: 1fr 1fr;
    }

    .intro-grid,
    .markets-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .section-heading {
        display: block;
    }

    .section-heading > p {
        margin-top: 20px;
    }
}

@media (max-width: 600px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .section {
        padding: 75px 0;
    }

    .logo small {
        display: none;
    }

    /* ── Все секции: section-label + h2 в один ряд ── */
    .intro-grid > div:first-child,
    .section-heading > div:first-child,
    .markets-content,
    .contact-info {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 10px;
    }

    .section-label {
        display: inline-block;
        flex-shrink: 0;
        margin-bottom: 0 !important;
        padding: 3px 9px;
        border-radius: 5px;
        background: rgba(11, 143, 85, 0.08);
        font-size: 10px;
        letter-spacing: 0.08em;
    }

    .section-label.light {
        background: rgba(185, 239, 74, 0.15);
        color: var(--lime);
    }

    .section-label + h2 {
        margin-bottom: 0;
        font-size: 25px;
        line-height: 1.15;
    }

    .markets-content > p {
        width: 100%;
        margin-top: 12px;
    }

    .contact-info > p {
        width: 100%;
        margin-top: 12px;
    }

    /* hero-label + h1 в один ряд */
    .hero-head {
        display: flex;
        align-items: baseline;
        gap: 12px;
        flex-wrap: wrap;
        margin-bottom: 16px;
    }

    .hero-label {
        display: inline-block;
        flex-shrink: 0;
        margin-bottom: 0;
        padding: 4px 10px;
        border-radius: 6px;
        background: rgba(185, 239, 74, 0.15);
        border: 1px solid rgba(185, 239, 74, 0.3);
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    .hero h1 {
        font-size: 34px;
        margin-bottom: 0;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-buttons {
        flex-wrap: nowrap;
    }

    .hero-buttons .button {
        flex: 1;
        min-height: 46px;
        padding: 0 14px;
        font-size: 12px;
        gap: 6px;
        white-space: nowrap;
    }

    .hero-statistics {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 10px;
        margin-top: 44px;
    }

    .hero-statistics > div {
        flex: 1;
        text-align: center;
    }

    .hero-statistics strong {
        font-size: 22px;
    }

    .hero-statistics span {
        font-size: 10px;
    }

    .product-grid,
    .advantages-grid,
    .market-list,
    .form-row {
        grid-template-columns: 1fr;
    }

    .product-card p {
        min-height: auto;
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 200px 200px 200px;
    }

    .gallery-item.gallery-large {
        grid-column: span 2;
        grid-row: auto;
    }

    .markets-card,
    .contact-form {
        padding: 25px;
    }

    .footer-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* ── Отключаем дорогой backdrop-filter на мобильных ── */
@media (max-width: 900px) {
    .header {
        backdrop-filter: none;
        background: rgba(255, 255, 255, 0.98);
    }
}

/* ── hero не участвует в content-visibility ── */
.hero.section {
    content-visibility: visible;
    contain-intrinsic-size: none;
}

/* ── Отключаем hover-эффекты на тач-устройствах ── */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
        border-color: var(--border);
        box-shadow: none;
    }
    .gallery-item:hover img {
        transform: none;
    }
    .button-primary:hover {
        transform: none;
        box-shadow: none;
    }
    .button-outline:hover {
        background: transparent;
        color: var(--white);
    }
}