/* ==========================================================================
   ELLIPSE DESIGN — стили сайта
   Локальные шрифты (без внешних CDN): Unbounded (display), Manrope (текст)
   ========================================================================== */

/* ---------- Шрифты (self-hosted) ---------- */
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/unbounded-cyrillic-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/unbounded-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/unbounded-cyrillic-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/unbounded-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/unbounded-cyrillic-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/unbounded-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/unbounded-cyrillic-800-normal.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap; unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/unbounded-latin-800-normal.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/unbounded-cyrillic-900-normal.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap; unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/unbounded-latin-900-normal.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-cyrillic-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-cyrillic-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-cyrillic-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-cyrillic-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-cyrillic-800-normal.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap; unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-latin-800-normal.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

/* ---------- Токены ---------- */
:root {
  --navy: #0C1134;
  --navy-deep: #080a24;
  --navy-soft: #171c47;
  --blue: #2356D9;
  --blue-bright: #4B7BFF;
  --white: #ffffff;
  --off-white: #F3F4FA;
  --ink: #10122a;
  --muted: #666b87;
  --muted-on-dark: #9296b8;
  --line: #E3E5F1;
  --line-on-dark: rgba(255, 255, 255, 0.12);

  --font-display: 'Unbounded', 'Arial Narrow', sans-serif;
  --font-body: 'Manrope', Arial, sans-serif;

  --container: 1240px;
  --pad: clamp(20px, 5vw, 64px);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Сброс ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}
.section--dark .eyebrow { color: var(--blue-bright); }

.section {
  padding: clamp(56px, 7.5vw, 108px) 0;
}
.section--light { background: var(--white); }
.section--off { background: var(--off-white); }
.section--dark { background: var(--navy); color: var(--white); }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 4.5vw, 56px);
}
.section-head h2 {
  font-size: clamp(32px, 4.2vw, 52px);
  margin-top: 14px;
}
.section-head p {
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
  max-width: 52ch;
}
.section--dark .section-head p { color: var(--muted-on-dark); }

/* ---------- Sparkle signature element ---------- */
.sparkle {
  display: inline-block;
  width: 1em; height: 1em;
}
.sparkle svg { width: 100%; height: 100%; }

/* ---------- Кнопки ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); position: relative; z-index: 2; }
.btn > * { position: relative; z-index: 2; }

/* Переливающийся ховер — только у главной кнопки действия (primary) */
.btn--primary {
  --mx: 50%; --my: 50%;
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(35, 86, 217, 0.25);
  animation: btnPulse 3.2s ease-in-out infinite;
}
.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: radial-gradient(120px circle at var(--mx) var(--my), rgba(255,255,255,0.5), transparent 70%);
  transition: opacity 0.35s ease;
}
.btn--primary:hover::before { opacity: 1; }
.btn--primary:hover { background: var(--blue-bright); box-shadow: 0 12px 36px rgba(75, 123, 255, 0.5); animation-play-state: paused; }
.btn--primary:hover svg { transform: translate(3px, -3px); }

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(35, 86, 217, 0.25), 0 0 0 0 rgba(75, 123, 255, 0.45); }
  50% { box-shadow: 0 8px 24px rgba(35, 86, 217, 0.25), 0 0 0 10px rgba(75, 123, 255, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .btn--primary { animation: none; }
}

.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }

.section--dark .btn--ghost,
.hero .btn--ghost {
  border-color: rgba(255,255,255,0.28);
  color: var(--white);
  background: rgba(255,255,255,0.04);
}
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover {
  border-color: var(--blue-bright);
  color: var(--white);
  background: rgba(75,123,255,0.14);
}

.btn--light {
  background: var(--white);
  color: var(--navy);
}
.btn--light:hover { box-shadow: 0 10px 30px rgba(255,255,255,0.25); background: var(--off-white); }
.btn--light:hover svg { transform: translate(3px, -3px); }

/* Кнопки в хедере на тёмной подложке — тоже не должны сливаться с фоном */
.header__cta .btn--ghost {
  border-color: rgba(255,255,255,0.3);
  color: var(--white);
  background: rgba(255,255,255,0.05);
}
.header__cta .btn--ghost:hover {
  border-color: var(--blue-bright);
  background: rgba(75,123,255,0.16);
}

/* Ghost-кнопки на синем градиенте (cta-band) — свой контраст для ховера */
.btn--on-gradient {
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
  background: rgba(255,255,255,0.06);
}
.btn--on-gradient:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,0.18);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 16px; left: 16px; right: 16px;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.header.is-hidden {
  transform: translateY(-130%);
  opacity: 0;
}
.header__inner {
  pointer-events: auto;
  width: 100%;
  max-width: var(--container);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 10px 10px 20px;
  border-radius: 999px;
  background: rgba(12, 17, 52, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}
.header.is-scrolled .header__inner {
  background: rgba(9, 12, 38, 0.92);
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.header__logo { display: flex; align-items: center; gap: 10px; padding-left: 6px; }
.header__logo img, .header__logo .inline-logo { height: 34px; width: auto; }

.header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header__nav a {
  position: relative;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.78);
  border-radius: 999px;
  transition: color 0.25s ease;
}
.header__nav a::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 6px;
  height: 1px;
  background: var(--blue-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.header__nav a:hover { color: var(--white); }
.header__nav a:hover::after { transform: scaleX(1); }
.header__nav a.is-active { color: var(--white); }

.header__cta { display: flex; align-items: center; gap: 10px; }
.header__cta .btn { padding: 12px 22px; font-size: 14px; }

.header__burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  color: var(--white);
}
.header__burger svg { width: 18px; height: 18px; }

/* Мобильное меню */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--white);
  padding: 14px 0;
  border-bottom: 1px solid var(--line-on-dark);
}
.mobile-nav__contacts { margin-top: 32px; display: flex; gap: 16px; }
.mobile-nav__contacts a { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--blue-bright); border: none; padding: 0; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  padding-top: 108px;
  padding-bottom: 48px;
}

/* Статичный фон — мраморная текстура, без параллакса */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg picture,
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
/* лёгкое затемнение снизу и слева, чтобы текст всегда читался поверх узора */
.hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,10,36,0.35) 0%, rgba(8,10,36,0.55) 60%, rgba(8,10,36,0.88) 100%),
    linear-gradient(90deg, rgba(8,10,36,0.55) 0%, rgba(8,10,36,0.15) 45%, transparent 70%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 28px;
}
.hero__badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #35D07F;
  box-shadow: 0 0 0 3px rgba(53,208,127,0.2);
}

.hero h1 {
  font-size: clamp(44px, 8vw, 104px);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line span { display: block; }
/* Контурный акцент без text-stroke: он рвёт засечки жирного геометричного шрифта.
   Вместо этого — заливка цветом фона + многослойный text-shadow по контуру буквы. */
.hero h1 .accent {
  color: var(--navy-deep);
  text-shadow:
    1.5px 0 0 var(--blue-bright),
    -1.5px 0 0 var(--blue-bright),
    0 1.5px 0 var(--blue-bright),
    0 -1.5px 0 var(--blue-bright),
    1.1px 1.1px 0 var(--blue-bright),
    -1.1px 1.1px 0 var(--blue-bright),
    1.1px -1.1px 0 var(--blue-bright),
    -1.1px -1.1px 0 var(--blue-bright);
}

.hero__sub {
  margin-top: 22px;
  max-width: 46ch;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted-on-dark);
}

.hero__actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero__stats {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: clamp(24px, 4vw, 56px);
}
.hero__stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  overflow-wrap: break-word;
}
.hero__stats .stat span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted-on-dark);
}

.hero__scroll {
  position: absolute;
  left: var(--pad); bottom: 36px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted-on-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero__scroll-mouse {
  flex-shrink: 0;
  width: 22px; height: 34px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 12px;
  position: relative;
}
.hero__scroll-mouse::after {
  content: '';
  position: absolute;
  left: 50%; top: 6px;
  width: 3px; height: 6px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--blue-bright);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Tools strip ---------- */
.tools {
  background: var(--navy-deep);
  padding: 26px 0;
  border-top: 1px solid var(--line-on-dark);
}
.tools__inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  flex-wrap: wrap;
}
.tools__label {
  font-size: 13px;
  color: var(--muted-on-dark);
  font-weight: 600;
  white-space: nowrap;
}
.tools__list {
  display: flex;
  gap: clamp(20px, 4vw, 44px);
  flex-wrap: wrap;
}
.tools__list span {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  transition: color 0.3s ease;
}
.tools__list span:hover { color: var(--white); }

/* ---------- Категории ---------- */
.cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.cat-card {
  position: relative;
  padding: 36px 28px 84px 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}
.cat-card:hover {
  transform: translateY(-6px);
  border-color: var(--blue);
  box-shadow: 0 20px 50px rgba(12,17,52,0.1);
}
.cat-card__icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  transition: background-color 0.4s ease, transform 0.4s var(--ease);
}
.cat-card__icon svg { width: 24px; height: 24px; color: var(--white); }
.cat-card:hover .cat-card__icon { background: var(--blue); transform: rotate(-8deg); }

.cat-card h3 { font-size: 21px; margin-bottom: 10px; }
.cat-card p { color: var(--muted); font-size: 15px; max-width: 40ch; }

.cat-card__num {
  position: absolute;
  top: 28px; right: 30px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--line);
  font-weight: 700;
}

.cat-card__link {
  position: absolute;
  bottom: 28px; right: 28px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
  z-index: 2;
}
.cat-card__link svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.cat-card__link:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  transform: translate(2px, -2px) scale(1.06);
  box-shadow: 0 8px 20px rgba(35,86,217,0.3);
}
.cat-card__link:hover svg { transform: translate(2px,-2px); }
.cat-card__link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.cat-card--soon {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: var(--off-white);
  border-style: dashed;
  color: var(--muted);
}
.cat-card--soon h3 { color: var(--muted); }

/* ---------- Работы: фильтры, карусель, карточки ---------- */
.works-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.filter-pill {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s ease;
}
.filter-pill:hover { border-color: var(--blue); color: var(--blue); }
.filter-pill.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }

.works-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.works-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.works-track::-webkit-scrollbar { display: none; }

.works-nav {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  background: var(--white);
  transition: all 0.25s ease;
}
.works-nav svg { width: 18px; height: 18px; }
.works-nav:hover { border-color: var(--blue); color: var(--blue); background: var(--off-white); }
.works-nav:disabled { opacity: 0.35; pointer-events: none; }

.work-card {
  position: relative;
  flex: 0 0 clamp(240px, 30vw, 320px);
  min-width: 0;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: linear-gradient(155deg, var(--navy) 0%, var(--blue) 130%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  padding: 26px;
  isolation: isolate;
  cursor: pointer;
  border: none;
  text-align: left;
  transition: transform 0.5s var(--ease);
}
.work-card:hover { transform: translateY(-8px); }
.work-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.16), transparent 55%);
  z-index: 0;
}
.work-card__cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.work-card__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: auto;
  position: relative; z-index: 1;
  width: 100%;
}
.work-card__tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.14);
  padding: 6px 12px;
  border-radius: 999px;
}
.work-card h4 {
  position: relative; z-index: 1;
  width: 100%;
  color: var(--white);
  font-size: 20px;
  margin-top: 20px;
  overflow-wrap: break-word;
  word-break: break-word;
}
.work-card p {
  position: relative; z-index: 1;
  width: 100%;
  color: rgba(255,255,255,0.65);
  font-size: 13.5px;
  margin-top: 6px;
  overflow-wrap: break-word;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-card__ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 0;
}
.work-card__ph svg { width: 30%; height: 30%; opacity: 0.14; }

.works-empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  width: 100%;
}

.works-note {
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Модалка кейса ---------- */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.case-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0s;
}
.case-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 10, 36, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.case-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.4s var(--ease);
}
.case-modal.is-open .case-modal__dialog { transform: scale(1) translateY(0); }

.case-modal__close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 3;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(12,17,52,0.55);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background-color 0.25s ease;
}
.case-modal__close:hover { background: rgba(35,86,217,0.85); }
.case-modal__close svg { width: 16px; height: 16px; }

.case-modal__gallery {
  position: relative;
  background: var(--navy);
  aspect-ratio: 1;
  min-height: 420px;
  overflow: hidden;
  /* Разрешаем браузеру только вертикальный скролл/жесты; горизонтальный свайп
     остаётся полностью в руках JS (листание фото), не блокируется браузером */
  touch-action: pan-y;
  user-select: none;
}
@media (hover: hover) and (pointer: fine) {
  .case-modal__gallery { cursor: grab; }
  .case-modal__gallery:active { cursor: grabbing; }
}
.case-modal__slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s var(--ease);
}
.case-modal__slides img {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  object-fit: cover;
}
.case-modal__slides .case-modal__ph {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--navy) 0%, var(--blue) 130%);
}
.case-modal__slides .case-modal__ph--alt {
  background: linear-gradient(155deg, var(--navy-soft) 0%, var(--blue-bright) 140%);
}
.case-modal__ph svg { width: 22%; height: 22%; opacity: 0.18; color: var(--white); }

/* Стрелки-навигация: показываются только там, где есть мышь (courser с hover),
   на тач-устройствах скрыты — там фото листаются свайпом, стрелки бы только мешали жесту. */
.case-modal__nav {
  position: absolute;
  top: 50%;
  margin-top: -21px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--navy);
  display: none;
  align-items: center; justify-content: center;
  transition: background-color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
  z-index: 2;
  opacity: 0;
}
.case-modal__nav svg { width: 17px; height: 17px; }
.case-modal__nav:hover { background: var(--white); transform: scale(1.06); }
.case-modal__nav--prev { left: 16px; }
.case-modal__nav--next { right: 16px; }
.case-modal__nav[hidden] { display: none !important; }

@media (hover: hover) and (pointer: fine) {
  .case-modal__nav { display: flex; }
  .case-modal__gallery:hover .case-modal__nav { opacity: 1; }
}

.case-modal__dots {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 7px;
  padding: 6px 4px;
  z-index: 2;
}
.case-modal__dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.case-modal__dots span.is-active { background: var(--white); transform: scale(1.2); }

.case-modal__counter {
  position: absolute;
  right: 16px; bottom: 16px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(8,10,36,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.case-modal__info {
  padding: clamp(32px, 4.4vw, 52px);
  display: flex;
  flex-direction: column;
}
.case-modal__info h3 {
  font-size: clamp(24px, 2.8vw, 32px);
  margin-bottom: 14px;
}
.case-modal__tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.case-modal__tags span {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  color: var(--muted);
}
.case-modal__info p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  flex: 1;
}
.case-modal__actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.case-modal__cta { align-self: auto; margin-top: 0; }

/* Второстепенная ссылка на Behance — правее акцентной кнопки, визуально тише */
.case-modal__link-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 2px;
  transition: color 0.25s ease;
}
.case-modal__link-secondary svg {
  width: 13px; height: 13px;
  transition: transform 0.3s var(--ease);
}
.case-modal__link-secondary:hover { color: var(--ink); }
.case-modal__link-secondary:hover svg { transform: translate(2px, -2px); }

@media (max-width: 760px) {
  .case-modal__dialog { grid-template-columns: 1fr; }
  .case-modal { padding: 0; align-items: flex-end; }
  .case-modal__dialog { max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .case-modal__gallery { aspect-ratio: 4/3; min-height: 0; }
}

/* ---------- Процесс ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  border-top: 1px solid var(--line);
}
.process-step {
  padding: 26px 28px 32px 28px;
  border-right: 1px solid var(--line);
}
.process-step:first-child { padding-left: 0; }
.process-step:last-child { border-right: none; }
.process-step__num {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--blue);
  font-weight: 700;
}
.process-step h4 {
  font-size: 19px;
  margin-top: 14px;
  margin-bottom: 10px;
}
.process-step p { color: var(--muted); font-size: 14.5px; }

/* ---------- CTA band ---------- */
/* Секция-обёртка с формой — компактный отступ сверху (ближе к предыдущему блоку) и уменьшенный снизу.
   Используется одинаково на index.html и price.html, поэтому вынесено из inline-style в класс. */
.section--contact { padding-top: clamp(28px, 4vw, 52px); padding-bottom: 40px; }

.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  margin: 0 var(--pad);
  padding: clamp(40px, 6.5vw, 72px) clamp(24px, 6vw, 72px);
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 160%);
  color: var(--white);
  overflow: hidden;
  text-align: center;
}
.cta-band h2 {
  position: relative; z-index: 1;
  font-size: clamp(30px, 4.6vw, 54px);
  max-width: 18ch; margin: 0 auto;
}
.cta-band p {
  position: relative; z-index: 1;
  margin-top: 16px;
  color: rgba(255,255,255,0.75);
  font-size: 17px;
}
.cta-band__actions {
  position: relative; z-index: 1;
  margin-top: 28px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Форма обсуждения проекта (заготовка) ---------- */
/* Карточка меняет размер (open) и меняет видимую грань через fade+scale.
   Полноценный 3D-flip несовместим с одновременным изменением width/height —
   так что здесь разворот сделан как мягкий кроссфейд между гранями. */
.order-widget {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
}
.order-card {
  position: relative;
  width: 240px;
  height: 64px;
  overflow: hidden;
  transition: width 0.42s var(--ease), height 0.42s var(--ease);
}
.order-card.is-open {
  width: min(480px, 90vw);
  height: 460px;
}
.order-card__face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
}
.order-card__front {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  /* Единый таймер с ресайзом блока: кнопка проявляется синхронно со сжатием, без разрыва по времени */
  transition: opacity 0.42s var(--ease), visibility 0s;
}
.order-card__front:hover { background: var(--off-white); }
.order-card__front svg { width: 18px; height: 18px; }
.order-card.is-open .order-card__front {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Кнопка гаснет тем же темпом, что растёт блок — становится hidden только когда уже невидима */
  transition: opacity 0.42s var(--ease), visibility 0s linear 0.42s;
}

.order-card__back {
  background: var(--navy);
  color: var(--white);
  padding: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97);
  /* Закрытие: форма гаснет тем же темпом и в то же окно времени, что и сжатие блока — без ранней пустой паузы */
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease), visibility 0s linear 0.42s;
}
.order-card.is-open .order-card__back {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  /* Открытие: форма проявляется с той же секунды и тем же темпом, что растёт блок */
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease), visibility 0s;
}

/* Подсветка формы при переходе с прайса: короткая пульсация обводки, чтобы привлечь внимание к форме,
   в которую только что "прилетел" выбор услуги, без назойливого мигания */
.order-card.is-highlighted .order-card__back {
  animation: orderCardHighlight 1.1s ease-out;
}
@keyframes orderCardHighlight {
  0% { box-shadow: 0 30px 60px rgba(0,0,0,0.35), 0 0 0 0 rgba(75,123,255,0.55); }
  35% { box-shadow: 0 30px 60px rgba(0,0,0,0.35), 0 0 0 6px rgba(75,123,255,0.35); }
  100% { box-shadow: 0 30px 60px rgba(0,0,0,0.35), 0 0 0 0 rgba(75,123,255,0); }
}
@media (prefers-reduced-motion: reduce) {
  .order-card.is-highlighted .order-card__back { animation: none; }
}

.order-card__back h4 { font-size: 19px; margin-bottom: 6px; padding-right: 44px; }
.order-card__back p { font-size: 13.5px; color: var(--muted-on-dark); margin-bottom: 18px; }

.order-card__close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  transition: background-color 0.2s ease;
}
.order-card__close svg { width: 14px; height: 14px; }
.order-card__close:hover { background: rgba(255,255,255,0.18); }

.order-form { display: flex; flex-direction: column; gap: 12px; }
.order-form input, .order-form textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-on-dark);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14.5px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.order-form input::placeholder, .order-form textarea::placeholder { color: var(--muted-on-dark); }
.order-form input:focus, .order-form textarea:focus {
  outline: none;
  border-color: var(--blue-bright);
  background: rgba(75,123,255,0.08);
}
.order-form textarea { resize: none; min-height: 74px; }
.order-form__submit {
  margin-top: 4px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 14.5px;
  text-align: center;
  transition: background-color 0.25s ease;
}
.order-form__submit:hover { background: var(--blue-bright); }
.order-form__note {
  margin-top: auto;
  padding-top: 12px;
  font-size: 12px;
  color: var(--muted-on-dark);
  text-align: center;
}

@media (max-width: 480px) {
  .order-card, .order-card.is-open { max-width: 100%; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-deep);
  color: var(--white);
  padding: 56px 0 28px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer__brand img, .footer__brand .inline-logo { height: 40px; margin-bottom: 20px; }
.footer__brand p { color: var(--muted-on-dark); max-width: 34ch; font-size: 14.5px; }

.footer__col h5 {
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-on-dark);
  margin-bottom: 18px;
}
.footer__col a, .footer__col span {
  display: block;
  padding: 7px 0;
  font-size: 15px;
  color: rgba(255,255,255,0.82);
  transition: color 0.25s ease;
  width: fit-content;
}
.footer__col a:hover { color: var(--blue-bright); }
.footer__contact-link {
  display: flex !important;
  align-items: center;
  gap: 10px;
}
.footer__contact-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.footer__contact-link:hover svg { opacity: 1; }

.footer__bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted-on-dark);
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-group] > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .process-step:nth-child(2) { border-right: none; }
  .process-step:nth-child(odd) { padding-left: 0; }
  .process-step:nth-child(3), .process-step:nth-child(4) { border-top: 1px solid var(--line); padding-top: 32px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .header__nav a { padding: 10px 11px; font-size: 13.5px; }
}

@media (max-width: 1100px) {
  .header__cta .btn--ghost:not(.header__cta-write) { display: none; }
}

@media (max-width: 860px) {
  .header__nav, .header__cta { display: none; }
  .header__burger { display: flex; }
  .header__inner { padding: 8px 8px 8px 18px; }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  /* На узких экранах статистика переходит на 2 строки и подходит вплотную к низу hero —
     скрываем подсказку "Листайте вниз", чтобы она не наезжала на текст статистики */
  .hero__scroll { display: none; }
}

@media (max-width: 640px) {
  .cats { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .process-step { border-right: none !important; padding: 28px 0 36px 0 !important; border-top: 1px solid var(--line); }
  .process-step:first-child { border-top: none; }
  .process-step:last-child { padding-bottom: 0 !important; }
  .hero__actions .btn { flex: 1; justify-content: center; }
  .cta-band { margin: 0 12px; }
  .work-card { flex-basis: 78vw; }
  /* На мобильном стрелки карусели съедали ширину у карточек и обрезали их по бокам —
     убираем стрелки, листается свайпом (это и так естественный жест на телефоне) */
  .works-nav { display: none; }
  .works-carousel { gap: 0; }
  .works-track { scroll-padding-left: var(--pad); margin: 0 calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad); }
}

/* ---------- Внутренние страницы (прайс и т.п.): компактный баннер вместо полноэкранного hero ---------- */
.page-hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  padding: clamp(140px, 20vw, 176px) 0 clamp(48px, 7vw, 72px);
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero__bg picture, .page-hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.page-hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,10,36,0.55) 0%, rgba(8,10,36,0.82) 100%),
    linear-gradient(90deg, rgba(8,10,36,0.55) 0%, rgba(8,10,36,0.1) 55%, transparent 75%);
}
.page-hero__content { position: relative; z-index: 1; }
.page-hero .eyebrow { color: var(--blue-bright); margin-bottom: 14px; }
.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  text-transform: uppercase;
}
.page-hero p {
  margin-top: 16px;
  max-width: 56ch;
  color: var(--muted-on-dark);
  font-size: clamp(15px, 1.4vw, 17px);
}

/* ---------- Прайс-лист ---------- */
.price-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}
.price-category {
  margin-bottom: clamp(40px, 6vw, 64px);
}
.price-category:last-child { margin-bottom: 0; }
.price-category__head {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.price-category__head h2 {
  font-size: clamp(22px, 2.6vw, 30px);
}
.price-category__desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  max-width: 60ch;
}
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.price-card {
  display: block;
  width: 100%;
  padding: 24px 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease);
}
.price-card:hover {
  border-color: var(--blue);
  box-shadow: 0 16px 40px rgba(12,17,52,0.08);
  transform: translateY(-3px);
}
.price-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.price-card__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.price-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16.5px;
  max-width: 30ch;
}
.price-card__value {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--blue);
  white-space: nowrap;
}
.price-card__desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.price-note {
  margin-top: 40px;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--off-white);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.price-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--blue); }

@media (max-width: 640px) {
  .price-grid { grid-template-columns: 1fr; }
}
