

/* ---------- Переменные (цвета и шрифты) ---------- */
:root {
    --color-primary: #004741;
    --color-primary-light: #007b71;
    --color-primary-mid: #02786e;
    --color-accent: #F1A132;
    --color-text: #000000;
    --color-text-secondary: #1F251F;
    --color-text-muted: #999999;
    --color-bg: #ffffff;
    --color-bg-alt: #f3f3f3;
    --color-border: #e8e8e8;
    --color-dark: #141414;

    --font-heading: "Inter", "Montserrat", Arial, sans-serif;
    --font-body: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --container-width: 1200px;
    --transition-fast: 0.2s ease-in-out;
    --transition-mid: 0.35s ease-in-out;
}

/* ---------- Сброс ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.4;
    font-weight: 400;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
}

/* ---------- Контейнер и секции ---------- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: 900px;
}

.section {
    padding: 96px 0;
}

.section--alt {
    background: var(--color-bg-alt);
}

.section__title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 300;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.section__intro {
    max-width: 640px;
    color: var(--color-text-secondary);
    opacity: 0.85;
    margin-bottom: 56px;
}

.section__action {
    margin-top: 56px;
    text-align: center;
}

.section__action .btn {
    border-radius: 12px;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    min-width: 240px;
    padding: 0 40px;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 500;
    text-align: center;
    border: none;
    cursor: pointer;
    border-radius: 0; /* прямые углы — стиль образца */
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn--primary {
    background: var(--color-primary);
    color: #ffffff;
}

.btn--primary:hover {
    background: var(--color-primary-light);
}

.btn--accent {
    position: relative;
    overflow: hidden;
    background: var(--color-accent);
    color: var(--color-text-secondary);
}

.btn--accent:hover {
    background: #e3921f;
}

.btn--outline {
    background: transparent;
    color: var(--color-text);
    box-shadow: inset 0 0 0 1px var(--color-primary);
}

.btn--outline:hover {
    background: rgba(0, 71, 65, 0.08);
}

.btn--outline-on-dark {
    background: transparent;
    color: #ffffff;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px var(--color-accent);
}

.btn--outline-on-dark:hover {
    background: rgba(241, 161, 50, 0.15);
    color: #ffffff;
}

.btn--block {
    width: 100%;
}

/* ---------- Логотип ---------- */
/* ---------- Шапка ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.header--scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav a {
    font-size: 16px;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

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

.nav__directions {
    display: none;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header__cta {
    min-height: 44px;
    min-width: 0;
    padding: 0 28px;
    border-radius: 12px;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--color-text);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
    opacity: 0;
}

.burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: min(92vh, 860px);
    display: flex;
    align-items: center;
    color: var(--color-text);
    background:
        linear-gradient(to right, rgb(255, 255, 255), rgba(255, 255, 255, 0.403)),
        url("../img/hero-bg.jpeg") center / cover no-repeat;
    padding: 120px 0 80px;
}

.hero__inner {
    position: relative;
    z-index: 1;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: 80px;
    font-weight: 300;
    line-height: 1.1;
    text-transform: uppercase;
    max-width: 760px;
    margin-bottom: 28px;
}

.hero__subtitle {
    font-size: 18px;
    line-height: 1.55;
    max-width: 560px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 56px;
}

.hero__actions .btn {
    border-radius: 12px;
}

.hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 40px;
}

.hero__facts li {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.hero__facts li::before {
    content: "+";
    color: var(--color-accent);
    font-weight: 500;
    margin-right: 8px;
}

/* ---------- Виды работ ---------- */
.work-types {
    display: flex;
    flex-direction: column;
    gap: 88px;
}

.work-type {
    display: flex;
    align-items: stretch;
    gap: 28px;
}

.work-type__info {
    flex: 0 0 66.666%;
    max-width: 66.666%;
    display: flex;
    flex-direction: column;
}

.work-type__title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 300;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.work-type__products {
    display: flex;
    flex-direction: column;
}

.work-type__product {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}

.work-type__product-name {
    font-size: 16px;
    line-height: 1.4;
    color: var(--color-text-secondary);
}

.work-type__product-price {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-primary);
    white-space: nowrap;
}

.work-type__carousel {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    position: relative;
    align-self: center;
}

.carousel__viewport {
    position: relative;
    height: 340px;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.carousel__track {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.45s ease-in-out;
}

.carousel__slide {
    flex: 0 0 100%;
    height: 340px;
}

.carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ---------- Кнопка «Бесплатная консультация» ---------- */
.btn-consult {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 38px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 500;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.btn-consult::before,
.btn--accent::before {
    content: "";
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    animation: shine-sweep 3.2s ease-in-out infinite;
}

.btn-consult:hover {
    background: var(--color-primary-light);
}

@keyframes shine-sweep {
    0% {
        left: -70%;
    }
    55%,
    100% {
        left: 130%;
    }
}

.btn-consult--section {
    align-self: flex-start;
    margin-top: 20px;
}

.btn-consult--modal {
    align-self: flex-start;
    padding: 13px 32px;
    font-size: 15px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--color-text);
    text-transform: uppercase;
    white-space: nowrap;
}

.logo span {
    color: var(--color-primary);
    font-weight: 500;
}

.logo--footer {
    color: #ffffff;
}
/* ---------- Наши работы ---------- */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.work {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--color-bg-alt);
}

.work img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-in-out;
}

.work:hover img {
    transform: scale(1.05);
}

.work figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

/* ---------- Отзывы ---------- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.review {
    padding: 36px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.review__rating {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.review__rating span {
    color: var(--color-accent);
    font-size: 18px;
}

.review__text {
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 24px;
}

.review__author {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
}

/* ---------- FAQ ---------- */
.faq {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(31, 37, 31, 0.18);
}

.faq-question {
    width: 100%;
    padding: 28px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.faq-icon {
    font-size: 32px;
    line-height: 1;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-right: 80px;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(31, 37, 31, 0.72);
    transition: max-height 0.35s ease, opacity 0.25s ease, padding-bottom 0.35s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    opacity: 1;
    padding-bottom: 28px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* ---------- CTA и форма ---------- */
.cta {
    padding: 120px 0;
    color: #ffffff;
    background:
        linear-gradient(rgba(0, 36, 33, 0.875), rgba(0, 36, 33, 0.927)),
        url("../img/forma.jpeg") center / cover no-repeat;
}


.cta__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.cta__title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 300;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.cta__text {
    font-size: 18px;
    line-height: 1.55;
    opacity: 0.9;
    max-width: 480px;
    margin-bottom: 40px;
}

.cta__contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cta__contacts a {
    font-size: 22px;
    font-weight: 500;
}

.cta__contacts li:last-child {
    font-size: 16px;
    opacity: 0.85;
}

.cta__contacts a:hover {
    color: var(--color-accent);
}

.cta__max-btn {
    margin-top: 24px;
}

.cta__schedule {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.cta__schedule-title {
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.cta__schedule-list {
    display: grid;
    gap: 6px;
    font-size: 15px;
}

.cta__schedule-list li {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.cta__schedule-list li span:last-child {
    opacity: 0.9;
    text-align: right;
    white-space: nowrap;
}

.directions__map {
    margin-top: 40px;
}

.directions__map iframe {
    display: block;
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 12px;
}

.cta__form-card {
    padding: 48px;
    background: #ffffff;
    color: var(--color-text);
}

.cta__form-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form__input {
    width: 100%;
    height: 56px;
    padding: 0 16px;
    font-size: 16px;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-bg-alt);
    border: 1px solid transparent;
    border-radius: 0;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #ffffff;
}

.form__input::placeholder {
    color: var(--color-text-muted);
}

.form__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text-muted);
    cursor: pointer;
}

.form__consent input {
    margin-top: 3px;
    accent-color: var(--color-primary);
}

.form__submit {
    border-radius: 999px;
}

.flash {
    margin-bottom: 24px;
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.4;
}

.flash__success {
    background: rgba(0, 122, 102, 0.12);
    color: var(--color-primary);
    border-left: 4px solid var(--color-primary);
}

.flash__error {
    background: rgba(220, 60, 40, 0.1);
    color: #b3261e;
    border-left: 4px solid #b3261e;
}

/* ---------- Модальное окно ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-mid), visibility var(--transition-mid);
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, 0.62);
}

.modal__box {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 48px 40px 40px;
    background: var(--color-bg);
    transform: translateY(20px);
    transition: transform var(--transition-mid);
}

.modal.is-open .modal__box {
    transform: translateY(0);
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal__close:hover {
    color: var(--color-primary);
}

.modal__title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.modal__text {
    font-size: 16px;
    line-height: 1.55;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
}

.modal__phone {
    font-weight: 500;
    color: var(--color-primary);
    white-space: nowrap;
}

.modal__phone:hover {
    color: var(--color-primary-light);
}

.modal__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal__input {
    width: 100%;
    height: 56px;
    padding: 0 20px;
    font-size: 16px;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-bg-alt);
    border: 1px solid transparent;
    border-radius: 0;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.modal__input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #ffffff;
}

.modal__input::placeholder {
    color: var(--color-text-muted);
}

/* ---------- Футер ---------- */
.footer {
    padding: 72px 0 32px;
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.75);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__about {
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.5;
    max-width: 320px;
}

.footer__title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 20px;
}

.footer__nav,
.footer__contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 15px;
}

.footer__nav a:hover,
.footer__contacts a:hover {
    color: var(--color-accent);
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 24px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.footer__links a:hover {
    color: var(--color-accent);
}

/* ---------- Юридическая страница ---------- */
.legal {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--color-text-secondary);
}

.legal h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 500;
    margin-top: 16px;
}

.legal ul {
    list-style: disc;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal__back {
    align-self: flex-start;
    margin-top: 32px;
}

/* ---------- Анимации появления ---------- */
.Reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.Reveal.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .Reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .btn-consult::before,
    .btn--accent::before {
        animation: none;
    }
    .carousel__track {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ---------- Адаптивность ---------- */
@media (max-width: 1199px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 959px) {
    .nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .nav.is-open {
        max-height: 480px;
    }

    .nav a {
        padding: 16px 24px;
        border-bottom: 1px solid var(--color-border);
    }

    .nav__directions {
        display: block;
    }

    .burger {
        display: flex;
    }

    .header__cta {
        display: none;
    }

    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .work-types {
        gap: 64px;
    }

    .work-type {
        flex-direction: column;
        gap: 24px;
    }

    .work-type__info {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .work-type__carousel {
        flex: 0 0 auto;
        max-width: 100%;
        align-self: stretch;
    }

    .carousel__viewport,
    .carousel__slide {
        height: 320px;
    }

    .cta__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

@media (max-width: 639px) {
    .section {
        padding: 64px 0;
    }

    .section__title {
        font-size: 28px;
    }

    .hero__title {
        font-size: 44px;
    }

    .hero {
        padding: 100px 0 56px;
    }

    .works-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .work-types {
        gap: 48px;
    }

    .work-type {
        gap: 16px;
    }

    .work-type__title {
        font-size: 22px;
    }

    .work-type__product {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .carousel__viewport,
    .carousel__slide {
        height: 280px;
    }

    .cta {
        padding: 80px 0;
    }

    .cta__title {
        font-size: 34px;
    }

    .cta__form-card {
        padding: 32px 24px;
    }

    .modal__box {
        padding: 40px 24px 32px;
    }

    .modal__text {
        margin-bottom: 24px;
    }

    .faq-answer {
        padding-right: 20px;
    }

    .faq-question {
        padding: 22px 0;
    }

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

    .footer__bottom {
        flex-direction: column;
    }

    .btn {
        min-width: 0;
        width: 100%;
    }
}
