/* ==========================================================================
   ЧистыйТверь — клининговая компания в Твери
   ========================================================================== */

:root {
    --primary: #0ea5b7;
    --primary-dark: #0b8a99;
    --primary-light: #e6f7f9;
    --accent: #f59e0b;
    --dark: #12343b;
    --dark-2: #1a4a52;
    --gray: #5f6d73;
    --gray-light: #9aa8ad;
    --bg: #f4f9fa;
    --white: #ffffff;
    --border: #e2ecee;
    --shadow: 0 10px 30px rgba(14, 165, 183, 0.12);
    --shadow-lg: 0 20px 50px rgba(14, 165, 183, 0.18);
    --radius: 16px;
    --transition: 0.3s ease;
    --font: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 90px 0;
}

.text--accent {
    color: var(--primary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    line-height: 1.2;
    white-space: nowrap;
}

.btn--primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--outline {
    background: transparent;
    color: var(--dark);
    border: 2px solid var(--border);
}

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

.btn--lg {
    padding: 17px 36px;
    font-size: 1.05rem;
}

.btn--sm {
    padding: 11px 20px;
    font-size: 0.9rem;
}

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

/* ==========================================================================
   Preloader
   ========================================================================== */

.preloader {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader--hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader__spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.header--scrolled {
    background: var(--white);
    box-shadow: 0 5px 30px rgba(18, 52, 59, 0.08);
    border-bottom: 1px solid var(--border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary);
}

.logo--accent {
    color: var(--primary);
}

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

.nav__link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray);
    transition: var(--transition);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

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

.nav__link:hover::after {
    width: 100%;
}

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

.header__phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark);
    transition: var(--transition);
}

.header__phone i {
    color: var(--primary);
}

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

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.burger span {
    width: 26px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

.burger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.burger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    padding: 160px 0 90px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 60%);
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(14, 165, 183, 0.08);
}

.hero::before {
    width: 400px;
    height: 400px;
    top: -120px;
    right: -100px;
}

.hero::after {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: -80px;
}

.hero__content {
    max-width: 820px;
    position: relative;
    z-index: 1;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.hero__title {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 20px;
}

.hero__subtitle {
    font-size: 1.15rem;
    color: var(--gray);
    max-width: 600px;
    margin-bottom: 36px;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

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

.stat {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat__number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.stat__label {
    font-size: 0.85rem;
    color: var(--gray);
}

/* ==========================================================================
   Section head
   ========================================================================== */

.section__head {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 55px;
}

.section__tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section__tag--light {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.section__title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 16px;
    line-height: 1.25;
}

.section__title--light {
    color: var(--white);
}

.section__subtitle {
    font-size: 1.05rem;
    color: var(--gray);
}

/* ==========================================================================
   Reveal animation
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ==========================================================================
   Services
   ========================================================================== */

.services {
    background: var(--white);
}

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

.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    background: var(--white);
}

.service-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 22px;
    transition: var(--transition);
}

.service-card:hover .service-card__icon {
    background: var(--primary);
    color: var(--white);
}

.service-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.service-card__text {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.service-card__link i {
    transition: var(--transition);
}

.service-card__link:hover {
    color: var(--primary-dark);
    gap: 12px;
}

/* ==========================================================================
   Advantages
   ========================================================================== */

.advantages {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    position: relative;
    overflow: hidden;
}

.advantages::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(14, 165, 183, 0.12);
    top: -150px;
    right: -100px;
}

.advantages__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    position: relative;
    z-index: 1;
}

.advantage {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 30px;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.advantage:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.advantage__icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(14, 165, 183, 0.25);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.advantage__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.advantage__text {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.75);
}

/* ==========================================================================
   How we work
   ========================================================================== */

.how {
    background: var(--white);
}

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

.step {
    position: relative;
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    transition: var(--transition);
}

.step:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.step__num {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.35;
    margin-bottom: 16px;
    line-height: 1;
}

.step__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.step__text {
    font-size: 0.92rem;
    color: var(--gray);
}

/* ==========================================================================
   Reviews
   ========================================================================== */

.reviews {
    background: var(--bg);
}

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

.review {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.review:hover {
    box-shadow: var(--shadow-lg);
}

.review__stars {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 16px;
}

.review__text {
    color: var(--gray);
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 24px;
    flex-grow: 1;
}

.review__author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.review__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.review__name {
    display: block;
    font-weight: 700;
    color: var(--dark);
}

.review__role {
    display: block;
    font-size: 0.82rem;
    color: var(--gray-light);
}

/* ==========================================================================
   Contacts
   ========================================================================== */

.contacts {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.contacts::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -200px;
    left: -150px;
}

.contacts__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.contacts__text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.contacts__list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 30px;
}

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

.contacts__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contacts__label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contacts__value {
    font-weight: 600;
    color: var(--white);
    font-size: 1.05rem;
}

a.contacts__value:hover {
    text-decoration: underline;
}

.contacts__social {
    display: flex;
    gap: 12px;
}

.contacts__social-link {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.contacts__social-link:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

/* Contact form */
.contacts__form-wrap {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.contact-form__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.contact-form__subtitle {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.contact-form__group {
    margin-bottom: 18px;
}

.contact-form__input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--dark);
    background: var(--bg);
    transition: var(--transition);
    outline: none;
}

.contact-form__input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.contact-form__input::placeholder {
    color: var(--gray-light);
}

.contact-form__select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235f6d73' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
}

.contact-form__textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form__privacy {
    font-size: 0.8rem;
    color: var(--gray-light);
    text-align: center;
    margin-top: 16px;
}

.contact-form__success {
    display: none;
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: #e6f7ef;
    color: #0b7a44;
    font-size: 0.95rem;
    font-weight: 500;
    align-items: center;
    gap: 10px;
}

.contact-form__success.show {
    display: flex;
}

.contact-form__success i {
    font-size: 1.4rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--dark);
    padding: 50px 0 20px;
}

.footer__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

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

.footer__nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer__link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: var(--transition);
}

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

.footer__contacts {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer__phone {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    transition: var(--transition);
}

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

.footer__email {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer__bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ==========================================================================
   Back to top
   ========================================================================== */

.to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}

.to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 992px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

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

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

    .hero__title {
        font-size: 2.6rem;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 25px;
        padding: 60px 30px;
        box-shadow: -10px 0 40px rgba(18, 52, 59, 0.1);
        transition: right 0.4s ease;
        z-index: 1000;
    }

    .nav--open {
        right: 0;
    }

    .nav__link {
        font-size: 1.1rem;
    }

    .burger {
        display: flex;
    }

    .header__actions .btn {
        display: none;
    }

    .header__phone span {
        display: none;
    }

    .header__phone i {
        font-size: 1.3rem;
    }

    .hero {
        padding: 130px 0 70px;
    }

    .hero__title {
        font-size: 2.1rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 70px 0;
    }

    .section__title {
        font-size: 1.9rem;
    }

    .footer__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer__contacts {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .services__grid,
    .advantages__grid,
    .reviews__grid {
        grid-template-columns: 1fr;
    }

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

    .hero__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .stat__number {
        font-size: 1.8rem;
    }

    .contacts__form-wrap {
        padding: 28px;
    }

    .hero__buttons .btn {
        width: 100%;
    }
}