/* =========================================
   1. FONTS & VARIABLES (SYSTEM SETUP)
   ========================================= */
/* Один файл на оба начертания: диапазон весов вместо двух одинаковых деклараций */
@font-face {
    font-family: 'CutoutOfFont';
    src: url('../fonts/CutOut/CutOutOFFont-Regular.woff2') format('woff2'),
    url('../fonts/CutOut/CutOutOFFont-Regular.woff') format('woff');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'UbuntuLight';
    src: url('../fonts/Ubuntu/Ubuntu-Light.woff2') format('woff2'),
    url('../fonts/Ubuntu/Ubuntu-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

:root {
    /* --- Colors --- */
    --black-bg: #000000;
    --white-bg: #FFFFFF;
    --yellow-bg: #FBBA06;
    --text-main: #111111;
    --pain-strip: #9C0404;
    --purple-strip: #4B1384;

    /* --- Fonts --- */
    --font-head: 'CutoutOfFont', sans-serif;
    --font-body: 'UbuntuLight', sans-serif;

    /* --- Typography Scale --- */
    --fs-h1: clamp(2.5rem, 6vw, 4.5rem);
    --fs-h2: clamp(2rem, 5vw, 3.5rem);
    --fs-h3: clamp(1.2rem, 3vw, 1.8rem);
    --fs-body: 1rem;
    --fs-small: 0.875rem;
    --fs-nav: 1.1rem;

    /* --- Spacing System --- */
    --page-padding: 5%;
    --section-gap: 6rem;

    --gap-xl: 4rem;
    --gap-lg: 2rem;
    --gap-md: 1.5rem;
    --gap-sm: 1rem;
    --gap-xs: 0.5rem;

    /* --- Grid ---
       Ширина контента и боковое поле. Шапка, первый экран, кнопка «ЗАКАЗАТЬ» и подвал
       выравниваются по тем же краям, что и секции: на широких экранах раньше шапка
       была на 5% от края, а контент — по центру в 1200px, и края «гуляли». */
    --content-max: 1200px;
    --gutter: max(var(--page-padding), calc((100% - var(--content-max)) / 2));

    /* --- Components --- */
    --header-height: 44px;
    --border-radius-lg: 25px;
    --border-radius-md: 15px;
    --card-padding: 2rem;
}

/* =========================================
   2. GLOBAL RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    overflow-x: clip;
    position: relative;
}

body {
    background-color: var(--white-bg);
    color: var(--text-main);
    font-family: var(--font-body), serif;
    font-size: var(--fs-body);
    line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--white-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--text-main);
    border-radius: 3px;
}

h1, h2, h3, h4 {
    text-wrap: balance;
    font-family: var(--font-head), serif;
    text-transform: uppercase;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: var(--gap-md);
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
    margin-bottom: var(--gap-sm);
}

.section-title {
    color: var(--purple-strip);
    margin-bottom: var(--gap-lg);
    font-size: var(--fs-h2);
    font-weight: 700;
}

.highlight {
    color: var(--pain-strip);
}

.text-yellow {
    color: var(--yellow-bg);
}

p {
    margin-bottom: var(--gap-sm);
    text-wrap: pretty;
}

.has-custom-cursor body,
.has-custom-cursor a,
.has-custom-cursor button,
.has-custom-cursor input,
.has-custom-cursor textarea,
.has-custom-cursor select,
.has-custom-cursor label {
    cursor: none !important;
}

.cursor-dot,
.cursor-outline {
    display: none;
}

.has-custom-cursor .cursor-dot,
.has-custom-cursor .cursor-outline {
    display: block;
}

/* Курсор двигаем через transform (без пересчёта раскладки), см. initCustomCursor */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--white-bg);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    margin: -4px 0 0 -4px;
    mix-blend-mode: difference;
    will-change: transform;
}

.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid var(--white-bg);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    margin: -20px 0 0 -20px;
    transition: scale 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    mix-blend-mode: difference;
    will-change: transform;
}

/* Увеличение — через scale: transform/scale не перекладывают страницу, в отличие от width/height */
body.hovering .cursor-outline {
    scale: 1.5;
    background-color: var(--white-bg);
    border-color: transparent;
}

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* Исправленный класс блокировки скролла */
.no-scroll, body.no-scroll {
    overflow: hidden;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, var(--content-max));
    height: var(--header-height);
    padding: 0 var(--gap-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12));
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    overflow: hidden;

    /* Цвета логотипа. Свойства зарегистрированы через @property, поэтому браузер их плавно анимирует */
    --logo-base: var(--purple-strip);
    --logo-shine: #ffffff;
    --logo-shadow: rgba(0, 0, 0, 0);
    transition: transform 0.3s ease, box-shadow 0.3s ease,
    --logo-base 0.55s ease, --logo-shine 0.55s ease, --logo-shadow 0.55s ease;
}

nav.nav-on-video {
    --logo-base: #ffffff;
    --logo-shine: #ffffff;
    --logo-shadow: rgba(0, 0, 0, 0.35);
}

@property --logo-base {
    syntax: '<color>';
    inherits: true;
    initial-value: #4B1384;
}

@property --logo-shine {
    syntax: '<color>';
    inherits: true;
    initial-value: #ffffff;
}

@property --logo-shadow {
    syntax: '<color>';
    inherits: true;
    initial-value: rgba(0, 0, 0, 0);
}

nav::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.02) 38%, rgba(255, 255, 255, 0.12));
    mix-blend-mode: screen;
    opacity: 0.5;
}

/* Default (non-video sections): purple theme */
nav:not(.nav-on-video) .nav-links a {
    color: var(--purple-strip) !important;
    text-shadow: none !important;
}

/* Video section: white theme */
nav.nav-on-video .nav-links a {
    color: #ffffff !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35) !important;
}

.logo {
    pointer-events: auto;
    color: var(--logo-base);
    text-decoration: none;
    font-family: var(--font-head), serif;
    font-weight: 700;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1;
    height: 100%;
}

.logo img {
    height: 32px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.26, 1.55);
}

/* Раньше на видео градиент выключался (background: none) — такое переключение браузер
   не умеет анимировать, поэтому цвет прыгал. Теперь градиент есть всегда, а меняются его цвета.
   Тень — через drop-shadow: text-shadow рисуется поверх текста с background-clip и портит его. */
.logo span {
    position: relative;
    top: 2px;

    background: linear-gradient(
            120deg,
            var(--logo-base) 0%,
            var(--logo-base) 40%,
            var(--logo-shine) 50%, var(--logo-base) 60%,
            var(--logo-base) 100%
    );
    background-size: 250% auto;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 1px 10px var(--logo-shadow));

    background-position: 0% center;
    transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo:hover span {
    background-position: 100% center;
}

.logo:hover img {
    transform: rotate(10deg) scale(1.05);
}

.nav-links {
    display: flex;
    gap: 10px;
    height: 100%;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font-head), serif;
    font-weight: 700;
    font-size: var(--fs-nav);
    padding: 4px 16px;
    border-radius: 50px;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: color-mix(in srgb, var(--purple-strip) 12%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--purple-strip) 25%, transparent);

    transform: scale(0.85);
    opacity: 0;
    z-index: -1;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-links a:hover::before {
    transform: scale(1);
    opacity: 1;
}

.nav-links a:hover {
    color: color-mix(in srgb, var(--purple-strip) 85%, #ffffff);
    text-shadow: 0 0 10px color-mix(in srgb, var(--purple-strip) 40%, transparent);
}

/* Зона нажатия 44×44 (рекомендация Apple и Google), полоски на прежнем месте за счёт margin */
.burger {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: -8px;
    padding: 0;
    flex-shrink: 0; /* иначе длинный логотип сжимает кнопку до 0px и в неё не попасть пальцем */
    position: relative;
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}

.burger span {
    position: absolute;
    left: 8px;
    height: 2px;
    background: var(--logo-base);
    transition: top 0.6s cubic-bezier(0.77, 0, 0.175, 1), transform 0.6s cubic-bezier(0.77, 0, 0.175, 1), width 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.burger span:nth-child(1) {
    top: 17px;
    width: 28px;
}

.burger span:nth-child(2) {
    top: 25px;
    width: 18px;
}

.burger.active span:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
    width: 28px;
}

.burger.active span:nth-child(2) {
    top: 21px;
    transform: rotate(-45deg);
    width: 28px;
}

/* Меню открыто: под шапкой белый фон, поэтому логотип и бургер — фиолетовые, даже над видео */
body.menu-open nav {
    --logo-base: var(--purple-strip);
    --logo-shine: #ffffff;
    --logo-shadow: rgba(0, 0, 0, 0);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--white-bg);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--gap-lg);
    padding: calc(var(--header-height) + 30px) var(--page-padding) 30px;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform 0.85s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu-overlay.open {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-overlay a {
    font-family: var(--font-head), serif;
    font-size: var(--fs-h2);
    text-decoration: none;
    color: var(--text-main);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

.mobile-menu-overlay.open a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay a:nth-child(1) {
    transition-delay: 0.15s;
}

.mobile-menu-overlay a:nth-child(2) {
    transition-delay: 0.25s;
}

.mobile-menu-overlay a:nth-child(3) {
    transition-delay: 0.35s;
}

.mobile-menu-overlay a:nth-child(4) {
    transition-delay: 0.45s;
}

/* =========================================
   4. LAYOUT & SECTIONS
   ========================================= */
section {
    padding: var(--section-gap) var(--page-padding);
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.content-block {
    max-width: var(--content-max);
    margin: 0 auto;
    width: 100%;
}

section:nth-of-type(odd) {
    background-color: var(--yellow-bg);
    color: var(--text-main);
}

section:nth-of-type(even) {
    background-color: var(--white-bg);
    color: var(--text-main);
}

/* min-height вместо height: если карточка выше экрана (низкий ноутбук, телефон
   в альбомной ориентации), секция растёт, а не обрезает текст */
section.video {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: var(--section-gap) var(--gutter);
    min-height: max(600px, 100vh);
    background-color: transparent !important;
    color: white !important;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--yellow-bg);
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.video-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#loaderPercent {
    font-family: var(--font-head), sans-serif;
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.about-content {
    max-width: 500px;
    width: 100%;
    position: relative;
}

/* Маркеры снаружи: перенесённая строка встаёт ровно под текстом, а не под точкой */
.hero-list {
    list-style-position: outside;
    padding: 0 0 0 1.25em;
    margin: 0 0 var(--gap-md);
}

.hero-list li {
    margin-bottom: var(--gap-xs);
}

.glass-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    padding: var(--card-padding);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.08) 42%, rgba(255, 255, 255, 0.22));
    opacity: 0.45;
}

.glass-card > * {
    position: relative;
    z-index: 1;
}

#about .glass-card,
#about .glass-card p,
#about .glass-card li,
#about .glass-card strong,
#about .glass-card b {
    color: #f5f1ff;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

#about .glass-card .section-title {
    color: #ffffff;
}

.btn-glass {
    display: inline-block;
    margin-top: var(--gap-md);
    padding: 0.8rem 1.5rem;
    background: var(--yellow-bg);
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-head), serif;
    font-weight: 700;
    border-radius: 50px;
    font-size: var(--fs-small);
    transition: 0.3s;
}

.btn-glass:hover {
    background: white;
    color: black;
    transform: translateY(-3px);
}

/* =========================================
   5. UI ELEMENTS (GRIDS & CARDS)
   ========================================= */
/* =========================================
   ЕДИНЫЕ СТИЛИ КНОПОК ЗАКРЫТИЯ (UNIFIED CLOSE)
   ========================================= */
.unified-close-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    z-index: 10020;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    outline: none;
    border-style: solid;
}

.unified-close-btn::before,
.unified-close-btn::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.unified-close-btn::before {
    transform: rotate(45deg);
}

.unified-close-btn::after {
    transform: rotate(-45deg);
}

.unified-close-btn:hover {
    background: var(--yellow-bg);
    color: var(--black-bg);
    border-color: var(--yellow-bg);
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 8px 24px rgba(251, 186, 6, 0.4);
}

/* =========================================
   СЕКЦИЯ SERVICES (МОЖЕМ-УМЕЕМ)
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-lg);
    margin-top: var(--gap-lg);
    padding: 2rem 0;
}

.service-item {
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 11; /* Стандартизация пропорций карточек */
    background: #141414;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    display: block;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.service-item::after {
    content: 'ЖМИ И ЧИТАЙ';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    color: var(--white-bg);
    font-family: var(--font-head), serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-item:hover img {
    transform: scale(1.05);
}

.service-item:hover::after {
    opacity: 1;
}

/* Модальное окно услуг */
#serviceModal.modal-overlay {
    z-index: 10005;
    padding: 40px;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-modal-content {
    position: relative;
    width: 100%;
    max-width: 960px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
}

#serviceModal.active .service-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.service-modal-content img {
    width: 100%;
    height: auto;
    max-height: 82vh;
    border-radius: 20px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease;
}

.eyes-section .content-block {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.eyes-animation-svg {
    width: 100%;
    height: auto;
    display: block;
}

.project-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--text-main);
    padding: 10px 20px;
    pointer-events: none;
}

.project-info h3 {
    color: white;
    margin: 0;
}

/* =========================================
   СЕКЦИЯ КЕЙСОВ (BENTO GRID)
   ========================================= */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gap-md);
    margin-bottom: var(--gap-md);
}

.portfolio-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    height: 400px;
    background: var(--black-bg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-item.col-8 {
    grid-column: span 8;
}

.portfolio-item.col-6 {
    grid-column: span 6;
}

.portfolio-item.col-4 {
    grid-column: span 4;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    opacity: 0.8;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.project-info {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    z-index: 2;
    background: transparent;
    padding: 0;
    pointer-events: none;
    transform: translateY(5px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-info h3 {
    color: var(--white-bg);
    margin-bottom: 5px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.04);
}

.portfolio-item:hover .project-info {
    transform: translateY(0);
}

/* Скрытая секция кейсов */
.portfolio-hidden {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
    opacity: 0;
    width: 100%;
}

.portfolio-hidden.open {
    max-height: 3000px;
    opacity: 1;
}

/* =========================================
   ЛАЙТБОКС КЕЙСОВ (LIGHTBOX)
   ========================================= */
.portfolio-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 10005;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.portfolio-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-container {
    display: flex;
    width: 92%;
    max-width: 1280px;
    height: 82vh;
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    transform: scale(0.96);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-lightbox.active .lightbox-container {
    transform: scale(1);
}

/* Левая сторона: Медиа */
.lightbox-media-side {
    position: relative;
    flex: 1.3;
    background: #050505;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.lightbox-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

#lightboxImg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transition: opacity 0.25s ease-in-out;
    opacity: 1;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Стрелки */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, border-color 0.3s, transform 0.3s;
    z-index: 5;
}

.lightbox-arrow:hover {
    background: var(--yellow-bg);
    color: var(--black-bg);
    border-color: var(--yellow-bg);
    transform: translateY(-50%) scale(1.05);
}

.arrow-left {
    left: 24px;
}

.arrow-right {
    right: 24px;
}

/* Правая сторона: Текст и метаданные */
.lightbox-info-side {
    flex: 0.7;
    background: #141414;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.lightbox-info-content {
    width: 100%;
}

.lightbox-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--yellow-bg);
    letter-spacing: 2px;
    font-weight: 700;
    display: block;
    margin-bottom: 12px;
}

.lightbox-title {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 18px;
    text-transform: uppercase;
    line-height: 1.1;
}

.lightbox-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Миниатюры */
.lightbox-thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.thumbnail-item {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s, transform 0.3s;
    flex-shrink: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.thumbnail-item.active {
    border-color: var(--yellow-bg);
    transform: scale(1.05);
}

/* =========================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ========================================= */
@media (max-width: 900px) {
    /* Сетка кейсов на планшете и телефоне — в разделе «9. АДАПТИВ» */

    #serviceModal,
    .portfolio-lightbox {
        display: flex !important;
        justify-content: center !important;
        align-items: flex-end !important;
        padding-top: 76px !important;
        padding-bottom: 24px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .unified-close-btn {
        top: 16px !important;
        right: 16px !important;
        width: 42px !important;
        height: 42px !important;
        background: rgba(15, 15, 15, 0.85) !important;
    }

    .unified-close-btn::before,
    .unified-close-btn::after {
        width: 14px;
    }


    .lightbox-container {
        flex-direction: column;
        height: calc(100vh - 115px) !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .lightbox-media-side {
        flex: 1.1;
        min-height: 45%;
    }

    .lightbox-image-wrapper {
        padding: 16px;
    }

    .lightbox-info-side {
        flex: 0.9;
        padding: 24px;
        justify-content: flex-start;
        gap: 12px;
        overflow-y: auto;
    }

    .lightbox-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .lightbox-desc {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .lightbox-arrow {
        width: 42px;
        height: 42px;
        font-size: 0.9rem;
    }

    .arrow-left {
        left: 12px;
    }

    .arrow-right {
        right: 12px;
    }

    /* Смещения кнопок закрытия на телефонах */
    .unified-close-btn {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .unified-close-btn::before,
    .unified-close-btn::after {
        width: 14px;
    }

    #serviceModal.modal-overlay {
        padding: 80px 16px 20px 16px;
        align-items: center;
    }

    .service-modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 !important;
    }

    .service-modal-content img {
        max-height: calc(100vh - 125px) !important;
        border-radius: 12px;
        width: auto;
        max-width: 100%;
        display: block;
        margin: 0 auto;
    }
}

.btn-outline {
    display: block;
    margin: var(--gap-lg) auto 0;
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    padding: 1rem 2rem;
    font-family: var(--font-head), serif;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    font-weight: 700;
    font-size: var(--fs-body);
}

.btn-outline:hover {
    background: var(--text-main);
    color: white;
}

.stickers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-xl) var(--gap-lg);
    margin-top: var(--gap-lg);
}

/* 1, 4, 7 карточки (Левый столбец) -> Прижимаем влево к заголовку */
.sticker-card:nth-child(3n+1) {
    justify-self: start;
}

/* 2, 5, 8 карточки (Средний столбец) -> Строго по центру */
.sticker-card:nth-child(3n+2) {
    justify-self: center;
}

/* 3, 6, 9 карточки (Правый столбец) -> Прижимаем вправо к краю страницы */
.sticker-card:nth-child(3n+3) {
    justify-self: end;
}

.sticker-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    width: 100%;
    max-width: 280px;
}

.sticker-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    position: relative;
    margin-bottom: var(--gap-md);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.sticker-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.sticker-hover-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: 50%;
}

.sticker-card h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0;
    font-family: var(--font-head), serif;
    font-weight: 800;
    text-transform: uppercase;
    transition: color 0.3s;
}

.sticker-card:hover .sticker-img-wrap {
    transform: scale(1.05);
    border-color: var(--pain-strip);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.sticker-card:hover img {
    filter: blur(5px) brightness(0.6);
    transform: scale(1.1);
}

.sticker-card:hover .sticker-hover-text {
    opacity: 1;
    transform: scale(1);
}

.sticker-card:hover h3 {
    color: var(--pain-strip);
}

.form-wrapper {
    display: grid;
    grid-template-columns: 1fr;
}

.form-container {
    align-content: center;
    background: transparent;
    padding: var(--card-padding);
    border: 2px solid var(--text-main);
    position: relative;
    border-radius: 30px;
}

.form-group {
    margin-bottom: var(--gap-sm);
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 1.2rem;
    color: var(--text-main);
    text-transform: uppercase;
    font-family: var(--font-head), serif;
    font-weight: 700;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--text-main);
    color: var(--text-main);
    font-family: var(--font-body), serif;
    font-size: var(--fs-body);
    padding: 8px 0;
    outline: none;
}

.form-group input:focus, .form-group textarea:focus {
    border-bottom-color: var(--pain-strip);
}

.btn-submit {
    background: var(--text-main);
    color: white;
    border: none;
    padding: 1.2rem;
    width: 100%;
    font-family: var(--font-head), serif;
    font-weight: 700;
    font-size: var(--fs-body);
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.2s;
    border-radius: 30px;
}

.btn-submit:hover {
    background: white;
    color: var(--text-main);
    outline: 2px solid var(--text-main);
    outline-offset: -2px;
}

.promo-cat-trigger {
    position: absolute;
    top: -40px;
    right: -20px;
    width: 100px;
    height: 100px;
    cursor: pointer;
    z-index: 10001;
    animation: float 3s ease-in-out infinite;
}

.cat-circle {
    width: 100%;
    height: 100%;
    background: var(--white-bg);
    border: 2px solid var(--text-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-family: var(--font-head), serif;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    background-color 0.3s ease,
    box-shadow 0.3s ease;
    z-index: 10001;
}

.cat-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--pain-strip);
    color: white;
    font-family: var(--font-head), serif;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;

    border: 2px solid var(--text-main);
    box-shadow: 2px 2px 0px var(--text-main);

    transform: rotate(15deg);
    z-index: 10002;
    pointer-events: none;

    animation: badge-pop 2s infinite ease-in-out;
}

.promo-cat-trigger:hover .cat-circle svg {
    animation: cat-wiggle 0.5s ease-in-out;
}


.promo-cat-trigger:active .cat-circle {
    transform: scale(0.92);
    background-color: var(--white-bg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease, background-color 0.1s ease;
}

.promo-cat-trigger:active .cat-badge {
    transform: rotate(5deg) scale(0.9);
    transition: transform 0.1s ease;
}

@keyframes cat-wiggle {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-15deg) scale(1.1);
    }
    50% {
        transform: rotate(10deg) scale(1.1);
    }
    75% {
        transform: rotate(-5deg) scale(1.05);
    }
}

/* Анимация пульсации бейджика */
@keyframes badge-pop {
    0%, 100% {
        transform: rotate(15deg) scale(1);
    }
    50% {
        transform: rotate(15deg) scale(1.1);
    }
}

/* =========================================
   FORM SUCCESS & STATES
   ========================================= */
.success-message {
    text-align: center;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease;
}

.success-message h3 {
    color: var(--purple-strip);
    font-size: var(--fs-h2);
    margin-bottom: 1rem;
}

.success-message p {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-submit.loading {
    opacity: 0.7;
    pointer-events: none;
    background: var(--purple-strip);
    color: white;
}


/* =========================================
   CONTACTS SECTION
   ========================================= */
.contacts-wrapper {
    display: grid;
    /* На ПК: 40% текст, 60% карта */
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--gap-lg);
    align-items: stretch;
    width: 100%;
}

.contacts-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.contact-group {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    flex-grow: 1;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.contact-label {
    font-family: var(--font-body), sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.4);
    font-weight: 600;
    letter-spacing: 1px;
}

.contact-text {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0;
}

.contact-link {
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-head), serif;
    font-weight: 700;
    font-size: clamp(0.8rem, 4vw, 1.2rem);
    transition: color 0.2s ease;
    width: fit-content;
    white-space: nowrap;
    max-width: 100%;
    display: inline-block;
}

.contact-link.address-link {
    white-space: normal;
    line-height: 1.4;
    display: block;
}

.contact-link.big-link {
    font-size: 1.8rem;
    line-height: 1;
}

.contact-link:hover {
    color: var(--purple-strip);
}

.social-minimal {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-minimal a {
    color: var(--text-main);
    font-size: 2rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.social-minimal a:hover {
    color: var(--purple-strip);
    transform: none;
}

.map-container {
    width: 100%;
    height: 100%;
    min-height: 450px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* =========================================
   6. WIDGETS
   ========================================= */
.scroll-progress-btn {
    position: fixed;
    left: 20px;
    bottom: 40px;
    z-index: 900;
    width: 30px;
    height: 160px;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.scroll-progress-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.text-shimmer {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: var(--font-head), serif;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: transparent;
    background: linear-gradient(
            to bottom,
            var(--purple-strip) 0%, var(--purple-strip) 40%,
            #d8b4fe 50%, var(--purple-strip) 60%,
            var(--purple-strip) 100%
    );
    background-size: 100% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer-flow 2.5s linear infinite;
    animation-play-state: paused;
}

.scroll-progress-btn.visible .text-shimmer {
    animation-play-state: running;
}

.scroll-progress-btn:hover .text-shimmer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--yellow-bg) 50%, rgba(255, 255, 255, 0) 100%);
    background-size: 100% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-flow 3s linear infinite;
}

.progress-track {
    width: 2px;
    height: 60px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.scroll-progress-btn:hover .progress-track {
    background: rgba(0, 0, 0, 0.2);
    height: 70px;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--pain-strip);
    border-radius: 2px;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.1s linear;
}

.scroll-progress-btn:hover .progress-bar {
    background: var(--yellow-bg);
}

/* CTA Button: все бесконечные анимации — только transform и opacity, их считает видеокарта */
.float-cta {
    position: fixed;
    right: var(--gutter);
    bottom: 40px;
    z-index: 1000;
    display: block;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Пульсирующее жёлтое кольцо (раньше — анимация box-shadow) */
.float-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(251, 186, 6, 0.7);
    animation: cta-pulse 2s ease-out infinite;
    will-change: transform, opacity;
}

.float-cta > span {
    position: relative;
    z-index: 1;
    display: block;
    padding: 16px 32px;
    border-radius: inherit;
    font-family: var(--font-head), serif;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: var(--purple-strip);
    color: var(--white-bg);
    border: 2px solid var(--white-bg);
    overflow: hidden;
    transition: color 0.3s ease, box-shadow 0.3s ease;
}

/* Блик (раньше — анимация left) */
.float-cta > span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: translateX(-150%) skewX(-20deg);
    animation: cta-shimmer 3s infinite;
    pointer-events: none;
}

.float-cta:hover {
    transform: translateY(-5px) scale(1.05);
}

.float-cta:hover > span {
    box-shadow: 0 15px 30px rgba(251, 186, 6, 0.6), 0 0 15px rgba(255, 255, 255, 0.8) inset;
    color: #000;
}

.float-cta:active {
    transform: translateY(-1px) scale(0.98);
}

.float-cta:active > span {
    box-shadow: 0 5px 10px rgba(251, 186, 6, 0.4);
}

@keyframes cta-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    70% {
        transform: scale(1.17, 1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes cta-shimmer {
    0% {
        transform: translateX(-150%) skewX(-20deg);
    }
    20%, 100% {
        transform: translateX(150%) skewX(-20deg);
    }
}

/* =========================================
   7. ANIMATION & SVG PAIN SECTION
   ========================================= */
.marquee-container {
    width: 100%;
    overflow: hidden;
    background: var(--pain-strip);
    position: relative;
}

.marquee-grey {
    background: var(--purple-strip);
    color: rgba(255, 255, 255, 0.7);
}

.marquee-burgundy {
    background: var(--pain-strip);
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    font-family: var(--font-head), serif;
    margin-top: -200px;
    position: relative;
}

.marquee-burgundy a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s;
}

.marquee-burgundy a:hover {
    border-bottom: 2px solid #fff;
}

.marquee-partners-white {
    background: #FFFFFF !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.partners-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: fit-content;
    padding-left: 0;
    padding-right: 2rem;
    animation: marquee 200s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.partner-logo {
    max-width: 180px;
    max-height: 70px;

    width: auto;
    height: auto;
    object-fit: contain;

    flex-shrink: 0;
    filter: grayscale(100%) opacity(0.6) contrast(1.1);
    transition: filter 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.track {
    display: flex;
    width: fit-content;
    gap: 0;
    animation: marquee 80s linear infinite;
    will-change: transform;
}

.track span {
    flex-shrink: 0;
    margin-right: 3rem;
    font-family: var(--font-head), serif;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.marquee-burgundy .track span {
    font-size: 1.5rem;
}

.pain-section {
    background-color: var(--yellow-bg);
    padding: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Анимированные иллюстрации собраны из слоёв: каждый движущийся элемент — отдельный <svg>.
   Сдвиг слоя браузер делает на видеокарте, без перерисовки всей картинки на каждом кадре. */
.svg-layers {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.svg-layer {
    position: absolute;
    display: block;
    max-width: none;
    pointer-events: none;
}

.svg-layer[data-layer] {
    will-change: transform;
}

.svg-layer[data-layer="bubble"] {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Иконки (бывший Font Awesome) */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    flex-shrink: 0;
}


.svg-container {
    width: 100%;
    height: auto;
    position: relative;
    padding: var(--page-padding);
    margin: 0;
    display: flex;
    justify-content: center;
}

/* =========================================
   8. FOOTER & MODALS (FIXED CENTER)
   ========================================= */

.spotlight-wrapper {
    position: relative;
    width: 100%;
    padding: 0;
    background-color: var(--black-bg) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: default;
    user-select: none;
    height: auto;
    min-height: 40vh;
}

.spotlight-content {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.spotlight-text {
    font-family: 'Unbounded', 'CutoutOfFont', sans-serif;
    font-weight: 900;
    font-size: 11vw;
    line-height: 0.8;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    text-align: center;
    color: var(--white-bg);
    width: 100%;
    display: block;
}

.spotlight-text.overlay {
    --x: 50%;
    --y: 50%;
    -webkit-mask-image: radial-gradient(circle 80vmax at var(--x) var(--y), white 20%, transparent 60%);
    mask-image: radial-gradient(circle 80vmax at var(--x) var(--y), white 20%, transparent 60%);
}

/* Подвал: реквизиты ИП (ст. 10 149-ФЗ) и ссылки на документы по персданным */
.site-footer {
    position: relative;
    background: var(--black-bg);
    color: rgba(255, 255, 255, 0.6);
    padding: 1.5rem var(--page-padding) 2rem;
    font-size: 0.75rem;
    line-height: 1.6;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column; /* справа оставляем место под плавающую кнопку «ЗАКАЗАТЬ» */
    align-items: flex-start;
    gap: 0.9rem;
}

.footer-legal p {
    margin: 0;
}

.footer-legal p:first-child {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem 1.5rem;
    max-width: calc(100% - 220px);
}

.footer-links a,
.footer-links button {
    color: var(--white-bg);
    font: inherit;
    background: none;
    border: 0;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links button:hover {
    color: var(--yellow-bg);
}

/* =========================================
   ФОРМЫ
   ========================================= */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--text-main);
    color: var(--white-bg) !important;
    font-family: var(--font-body), serif;
    font-size: var(--fs-h3);
    padding: 8px 0;
    outline: none;
    transition: border-bottom-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-bottom-color: var(--pain-strip);
}


/* =========================================
   МОДАЛЬНОЕ ОКНО
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white-bg);
    border: 2px solid var(--text-main);
    padding: var(--card-padding);
    max-width: 450px;
    width: 100%;
    position: relative;
    color: var(--text-main);
    border-radius: 30px;
    overflow: hidden;

    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
}

.modal-content {
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-main);
    transition: color 0.2s ease, transform 0.2s ease;
}

.close-modal:hover {
    color: var(--pain-strip);
    transform: scale(1.1);
}

.modal-content .form-group input,
.modal-content .form-group textarea,
.modal-content .form-group select {
    color: var(--text-main) !important;
}

.modal-content .form-group input::placeholder,
.modal-content .form-group textarea::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* =========================================
   CTA MID SECTION (КНОПКА ЗАКАЗА)
   ========================================= */
.cta-mid-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-lg);
    background: var(--yellow-bg);
    border: 2px solid var(--text-main);
    border-radius: 30px;
    padding: 3.5rem 4rem;

    grid-column: 1 / -1;
    margin-top: 2rem;
    align-self: center;
    box-shadow: 12px 12px 0px var(--text-main);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.cta-mid-container::before {
    content: '';
    position: absolute;
    right: -10%;
    top: -50%;
    width: 400px;
    height: 400px;
    background: var(--pain-strip);
    filter: blur(90px);
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}

.cta-mid-container:hover {
    transform: translate(-4px, -4px);
    box-shadow: 16px 16px 0 var(--text-main);
}

.cta-mid-text {
    flex: 1 1 450px;
}

.cta-mid-text h2,
.cta-mid-text h3 {
    font-size: clamp(2rem, 4.2vw, 3.5rem);
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-family: var(--font-head), serif;
    text-transform: uppercase;
}

.cta-mid-text p {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    max-width: 85%;
    margin: 0;
}

.btn-massive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: var(--text-main);
    color: var(--white-bg);
    font-family: var(--font-head), serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    padding: 1.5rem 3rem;
    border-radius: 50px;
    border: 2px solid var(--text-main);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
}

.btn-massive .icon {
    width: 1.2rem;
    height: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-massive:hover {
    background: var(--white-bg);
    color: var(--text-main);
    transform: translateY(-3px);
}

.btn-massive:hover .icon {
    transform: translateX(10px);
}

/* =========================================
   9. АДАПТИВ
   ≤1240 — компактная шапка (ноутбуки, iPad в альбомной ориентации)
   ≤1100 — меню-бургер: пять пунктов меню уже не помещаются в одну строку
   ≤900  — планшеты и телефоны
   ≤600  — телефоны
   ≤380  — маленькие телефоны (iPhone SE и подобные, 320–380px)
   ========================================= */

/* Большие мониторы: чуть крупнее текст и шире контент, чтобы страница не выглядела мелкой */
@media (min-width: 1700px) {
    :root {
        --content-max: 1320px;
    }

    html {
        font-size: 17px;
    }
}

@media (min-width: 2200px) {
    :root {
        --content-max: 1440px;
    }

    html {
        font-size: 18px;
    }
}

/* Компактная шапка: раньше на 1024–1200px пункты меню переносились на две строки и обрезались */
@media (max-width: 1240px) {
    nav {
        padding: 0 1.25rem;
    }

    .logo {
        font-size: 1.35rem;
        gap: 10px;
    }

    .nav-links {
        gap: 2px;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 4px 10px;
    }
}

@media (max-width: 1100px) {
    .burger {
        display: block;
        order: 1;
    }

    .logo {
        order: 2;
    }

    .nav-links {
        display: none;
    }
}

/* ---------- Планшеты и телефоны ---------- */
@media (max-width: 900px) {
    :root {
        --section-gap: 4rem;
        --page-padding: 20px;
        --header-height: 48px;
        --gap-lg: 1.5rem;
        --fs-h2: 1.8rem;
    }

    body {
        width: 100%;
        overflow-x: hidden;
        overflow-x: clip;
    }

    .content-block {
        width: 100%;
        padding: 0;
    }

    nav {
        top: 10px;
        width: calc(100% - (var(--page-padding) * 2));
        padding: 0 1rem;
        border-radius: 50px;
        backdrop-filter: blur(8px) saturate(140%);
        -webkit-backdrop-filter: blur(8px) saturate(140%);
    }

    section {
        padding: var(--section-gap) var(--page-padding);
    }

    /* Свой курсор на тач-экранах не нужен */
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    body, a, button, input, textarea, select {
        cursor: auto !important;
    }

    /* --- Первый экран: карточка никогда не уезжает под шапку --- */
    section.video {
        min-height: 100vh;
        min-height: 100svh;
        padding: calc(var(--header-height) + 10px + 1.25rem) var(--page-padding) calc(6rem + env(safe-area-inset-bottom));
        align-items: flex-end;
        justify-content: center;
    }

    .about-content {
        max-width: 560px;
    }

    .video-loader {
        align-items: flex-start !important;
        padding-top: 15vh;
    }

    #loaderPercent {
        font-size: 20vw;
    }

    .glass-card {
        transform: none;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        text-align: center;
        width: 100%;
        margin-bottom: 2vh;
    }

    .glass-card ul {
        display: inline-block;
        text-align: left;
    }

    .glass-card:hover {
        transform: none;
    }

    /* --- Блок «боли»: картинка шире экрана, но пузыри с текстом целиком в кадре --- */
    .pain-section {
        height: auto;
        min-height: 0;
        padding: 3rem 0;
        display: block;
    }

    .svg-container {
        padding: 0;
        margin: 0;
        overflow-x: hidden;
        display: flex;
        justify-content: center;
    }

    .pain-section .svg-container {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: hidden !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .pain-section .svg-container .svg-layers {
        width: 108vw;
        min-width: 108vw;
        max-width: none;
        height: auto;
        flex-shrink: 0;
    }

    /* Полоса «ЗВОНИ СКОРЕЙ» заходит на низ картинки — в той же пропорции, что на компьютере */
    .marquee-burgundy {
        margin-top: calc(-3rem - 16vw);
    }

    .marquee-burgundy .track span {
        font-size: 1rem;
    }

    /* --- Услуги: на планшете две колонки вместо шести карточек в столбик --- */
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
        padding: 1rem 0;
    }

    .service-item {
        border-radius: 15px;
        aspect-ratio: 16 / 11;
    }

    .service-item::after {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
        align-items: flex-end;
        padding-bottom: 25px;
        font-size: 1.2rem;
        content: 'СМОТРЕТЬ';
    }

    .service-item:hover {
        transform: none;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .service-item:hover img {
        transform: none;
    }

    .service-modal-content img {
        opacity: 1;
        filter: grayscale(0%);
        max-height: 80vh;
        border-radius: 15px;
    }

    .service-modal-content img:hover {
        transform: none;
    }

    /* --- CTA «Хочешь так же?» ---
       flex: 1 1 450px в колонке задавал блоку высоту 450px — отсюда пустая дыра на телефоне */
    .cta-mid-container {
        grid-column: 1 / -1;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        padding: 2.5rem 1.5rem;
        margin-top: 1rem;
        text-align: center;
        border-radius: 20px;
        box-shadow: 6px 6px 0 var(--text-main);
    }

    .cta-mid-container:hover {
        transform: none;
        box-shadow: 6px 6px 0 var(--text-main);
    }

    .cta-mid-text {
        flex: 0 0 auto;
    }

    .cta-mid-text h3 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin-bottom: 0.75rem;
        line-height: 1.1;
    }

    .cta-mid-text p {
        max-width: 34em;
        margin: 0 auto;
        font-size: 1rem;
    }

    .btn-massive {
        width: 100%;
        max-width: 460px;
        padding: 1.1rem 1.25rem;
        font-size: clamp(0.95rem, 4.2vw, 1.1rem);
        line-height: 1.2;
        white-space: normal;
        text-align: center;
        gap: 10px;
    }

    /* --- Почему мы: три колонки на планшете --- */
    .stickers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem 1.25rem;
    }

    .sticker-card:nth-child(n) {
        justify-self: center;
    }

    .sticker-card h3 {
        font-size: 0.9rem;
    }

    /* --- Кейсы: на планшете сохраняем «бенто» 7/5 вместо одной колонки --- */
    .portfolio-grid {
        gap: var(--gap-sm);
    }

    .portfolio-item.col-8,
    .portfolio-item.col-6 {
        grid-column: span 7;
        height: 300px;
    }

    .portfolio-item.col-4 {
        grid-column: span 5;
        height: 300px;
    }

    /* --- Форма --- */
    .promo-cat-trigger {
        top: -30px;
        right: 0;
        width: 80px;
        height: 80px;
    }

    .modal-content {
        max-width: 90%;
        padding: 1.5rem;
        border-radius: 25px;
    }

    /* --- Контакты: заголовок «Где мы?» над картой, а не под ней --- */
    .contacts-wrapper {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .contacts-info {
        order: 1;
        width: 100%;
    }

    .map-container {
        order: 2;
        height: 320px;
        min-height: auto;
        width: 100%;
        border-radius: 20px;
    }

    .contact-group {
        gap: 1.25rem;
    }

    .contact-link.big-link {
        font-size: 1.5rem;
    }

    /* зоны нажатия 44px для телефона, почты и соцсетей */
    .contact-link {
        padding-block: 8px;
    }

    .social-minimal {
        gap: 0.5rem;
        margin-left: -6px;
    }

    .social-minimal a {
        width: 44px;
        height: 44px;
    }

    /* --- Виджеты --- */
    .scroll-progress-btn {
        left: 3px;
        bottom: 20px;
        width: var(--page-padding);
        background: transparent;
    }

    .float-cta {
        bottom: 20px;
        right: var(--page-padding);
        z-index: 1;
    }

    .float-cta > span {
        padding: 14px 24px;
        font-size: 0.9rem;
    }

    .marquee-partners-white {
        padding: 0.5rem 0;
    }

    .partners-track {
        gap: 1.5rem;
        width: fit-content;
        animation-duration: 90s !important;
    }

    .partner-logo {
        max-width: 120px;
        max-height: 50px;
        opacity: 0.85;
    }

    /* --- Подвал --- */
    .spotlight-wrapper {
        min-height: auto;
        height: auto;
        padding: 2rem 0 3rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .spotlight-text {
        line-height: 0.75;
    }

    .site-footer {
        padding: 1.5rem var(--page-padding) calc(5.5rem + env(safe-area-inset-bottom));
        font-size: 0.78rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0;
        max-width: 100%;
    }

    .footer-links a,
    .footer-links button {
        padding: 8px 0;
    }
}

/* ---------- Телефоны ---------- */
@media (max-width: 600px) {
    /* Картинка шире экрана (иначе текст в пузырях мелкий), сдвинута так,
       чтобы крайние пузыри не обрезались */
    .pain-section .svg-container .svg-layers {
        width: 136vw;
        min-width: 136vw;
        position: relative;
        left: 2.7vw;
    }

    .marquee-burgundy {
        margin-top: calc(-3rem - 20vw);
    }

    /* «Глаза»: подпись крупнее на 16% */
    .eyes-section .svg-layers {
        width: 116vw;
        margin-left: -8vw;
    }

    .services-grid {
        grid-template-columns: 1fr !important;
    }

    .service-item {
        aspect-ratio: 16 / 10;
    }

    /* Почему мы: две колонки, девятая карточка по центру (раньше её просто скрывали) */
    .stickers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1rem;
    }

    .stickers-grid .sticker-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        width: calc((100% - 1rem) / 2);
    }

    .portfolio-item.col-8,
    .portfolio-item.col-6,
    .portfolio-item.col-4 {
        grid-column: span 12;
        height: 280px;
    }

    .project-info {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    .project-info h3 {
        font-size: 1.25rem;
    }

    /* Форма: кот-промокод больше не наезжает на заголовки */
    #order .section-title {
        padding-right: 64px;
    }

    .form-container {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 24px;
    }

    #mainFormWrapper > h3 {
        padding-right: 52px;
    }

    .promo-cat-trigger {
        top: -36px;
        right: -6px;
        width: 72px;
        height: 72px;
    }

    .form-group label {
        font-size: 1rem;
    }

    .consent-check {
        font-size: 0.9rem;
    }
}

/* ---------- Маленькие телефоны (320–380px) ---------- */
@media (max-width: 380px) {
    :root {
        --page-padding: 16px;
        --fs-h2: 1.6rem;
    }

    .logo {
        font-size: 1.15rem;
        gap: 8px;
    }

    .logo img {
        height: 26px;
    }

    .glass-card {
        padding: 1.5rem 1.25rem;
    }

    .cta-mid-container {
        padding: 2rem 1.25rem;
    }

    .form-container {
        padding-inline: 1rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .contact-link.big-link {
        font-size: 1.35rem;
    }
}

/* ---------- Тач-экраны: эффекты наведения не «залипают» после касания ---------- */
@media (hover: none) {
    /* Чёрно-белые кейсы окрашиваются при наведении мыши; на телефоне наведения нет —
       показываем сразу в цвете */
    .portfolio-item img,
    .portfolio-item:hover img {
        filter: none;
        transform: none;
    }

    .portfolio-item:hover {
        transform: none;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

    .portfolio-item:hover .project-info {
        transform: translateY(5px);
    }

    .partner-logo:hover {
        filter: grayscale(100%) opacity(0.6) contrast(1.1);
        transform: none;
    }

    .btn-glass:hover,
    .btn-massive:hover {
        transform: none;
    }
}

/* Телефоны (и телефоны в альбомной ориентации): плавающая «ЗАКАЗАТЬ» появляется после первого экрана —
   на маленьком экране она перекрывала кнопку «Смотреть работы» в карточке «Кто мы?» */
@media (max-width: 600px), (max-height: 500px) {
    .float-cta {
        opacity: 0;
        transform: translateY(16px);
        pointer-events: none;
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .float-cta.is-shown {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
}

/* Без серой вспышки при касании у элементов со своей анимацией нажатия */
.service-item,
.portfolio-item,
.sticker-card,
.promo-cat-trigger,
.float-cta,
.btn-submit,
.btn-massive,
.btn-glass {
    -webkit-tap-highlight-color: transparent;
}

/* ---------- Фокус с клавиатуры ----------
   Раньше у кнопок закрытия и полей было outline: none — с клавиатуры не было видно, где фокус */
:where(a, button, [role="button"], select, summary, .burger):focus-visible {
    outline: 3px solid var(--text-main);
    outline-offset: 3px;
}

:where(.site-footer, .portfolio-lightbox, #serviceModal, nav.nav-on-video, .marquee-container) :where(a, button):focus-visible,
.float-cta:focus-visible,
.unified-close-btn:focus-visible {
    outline: 3px solid var(--yellow-bg);
    outline-offset: 3px;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
    border-bottom-color: var(--purple-strip);
    box-shadow: 0 2px 0 0 var(--purple-strip);
}

/* =========================================
   10. ANIMATIONS (KEYFRAMES)
   ========================================= */
@keyframes shimmer-flow {
    0% {
        background-position: 0 100%;
    }
    100% {
        background-position: 0 0;
    }
}

@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   11. СОГЛАСИЕ НА ОБРАБОТКУ ПД В ФОРМАХ
   ========================================= */
.consent-block {
    margin: 0.75rem 0 1.25rem;
}

.consent-check {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: var(--font-body), sans-serif;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-main);
    text-transform: none;
}

.consent-check input {
    position: absolute;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    margin: 0;
    opacity: 0;
    z-index: 1;
}

.consent-box {
    position: relative;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    margin-top: -2px;
    background: var(--white-bg);
    border: 2px solid var(--text-main);
    border-radius: 7px;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.consent-box::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 2px;
    width: 7px;
    height: 13px;
    border: solid var(--white-bg);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
}

.consent-check input:checked + .consent-box {
    background: var(--text-main);
}

.consent-check input:checked + .consent-box::after {
    transform: rotate(45deg) scale(1);
}

.consent-check input:focus-visible + .consent-box {
    outline: 3px solid var(--purple-strip);
    outline-offset: 2px;
}

.consent-text a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.consent-text a:hover {
    color: var(--purple-strip);
}

.consent-error {
    display: none;
    margin: 8px 0 0 38px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pain-strip);
}

.consent-block.is-invalid .consent-box {
    border-color: var(--pain-strip);
    box-shadow: 0 0 0 3px rgba(156, 4, 4, 0.25);
    animation: consent-shake 0.35s ease;
}

.consent-block.is-invalid .consent-error {
    display: block;
}

.form-policy-link {
    margin: 14px 0 0;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-policy-link a {
    color: var(--text-main);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-policy-link a:hover {
    color: var(--purple-strip);
}

@keyframes consent-shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-4px);
    }
    75% {
        transform: translateX(4px);
    }
}


/* =========================================
   12. ЗАГРУЗКА КАРТИНОК В МОДАЛКЕ И ЛАЙТБОКСЕ
   ========================================= */
.service-modal-content.is-loading::after,
.lightbox-image-wrapper.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--yellow-bg);
    border-radius: 50%;
    animation: img-spin 0.8s linear infinite;
}

.lightbox-image-wrapper {
    position: relative;
}

@keyframes img-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .float-cta::before,
    .float-cta > span::after,
    .text-shimmer,
    .promo-cat-trigger,
    .cat-badge,
    .track,
    .partners-track {
        animation: none !important;
    }
}
