@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/manrope/Manrope[wght].ttf') format('truetype');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/playfairdisplay/PlayfairDisplay[wght].ttf') format('truetype');
}
:root {
    --ink: #0d1b26;
    --ink-2: #13232f;
    --red: #d51f38;
    --red-dark: #a9152a;
    --red-soft: rgba(213, 31, 56, 0.07);
    --red-bright: #e8364c;
    --blue: #aec6d5;
    --blue-deep: #40657c;
    --cream: #eff2f4;
    --paper: #ffffff;
    --line: #dde3e7;
    --text: #1f2c37;
    --muted: #58656f;
    --muted-light: rgba(255, 255, 255, 0.64);
    --radius-s: 4px;
    --radius: 8px;
    --radius-l: 12px;
    --radius-pill: 4px;
    --shadow-card: 0 14px 32px -28px rgba(13, 27, 38, 0.45);
    --container: 1200px;
    --gutter: 24px;
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

img,
svg,
iframe {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4 {
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

b,
strong {
    font-weight: 700;
}

/* ===== 2. УТИЛИТЫ И ТИПОГРАФИКА СЕКЦИЙ ===== */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    position: relative;
    padding: 104px 0;
}

.section-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 52px;
}

.section-head--row {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 56px;
}

.section-head--row > div {
    max-width: 640px;
}

.section-head--center {
    align-items: center;
    text-align: center;
    max-width: 820px;
    margin: 0 auto 56px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--blue-deep);
}

.section-label::before {
    content: '';
    width: 26px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.section-label--light {
    color: rgba(255, 255, 255, 0.55);
}

.section-title {
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.section-lead {
    font-size: 17px;
    line-height: 1.62;
    color: var(--muted);
    max-width: 660px;
}

.section-lead--aside {
    font-size: 15.5px;
    max-width: 400px;
    text-align: right;
    padding-bottom: 6px;
}

.section-head--dark .section-title {
    color: #fff;
}

.section-head--dark .section-lead {
    color: var(--muted-light);
}

.section-head--center .section-lead {
    max-width: 720px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 999;
    padding: 12px 20px;
    border-radius: var(--radius-s);
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transition: top 0.2s var(--ease);
}

.skip-link:focus {
    top: 16px;
}

/* ===== 3. КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 28px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.25s var(--ease), background 0.25s var(--ease),
        color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: 0 0 auto;
    transition: transform 0.25s var(--ease);
}

.btn:hover svg {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--red);
    color: #fff;
}

.btn-primary:hover {
    background: var(--red-dark);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--ink);
}

.btn-light {
    background: #fff;
    color: var(--ink);
}

.btn-light:hover {
    background: var(--cream);
}

.btn-sm {
    padding: 11px 20px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

/* ===== 4. HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--paper);
    color: var(--text);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.header.is-scrolled {
    border-bottom-color: #ccd5db;
    box-shadow: 0 2px 0 rgba(13, 27, 38, 0.03), 0 16px 26px -22px rgba(13, 27, 38, 0.55);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 84px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.logo--footer {
    gap: 14px;
}

.logo-img {
    width: auto;
    height: 48px;
    max-width: 100%;
    object-fit: contain;
}

.logo--footer .logo-img {
    height: 52px;
}

.logo--footer .logo-text {
    border-left-color: rgba(255, 255, 255, 0.16);
}

.logo--footer .logo-name {
    color: #fff;
}

.logo--footer .logo-sub {
    color: rgba(255, 255, 255, 0.55);
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.logo-name {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ink);
}

.logo-sub {
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.nav {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
    margin-right: auto;
}

.nav a {
    position: relative;
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--muted);
    padding: 6px 0;
    transition: color 0.2s var(--ease);
}

.nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s var(--ease);
}

.nav a:hover,
.nav a.is-active {
    color: var(--ink);
}

.nav a:hover::after,
.nav a.is-active::after {
    transform: scaleX(1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 0 0 auto;
}

.header-phone {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    line-height: 1.35;
    text-align: right;
}

.header-phone-num {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--ink);
    transition: color 0.2s var(--ease);
}

.header-phone:hover .header-phone-num {
    color: var(--red);
}

.header-phone-hint {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--muted);
}

.header .btn-ghost {
    border-color: rgba(13, 27, 38, 0.42);
    color: var(--ink);
}

.header .btn-ghost:hover {
    border-color: var(--ink);
    background: var(--cream);
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px;
    border-radius: var(--radius-s);
    border: 1px solid var(--line);
    transition: border-color 0.2s var(--ease);
}

.burger:hover {
    border-color: var(--ink);
}

.burger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.burger[aria-expanded='true'] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded='true'] span:nth-child(2) {
    opacity: 0;
}

.burger[aria-expanded='true'] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    overflow: hidden;
    padding: 0 var(--gutter);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -32px rgba(13, 27, 38, 0.5);
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease), visibility 0.3s;
}

.mobile-menu.is-open {
    max-height: 520px;
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.mobile-nav a {
    padding: 15px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--red);
}

.mobile-menu-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0 24px;
}

.mobile-menu-footer p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

/* ===== 5. HERO ===== */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--ink);
    color: #fff;
    padding: 84px 0 0;
}

.hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 96px 96px;
    -webkit-mask-image: radial-gradient(90% 70% at 50% 30%, #000 20%, transparent 78%);
    mask-image: radial-gradient(90% 70% at 50% 30%, #000 20%, transparent 78%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    padding-bottom: 80px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    max-width: 860px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.82);
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red-bright);
}

.hero-title {
    font-size: clamp(34px, 4.8vw, 62px);
    line-height: 1.03;
    letter-spacing: -0.035em;
    font-weight: 800;
}

.mark {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--red-bright);
    padding: 0 2px;
}

.hero-lead {
    font-size: 17.5px;
    line-height: 1.62;
    color: rgba(255, 255, 255, 0.72);
    max-width: 720px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero .btn-ghost {
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.hero .btn-ghost:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 4px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.6);
}

.hero-trust li {
    position: relative;
    padding-left: 20px;
}

.hero-trust li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--red-bright);
    border-bottom: 2px solid var(--red-bright);
    transform: rotate(-45deg);
}

/* ===== 6. ABOUT — О БЮРО ===== */
.section.about {
    background: var(--paper);
    padding-bottom: 0;
}

.about-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    align-items: center;
    gap: 72px;
}

.about-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.about-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.14;
    letter-spacing: -0.01em;
    color: var(--ink);
    max-width: 520px;
}

.about-title span {
    color: var(--red);
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 560px;
    font-size: 16.5px;
    line-height: 1.68;
    color: var(--muted);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 68px;
    list-style: none;
    padding: 0;
}

.about-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 26px;
    text-align: center;
}

.about-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: rgba(13, 27, 38, 0.12);
}

.about-stat::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--red);
    transform: scaleX(1);
    transform-origin: center;
    transition: transform 0.9s var(--ease);
}

.about-stats.reveal .about-stat::after { transform: scaleX(0); }
.about-stats.reveal.is-visible .about-stat::after { transform: scaleX(1); }
.about-stat:nth-child(2)::after { transition-delay: 0.12s; }
.about-stat:nth-child(3)::after { transition-delay: 0.24s; }

.about-stat-num {
    font-size: clamp(30px, 3.3vw, 44px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.about-stat-label {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
    max-width: 240px;
}

.about-trust {
    margin-top: 72px;
    padding: 56px 0;
    background: var(--cream);
}

/* ===== 7. ОТРАСЛИ КЛИЕНТОВ ===== */
.clients {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 44px;
    padding-top: 34px;
    border-top: 1px solid rgba(13, 27, 38, 0.12);
}

.clients-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clients-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
}

.clients-ticker {
    min-width: 0;
    overflow: hidden;
    padding: 6px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}

.clients-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.clients-list li {
    padding: 12px 20px;
    margin: 0 12px 12px 0;
    border-radius: var(--radius);
    border: 1px solid rgba(13, 27, 38, 0.10);
    background: var(--paper);
    box-shadow: var(--shadow-card);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    transition: border-color 0.25s var(--ease);
}

.clients-list li:hover {
    border-color: rgba(213, 31, 56, 0.35);
}

.clients-list > li[aria-hidden='true'] {
    display: none;
}

.clients-list.is-running {
    flex-wrap: nowrap;
    width: max-content;
    animation: clients-run var(--run, 34s) linear infinite;
}

.clients-list.is-running > li {
    margin-bottom: 0;
}

.clients-list.is-running > li[aria-hidden='true'] {
    display: block;
}

.clients-list.is-running:hover {
    animation-play-state: paused;
}
.contact{
    background-color: var(--cream);
}
.input-form{
    background-color: var(--cream);
}

@keyframes clients-run {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ===== 8. SERVICES — СЛАЙДЕР ===== */
.services {
    background: var(--paper);
}

.services-tabs {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--paper);
    overflow: hidden;
}

.services-tab {
    display: inline-flex;
    padding: 12px 16px 11px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--muted);
    text-align: left;
    border-radius: var(--radius-s) var(--radius-s) 0 0;
    transition: color 0.22s var(--ease), background 0.22s var(--ease);
}
.services-tab:hover {
    color: var(--ink);
    background: var(--cream);
}
.services-tab:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: -2px;
}
.services-tab[aria-selected='true'] {
    color: var(--ink);
    font-weight: 700;
    background: var(--cream);
    box-shadow: inset 0 -2px 0 var(--red);
}

/* Старые вкладки скрыты — их место занял слайдер */
.services-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 20px 0;
    border-bottom: 1px solid var(--line);
}


.services-panels {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0;
}

.services-panels::-webkit-scrollbar {
    display: none;
}

.service-panel {
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding: 36px 80px 40px;
    min-height: 500px;
}

/* Панели больше не прячутся через hidden — все лежат в потоке слайдера */
.service-panel[hidden] {
    display: block;
}

.service-panel-head {
    display: flex;
    align-items: center;
    gap: 18px;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--ink);
}

.service-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.service-panel-title {
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--ink);
    min-width: 0;
}

.service-panel-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 28px;
    margin-top: 22px;
    padding: 13px 20px;
    border-radius: var(--radius);
    background: var(--cream);
    font-size: 14px;
    color: var(--muted);
}

.service-panel-meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.service-panel-meta-item + .service-panel-meta-item {
    padding-left: 28px;
    border-left: 1px solid rgba(13, 27, 38, 0.14);
}

.service-panel-meta b {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.service-panel-lead {
    max-width: 860px;
    margin-top: 20px;
    font-size: 16.5px;
    line-height: 1.62;
    color: var(--text);
}

.service-panel-label {
    margin: 26px 0 14px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(13, 27, 38, 0.45);
}

.service-panel-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 44px;
    max-width: 900px;
}

.service-panel-list li {
    position: relative;
    padding-left: 26px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
}

.service-panel-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    width: 9px;
    height: 5px;
    border-left: 2px solid var(--red);
    border-bottom: 2px solid var(--red);
    transform: rotate(-45deg);
}

.service-panel-foot {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px dashed rgba(13, 27, 38, 0.16);
}

.service-panel-note {
    max-width: 660px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--muted);
}

.service-panel-note b {
    color: var(--ink);
}

.services-cta {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

/* Навигация слайдера */
.services-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease);
    z-index: 10;
}

.services-slider-nav:hover {
    background: var(--cream);
    border-color: var(--ink);
}

.services-slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.services-slider-nav--prev { left: 16px; }
.services-slider-nav--next { right: 16px; }

.services-slider-nav svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Точки-индикаторы */
.services-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.services-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--line);
    cursor: pointer;
    transition: all 0.25s var(--ease);
    padding: 0;
}

.services-slider-dot:hover {
    background: var(--muted);
}

.services-slider-dot.is-active {
    background: var(--red);
    width: 24px;
    border-radius: 4px;
}

/* ===== 9. PORTFOLIO — КЕЙСЫ ===== */
.portfolio {
    background: var(--cream);
}

.cases-list {
    display: flex;
    flex-direction: column;
    margin-top: 44px;
    border-bottom: 1px solid rgba(13, 27, 38, 0.14);
}

.case {
    display: grid;
    grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
    column-gap: 56px;
    align-items: start;
    padding: 42px 0;
    border-top: 1px solid rgba(13, 27, 38, 0.14);
}

.case-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    max-width: 440px;
}

.case-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.case-tag {
    padding: 5px 10px;
    border-radius: var(--radius-s);
    background: var(--paper);
    border: 1px solid rgba(13, 27, 38, 0.12);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-deep);
}

.case-year {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.case-title {
    font-size: clamp(19px, 1.7vw, 23px);
    line-height: 1.3;
    color: var(--ink);
}

.case-desc {
    font-size: 14.5px;
    line-height: 1.62;
    color: var(--muted);
}

.case-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.case-photo {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    aspect-ratio: 4 / 3;
}

.case-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cases-more[hidden] {
    display: none;
}

.cases-more-cta {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.cases-more-btn[hidden] {
    display: none;
}

.cases-more-btn:hover svg {
    transform: translateY(2px);
}

.cases-more-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* ===== 10. PROCESS ===== */
.process {
    background: var(--ink);
    color: #fff;
    overflow: hidden;
}

.process-list {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    counter-reset: step;
}

.process-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 26px;
}

.process-step::before {
    content: '';
    position: absolute;
    top: 21px;
    left: 46px;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
    transition: background 0.3s var(--ease);
}

.process-step:last-child::before {
    display: none;
}

.process-num {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: var(--ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.62);
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.process-step > div {
    flex: 1 0 auto;
    margin-top: 22px;
    transition: transform 0.3s var(--ease);
}

.process-step h3 {
    font-size: 17.5px;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 6px;
}

.process-step p {
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}

.process-step:hover .process-num {
    color: #fff;
    border-color: var(--red-bright);
    background: var(--ink-2);
}

.process-step:hover::before {
    background: rgba(255, 255, 255, 0.34);
}

.process-step:hover > div {
    transform: translateY(-2px);
}

.process-note {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 34px;
    padding: 26px 32px;
    border-radius: var(--radius-l);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.process-note svg {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    fill: var(--blue);
}

.process-note p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.62);
    max-width: 720px;
}

.process-note b {
    color: #fff;
}

.process-note .btn {
    margin-left: auto;
    flex: 0 0 auto;
}

/* ===== 11. CONTACT + FORM ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.contact-lines {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 4px;
}

.contact-line {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(13, 27, 38, 0.1);
}

.contact-line svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: var(--red);
}

.contact-line > span {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.contact-line b {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
    transition: color 0.2s var(--ease);
}

a.contact-line:hover b {
    color: var(--red);
}

.contact-line > span > span {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--muted);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 36px 34px 32px;
    border-radius: var(--radius-l);
    background: var(--paper);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
}

.form-title {
    font-size: 23px;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.form-subtitle {
    margin-top: -8px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--muted);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--ink);
}

.field input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-s);
    border: 1px solid rgba(13, 27, 38, 0.14);
    font-size: 16px;
    color: var(--ink);
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input::placeholder {
    color: rgba(38, 48, 60, 0.42);
}

.field input:focus {
    outline: none;
    border-color: var(--red);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(213, 31, 56, 0.12);
}

.field input.is-invalid {
    border-color: var(--red);
    background: rgba(213, 31, 56, 0.04);
}

.field-error {
    font-size: 11.5px;
    line-height: 1.35;
    color: var(--red);
    min-height: 0;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex: 0 0 auto;
    accent-color: var(--red);
    cursor: pointer;
}

.checkbox label {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--muted);
    cursor: pointer;
}

.checkbox a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.checkbox a:hover {
    color: var(--red);
}

.form-note {
    font-size: 11.5px;
    line-height: 1.5;
    text-align: center;
    color: var(--muted);
}

.form-success,
.form-error {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    border-radius: var(--radius-s);
}

.form-success {
    background: rgba(37, 168, 108, 0.09);
    border: 1px solid rgba(37, 168, 108, 0.28);
}

.form-success b { color: #14764f; font-size: 14px; }
.form-success span { color: #2c6a51; font-size: 12.5px; line-height: 1.5; }

.form-error {
    background: var(--red-soft);
    border: 1px solid rgba(213, 31, 56, 0.28);
}

.form-error b { color: var(--red-dark); font-size: 14px; }
.form-error span { color: #8f1d2c; font-size: 12.5px; line-height: 1.5; }

.form-success[hidden],
.form-error[hidden] {
    display: none;
}

.form-success:focus-visible,
.form-error:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

/* ===== 12. FOOTER, MOBILE BAR И КНОПКА «НАВЕРХ» ===== */
.footer {
    background: var(--ink);
    color: #fff;
    padding: 72px 0 30px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.1fr;
    gap: 48px;
    padding-bottom: 44px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    max-width: 320px;
}

.footer-about {
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.footer-col h4 {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    margin-bottom: 6px;
}

.footer-col a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.72);
    transition: color 0.2s var(--ease);
}

.footer-col a:hover {
    color: #fff;
}

.footer-phone {
    font-size: 18px !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff !important;
}

.footer-address {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 24px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.42);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.footer-legal a {
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s var(--ease);
}

.footer-legal a:hover {
    color: #fff;
}

.mobile-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--ink);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-radius: var(--radius-pill);
    background: var(--red);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.mobile-bar-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.mobile-bar-btn--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.to-top {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow-card);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
        border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.to-top svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.to-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.to-top:hover {
    border-color: var(--red);
    color: var(--red);
}

.to-top:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

/* ===== 13. ПРОСМОТР ФОТО (LIGHTBOX) ===== */
html.lightbox-open {
    overflow: hidden;
    background: #080f15;
}

.case-photo.is-zoomable {
    position: relative;
    cursor: zoom-in;
}

.case-photo.is-zoomable::after {
    content: 'Увеличить';
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: var(--radius-s);
    background: rgba(13, 27, 38, 0.82);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    pointer-events: none;
}

.case-photo.is-zoomable:hover::after,
.case-photo.is-zoomable:focus-within::after {
    opacity: 1;
    transform: translateY(0);
}

.case-photo.is-zoomable img {
    transition: transform 0.5s var(--ease);
}

.case-photo.is-zoomable:hover img {
    transform: scale(1.025);
}

.case-photo.is-zoomable img:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: -2px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 3vw, 40px);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 15, 21, 0.94);
}

.lightbox-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(1180px, 100%);
    max-height: 100%;
    animation: lightbox-in 0.3s var(--ease);
}

.lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.lightbox-counter {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.55);
    font-variant-numeric: tabular-nums;
}

.lightbox-tools {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lightbox-open-tab {
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.26);
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.lightbox-open-tab:hover {
    color: #fff;
    border-color: #fff;
}

.lightbox-close,
.lightbox-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.lightbox-close {
    width: 40px;
    height: 40px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    background: rgba(8, 15, 21, 0.72);
    width: 44px;
    height: 44px;
}

.lightbox-nav--prev { left: 0; }
.lightbox-nav--next { right: 0; }

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible,
.lightbox-open-tab:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.lightbox-close svg,
.lightbox-nav svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.lightbox-nav svg {
    width: 26px;
    height: 26px;
}

.lightbox-nav[hidden] {
    display: none;
}

.lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.lightbox-img {
    max-width: 100%;
    max-height: min(78vh, 860px);
    object-fit: contain;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
}

.lightbox-caption {
    font-size: 13.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
}

.lightbox-caption:empty {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@keyframes lightbox-in {
    from { opacity: 0; transform: translateY(10px) scale(0.99); }
    to   { opacity: 1; transform: none; }
}

/* ===== 14. АНИМАЦИИ ===== */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .about-stat::after { transform: scaleX(1); }
    .clients-list.is-running { animation: none; width: auto; flex-wrap: wrap; }
    .clients-list.is-running > li[aria-hidden='true'] { display: none; }
    .case-photo.is-zoomable:hover img {
        transform: none;
    }
}