:root {
    --bg: #0b0b0d;
    --bg-soft: #111116;
    --text: #eaeaea;
    --muted: #b5b5b5;
    --accent: #ffd60a;
    --accent-ink: #0b0b0d;
    --card: #15151c;
    --ring: #ffd60a44;
    --shadow: 0 10px 30px rgba(0, 0, 0, .5);
    --radius: 16px;
    --radius-lg: 22px;
    --gap: 18px;
    --container: 1240px;
}

/* base */
html,
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    overflow-x: hidden
}

a {
    color: var(--accent);
    text-decoration: none
}

a:hover {
    opacity: .9
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 12px
}

/* header */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 11, 13, .9);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid #1d1d25
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 70px
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: block
}

.brand h1 {
    font-size: 18px;
    margin: 0;
    font-weight: 800;
    letter-spacing: .3px
}

.menu {
    display: flex;
    gap: 10px
}

.menu a {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--text)
}

.menu a.active,
.menu a:hover {
    background: var(--bg-soft)
}

/* затемнение фона */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    /* сильнее затемнили */
    backdrop-filter: blur(4px);
    /* замылено */
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 90;
}

/* панель меню: фон есть, 80% ширины, выезжает справа */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: 80vw;
    /* ровно 80% */
    max-width: 420px;
    /* опциональный предел */
    background: #0f0f14;
    /* ФОН МЕНЮ */
    border-left: 1px solid #23232f;
    box-shadow: -20px 0 40px rgba(0, 0, 0, .5);
    transform: translateX(100%);
    /* скрыто справа */
    transition: transform .25s ease;
    z-index: 91;
    display: flex;
    flex-direction: column;
    padding: 18px;
}

/* ссылки — столбцом, выравнивание по левой стороне */
.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    align-items: flex-start;
}

.drawer-nav a {
    display: block;
    width: 100%;
    text-align: left;
    /* по левой стороне */
    padding: 14px 12px;
    border-radius: 12px;
    color: #eaeaea;
    font-size: 18px;
    font-weight: 700;
}

.drawer-nav a:hover,
.drawer-nav a:focus-visible {
    background: #15151c;
    outline: none
}

/* открытое состояние */
body.nav-open .backdrop {
    opacity: 1;
    pointer-events: auto
}

body.nav-open .drawer {
    transform: translateX(0)
}


/* HERO */
.hero {
    min-height: 92vh;
    padding: 6vh 0;
    display: grid;
    place-items: center
}

.hero .wrap {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 48px;
    align-items: center
}

.hero .card {
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none
}

.hero .stack {
    display: grid;
    gap: 22px;
    max-width: 740px;
    margin-top: -16px;
    margin-left: -16px
}

.hero h2 {
    font-size: clamp(36px, 4.8vw, 56px);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: 0 0 20px
}

.hero p {
    color: var(--muted);
    font-size: 20px;
    line-height: 1.7;
    margin: 0 0 20px
}

.hero .stack ul {
    margin: 10px 0 0 24px;
    line-height: 1.7
}

.hero .logo-box {
    background: transparent;
    border: 0;
    border-radius: 0;
    min-height: auto;
    display: grid;
    place-items: center;
    padding: 0
}

.hero-logo {
    width: 100%;
    max-width: 520px;
    height: auto;
    display: block;
    opacity: 1
}

/* sections */
.section {
    padding: 36px 0
}

.section h3 {
    font-size: 26px;
    margin: 0 0 14px
}

.section.center {
    text-align: center
}

.section.center h3 {
    margin-bottom: 6px
}

.section.center p {
    margin-top: 0
}

.muted {
    color: var(--muted)
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap)
}

.card {
    background: var(--card);
    border: 1px solid #21212a;
    border-radius: var(--radius);
    padding: 18px
}

.card h4 {
    margin: 0 0 8px;
    font-size: 18px
}

.card p {
    margin: 0;
    color: var(--muted)
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer
}

.btn.alt {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent)
}

/* services list */
.service-list .card.service {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease
}

.service-list .card.service .thumb {
    width: 128px;
    height: 128px;
    object-fit: contain;
    display: block;
    margin: 0 auto 8px;
    background: transparent;
    border: 0;
    box-shadow: none
}

.service-list .card.service .actions {
    margin-top: 6px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center
}

.service-list .card.service:hover,
.service-list .card.service:focus-within {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 0 0 1px #ffd60a44, 0 10px 28px rgba(0, 0, 0, .55);
    border-color: #2a2a33
}

/* detail */
.detail h2 {
    margin: 0 0 8px
}

.detail .meta {
    color: var(--muted);
    margin-bottom: 16px
}

.detail .cols {
    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: var(--gap)
}

.detail .card li {
    margin: 6px 0
}

/* contact */
*,
*::before,
*::after {
    box-sizing: border-box
}

form {
    display: grid;
    gap: 14px
}

.row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start
}

label {
    font-size: 13px;
    color: #cfcfcf;
    display: block
}

input,
textarea,
select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px 12px;
    border-radius: 12px;
    background: #0f0f14;
    color: var(--text);
    border: 1px solid #232332;
    outline: none
}

input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 4px var(--ring);
    border-color: var(--accent)
}

textarea {
    min-height: 140px;
    resize: vertical
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b5b5b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px
}

.note {
    font-size: 12px;
    color: var(--muted)
}

/* advantages 2×2 */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 12px
}

.adv-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 18px;
    background: var(--card);
    border: 1px solid #21212a;
    border-radius: var(--radius);
    padding: 16px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease
}

.adv-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
    border-color: #2a2a33
}

.adv-media {
    width: 120px;
    height: 120px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: transparent
}

.adv-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent
}

.adv-body h5 {
    margin: 0 0 6px;
    font-size: 18px;
    text-align: left
}

.adv-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    text-align: left
}

/* headings centered in sections (не трогаем .hero) */
.section h2,
.section h3,
.section h4,
.section>p,
.section .muted {
    text-align: center
}

/* reveal on scroll (IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(12px)
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: opacity .5s ease, transform .5s ease;
    transition-delay: var(--d, 0ms)
}

/* footer */
footer {
    margin-top: 28px;
    padding: 22px 0;
    border-top: 1px solid #1d1d25;
    color: var(--muted)
}

footer .cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: center
}

/* responsive */
@media(max-width:900px) {
    .burger {
        display: flex
    }

    .menu {
        display: none
    }

    .hero .wrap {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 20px
    }

    .hero .logo-box {
        order: -1;
        margin: 0 auto 8px
    }

    .hero .stack {
        margin: 0;
        align-items: center
    }

    .hero .stack ul {
        margin: 8px 0 0;
        list-style-position: inside;
        text-align: left
    }

    .grid {
        grid-template-columns: 1fr
    }

    .detail .cols {
        grid-template-columns: 1fr
    }

    .row {
        grid-template-columns: 1fr
    }

    .advantages-grid {
        grid-template-columns: 1fr
    }

    .adv-body h5,
    .adv-body p {
        text-align: center
    }
}

/* ——— Back link (на детальних сторінках) ——— */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #eaeaea;
    text-decoration: none;
    border: 1px solid #23232f;
    border-radius: 12px;
    padding: 8px 12px;
    background: #111116;
}

.back-link:hover {
    background: #15151c;
    border-color: #2a2a33
}

.back-link .arr {
    display: inline-block;
    transform: translateY(-1px)
}

/* ——— Відступи між блоками на мобільних ——— */
@media (max-width:900px) {
    .section {
        padding: 28px 0
    }

    .detail .cols {
        gap: 14px
    }

    .detail .card {
        margin: 6px 0
    }
}

/* ——— Детальні сторінки послуг ——— */
.detail h2 {
    text-align: center;
    margin-top: 6px
}

.detail .meta {
    text-align: center
}

.detail .cols {
    gap: 22px
}

.detail .card h4 {
    text-align: center;
    margin-bottom: 10px
}

/* ——— Бургер тільки на мобільних + «три смуги» ——— */
.burger {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid #23232f;
    border-radius: 10px;
    background: #121218;
    color: #eaeaea;
    cursor: pointer
}

.burger span {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #eaeaea;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

.burger span:nth-child(1) {
    top: 13px
}

.burger span:nth-child(2) {
    top: 21px
}

.burger span:nth-child(3) {
    top: 29px
}

@media (max-width:900px) {
    .burger {
        display: flex;
        align-items: center;
        justify-content: center
    }

    .menu {
        display: none
    }
}

/* Legal page */
.legal h2 {
    text-align: center;
    margin-bottom: 6px
}

.legal .toc {
    margin: 12px 0 18px
}

.legal .toc ol {
    margin: 8px 0 0 18px
}

.legal article {
    margin-top: 14px
}

.legal h3 {
    margin: 0 0 10px
}

.legal h4 {
    margin: 14px 0 8px;
    font-size: 18px
}

.legal p,
.legal li {
    color: var(--muted);
    line-height: 1.6
}

.legal ul,
.legal ol {
    padding-left: 18px
}

/* Legal layout cosmetics */
.legal h2 {
    text-align: center;
    margin-bottom: 6px
}

.legal .toc {
    margin: 12px 0 18px
}

.legal .toc ol {
    margin: 8px 0 0 18px
}

.legal article {
    margin-top: 14px
}

.legal h3 {
    margin: 0 0 10px
}

.legal p,
.legal li {
    color: var(--muted);
    line-height: 1.6
}

.legal ul,
.legal ol {
    padding-left: 18px
}

/* Подзаголовки 1.1, 1.2 ... справа */
.legal h4 {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    /* текст слева, номер справа */
    gap: 12px;
    margin: 14px 0 8px;
    font-size: 18px;
}

.legal h4 .hno {
    min-width: 3.5ch;
    /* фиксированная площадка под номер */
    text-align: right;
    color: #cfcfcf;
    font-weight: 700;
    letter-spacing: .02em;
    opacity: .9;
    border-bottom: 1px dashed #2a2a33;
    /* легкий визуальный маркер */
}

/* Якоря: небольшой отступ сверху при прокрутке */
[id] {
    scroll-margin-top: 84px;
}