/* ==========================================================================
   ТверьСанТех — сантехник и прочистка канализации в Твери
   ========================================================================== */

:root {
    --primary: #1d6fb8;
    --primary-dark: #175a96;
    --primary-light: #e8f2fb;
    --accent: #f59e0b;
    --dark: #12263a;
    --dark-2: #1a3a54;
    --gray: #5d6b78;
    --gray-light: #97a5b0;
    --bg: #f3f8fd;
    --white: #ffffff;
    --border: #dfe9f2;
    --shadow: 0 10px 30px rgba(29, 111, 184, 0.12);
    --shadow-lg: 0 20px 50px rgba(29, 111, 184, 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, 38, 58, 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);
    white-space: nowrap;
}

.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(29, 111, 184, 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);
}

.stat__label {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--gray);
}

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

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

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

.section__tag--light {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

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

.section__title--light {
    color: #fff;
}

.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__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    display: flex;
    flex-direction: column;
    padding: 34px 28px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(18, 38, 58, 0.04);
}

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

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

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

.service-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

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

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

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

.service-card:hover .service-card__link i {
    transform: translateX(4px);
}

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

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

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

.advantage {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 30px 26px;
    transition: var(--transition);
}

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

.advantage__icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--accent);
    color: var(--white);
    font-size: 1.6rem;
    margin-bottom: 18px;
}

.advantage__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

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

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

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

.step {
    position: relative;
    padding: 30px 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(18, 38, 58, 0.04);
    transition: var(--transition);
}

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

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

.step__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

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

/* ==========================================================================
   Prices
   ========================================================================== */

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

.prices__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 36px 28px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(18, 38, 58, 0.04);
}

.price-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.price-card--featured {
    border: 2px solid var(--primary);
}

.price-card__badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.price-card__icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 18px;
}

.price-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.price-card__value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

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

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

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

.review {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 26px;
    box-shadow: 0 4px 20px rgba(18, 38, 58, 0.04);
}

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

.review__text {
    font-size: 0.98rem;
    color: var(--gray);
    margin-bottom: 20px;
    font-style: italic;
}

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

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

.review__name {
    display: block;
    font-weight: 700;
}

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

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

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

.contacts__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contacts__text {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 28px;
}

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

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

.contacts__icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.1rem;
}

.contacts__label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.contacts__value {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 1.02rem;
}

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

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

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

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

/* ==========================================================================
   Contact form
   ========================================================================== */

.contacts__form-wrap {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
}

.contact-form__title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

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

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

.contact-form__input {
    width: 100%;
    padding: 14px 18px;
    border: 1px 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 3px rgba(29, 111, 184, 0.12);
}

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

.contact-form__select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%2397a5b0' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
}

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

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

.contact-form__success {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 18px;
    background: #e8f7ec;
    color: #1e7e34;
    border-radius: 12px;
    font-size: 0.95rem;
}

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

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

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

.footer {
    background: var(--dark);
    color: #fff;
    padding: 60px 0 30px;
}

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

.footer .logo {
    color: #fff;
}

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

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

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

.footer__contacts {
    text-align: right;
}

.footer__phone {
    display: block;
    font-weight: 700;
    font-size: 1.15rem;
    transition: var(--transition);
}

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

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

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

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

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

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

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

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

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

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

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

    .hero__title {
        font-size: 2.6rem;
    }

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

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 24px;
        padding: 40px;
        box-shadow: -10px 0 40px rgba(18, 38, 58, 0.15);
        transition: right 0.4s ease;
    }

    .nav--open {
        right: 0;
    }

    .nav__link {
        font-size: 1.1rem;
    }

    .burger {
        display: flex;
    }

    .header__actions .btn {
        display: none;
    }
}

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

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

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .section__title {
        font-size: 1.8rem;
    }

    .services__grid,
    .advantages__grid,
    .reviews__grid,
    .prices__grid,
    .how__grid {
        grid-template-columns: 1fr;
    }

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

    .contacts__form-wrap {
        padding: 28px 20px;
    }

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

    .footer__contacts {
        text-align: center;
    }
}