:root {
    --primary: #ff4a0a;
    --primary-hover: #e8470b;
    --primary-dark: #ff4401;
    --text: #1f1f1f;
    --text-secondary: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg: #f7f7f7;
    --bg-alt: #eeeeee;
    --white: #ffffff;
    --border: #e8e8e8;
    --footer-bg: #2f2f2f;
    --shadow: 0 4px 24px rgba(31, 31, 31, 0.08);
    --radius: 12px;
    --transition: 0.2s ease-in-out;
    --container-padding: 20px;
    --container-max: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

a {
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}

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

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

h1, h2, h3 {
    font-family: inherit;
    font-weight: 500;
    line-height: 1.25;
    color: var(--text);
}

h2 {
    font-size: 2rem;
    margin: 0 0 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 640px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white);
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    text-decoration: none;
}

.btn:hover {
    background: var(--primary-hover);
    color: var(--white);
    transform: translateY(-1px);
}

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

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

.btn--large {
    padding: 16px 36px;
    font-size: 17px;
}

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

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 16px;
    width: 100%;
}

.header__logo {
    flex-shrink: 0;
    line-height: 0;
}

.header__logo img {
    height: 56px;
    width: auto;
    object-fit: contain;
    display: block;
}

.header__nav {
    display: flex;
    gap: 24px;
}

.header__nav a {
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
}

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

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

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

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

/* Hero */
.hero {
    position: relative;
    padding: 96px 0 72px;
    text-align: center;
    background: var(--text) url('../img/hero-bg.jpg') center center / cover no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(31, 31, 31, 0.88) 0%,
        rgba(31, 31, 31, 0.62) 55%,
        rgba(31, 31, 31, 0.75) 100%
    );
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.75rem;
    margin: 0 0 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--white);
}

.hero__subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__features {
    list-style: none;
    padding: 0;
    margin: 0 0 36px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 32px;
}

.hero__features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.92);
}

.hero__features li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 20px;
}

.hero__cta .btn--outline {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.85);
}

.hero__cta .btn--outline:hover {
    background: var(--white);
    color: var(--text);
    border-color: var(--white);
}

.hero__phone {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
}

.hero__phone a {
    color: var(--white);
    font-weight: 500;
}

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

/* Before / After */
.before-after {
    padding: 60px 0;
    background: var(--white);
}

.before-after__slider {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    user-select: none;
    cursor: ew-resize;
    aspect-ratio: 16 / 9;
}

.before-after__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.before-after__after-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    width: 50%;
}

.before-after__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--white);
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.before-after__handle::after {
    content: "⟷";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.before-after__label {
    position: absolute;
    top: 16px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.55);
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    z-index: 5;
    letter-spacing: 0.5px;
}

.before-after__label--before {
    left: 16px;
}

.before-after__label--after {
    right: 16px;
}

/* Stats */
.stats {
    padding: 60px 0;
    background: var(--bg);
}

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

.stats__num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stats__label {
    font-size: 14px;
    color: var(--text-light);
}

/* Components cards */
.components {
    padding: 60px 0;
    background: var(--white);
}

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

.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

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

.card__image {
    overflow: hidden;
}

.card__image img {
    width: 100%;
    height: 132px;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform var(--transition);
}

.card:hover .card__image img {
    transform: scale(1.03);
}

.card__body {
    padding: 16px 20px 20px;
}

.card h3 {
    font-size: 1.15rem;
    margin: 0 0 8px;
}

.card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.55;
}

/* Gallery */
.works {
    padding: 60px 0;
    background: var(--bg);
}

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

.gallery__item {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
}

.gallery__item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.gallery__caption {
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.section-cta {
    text-align: center;
    margin-top: 32px;
}

/* Process */
.process {
    padding: 60px 0;
    background: var(--white);
}

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

.step {
    text-align: center;
    padding: 24px 16px;
}

.step__num {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 1.05rem;
    margin: 0 0 8px;
}

.step p {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
}

/* Why us */
.why {
    padding: 60px 0;
    background: var(--bg);
}

.why__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.why__list li {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.why__list strong {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 1.05rem;
}

.why__list span {
    font-size: 14px;
    color: var(--text-light);
}

/* FAQ */
.faq {
    padding: 60px 0;
    background: var(--white);
}

.faq__list {
    max-width: 760px;
    margin: 0 auto;
}

.faq__item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq__question {
    width: 100%;
    background: var(--bg);
    border: none;
    padding: 18px 24px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    font-family: inherit;
    transition: background var(--transition);
}

.faq__question:hover {
    background: var(--bg-alt);
}

.faq__question::after {
    content: "+";
    font-size: 20px;
    color: var(--primary);
    transition: transform var(--transition);
    flex-shrink: 0;
    margin-left: 12px;
}

.faq__item.is-open .faq__question::after {
    transform: rotate(45deg);
}

.faq__answer {
    display: none;
    padding: 8px 24px 22px;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.65;
}

.faq__item.is-open .faq__answer {
    display: block;
}

/* Final CTA */
.final-cta {
    padding: 80px 0;
    text-align: center;
    background: var(--text);
    color: var(--white);
}

.final-cta h2 {
    color: var(--white);
    margin-bottom: 12px;
}

.final-cta p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 32px;
    font-size: 1.05rem;
}

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

.final-cta .btn:hover {
    background: var(--primary-hover);
    color: var(--white);
}

/* Footer */
.footer {
    padding: 48px 0 32px;
    background: var(--footer-bg);
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
}

.footer a {
    color: rgba(255, 255, 255, 0.85);
}

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

.footer__contacts {
    margin-bottom: 16px;
    line-height: 1.8;
}

.footer__socials {
    margin-bottom: 20px;
}

.footer__socials a {
    margin: 0 10px;
}

.footer__legal {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 16px;
}

/* Mobile sticky CTA */
.mobile-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px var(--container-padding);
    background: var(--white);
    border-top: 1px solid var(--border);
    z-index: 90;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.mobile-cta .btn {
    width: 100%;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
}

.modal-overlay.is-open {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    padding: 4px;
}

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

.modal h3 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.modal__subtitle {
    color: var(--text-light);
    font-size: 14px;
    margin: 0 0 24px;
}

/* Quiz */
.quiz__progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 24px;
    overflow: hidden;
}

.quiz__progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 33%;
}

.quiz__step {
    display: none;
}

.quiz__step.is-active {
    display: block;
}

.quiz__label {
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.quiz__hint {
    font-size: 13px;
    color: var(--text-light);
    margin: -8px 0 16px;
}

.text-muted {
    font-weight: 400;
    color: var(--text-muted);
}

.quiz__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.quiz__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    font-size: 14px;
}

.quiz__option:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.quiz__option input {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.quiz__option.is-selected {
    border-color: var(--primary);
    background: #fff5f0;
}

.quiz__field {
    margin-bottom: 16px;
}

.quiz__field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.quiz__field input,
.quiz__field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--transition);
}

.quiz__field input:focus,
.quiz__field textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.quiz__field textarea {
    resize: vertical;
    min-height: 80px;
}

.quiz__field--error input,
.quiz__field--error textarea {
    border-color: var(--primary-hover);
}

.quiz__error {
    color: var(--primary-hover);
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.quiz__field--error .quiz__error {
    display: block;
}

.quiz__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.quiz__consent input {
    margin-top: 3px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

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

.quiz__actions .btn--outline {
    flex: 0 0 auto;
}

.quiz__actions .btn:not(.btn--outline) {
    flex: 1;
}

.quiz__success {
    text-align: center;
    padding: 20px 0;
}

.quiz__success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.quiz__success h3 {
    margin-bottom: 8px;
}

.quiz__success p {
    color: var(--text-light);
    font-size: 14px;
}

.quiz__close-btn {
    margin-top: 20px;
}

.quiz__hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 992px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .card__image img {
        height: 112px;
    }

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

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

@media (max-width: 768px) {
    :root {
        --container-padding: 20px;
    }

    .header__nav {
        display: none;
    }

    .header__phone {
        display: none;
    }

    .header__inner {
        padding-top: 10px;
        padding-bottom: 10px;
        gap: 12px;
    }

    .header__logo img {
        height: 40px;
    }

    .header__actions .btn {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

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

    .hero h1 {
        font-size: 1.85rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .hero__features {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .hero__cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__cta .btn {
        width: 100%;
    }

    h2 {
        font-size: 1.5rem;
    }

    .cards-grid,
    .gallery,
    .steps,
    .why__list,
    .stats__grid {
        grid-template-columns: 1fr;
    }

    .components .cards-grid {
        gap: 12px;
    }

    .components .card {
        display: flex;
        flex-direction: row;
        align-items: stretch;
    }

    .components .card__image {
        flex: 0 0 80px;
        max-width: 80px;
    }

    .components .card__image img {
        height: 100%;
        min-height: 80px;
        max-height: 80px;
    }

    .components .card:hover .card__image img {
        transform: none;
    }

    .components .card__body {
        padding: 12px 14px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .components .card h3 {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .components .card p {
        font-size: 12px;
        line-height: 1.45;
    }

    .mobile-cta {
        display: block;
    }

    body {
        padding-bottom: 72px;
    }

    .modal {
        padding: 24px var(--container-padding);
    }
}
