/* ═══════════════════════════════════════════════
   МАТРИЦА — Tech-Noir Precision
   Design System: Space Grotesk + JetBrains Mono
   Palette: Deep navy → electric cyan accent
   ═══════════════════════════════════════════════ */

:root {
    --bg:        #0a0e1a;
    --bg-card:   #111627;
    --bg-card-hover: #161d33;
    --surface:   #1a2140;
    --border:    #1e2747;
    --border-hover: #2a3560;
    --text:      #c8cee0;
    --text-dim:  #6b7394;
    --text-bright: #eaecf4;
    --accent:    #00d4ff;
    --accent-dim: rgba(0, 212, 255, 0.12);
    --accent-glow: rgba(0, 212, 255, 0.25);
    --white:     #ffffff;
    --danger:    #ff4466;
    --success:   #00cc88;

    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', 'SF Mono', monospace;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    --container: 1200px;
    --gap: clamp(1rem, 3vw, 2rem);
}

/* ═══ RESET ═══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font-display);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea { font: inherit; color: inherit; }

/* ═══ UTILITIES ═══ */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.accent { color: var(--accent); }
.section-label {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}
.btn--primary {
    background: var(--accent);
    color: var(--bg);
}
.btn--primary:hover {
    background: #33ddff;
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}
.btn--ghost {
    border: 1.5px solid var(--border-hover);
    color: var(--text-bright);
}
.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.btn--full { width: 100%; }

/* ═══════════════════ HEADER ═══════════════════ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.4s var(--ease-out);
    background: transparent;
}
.header--scrolled {
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.625rem 0;
}
.header__inner {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}
.logo__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 8px;
}
.logo__text {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--white);
    letter-spacing: -0.01em;
}
.nav {
    display: flex;
    gap: 1.75rem;
    margin-left: auto;
}
.nav__link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dim);
    transition: color 0.25s;
    position: relative;
}
.nav__link:hover { color: var(--white); }
.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width 0.3s var(--ease-out);
}
.nav__link:hover::after { width: 100%; }
.header__contacts {
    display: flex;
    gap: 1.5rem;
    margin-left: 2rem;
    flex-shrink: 0;
}
.header__phone,
.header__email {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-dim);
    transition: color 0.25s;
}
.header__phone:hover,
.header__email:hover { color: var(--accent); }

/* Burger */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px 0;
    margin-left: auto;
}
.burger span {
    display: block;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}
/* burger stays as hamburger icon — close button is inside nav overlay */

/* Nav close button & footer — hidden on desktop */
.nav__close { display: none; }
.nav__footer { display: none; }

/* ═══════════════════ HERO ═══════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}
.hero__matrix {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.4;
    color: var(--accent);
    overflow: hidden;
    pointer-events: none;
    white-space: pre;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 80%, var(--accent-dim) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 20%, rgba(100, 50, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}
.hero__inner {
    position: relative;
    z-index: 1;
}
.hero__badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 100px;
    padding: 0.375rem 1rem;
    margin-bottom: 2rem;
    animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}
.hero__title {
    font-size: clamp(2.75rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    color: var(--white);
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}
.hero__subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.8s var(--ease-out) 0.6s both;
}
.hero__actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 5rem;
    animation: fadeUp 0.8s var(--ease-out) 0.8s both;
}
.hero__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    animation: fadeUp 0.8s var(--ease-out) 1s both;
}
.hero__stat-num {
    font-family: var(--font-mono);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--white);
    display: block;
    margin-bottom: 0.375rem;
}
.hero__stat-label {
    font-size: 0.8125rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    right: 2.5rem;
    bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 1;
}
.hero__scroll span {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    writing-mode: vertical-rl;
}
.hero__scroll-line {
    width: 1px;
    height: 60px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}
.hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 40%;
    background: var(--accent);
    animation: scrollLine 2s ease-in-out infinite;
}

/* ═══════════════════ ABOUT ═══════════════════ */
.about {
    padding: clamp(5rem, 10vw, 8rem) 0;
}
.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}
.about__text {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}
.about__text:last-child { margin-bottom: 0; }

/* ═══════════════════ PAYMENT FLOWS ═══════════════════ */
.flows {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.flows__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.flow-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.4s var(--ease-out);
}
.flow-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-dim);
    transform: translateY(-4px);
}
.flow-card__icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 1.5rem;
}
.flow-card__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.625rem;
}
.flow-card__tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}
.flow-card__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.flow-card__list li {
    font-size: 0.9375rem;
    color: var(--text);
    padding-left: 1.25rem;
    position: relative;
}
.flow-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* ═══════════════════ IT SOLUTIONS ═══════════════════ */
.solutions {
    padding: clamp(5rem, 10vw, 8rem) 0;
}

/* Accordion */
.accordion-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 4rem;
}
.accordion {
    border-bottom: 1px solid var(--border);
}
.accordion:first-child {
    border-top: 1px solid var(--border);
}
.accordion__header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    padding: 1.5rem 0;
    text-align: left;
    transition: color 0.25s;
}
.accordion__header:hover { color: var(--white); }
.accordion__number {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-dim);
    flex-shrink: 0;
    width: 2rem;
}
.accordion__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-bright);
    flex: 1;
}
.accordion__icon {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.accordion__icon::before,
.accordion__icon::after {
    content: '';
    position: absolute;
    background: var(--text-dim);
    transition: all 0.4s var(--ease-out);
}
.accordion__icon::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;
    transform: translateY(-50%);
}
.accordion__icon::after {
    top: 0;
    left: 50%;
    width: 1.5px;
    height: 100%;
    transform: translateX(-50%);
}
.accordion.active .accordion__icon::after {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}
.accordion.active .accordion__icon::before {
    background: var(--accent);
}
.accordion__body {
    overflow: hidden;
    transition: max-height 0.5s var(--ease-out);
}
/* JS adds .js-accordion-init to enable collapse; without JS content is visible */
.js-accordion-init .accordion__body {
    max-height: 0;
}
.js-accordion-init .accordion.active .accordion__body {
    /* max-height set by JS */
}
.accordion__content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
}
.accordion__col h4 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}
.accordion__col p,
.accordion__col li {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text);
}
.accordion__col ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.accordion__col li {
    padding-left: 1rem;
    position: relative;
}
.accordion__col li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-dim);
}
.accordion__tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
}
.tag {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.25rem 0.625rem;
}

/* Cases */
.cases__title {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 1.5rem;
}
.cases__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.case-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.4s var(--ease-out);
}
.case-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.case-card__metric {
    font-family: var(--font-mono);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 0.75rem;
}
.case-card__text {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.6;
}

/* ═══════════════════ SERVICES ═══════════════════ */
.services {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}
.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}
.service-card:hover .service-card__arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
}
.service-card__num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}
.service-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
}
.service-card__text {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.7;
    flex: 1;
}
.service-card__arrow {
    width: 24px;
    height: 24px;
    color: var(--text-dim);
    margin-top: 1.5rem;
    transition: all 0.3s var(--ease-out);
    align-self: flex-end;
}

/* ═══════════════════ TECH STACK ═══════════════════ */
.stack {
    padding: clamp(5rem, 10vw, 8rem) 0;
}
.stack__subtitle {
    font-size: 1.0625rem;
    color: var(--text);
    max-width: 640px;
    line-height: 1.7;
    margin-bottom: 3rem;
    margin-top: -1rem;
}
.stack__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.stack-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s var(--ease-out);
}
.stack-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.stack-card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.75rem;
}
.stack-card__tech {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-dim);
    line-height: 1.7;
}

/* ═══════════════════ FAQ ═══════════════════ */
.faq {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.faq__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.faq-item {
    border-bottom: 1px solid var(--border);
}
.faq-item:first-child {
    border-top: 1px solid var(--border);
}
.faq-item__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-bright);
    cursor: pointer;
    list-style: none;
    transition: color 0.25s;
}
.faq-item__question::-webkit-details-marker { display: none; }
.faq-item__question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--text-dim);
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.3s var(--ease-out), color 0.25s;
}
.faq-item[open] .faq-item__question::after {
    content: '−';
    color: var(--accent);
}
.faq-item__question:hover { color: var(--white); }
.faq-item__answer {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.8;
    padding-bottom: 1.5rem;
    max-width: 800px;
}

/* ═══════════════════ CONTACT ═══════════════════ */
.contact {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}
.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}
.contact__details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}
.contact__detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.contact__detail-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}
.contact__detail-value {
    font-size: 1rem;
    color: var(--text-bright);
    line-height: 1.5;
    transition: color 0.25s;
}
a.contact__detail:hover .contact__detail-value {
    color: var(--accent);
}

/* Form */
.form {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
}
.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form__group {
    margin-bottom: 1.25rem;
}
.form__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}
.form__input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.9375rem;
    transition: all 0.25s;
    outline: none;
}
.form__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.form__textarea {
    resize: vertical;
    min-height: 100px;
}
.form__agreement {
    margin-bottom: 1.5rem;
}

/* Checkbox */
.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}
.checkbox input { display: none; }
.checkbox__mark {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-hover);
    border-radius: 4px;
    margin-top: 2px;
    position: relative;
    transition: all 0.25s;
}
.checkbox input:checked + .checkbox__mark {
    background: var(--accent);
    border-color: var(--accent);
}
.checkbox input:checked + .checkbox__mark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid var(--bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox__text {
    font-size: 0.8125rem;
    color: var(--text-dim);
    line-height: 1.5;
}
.checkbox__text a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.25s;
}
.checkbox__text a:hover {
    text-decoration-color: var(--accent);
}

/* ═══════════════════ FOOTER ═══════════════════ */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}
.footer__inner {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
.footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer__nav {
    display: flex;
    gap: 2rem;
}
.footer__nav a {
    font-size: 0.875rem;
    color: var(--text-dim);
    transition: color 0.25s;
}
.footer__nav a:hover { color: var(--white); }
.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.footer__legal {
    display: flex;
    gap: 2rem;
}
.footer__legal a {
    font-size: 0.8125rem;
    color: var(--text-dim);
    transition: color 0.25s;
}
.footer__legal a:hover { color: var(--accent); }
.footer__copy {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

/* ═══════════════════ COOKIE BANNER ═══════════════════ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    transform: translateY(100%);
    transition: transform 0.5s var(--ease-out);
}
.cookie-banner.visible {
    transform: translateY(0);
}
.cookie-banner__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.cookie-banner__text {
    font-size: 0.8125rem;
    color: var(--text);
    line-height: 1.6;
    flex: 1;
}
.cookie-banner__text a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-banner__actions {
    display: flex;
    gap: 0.625rem;
    flex-shrink: 0;
}
.cookie-banner__accept,
.cookie-banner__decline {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .cookie-banner__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .cookie-banner__text { font-size: 0.75rem; }
}

/* ═══════════════════ CONSENT MODAL ═══════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease-out);
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.4s var(--ease-spring);
    display: flex;
    flex-direction: column;
}
.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}
.modal__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.75rem;
    color: var(--text-dim);
    z-index: 2;
    line-height: 1;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}
.modal__close:hover { color: var(--white); }
.modal__body {
    padding: 2.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.modal__body::-webkit-scrollbar { width: 6px; }
.modal__body::-webkit-scrollbar-track { background: transparent; }
.modal__body::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}
.modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}
.modal__body > p {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}
.modal__body ol {
    counter-reset: consent;
    list-style: none;
    margin-top: 1.5rem;
}
.modal__body ol > li {
    counter-increment: consent;
    margin-bottom: 1.25rem;
}
.modal__body ol > li > p {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.7;
}
.modal__body ol > li > p::before {
    content: counter(consent) ". ";
    font-weight: 600;
    color: var(--accent);
}
.modal__body ol > li > ul {
    margin-top: 0.75rem;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.modal__body ol > li > ul > li {
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.6;
    position: relative;
    padding-left: 1rem;
}
.modal__body ol > li > ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}
.modal__body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.modal__agree {
    margin-top: 2rem;
}

/* ═══════════════════ ANIMATIONS ═══════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollLine {
    0% { top: -100%; }
    100% { top: 200%; }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
    .header__contacts { display: none; }
    .services__grid { grid-template-columns: repeat(2, 1fr); }
    .stack__grid { grid-template-columns: repeat(2, 1fr); }
    .accordion__content { grid-template-columns: 1fr; gap: 1.5rem; }
    .cases__grid { grid-template-columns: 1fr; }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
    /* Header & Nav */
    .burger { display: flex; z-index: 1001; }
    .burger.active { opacity: 0; pointer-events: none; }
    .header { padding: 0.75rem 0; }
    .header--scrolled { padding: 0.5rem 0; }
    .nav {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.75rem;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.35s var(--ease-out), visibility 0.35s;
        z-index: 1000;
        padding: 4rem 2rem 2rem;
        overflow-y: auto;
    }
    .nav.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }
    .nav__close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 1rem;
        right: 1.25rem;
        width: 44px;
        height: 44px;
        font-size: 2rem;
        color: var(--text-dim);
        background: none;
        border: 1px solid var(--border);
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.25s;
        z-index: 1;
    }
    .nav__close:hover,
    .nav__close:active {
        color: var(--white);
        border-color: var(--text-dim);
    }
    .nav__link {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--white);
    }
    .nav__link::after { display: none; }
    .nav__footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border);
        width: 100%;
        max-width: 280px;
    }
    .nav__footer-link {
        font-family: var(--font-mono);
        font-size: 0.8125rem;
        color: var(--text-dim);
        transition: color 0.25s;
    }
    .nav__footer-link:hover { color: var(--accent); }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 7rem 0 3rem;
    }
    .hero__badge { margin-bottom: 1.5rem; }
    .hero__title {
        font-size: clamp(2.25rem, 10vw, 3.5rem);
        margin-bottom: 1.25rem;
    }
    .hero__subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .hero__actions {
        flex-direction: column;
        margin-bottom: 3rem;
    }
    .hero__actions .btn { width: 100%; text-align: center; }
    .hero__stats {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding-top: 2rem;
    }
    .hero__stat-num { font-size: 1.75rem; }
    .hero__scroll { display: none; }

    /* About */
    .about { padding: clamp(3rem, 8vw, 5rem) 0; }
    .about__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .section-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
        margin-bottom: 1.5rem;
    }
    .about__text { font-size: 0.9375rem; }

    /* Flows */
    .flows { padding: clamp(3rem, 8vw, 5rem) 0; }
    .flows__grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .flow-card { padding: 1.75rem; }
    .flow-card__title { font-size: 1.2rem; }

    /* Solutions */
    .solutions { padding: clamp(3rem, 8vw, 5rem) 0; }
    .accordion__header {
        gap: 1rem;
        padding: 1.25rem 0;
    }
    .accordion__title { font-size: 1rem; }
    .accordion__content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-bottom: 1.5rem;
    }
    .accordion__tags { flex-wrap: wrap; gap: 0.375rem; }

    /* Cases */
    .cases__grid { grid-template-columns: 1fr; gap: 1rem; }
    .case-card { padding: 1.5rem; }
    .case-card__metric { font-size: 1.75rem; }

    /* Services */
    .services { padding: clamp(3rem, 8vw, 5rem) 0; }
    .services__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .service-card { padding: 1.5rem; }
    .service-card__title { font-size: 1.125rem; }

    /* Stack */
    .stack { padding: clamp(3rem, 8vw, 5rem) 0; }
    .stack__subtitle { font-size: 0.9375rem; }
    .stack__grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .stack-card { padding: 1.25rem; }

    /* Contact */
    .contact { padding: clamp(3rem, 8vw, 5rem) 0; }
    .contact__grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .contact__details { margin-top: 1.5rem; gap: 1.25rem; }
    .form { padding: 1.5rem; border-radius: 12px; }
    .form__row { grid-template-columns: 1fr; gap: 0; }
    .form__input { padding: 0.875rem 1rem; font-size: 1rem; }

    /* Modal */
    .modal-overlay { padding: 0.75rem; }
    .modal {
        max-height: 90vh;
        border-radius: 12px;
    }
    .modal__body { padding: 1.5rem; }
    .modal__title { font-size: 1.25rem; }
    .modal__body > p { font-size: 0.875rem; }
    .modal__body ol > li > p { font-size: 0.875rem; }
    .modal__body ol > li > ul > li { font-size: 0.8125rem; }

    /* Footer */
    .footer { padding: 2rem 0; }
    .footer__top {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    .footer__nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1.25rem;
        font-size: 0.8125rem;
    }
    .footer__bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer__legal {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .footer__legal a { font-size: 0.75rem; }
    .footer__copy { font-size: 0.75rem; }

    /* FAQ */
    .faq { padding: clamp(3rem, 8vw, 5rem) 0; }
    .faq-item__question { font-size: 0.9375rem; padding: 1.25rem 0; }
    .faq-item__answer { font-size: 0.875rem; }
}

/* ── Small Mobile (≤480px) ── */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero__title { font-size: 2rem; }
    .hero__stats { gap: 1rem; }
    .hero__stat-num { font-size: 1.5rem; }
    .hero__stat-label { font-size: 0.75rem; }
    .section-label { font-size: 0.6875rem; }
    .section-title { font-size: 1.625rem; }
    .flow-card { padding: 1.25rem; }
    .flow-card__title { font-size: 1.1rem; }
    .flow-card__list li { font-size: 0.875rem; }
    .accordion__number { width: 1.5rem; font-size: 0.75rem; }
    .accordion__title { font-size: 0.9375rem; }
    .service-card__text { font-size: 0.875rem; }
    .stack-card__tech { font-size: 0.75rem; }
    .form { padding: 1.25rem; }
    .btn { padding: 0.75rem 1.5rem; font-size: 0.875rem; }
    .modal__body { padding: 1.25rem; }
    .modal__title { font-size: 1.125rem; }
    .logo__icon { width: 32px; height: 32px; font-size: 1rem; }
    .logo__text { font-size: 1rem; }
}

/* ── Touch-friendly tap targets ── */
@media (hover: none) and (pointer: coarse) {
    .accordion__header { min-height: 56px; }
    .nav__link { padding: 0.5rem; }
    .btn { min-height: 48px; }
    .form__input { min-height: 48px; }
    .checkbox { min-height: 44px; }
    .footer__nav a { padding: 0.375rem; }
}
