﻿:root {
    --green: #00A651;
    --green-dark: #008c44;
    --grey: #4a4a4a;
    --grey-dark: #333333;
    --grey-light: #f5f5f5;
    --white: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --font: 'Montserrat', system-ui, sans-serif;
    --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--grey-dark);
    background: var(--white);
}

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

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

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header */
.site-header {
    position: relative;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    flex-shrink: 0;
}

.logo-top {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.logo-grey {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--grey);
    text-transform: uppercase;
}

.logo-star {
    color: var(--green);
    display: flex;
    align-items: center;
}

.logo-green {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--green);
    text-transform: uppercase;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li + li::before {
    content: '|';
    margin: 0 0.85rem;
    color: var(--border);
    font-weight: 400;
}

.main-nav a {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--grey);
    transition: color 0.2s;
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--grey-dark);
    transition: transform 0.2s, opacity 0.2s;
}

.mobile-nav {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 0.5rem 1rem 1rem;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav a {
    display: block;
    padding: 0.65rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--grey);
    border-bottom: 1px solid var(--border);
}

/* Hero */
.hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

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

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0.15) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 3.5rem 0 6rem;
    max-width: 560px;
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.6rem, 3.5vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--grey-dark);
}

.hero-lead {
    margin: 0 0 1.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--grey);
    max-width: 440px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

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

.btn-primary:hover {
    background: var(--green-dark);
}

.btn-block { width: 100%; }

/* Main floating card */
.main-card-wrap {
    position: relative;
    z-index: 10;
    margin-top: -4.5rem;
    padding-bottom: 3rem;
}

.main-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2.5rem 2.5rem 2rem;
}

.block-title {
    margin: 0 0 1.25rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey-dark);
}

.block-title--center {
    text-align: center;
}

/* Services */
.services-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.service-item {
    text-align: center;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 0.75rem;
    color: var(--green);
}

.service-item h3 {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--grey-dark);
}

.service-item p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--grey);
}

/* Calculator row */
.calc-row {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.calc-field {
    margin-bottom: 1.25rem;
}

.calc-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--grey);
}

.area-slider-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.area-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
}

.area-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--green);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.area-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--green);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.area-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--green);
    white-space: nowrap;
    min-width: 4.5rem;
    text-align: right;
}

.area-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--grey);
}

.calc-field select {
    width: 100%;
    max-width: 280px;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.calc-total {
    margin: 1.5rem 0 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--grey-dark);
}

.calc-total strong {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green);
}

/* Lead forms */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lead-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
}

.lead-form input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.15);
}

.lead-form--inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.lead-form--inline label {
    flex: 1;
    min-width: 160px;
}

.lead-form--inline .btn {
    flex-shrink: 0;
}

/* Before/after */
.gallery-row {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.ba-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.ba-slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--grey-light);
    user-select: none;
}

.ba-image {
    position: absolute;
    inset: 0;
}

.ba-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-before { z-index: 1; }

.ba-after {
    z-index: 2;
    clip-path: inset(0 0 0 var(--ba-pos, 50%));
}

.ba-label {
    position: absolute;
    bottom: 10px;
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 4px;
    color: var(--grey-dark);
}

.ba-before .ba-label { left: 10px; }
.ba-after .ba-label { right: 10px; }

.ba-range {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    margin: 0;
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--ba-pos, 50%);
    width: 3px;
    background: var(--white);
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.ba-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--green);
}

/* Guarantees */
.about-text {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 1.5rem;
    font-size: 0.88rem;
    color: var(--grey);
    line-height: 1.65;
}

.guarantees-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.guarantee-box {
    padding: 1rem 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--grey-dark);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.guarantees-standalone {
    padding: 2.5rem 0 3rem;
    background: var(--grey-light);
}

.guarantees-standalone .guarantee-box {
    background: var(--white);
}

/* Footer */
.site-footer {
    background: var(--grey-light);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--grey);
}

.footer-copy { margin: 0; }

.footer-phone {
    margin: 0;
    text-align: center;
}

.footer-phone a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--grey-dark);
    transition: color 0.2s;
}

.footer-phone a:hover { color: var(--green); }
.footer-phone .icon { color: var(--green); }

.footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--grey);
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--green); }

.footer-sep { color: var(--border); }

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    max-width: 360px;
    padding: 1rem 1.25rem;
    background: var(--grey-dark);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error { background: #c0392b; }

/* Responsive */
@media (max-width: 1024px) {
    .services-row { grid-template-columns: repeat(2, 1fr); }
    .calc-row { grid-template-columns: 1fr; }
    .guarantees-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .menu-toggle { display: flex; }

    .hero { min-height: 360px; }
    .hero-content { padding-bottom: 5rem; }
    .main-card { padding: 1.5rem; }
    .main-card-wrap { margin-top: -3rem; }

    .services-row { grid-template-columns: 1fr; gap: 1.25rem; }
    .ba-grid { grid-template-columns: 1fr; }

    .lead-form--inline {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links { justify-content: center; }
}
