:root {
    --ink: #11161d;
    --ink-2: #202a36;
    --muted: #65717f;
    --line: #dce3ea;
    --paper: #f7f9fb;
    --white: #ffffff;
    --yellow: #ffd22e;
    --yellow-2: #f4b400;
    --blue: #1677c8;
    --green: #1b8a5a;
    --shadow: 0 22px 70px rgba(17, 22, 29, .18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

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

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

.site-header {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 28px;
    align-items: center;
    padding: 18px clamp(18px, 4vw, 56px);
    color: var(--white);
    transition: background .2s ease, box-shadow .2s ease, padding .2s ease;
}

.site-header.is-scrolled {
    background: rgba(17, 22, 29, .94);
    box-shadow: 0 12px 36px rgba(0, 0, 0, .18);
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand,
.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--yellow), var(--yellow-2));
    color: var(--ink);
    font-weight: 900;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 26px;
    font-size: 14px;
    font-weight: 700;
}

.main-nav a,
.header-phone {
    opacity: .9;
}

.main-nav a:hover,
.header-phone:hover {
    opacity: 1;
    color: var(--yellow);
}

.header-phone {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 8px;
    font-weight: 800;
}

.hero {
    position: relative;
    min-height: 760px;
    overflow: hidden;
    color: var(--white);
    background: var(--ink) var(--hero-image) center / cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 15, 22, .9) 0%, rgba(10, 15, 22, .76) 44%, rgba(10, 15, 22, .35) 100%),
        linear-gradient(0deg, rgba(10, 15, 22, .72), rgba(10, 15, 22, .12));
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 650px) minmax(280px, 1fr);
    gap: 36px;
    align-items: center;
    min-height: 640px;
    padding: 120px clamp(18px, 5vw, 72px) 136px;
}

.hero-copy {
    max-width: 650px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--yellow);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 34px;
    height: 3px;
    background: currentColor;
}

.eyebrow.dark {
    color: var(--blue);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 680px;
    margin-bottom: 22px;
    font-size: 56px;
    line-height: 1.04;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 16px;
    font-size: 38px;
    line-height: 1.12;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 10px;
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: 0;
}

.ai-help-trigger {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: inherit;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
}

.ai-help-trigger:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--ink);
}

.hero-copy p {
    max-width: 610px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, .84);
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.btn-primary {
    background: var(--yellow);
    color: var(--ink);
    box-shadow: 0 12px 34px rgba(255, 210, 46, .24);
}

.btn-primary:hover {
    background: var(--yellow-2);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, .45);
    color: var(--white);
}

.btn-ghost:hover {
    border-color: var(--yellow);
    color: var(--yellow);
}

.hero-machine {
    align-self: end;
    justify-self: end;
    width: min(620px, 100%);
    transform: translateY(42px);
    filter: drop-shadow(0 28px 50px rgba(0, 0, 0, .45));
}

.metric-strip {
    position: absolute;
    z-index: 2;
    left: clamp(18px, 5vw, 72px);
    right: clamp(18px, 5vw, 72px);
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow);
}

.metric {
    min-height: 112px;
    padding: 24px;
    border-right: 1px solid var(--line);
}

.metric:last-child {
    border-right: 0;
}

.metric strong {
    display: block;
    margin-bottom: 4px;
    color: var(--blue);
    font-size: 32px;
    line-height: 1;
}

.metric span {
    color: var(--muted);
    font-weight: 700;
}

.section {
    padding: 88px clamp(18px, 5vw, 72px);
}

.section-tight {
    padding-top: 112px;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(280px, 540px) minmax(260px, 560px);
    gap: 36px;
    align-items: end;
    margin-bottom: 38px;
}

.section-heading.compact {
    display: block;
    max-width: 760px;
}

.section-heading p {
    color: var(--muted);
    font-size: 17px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 16px 38px rgba(16, 25, 38, .08);
}

.service-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--paper);
}

.service-card div {
    padding: 22px;
}

.service-card p,
.advantage p,
.process-step p,
blockquote p {
    color: var(--muted);
}

.band {
    display: grid;
    grid-template-columns: minmax(280px, 440px) 1fr;
    gap: 48px;
    align-items: start;
    background: var(--paper);
}

.band-copy p {
    color: var(--muted);
    font-size: 17px;
}

.advantages {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.advantage {
    min-height: 188px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.advantage span {
    display: block;
    width: 46px;
    height: 6px;
    margin-bottom: 24px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--yellow), var(--green));
}

.gallery-section {
    background: var(--ink);
    color: var(--white);
}

.gallery-section .eyebrow.dark {
    color: var(--yellow);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

figure {
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: 8px;
    background: #0a0f16;
}

figure img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    opacity: .92;
    transition: transform .25s ease, opacity .25s ease;
}

figure:hover img {
    transform: scale(1.035);
    opacity: 1;
}

figcaption {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(17, 22, 29, .78);
    color: var(--white);
    font-weight: 800;
}

.process-grid,
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.process-step {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.process-step span {
    display: block;
    margin-bottom: 34px;
    color: var(--blue);
    font-size: 36px;
    font-weight: 900;
}

.docs-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(90deg, var(--yellow), #f7e27a);
    color: var(--ink);
}

.docs-band p {
    max-width: 620px;
    margin-bottom: 0;
    color: rgba(17, 22, 29, .72);
}

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

.doc-links a {
    padding: 12px 16px;
    border: 1px solid rgba(17, 22, 29, .2);
    border-radius: 8px;
    background: rgba(255, 255, 255, .52);
    font-weight: 900;
}

.testimonials {
    background: var(--white);
}

blockquote {
    min-height: 190px;
    margin: 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

blockquote cite {
    display: block;
    margin-top: 18px;
    color: var(--ink);
    font-style: normal;
    font-weight: 900;
}

.request-section {
    display: grid;
    grid-template-columns: minmax(280px, 480px) minmax(320px, 1fr);
    gap: 48px;
    padding: 92px clamp(18px, 5vw, 72px);
    background: var(--ink-2);
    color: var(--white);
}

.request-copy p {
    color: rgba(255, 255, 255, .78);
    font-size: 17px;
}

.contact-list {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.contact-list a,
.contact-list span {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    font-weight: 800;
}

.request-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 28px;
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow);
}

label {
    display: grid;
    gap: 8px;
}

label span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(22, 119, 200, .16);
}

.span-2 {
    grid-column: span 2;
}

.hp-field {
    position: absolute;
    left: -10000px;
}

.form-message {
    grid-column: span 2;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 800;
}

.form-message.success {
    background: rgba(27, 138, 90, .12);
    color: var(--green);
}

.form-message.error,
.system-alert {
    background: rgba(190, 54, 54, .12);
    color: #b93232;
}

.captcha-field {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.captcha-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.captcha-line img {
    width: 72px;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.captcha-line b {
    color: var(--ink);
    font-size: 26px;
}

.captcha-line input {
    width: 150px;
    flex: 0 0 150px;
}

.km-ai-root {
    position: fixed;
    z-index: 9999;
    right: 18px;
    bottom: 18px;
    font-family: Arial, Helvetica, sans-serif;
}

.km-ai-fab {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yellow), var(--blue));
    color: var(--white);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .28);
    font-weight: 900;
    cursor: pointer;
}

.km-ai-fab span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(17, 22, 29, .22);
}

.km-ai-panel {
    position: absolute;
    right: 0;
    bottom: 62px;
    display: flex;
    width: min(420px, calc(100vw - 28px));
    max-height: min(76vh, 640px);
    overflow: hidden;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: linear-gradient(180deg, #17202a, #0b1017);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .48);
    color: var(--white);
}

.km-ai-panel[hidden] {
    display: none;
}

.km-ai-head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.km-ai-title {
    font-weight: 900;
}

.km-ai-sub {
    margin-top: 2px;
    color: rgba(255, 255, 255, .62);
    font-size: 12px;
}

.km-ai-close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    color: var(--white);
    cursor: pointer;
}

.km-ai-messages {
    display: flex;
    min-height: 220px;
    padding: 14px;
    overflow: auto;
    flex-direction: column;
    gap: 10px;
}

.km-ai-message {
    max-width: 88%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.42;
}

.km-ai-message.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, .06);
}

.km-ai-message.user {
    align-self: flex-end;
    border-color: rgba(255, 210, 46, .32);
    background: rgba(255, 210, 46, .16);
}

.km-ai-message.loading {
    opacity: .7;
}

.km-ai-composer {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.km-ai-input {
    min-height: 42px;
    max-height: 110px;
    flex: 1;
    resize: vertical;
    border-color: rgba(255, 255, 255, .14);
    background: rgba(0, 0, 0, .24);
    color: var(--white);
}

.km-ai-send {
    border: 0;
    border-radius: 8px;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 900;
    cursor: pointer;
}

.system-alert {
    display: grid;
    gap: 6px;
    margin: 24px clamp(18px, 5vw, 72px) 0;
    padding: 16px;
    border-radius: 8px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 28px clamp(18px, 5vw, 72px);
    background: #0b1017;
    color: var(--white);
}

.site-footer div {
    display: grid;
    gap: 4px;
}

.site-footer span,
.site-footer a {
    color: rgba(255, 255, 255, .68);
}

@media (max-width: 1100px) {
    .hero-inner,
    .band,
    .request-section,
    .section-heading {
        grid-template-columns: 1fr;
    }

    .hero-machine {
        justify-self: start;
        max-width: 520px;
        transform: translateY(10px);
    }

    .services-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-header {
        position: absolute;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 18px;
    }

    .main-nav {
        justify-content: flex-start;
        gap: 14px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .header-phone {
        justify-self: start;
    }

    .hero {
        min-height: 760px;
    }

    .hero-inner {
        min-height: 560px;
        padding: 188px 18px 210px;
    }

    h1 {
        font-size: 38px;
    }

    h2 {
        font-size: 30px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-machine {
        display: none;
    }

    .metric-strip {
        left: 18px;
        right: 18px;
        grid-template-columns: 1fr;
    }

    .metric {
        min-height: auto;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .metric:last-child {
        border-bottom: 0;
    }

    .section,
    .request-section {
        padding: 62px 18px;
    }

    .services-grid,
    .advantages,
    .gallery-grid,
    .process-grid,
    .testimonial-grid,
    .request-form {
        grid-template-columns: 1fr;
    }

    .docs-band,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .span-2 {
        grid-column: span 1;
    }

    .captcha-line input {
        width: 100%;
        flex-basis: 100%;
    }

    .km-ai-root {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }

    .km-ai-fab {
        margin-left: auto;
    }

    .km-ai-panel {
        right: 0;
        left: 0;
        bottom: 62px;
        width: auto;
        max-height: 80vh;
    }
}
