/* ============================================================
   ЖКХ-Эксперт 34 — style.css
   Современный адаптивный сайт юридических услуг для ТСЖ/УК
   ============================================================ */

:root {
    --navy-900: #0a1f33;
    --navy-800: #0e2a47;
    --navy-700: #14385c;
    --blue-500: #2f7fd6;
    --blue-400: #4da3ff;
    --blue-100: #e8f2fc;
    --gold-500: #f0b429;
    --bg: #f5f8fc;
    --white: #ffffff;
    --text: #1b2733;
    --text-muted: #5a6b7d;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(14, 42, 71, .10);
    --shadow-lg: 0 20px 50px rgba(14, 42, 71, .16);
    --transition: .3s cubic-bezier(.4, 0, .2, 1);
    --font-main: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-accent: 'Oswald', 'Manrope', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-main);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
    width: min(1200px, 100% - 40px);
    margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
    color: var(--white);
    box-shadow: 0 8px 22px rgba(47, 127, 214, .38);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(47, 127, 214, .5); }

.btn--ghost {
    background: transparent;
    color: var(--navy-800);
    border: 2px solid var(--blue-500);
}
.btn--ghost:hover { background: var(--blue-500); color: var(--white); }

.btn--small { padding: 10px 22px; font-size: 14px; }

/* ---------- Header ---------- */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(14, 42, 71, .08);
    transition: var(--transition);
}

.header.is-scrolled { box-shadow: var(--shadow); }

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

.logo { display: inline-flex; align-items: center; gap: 12px; }

.logo__img {
    width: 52px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(47, 127, 214, .35));
}

.logo__text {
    font-family: var(--font-accent);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--navy-800);
    text-transform: uppercase;
}
.logo__text b { color: var(--blue-500); }

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

.nav__link {
    position: relative;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    padding: 6px 0;
    transition: color .25s;
}

.nav__link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 0;
    height: 2px;
    background: var(--blue-500);
    transition: width .3s;
}
.nav__link:hover, .nav__link.is-active { color: var(--blue-500); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

.nav__cta { display: none; }

/* Burger */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    background: var(--blue-100);
    padding: 10px;
}
.burger span {
    display: block;
    height: 2.5px;
    border-radius: 2px;
    background: var(--navy-800);
    transition: var(--transition);
}
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 170px 0 90px;
    background:
        radial-gradient(1000px 500px at 85% -10%, rgba(77, 163, 255, .18), transparent 60%),
        radial-gradient(700px 400px at -10% 110%, rgba(240, 180, 41, .10), transparent 60%),
        linear-gradient(180deg, #eef5fc 0%, var(--bg) 100%);
    overflow: hidden;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 48px;
}

.hero__eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--blue-500);
    background: var(--blue-100);
    border-radius: 999px;
    padding: 8px 18px;
    margin-bottom: 22px;
}

.hero__title {
    font-family: var(--font-accent);
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 600;
    line-height: 1.12;
    color: var(--navy-900);
    margin-bottom: 20px;
}
.hero__title span { color: var(--blue-500); }

.hero__text {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 32px;
}

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

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

.hero__badges li {
    position: relative;
    padding: 10px 18px 10px 40px;
    background: var(--white);
    border: 1px solid rgba(14, 42, 71, .08);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-800);
    box-shadow: 0 4px 14px rgba(14, 42, 71, .06);
}

.hero__badges li::before {
    content: '';
    position: absolute;
    left: 16px; top: 50%;
    width: 14px; height: 14px;
    transform: translateY(-50%);
    background: var(--gold-500);
    border-radius: 50%;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4'%3E%3Cpath d='M5 13l4 4 10-11'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4'%3E%3Cpath d='M5 13l4 4 10-11'/%3E%3C/svg%3E") center/contain no-repeat;
}

.hero__media { display: flex; justify-content: center; }

.hero__img {
    width: min(100%, 550px);
    filter: drop-shadow(0 30px 60px rgba(14, 42, 71, .28));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-18px) rotate(1deg); }
}

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section--alt { background: linear-gradient(180deg, #eaf2fa, var(--bg)); }

.section__head { max-width: 760px; margin-bottom: 54px; }

.section__eyebrow {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--blue-500);
    margin-bottom: 12px;
}

.section__title {
    font-family: var(--font-accent);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 600;
    line-height: 1.15;
    color: var(--navy-900);
    margin-bottom: 16px;
}

.section__lead { font-size: 17px; color: var(--text-muted); }

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 36px;
}

.tabs__btn {
    padding: 13px 26px;
    border-radius: 999px;
    background: var(--white);
    border: 1.5px solid rgba(14, 42, 71, .12);
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-800);
    transition: var(--transition);
}

.tabs__btn:hover { border-color: var(--blue-500); color: var(--blue-500); }

.tabs__btn.is-active {
    background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
    border-color: transparent;
    color: var(--white);
    box-shadow: var(--shadow);
}

.tabs__panel { animation: fadeIn .45s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Service cards ---------- */
.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.service-grid--single { grid-template-columns: 1fr; }
.service-grid--single .card { max-width: 900px; }

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(14, 42, 71, .06);
    transition: var(--transition);
}

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

.card h3 {
    font-family: var(--font-accent);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--navy-900);
    margin-bottom: 14px;
}

.card__lead { color: var(--text-muted); margin-bottom: 20px; }

.card__note {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue-500);
    background: var(--blue-100);
    border-left: 3px solid var(--blue-500);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.chip {
    display: inline-block;
    vertical-align: middle;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--navy-800);
    background: var(--gold-500);
    border-radius: 999px;
    padding: 4px 12px;
    margin-left: 8px;
    transform: translateY(-3px);
}

.card--accent {
    background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-700) 100%);
    color: var(--white);
    border: none;
}
.card--accent h3 { color: var(--white); }
.card--accent .card__lead { color: rgba(255, 255, 255, .78); }
.card--accent .card__note {
    color: #ffe9ad;
    background: rgba(240, 180, 41, .14);
    border-left-color: var(--gold-500);
}

/* Check list */
.check-list { display: grid; gap: 14px; }

.check-list li {
    position: relative;
    padding-left: 34px;
    color: var(--text-muted);
    font-size: 15px;
}

.check-list li b { color: var(--navy-800); }

.check-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 4px;
    width: 20px; height: 20px;
    background: var(--blue-500);
    border-radius: 6px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 13l4 4 10-11'/%3E%3C/svg%3E") center/70% no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 13l4 4 10-11'/%3E%3C/svg%3E") center/70% no-repeat;
}

.check-list--light li { color: rgba(255, 255, 255, .82); }
.check-list--light li b { color: var(--white); }
.check-list--light li::before { background: var(--gold-500); }

/* Offers (panel 3) */
.offer-list { display: grid; gap: 18px; margin-top: 8px; }

.offer {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    border-left: 4px solid var(--blue-500);
    transition: var(--transition);
}
.offer:hover { transform: translateX(6px); box-shadow: var(--shadow); }

.offer h4 { font-size: 17px; color: var(--navy-900); margin-bottom: 6px; }
.offer p { font-size: 15px; color: var(--text-muted); }

/* Sub-list (вложенные маркированные списки в услугах) */
.sub-list { display: grid; gap: 8px; margin-top: 10px; }

.sub-list li {
    position: relative;
    padding-left: 22px;
    font-size: 14.5px;
    color: var(--text-muted);
}

.sub-list li::before {
    content: '';
    position: absolute;
    left: 2px; top: 7px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--blue-500);
}

/* ---------- Steps ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    counter-reset: step;
}

.step {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    padding: 64px 26px 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(14, 42, 71, .06);
    transition: var(--transition);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.step__num {
    position: absolute;
    top: -22px; left: 26px;
    width: 56px; height: 56px;
    display: grid;
    place-items: center;
    font-family: var(--font-accent);
    font-size: 24px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(47, 127, 214, .4);
}

.step h3 { font-size: 18px; color: var(--navy-900); margin-bottom: 10px; line-height: 1.35; }
.step p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- Advantages ---------- */
.adv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.adv {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    padding: 34px 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(14, 42, 71, .06);
    overflow: hidden;
    transition: var(--transition);
}
.adv:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.adv::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--blue-500), var(--gold-500));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s;
}
.adv:hover::after { transform: scaleX(1); }

.adv__num {
    font-family: var(--font-accent);
    font-size: 44px;
    font-weight: 600;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--blue-400);
    display: block;
    margin-bottom: 14px;
    line-height: 1;
}

.adv h3 { font-size: 19px; color: var(--navy-900); margin-bottom: 10px; }
.adv p { font-size: 15px; color: var(--text-muted); }

/* ---------- Contract ---------- */
.contract {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.contract__lead { color: var(--text-muted); font-size: 17px; margin: 16px 0 30px; }

.contract__list { display: grid; gap: 20px; }

.contract__list li {
    background: var(--white);
    border-radius: var(--radius);
    padding: 26px 30px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--gold-500);
    transition: var(--transition);
}
.contract__list li:hover { transform: translateX(8px); }

.contract__list h3 { font-size: 18px; color: var(--navy-900); margin-bottom: 6px; }
.contract__list p { font-size: 15px; color: var(--text-muted); }

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

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(14, 42, 71, .06);
    transition: var(--transition);
}
a.contact-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(47, 127, 214, .4); }

.contact-card__label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--blue-500);
}

.contact-card__value {
    font-family: var(--font-accent);
    font-size: 26px;
    font-weight: 600;
    color: var(--navy-900);
    word-break: break-word;
}

.contact-card__hint { font-size: 14px; color: var(--text-muted); }

/* ---------- Footer ---------- */
.footer {
    background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
    color: rgba(255, 255, 255, .82);
    padding: 60px 0 0;
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-bottom: 40px;
}

.logo--footer .logo__text { color: var(--white); }
.logo--footer .logo__text b { color: var(--blue-400); }

.footer__nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__nav a { font-size: 15px; font-weight: 600; transition: color .25s; }
.footer__nav a:hover { color: var(--blue-400); }

.footer__contacts { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.footer__contacts a { font-weight: 700; color: var(--white); transition: color .25s; }
.footer__contacts a:hover { color: var(--gold-500); }

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: 22px;
    padding-bottom: 22px;
    font-size: 14px;
    color: rgba(255, 255, 255, .55);
    text-align: center;
}

/* ---------- Reveal animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.4, 0, .2, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero__img { animation: none; }
}

/* ============================================================
   Адаптивность
   ============================================================ */

/* Планшеты */
@media (max-width: 1024px) {
    .hero__inner { grid-template-columns: 1fr; text-align: center; }
    .hero__content { display: flex; flex-direction: column; align-items: center; }
    .hero__text { max-width: 640px; }
    .hero__actions, .hero__badges { justify-content: center; }
    .hero__media { order: -1; }
    .hero__img { width: min(70%, 300px); }

    .service-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
    .adv-grid { grid-template-columns: repeat(2, 1fr); }
    .contract { grid-template-columns: 1fr; gap: 40px; }
    .contacts__grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}

/* Мобильные */
@media (max-width: 768px) {
    .section { padding: 70px 0; }
    .hero { padding: 130px 0 70px; }

    .burger { display: flex; }

    .nav {
        position: fixed;
        top: 76px;
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--white);
        padding: 16px 20px 24px;
        box-shadow: 0 30px 40px rgba(14, 42, 71, .18);
        border-bottom: 1px solid rgba(14, 42, 71, .08);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform .35s cubic-bezier(.4, 0, .2, 1), opacity .3s;
        max-height: calc(100vh - 76px);
        overflow-y: auto;
    }

    .nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }

    .nav__link { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid rgba(14, 42, 71, .06); }
    .nav__link::after { display: none; }
    .nav__cta { display: inline-flex; margin-top: 16px; text-align: center; }

    .tabs { flex-direction: column; }
    .tabs__btn { width: 100%; text-align: center; }

    .card { padding: 26px 22px; }
    .card h3 { font-size: 21px; }

    .steps { grid-template-columns: 1fr; gap: 44px; }
    .adv-grid { grid-template-columns: 1fr; }

    .footer__inner { flex-direction: column; text-align: center; }
    .footer__nav { justify-content: center; }
    .footer__contacts { text-align: center; }

    .btn { width: 100%; max-width: 360px; }
    .hero__actions { width: 100%; }
    .hero__actions .btn { max-width: 100%; }
}

@media (max-width: 420px) {
    .container { width: calc(100% - 28px); }
    .hero__badges li { font-size: 13px; padding: 8px 14px 8px 36px; }
    .contact-card__value { font-size: 21px; }
}
