﻿/* ====== Fonts (подключишь файлы сам или через @import) ======
   font-family: 'Inter Tight';
   font-family: 'Rubik Mono One';
*/

:root {
    --c-text: #353535;
    --c-black: #222222;
    --c-green: #6FA979;
    --c-green-dark: #65976D;
    --c-purple: #8C70C3;
    --c-purple-2: #A88EDD;
    --c-bg: #FFFFFF;

    --shadow-green: inset 0 -5px 16px #8ED599, inset 0 4px 16px #8ED599;
    --shadow-green-card: inset -10px -20px 28px #A4CAAB, inset 10px 20px 28px #A4CAAB;
    --shadow-purple-card: inset -10px -20px 28px #CBB6F4, inset -10px 20px 28px #CBB6F4;

    --r-20: 20px;
    --r-35: 35px;
    --r-50: 50px;
    --r-60: 60px;

    --container: 1200px;
    /* адаптивный контейнер, “макетный” можно сделать 1440 */
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter Tight", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--c-text);
    background: var(--c-bg);
}

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

button {
    font: inherit;
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
}

.header__row {
    height: 86px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo__img {
    height: 58px;
    /* как в макете по ощущению */
    width: auto;
    display: block;
}

.logo__img--icon,
.logo__img--text {
    display: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: 40px;
    flex: 1;
}

.nav__link {
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--c-black);
    font-weight: 400;
}

.nav__link--active {
    color: var(--c-green-dark);
    font-weight: 700;
}

.nav__dropdown {
    position: relative;
}

.nav__link--btn {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav__chev {
    width: 10px;
    height: 10px;
    border-right: 2px solid #C3C3C3;
    border-bottom: 2px solid #C3C3C3;
    transform: rotate(-45deg);
    margin-top: -2px;
}

.nav__link--btn.is-open .nav__chev {
    transform: rotate(45deg);
}

.nav__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 220px;
    background: #fff;
    border: 1px solid #C3C3C3;
    border-radius: 15px;
    padding: 10px;
    display: none;
}

.nav__menu.is-open {
    display: grid;
    gap: 6px;
}

.nav__menu-item {
    padding: 10px 10px;
    border-radius: 10px;
}

.nav__menu-item:hover {
    background: #F4F6F7;
}



.nav__menu-divider {
    height: 1px;
    background: #EDEDED;
    margin: 2px 6px;
}

.burger {
    display: none;
    width: 44px;
    height: 44px;
    border: 2px solid #73B531;
    border-radius: 50%;
    background: #fff;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    cursor: pointer;
    margin-left: auto;
}

.burger span {
    width: 18px;
    height: 2px;
    background: #73B531;
    display: block;
}

/* ===== Buttons ===== */
.btn {
    border: 0;
    cursor: pointer;
    border-radius: var(--r-35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    letter-spacing: -0.03em;
    font-weight: 600;
}

.btn--small {
    border-radius: var(--r-20);
    padding: 12px 18px;
    font-size: 16px;
    line-height: 19px;
}

.btn--md {
    padding: 40px 60px;
    font-size: 18px;
    line-height: 22px;
    border-radius: var(--r-35);
}

.btn--solid {
    background: var(--c-green-dark);
    color: #fff;
}

.btn--grad-green {
    background: linear-gradient(90deg, #71A279 0%, #6DB178 100%);
    color: #fff;
    box-shadow: var(--shadow-green);
}

/* ===== Modal ===== */
.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

.modal__dialog {
    position: relative;
    width: min(560px, calc(100% - 32px));
    margin: 10vh auto;
    background: #fff;
    border-radius: 24px;
    padding: 22px;
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 0;
    background: #F1F3F4;
    border-radius: 12px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.modal__title {
    margin: 0 0 16px;
    font-size: 22px;
}

.modal__text {
    margin: 0 0 18px;
    text-align: center;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.03em;
}

.form {
    display: grid;
    gap: 12px;
}

.field {
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.field input {
    height: 44px;
    border-radius: 12px;
    border: 1px solid #D7D7D7;
    padding: 0 12px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .nav {
        display: none;
    }

    .burger {
        display: inline-flex;
    }

    .header__row {
        gap: 12px;
    }

    .btn--small {
        display: none;
    }

    .logo__img--main {
        display: none;
    }

    .logo__img--icon,
    .logo__img--text {
        display: block;
    }

    .logo__img--icon {
        height: 44px;
    }

    .logo__img--text {
        height: 44px;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .header__row {
        height: 72px;
    }

    .logo__img {
        height: 44px;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 20px, var(--container));
    }

}

@media (max-width: 480px) {
    .header__row {
        height: 60px;
        gap: 10px;
    }

    .logo__img {
        height: 34px;
    }

    .burger {
        width: 36px;
        height: 36px;
        gap: 4px;
    }

    .burger span {
        width: 16px;
        height: 2px;
    }
}

/* ===== Footer mobile (all pages) ===== */
@media (max-width: 480px) {
    .footer {
        margin-top: 0;
    }

    .footer__notch-wrap {
        padding: 88px 0 32px;
        border-radius: 40px 40px 0 0;
    }

    .footer__notch-wrap::before {
        display: block !important;
        width: 110px !important;
        height: 90px !important;
        top: -50px !important;
    }

    .footer__logo-float {
        top: -72px;
        width: 72px;
        height: 72px;
    }

    .footer__content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        text-align: center;
    }

    .footer__top-row {
        display: contents;
    }

    .footer__center {
        order: 1;
    }

    .footer__phone {
        font-size: 28px;
        line-height: 34px;
    }

    .footer__caption {
        font-size: 14px;
        line-height: 17px;
    }

    .footer__divider {
        order: 2;
        margin-top: 0;
        width: 100%;
        grid-template-columns: 1fr auto 1fr;
        gap: 12px;
    }

    .footer__social {
        gap: 14px;
    }

    .footer__social-btn {
        width: 35px;
        height: 35px;
        border-radius: 7px;
    }

    .footer__social-btn svg {
        width: 22px;
        height: 22px;
    }

    .footer__cols {
        order: 3;
        margin-top: 0;
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
    }

    .footer-col__title {
        font-size: 18px;
    }

    .footer-col a {
        font-size: 14px;
    }

    .footer__left {
        order: 4;
        margin-top: 0;
        font-size: 14px;
        line-height: 1.2;
        text-align: center;
    }

    .footer__right {
        order: 5;
        margin-top: 0;
        font-size: 14px;
        line-height: 1.2;
        text-align: center;
        text-decoration: underline;
    }
}

/* ===== Mobile nav ===== */
.mnav[hidden] {
    display: none;
}

.mnav {
    position: fixed;
    inset: 0;
    z-index: 90;
}

.mnav__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
}

.mnav__panel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: min(360px, 100%);
    background: #fff;
    padding: 28px 20px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.mnav__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mnav__title {
    font-weight: 600;
}

.mnav__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #F1F3F4;
    cursor: pointer;
    font-size: 20px;
    display: none;
}

.mnav__logo img {
    width: 88px;
    height: auto;
    display: block;
    margin: 6px auto 2px;
}

.mnav__content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.mnav__list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 8px 0 18px;
}

.mnav__link {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.03em;
    color: #353535;
}

.mnav__subpanel {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin: 8px 0 18px;
}

.mnav__back {
    border: 0;
    background: transparent;
    color: #65976D;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.03em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.mnav__back::before {
    content: "";
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    display: inline-block;
    margin-top: -2px;
}

.mnav.is-sub .mnav__list {
    display: none;
}

.mnav.is-sub .mnav__subpanel {
    display: flex;
}

.mnav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(260px, 100%);
    height: 78px;
    border-radius: 25px;
    background: #65976D;
    color: #fff;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.mnav__phone {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 600;
    color: #65976D;
    letter-spacing: -0.03em;
}

.mnav__caption {
    font-size: 12px;
    color: #353535;
    letter-spacing: -0.03em;
}

.mnav__foot {
    margin-top: auto;
    font-size: 14px;
    color: #353535;
    letter-spacing: -0.03em;
}

/* ===== Footer mobile force (override 900px rules) ===== */
@media (max-width: 480px) {
    .footer__notch-wrap {
        padding: 88px 0 32px !important;
        border-radius: 40px 40px 0 0 !important;
    }

    .footer__notch-wrap::before {
        display: block !important;
        width: 170px !important;
        height: 170px !important;
        top: -100px !important;
        background: #FFFFFF !important;
    }

    .footer__logo-float {
        top: -72px !important;
        width: 72px !important;
        height: 72px !important;
    }

    .footer__content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 18px !important;
        text-align: center !important;
    }

    .footer__top-row {
        display: contents !important;
    }

    .footer__center {
        order: 1 !important;
    }

    .footer__divider {
        order: 2 !important;
        width: 100% !important;
        margin-top: 0 !important;
    }

    .footer__cols {
        order: 3 !important;
        width: 100% !important;
        margin-top: 0 !important;
    }

    .footer__left {
        order: 4 !important;
        margin-top: 0 !important;
        text-align: center !important;
    }

    .footer__right {
        order: 5 !important;
        margin-top: 0 !important;
        text-align: center !important;
        text-decoration: underline !important;
    }

    .footer__phone {
        font-size: 28px !important;
        line-height: 34px !important;
    }

    .footer__caption {
        font-size: 14px !important;
        line-height: 17px !important;
    }

    .footer__divider {
        grid-template-columns: 1fr auto 1fr !important;
        gap: 12px !important;
    }

    .footer__social {
        gap: 14px !important;
    }

    .footer__social-btn {
        width: 35px !important;
        height: 35px !important;
        border-radius: 7px !important;
    }

    .footer__social-btn svg {
        width: 22px !important;
        height: 22px !important;
    }

    .footer__cols {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .footer-col__title {
        font-size: 18px !important;
    }

    .footer-col a {
        font-size: 14px !important;
    }
}

/* Keep notch between desktop and mobile */
@media (max-width: 900px) {
    .footer__notch-wrap::before {
        display: block !important;
        width: 195px !important;
        height: 195px !important;
        top: -103px !important
    }

    .footer__logo-float {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

.footer {
    background: transparent;
    padding: 0;
    margin-top: 60px;
    /* при необходимости можешь дать отступ от блока выше */
}

/* Серый блок футера со скруглёнными верхними углами */
.footer__notch-wrap {
    position: relative;
    background: #EDF1F4;
    padding: 92px 0 60px;
    /* сверху место под выемку/лого */
    border-radius: 60px 60px 0 0;
    /* скруглённые верхние края */
    overflow: visible;
    position: relative;
}

/* Полукруглая выемка сверху по центру */
.footer__notch-wrap::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    width: 220px;
    height: 220px;
    top: -130px;

    background: #FFFFFF;
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}


/* Лого отдельно от футера: выше блока и накладывается на секцию выше */
.footer__logo-float {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    top: -68px;
    /* насколько лого "вылезает" вверх */
    width: 126px;
    height: 124px;

    display: grid;
    place-items: center;

    z-index: 5;
    pointer-events: none;
}

.footer__logo-float img {
    width: 100%;
    height: auto;
    display: block;
}

/* Контент футера поверх фона, но ниже лого */
.footer__content {
    position: relative;
    z-index: 2;
}

/* Верхняя строка: слева / центр / справа */
.footer__top-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 20px;
    padding-top: 10px;
}

.footer__left, .footer__right {
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #353535;
    margin-top: 18px;
}

.footer__left {
    text-align: left;
}

.footer__right {
    text-align: right;
    text-decoration: underline;
}

.footer__center {
    text-align: center;
}

.footer__phone {
    display: inline-block;
    font-weight: 500;
    font-size: 64px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #65976D;
}

.footer__caption {
    margin-top: 8px;
    font-size: 24px;
    line-height: 29px;
    letter-spacing: -0.03em;
    color: #353535;
}

/* Дивидер: линия — соц. иконки — линия (как в макете) */
.footer__divider {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.footer__line {
    height: 1px;
    background: #C3C3C3;
    display: block;
}

/* Социконки по центру дивидера */
.footer__social {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.footer__social-btn {
    width: 47px;
    height: 47px;
    border-radius: 10px;
    background: #FFFFFF;
    display: grid;
    place-items: center;
}

.footer__social-btn svg {
    width: 30px;
    height: 30px;
    fill: #65976D;
}

/* Колонки */
.footer__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 60px;
    margin-top: 34px;
}

.footer-col {
    display: grid;
    gap: 10px;
    text-align: center;
}

.footer-col__title {
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-weight: 400;
    color: #000;
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #353535;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .footer__phone {
        font-size: 48px;
    }

    .footer__cols {
        gap: 30px;
    }
}

/* На мобилках упрощаем выемку (иначе может выглядеть тесно) */
@media (max-width: 900px) {
    .footer__notch-wrap {
        padding-top: 90px;
        border-radius: 40px 40px 0 0;
    }

    .footer__notch-wrap::before {
        display: none;
    }

    .footer__logo-float {
        position: static;
        transform: none;
        margin: 0 auto 14px;
        pointer-events: auto;
    }

    .footer__top-row {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__left, .footer__right {
        text-align: center;
        margin-top: 0;
    }

    .footer__divider {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .footer__cols {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 520px) {
    .footer__phone {
        font-size: 34px;
    }

    .footer__caption {
        font-size: 18px;
    }
}

/* ===== Contacts page ===== */
.contacts-page {
    padding: clamp(44px, 5vw, 90px) 0;
}

.contacts-page__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 60px);
    align-items: start;
}

.contacts-page__title {
    margin: 0 0 18px;
    font-size: clamp(34px, 4vw, 64px);
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-weight: 600;
    color: #C3C3C3;
}

.contacts-page__lead {
    margin: 0;
    font-size: clamp(18px, 2vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-weight: 500;
    color: #353535;
}

.contacts-page__accent {
    color: #65976D;
}

.contacts-page__cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 32px;
}

.contacts-page__col h3 {
    margin: 0 0 10px;
    font-size: clamp(18px, 2.2vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-weight: 600;
    color: #353535;
}

.contacts-page__col p {
    margin: 0 0 8px;
    font-size: clamp(16px, 1.6vw, 24px);
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-weight: 400;
    color: #353535;
}

.contacts-page__map {
    margin-top: clamp(28px, 4vw, 60px);
    height: clamp(240px, 28vw, 431px);
    border-radius: 60px;
    background: #E7ECEF;
    overflow: hidden;
}

.contacts-page__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 980px) {
    .contacts-page__grid {
        grid-template-columns: 1fr;
    }

    .contacts-page__cols {
        grid-template-columns: 1fr;
    }
}

/* Footer mobile final override to beat 900px */
@media (max-width: 480px) {
    .footer__notch-wrap { padding: 88px 0 32px !important; border-radius: 40px 40px 0 0 !important; }
    .footer__notch-wrap::before { display: block !important; width: 110px !important; height: 90px !important; top: -50px !important; }
    .footer__logo-float { top: -72px !important; width: 72px !important; height: 72px !important; }
    .footer__content { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 18px !important; text-align: center !important; }
    .footer__top-row { display: contents !important; }
    .footer__center { order: 1 !important; }
    .footer__divider { order: 2 !important; width: 100% !important; margin-top: 0 !important; grid-template-columns: 1fr auto 1fr !important; gap: 12px !important; }
    .footer__cols { order: 3 !important; width: 100% !important; margin-top: 0 !important; grid-template-columns: 1fr !important; gap: 20px !important; }
    .footer__left { order: 4 !important; margin-top: 0 !important; text-align: center !important; }
    .footer__right { order: 5 !important; margin-top: 0 !important; text-align: center !important; text-decoration: underline !important; }
    .footer__phone { font-size: 28px !important; line-height: 34px !important; }
    .footer__caption { font-size: 14px !important; line-height: 17px !important; }
    .footer__social { gap: 14px !important; }
    .footer__social-btn { width: 35px !important; height: 35px !important; border-radius: 7px !important; }
    .footer__social-btn svg { width: 22px !important; height: 22px !important; }
    .footer-col__title { font-size: 18px !important; }
    .footer-col a { font-size: 14px !important; }
}
