:root {
    --bg: #0d1014;
    --bg-soft: #151719;
    --text: #f4f6f8;
    --muted: #b4bcc5;
    --line: rgba(255, 255, 255, .22);
    --accent: #ffffff;
    --surface-soft: #1c1f23;
    --surface-base: #22262b;
    --surface-highlight: #2c3137;
    --surface-accent: #373d44;
    --surface-accent-shadow: none;
    --control-bg: #1c1f23;
    --control-hover: #282d33;
    --control-border-strong: rgba(255, 255, 255, .46);
    --header-surface: #0d1014;
    --radius: 16px;
    --max: 1180px;
    --header-offset: 76px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 48px;
    --space-7: 64px;
}

:root[data-theme="light"] {
    --bg: #ffffff;
    --bg-soft: #fafafb;
    --text: #11151b;
    --muted: #575f6b;
    --line: rgba(17, 21, 27, .14);
    --accent: #11151b;
    --surface-soft: #f5f6f7;
    --surface-base: #f1f3f6;
    --surface-highlight: #e9edf2;
    --surface-accent: #e3e9ef;
    --surface-accent-shadow: none;
    --control-bg: #f5f6f7;
    --control-hover: #eceff3;
    --control-border-strong: rgba(17, 21, 27, .22);
    --header-surface: #ffffff;
}

* {
    box-sizing: border-box;
}

section[id] {
    scroll-margin-top: calc(var(--header-offset) - var(--space-2));
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

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

a, button, .btn, .theme-toggle, .menu-toggle {
    -webkit-tap-highlight-color: transparent;
}

.page {
    overflow: hidden;
}

.container {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: var(--header-surface);
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.header-inner {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    font-size: 18px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--muted);
    font-size: 14px;
}

.nav a {
    white-space: nowrap;
}

.nowrap {
    white-space: nowrap;
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
}

.theme-toggle:hover,
.menu-toggle:hover {
    background: var(--control-hover);
}

.theme-toggle.mobile-only {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: #0b0d10;
    font-weight: 700;
    font-size: 15px;
    transition: opacity .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.btn:hover {
    opacity: .92;
}

:root[data-theme="dark"] .btn:not(.secondary):hover {
    opacity: 1;
    background: #d9e0e8;
    border-color: #d9e0e8;
    color: #0b0d10;
}

:root[data-theme="dark"] .btn.secondary:hover {
    opacity: 1;
    background: var(--control-hover);
    border-color: var(--control-border-strong);
    color: var(--text);
}

.header .btn:hover {
    transform: none;
    opacity: 1;
    border-color: var(--control-border-strong);
    background: var(--control-hover);
}

.header .btn.secondary {
    margin-left: auto;
}

:root[data-theme="dark"] .header .btn:hover {
    border-color: var(--control-border-strong);
    background: var(--control-hover);
}

:root[data-theme="dark"] .header .btn.secondary:hover {
    border-color: var(--control-border-strong);
    background: var(--control-hover);
}

.btn.secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn.secondary:hover {
    transform: none;
    opacity: 1;
    background: var(--control-hover);
    border-color: var(--control-border-strong);
}

:root[data-theme="light"] .btn:not(.secondary) {
    color: #f4f6f8;
}

.hero {
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding: calc(var(--header-offset) + var(--space-4)) 0 var(--space-7);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: var(--space-7);
    align-items: end;
}

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

h1 {
    max-width: 980px;
    font-size: clamp(42px, 6.5vw, 88px);
    line-height: .92;
    letter-spacing: -.05em;
    font-weight: 800;
}

.hero-text {
    max-width: 610px;
    margin-top: var(--space-4);
    color: var(--muted);
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.45;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-5);
}

.hero-card {
    background: var(--surface-accent);
    box-shadow: var(--surface-accent-shadow);
    border-radius: var(--radius);
    padding: var(--space-5);
}

.hero-card strong {
    display: block;
    font-size: 38px;
    line-height: 1;
    letter-spacing: -.05em;
    margin-bottom: 10px;
}

.hero-card span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

section {
    padding: var(--space-6) 0;
}

.section-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    align-items: start;
    margin-bottom: var(--space-5);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.section-label::after {
    content: "›";
    font-size: .95em;
    line-height: 1;
}

.section-label.no-marker::after {
    content: none;
}

h2 {
    max-width: 850px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.02;
    letter-spacing: -.05em;
}

.lead {
    max-width: 800px;
    color: var(--muted);
    font-size: 22px;
    line-height: 1.45;
}

.section-copy {
    margin-top: var(--space-3);
}

.copy-gap {
    margin-top: var(--space-3);
}

.grid {
    display: grid;
    gap: var(--space-3);
}

.grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.work-grid .number {
    margin-bottom: var(--space-3);
    font-size: 12px;
    letter-spacing: .08em;
    opacity: .72;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
    align-items: start;
}

.process-note {
    max-width: 820px;
    margin-top: var(--space-6);
    padding-left: var(--space-3);
    border-left: 2px solid rgba(255, 255, 255, .28);
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

:root[data-theme="light"] .process-note {
    border-left-color: rgba(17, 21, 27, .2);
}

.process-step {
    position: relative;
    padding-top: var(--space-4);
}

.process-step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--line);
}

.process-step:not(:last-child)::after {
    content: "›";
    position: absolute;
    top: -14px;
    right: -18px;
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
}

.process-step .number {
    font-size: 18px;
    letter-spacing: .04em;
    margin-bottom: var(--space-3);
    color: var(--text);
}

.process-step h3 {
    font-size: 24px;
    line-height: 1.12;
    letter-spacing: -.03em;
    margin-bottom: 12px;
}

.process-step p {
    color: var(--muted);
    font-size: 16px;
}

.card {
    min-height: 170px;
    padding: var(--space-5);
    border-radius: var(--radius);
    background: var(--surface-base);
}

.card h3 {
    font-size: 22px;
    line-height: 1.16;
    letter-spacing: -.025em;
    margin-bottom: 14px;
}

.card p, .card li {
    color: var(--muted);
    font-size: 16px;
}

.number {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: var(--space-4);
}

.wide {
    grid-column: span 2;
}

.tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.pill {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    background: var(--surface-soft);
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.panel {
    padding: var(--space-5);
    border-radius: var(--radius);
    background: var(--surface-base);
}

.split .panel:not(.dark-card) {
    background: transparent;
}

.panel p {
    color: var(--muted);
    font-size: 20px;
    line-height: 1.5;
}

.panel-title {
    margin-top: var(--space-3);
}

.approach-lead {
    max-width: 700px;
    margin-top: var(--space-3);
    color: var(--muted);
    font-size: 17px;
    line-height: 1.5;
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.approach-card {
    min-height: 100%;
    padding: var(--space-4);
    border-radius: 16px;
    background: var(--surface-base);
}

.approach-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.12;
    letter-spacing: -.025em;
}

.approach-card p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
}

.approach-card:last-child {
    grid-column: span 2;
}

.experience-note-section .panel:first-child p {
    color: var(--text);
}

.fit-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fit-item {
    display: grid;
    grid-template-columns: 24px minmax(180px, .55fr) 1fr;
    gap: var(--space-4);
    align-items: start;
    padding: var(--space-3) 0;
    border-top: 1px solid var(--line);
}

.fit-item::before {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    width: 24px;
    min-height: 25px;
    margin-top: 1px;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.fit-list-positive .fit-item::before {
    content: "✓";
}

.fit-list-negative .fit-item::before {
    content: "×";
}

.fit-item:last-child {
    border-bottom: 1px solid var(--line);
}

.fit-item h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.12;
    letter-spacing: -.025em;
}

.fit-item p {
    color: var(--muted);
    font-size: 16px;
    margin: 0;
}

.result-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2) var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.result-item {
    padding: var(--space-3) 0;
    border-top: 1px solid var(--line);
}

.result-item:last-child {
    border-bottom: 1px solid var(--line);
}

.result-item.wide {
    grid-column: span 2;
}

.result-item h3 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.14;
    letter-spacing: -.025em;
}

.result-item p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.dark-card {
    background: var(--surface-highlight);
    box-shadow: var(--surface-accent-shadow);
}

.cta {
    padding: var(--space-6) 0;
}

.cta-box {
    min-height: 430px;
    display: grid;
    align-items: end;
    padding: clamp(var(--space-5), 6vw, 72px);
    border-radius: 24px;
    background: var(--surface-accent);
    box-shadow: var(--surface-accent-shadow);
}

.cta-box h2 {
    max-width: 900px;
    font-size: clamp(46px, 7vw, 92px);
}

.cta-box p {
    max-width: 680px;
    margin-top: var(--space-3);
    color: var(--muted);
    font-size: 22px;
}

:root[data-theme="light"] .hero-card,
:root[data-theme="light"] .dark-card,
:root[data-theme="light"] .cta-box {
    background: var(--surface-accent);
}

.cta-box .hero-actions {
    margin-top: var(--space-4);
}

.footer {
    padding: var(--space-5) 0;
    color: var(--muted);
    font-size: 14px;
}

#contacts {
    padding-bottom: var(--space-5);
}

#contacts .section-head {
    margin-bottom: 24px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.footer-copy {
    color: var(--text);
    font-size: 14px;
}

.footer-tags {
    color: var(--muted);
    font-size: 13px;
}

.footer-legal {
    margin-top: var(--space-3);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    text-align: left;
}

.footer-legal-line {
    display: block;
}

.contacts-list {
    display: grid;
    gap: var(--space-2);
}

.contacts-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 60px;
    padding: 6px 0;
}

.contacts-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--muted);
}

.contacts-icon svg {
    width: 24px;
    height: 24px;
}

.contacts-icon-phone svg {
    width: 26px;
    height: 26px;
}

.contacts-icon-telegram svg {
    width: 25px;
    height: 25px;
}

.contacts-icon svg * {
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contacts-item a {
    color: var(--text);
    font-size: clamp(16px, 1.7vw, 21px);
    line-height: 1.2;
    letter-spacing: -.03em;
    transition: color .2s ease, opacity .2s ease;
}

.contacts-item a:hover {
    color: var(--muted);
}

.case-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.cases-carousel {
    position: relative;
}

.cases-stage {
    position: relative;
}

.cases-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-padding-inline: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.cases-track::-webkit-scrollbar {
    display: none;
}

.case-slide {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
}

.case-head {
    margin-bottom: var(--space-4);
}

.case-index {
    display: block;
    margin-bottom: var(--space-3);
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.case-head h3 {
    margin: 0;
}

.cases-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding-bottom: 4px;
}

.cases-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .42);
    cursor: pointer;
    transition: background .2s ease;
}

.cases-dot.is-active {
    background: var(--text);
}

:root[data-theme="light"] .cases-dot {
    background: rgba(17, 21, 27, .22);
}

:root[data-theme="light"] .cases-dot.is-active {
    background: var(--text);
}

.case-point {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    padding: var(--space-3);
    border-radius: 16px;
    background: var(--surface-base);
}

.case-point b {
    color: var(--text);
    font-size: 13px;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.case-point span {
    color: var(--muted);
}

@media (max-width: 1100px) {
    :root {
        --header-offset: 68px;
    }

    .logo {
        margin-right: 0;
    }

    .header-inner {
        height: 68px;
        min-height: 68px;
        gap: 10px;
    }

    .nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 68px;
        z-index: 15;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 0;
        border-radius: 0;
        background: var(--bg-soft);
    }

    :root[data-theme="dark"] .nav {
        background: var(--surface-base);
    }

    .nav[data-open="true"] {
        display: flex;
    }

    .nav a {
        width: 100%;
        padding: 14px 20px;
        border-radius: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .nav a::before {
        content: "›";
        color: var(--muted);
        font-size: 18px;
        line-height: 1;
    }

    .nav a:hover {
        background: rgba(255, 255, 255, .06);
    }

    :root[data-theme="light"] .nav a:hover {
        background: rgba(17, 21, 27, .05);
    }

    .theme-toggle {
        display: none;
    }

    .theme-toggle.mobile-only {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 42px;
        border-radius: 8px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-grid, .section-head, .split {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding: calc(var(--header-offset) + var(--space-4)) 0 var(--space-6);
    }

    .hero-text {
        margin-top: var(--space-3);
    }

    .hero-actions {
        margin-top: var(--space-4);
    }

    .section-head {
        margin-bottom: var(--space-4);
    }

    .grid.cols-3 {
        grid-template-columns: 1fr;
    }

    .process-steps {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .process-step:not(:last-child)::after {
        content: none;
    }

    .process-note {
        margin-top: var(--space-5);
        padding-left: 16px;
    }

    .approach-grid {
        grid-template-columns: 1fr;
    }

    .approach-card:last-child {
        grid-column: auto;
    }

    .fit-item {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }

    .result-list {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .result-item.wide {
        grid-column: auto;
    }

    .case-points {
        grid-template-columns: 1fr;
    }

    .wide {
        grid-column: auto;
    }

    section {
        padding: var(--space-5) 0;
    }

    .cta {
        padding: var(--space-5) 0;
    }

    .cta-box {
        min-height: auto;
        align-items: start;
        padding: var(--space-4);
    }

    #contacts {
        padding-bottom: var(--space-5);
    }

    #contacts .section-head {
        margin-bottom: var(--space-4);
    }
}

@media (min-width: 1101px) {
    .logo {
        margin-right: 12px;
    }
}

@media (max-width: 540px) {
    .container {
        width: min(var(--max), calc(100% - 28px));
    }

    .logo {
        font-size: 16px;
    }

    .nav {
        font-size: 13px;
    }

    h1 {
        font-size: 48px;
    }

    .hero-text, .lead, .panel p, .cta-box p {
        font-size: 18px;
    }

    .hero-card, .card, .panel {
        padding: var(--space-4);
    }

    .approach-card, .case-point {
        padding: var(--space-4);
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
    }

    .header .btn.secondary {
        width: auto;
        min-height: 42px;
        padding: 0 14px;
        font-size: 13px;
    }

    .footer-copy,
    .footer-tags {
        font-size: 13px;
    }
}

.metrika-pixel {
    position: absolute;
    left: -9999px;
}
