/* ============================================================
   LUMEN DESIGN — visual system
   Уголь (charcoal) · Оранжевый (ember) · Жемчуг (pearl)
   ============================================================ */

@font-face {
  font-family: 'Clash Display';
  src: url('ClashDisplay-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* — уголь — */
  --coal-950: #070708;
  --coal-900: #0b0b0d;
  --coal-850: #0f0f12;
  --coal-800: #131316;
  --coal-700: #1a1a1e;
  --bg: var(--coal-900);

  /* — жемчуг — */
  --pearl: #f3efe8;
  --pearl-bright: #ffffff;
  --pearl-deep: #d9d2c6;
  --text: var(--pearl);
  --muted: rgba(243, 239, 232, 0.68);
  --muted-soft: rgba(243, 239, 232, 0.46);
  --muted-faint: rgba(243, 239, 232, 0.28);

  /* — оранжевый — */
  --accent: #ff7a1a;
  --accent-hi: #ffb067;
  --accent-lo: #d8500a;
  --accent-glow: rgba(255, 122, 26, 0.36);

  /* — линии и поверхности — */
  --line: rgba(243, 239, 232, 0.09);
  --line-strong: rgba(243, 239, 232, 0.16);
  --line-accent: rgba(255, 122, 26, 0.42);
  --surface: rgba(243, 239, 232, 0.05);

  --shadow: 0 26px 70px -24px rgba(0, 0, 0, 0.85);
  --shadow-lift: 0 34px 80px -26px rgba(0, 0, 0, 0.9);

  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;

  --container: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: 'Clash Display', 'Onest', sans-serif;
  --font-head: 'Onest', 'Golos Text', sans-serif;
  --font-body: 'Golos Text', 'Onest', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(255, 122, 26, 0.55) rgba(243, 239, 232, 0.04);
  scrollbar-width: thin;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  margin-top: 0;
}

p,
blockquote {
  margin-top: 0;
}

/* ============================================================
   Атмосфера: видео, свечение, зерно
   ============================================================ */

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.bg-video-wrapper {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--coal-950);
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
  transform-origin: center;
  filter: saturate(0.82) contrast(1.04) brightness(1.14);
}

/* Глубина: угольная заливка + тёплое свечение + виньетка */
.bg-video-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 60% at 12% 2%, rgba(255, 122, 26, 0.17), transparent 58%),
    radial-gradient(70% 50% at 92% 22%, rgba(255, 122, 26, 0.08), transparent 60%),
    linear-gradient(
      180deg,
      rgba(7, 7, 8, 0.44) 0%,
      rgba(9, 9, 11, 0.58) 34%,
      rgba(11, 11, 13, 0.72) 72%,
      rgba(11, 11, 13, 0.82) 100%
    );
}

/* Вторая виньетка — прижимает края в уголь */
.bg-video-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(125% 95% at 50% 42%, transparent 38%, rgba(7, 7, 8, 0.55) 100%);
}

/* Плёночное зерно поверх всей сцены */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ============================================================
   Стекло — угольное, а не молочное
   ============================================================ */

.liquid-glass {
  position: relative;
  background:
    linear-gradient(180deg, rgba(243, 239, 232, 0.075), rgba(243, 239, 232, 0.018) 46%),
    rgba(12, 12, 14, 0.52);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    var(--shadow);
  backdrop-filter: blur(26px) saturate(135%);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
}

.accent-glass {
  background:
    linear-gradient(155deg, rgba(255, 122, 26, 0.2) 0%, rgba(255, 122, 26, 0.04) 42%, transparent 72%),
    linear-gradient(180deg, rgba(243, 239, 232, 0.06), rgba(243, 239, 232, 0.015)),
    rgba(12, 12, 14, 0.56);
  border-color: rgba(255, 122, 26, 0.22);
}

.secondary-glass {
  background:
    linear-gradient(180deg, rgba(243, 239, 232, 0.05), rgba(243, 239, 232, 0.012)),
    rgba(10, 10, 12, 0.5);
}

/* ============================================================
   Шапка
   ============================================================ */

.site-header {
  position: fixed;
  top: 18px;
  left: 0;
  width: 100%;
  z-index: 40;
  pointer-events: none;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-radius: 999px;
  padding: 0 12px 0 24px;
  pointer-events: auto;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--pearl);
  transition: color 0.3s var(--ease);
}

.logo:hover {
  color: var(--accent-hi);
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.94rem;
  padding-bottom: 4px;
  transition: color 0.28s var(--ease);
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.45s var(--ease);
}

.nav a:hover,
.nav a.is-active {
  color: var(--pearl);
}

.nav a.is-active {
  color: var(--accent-hi);
}

.nav a:hover::after,
.nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.header-cta {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--coal-950);
  background: linear-gradient(180deg, var(--accent-hi), var(--accent) 58%, var(--accent-lo));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 10px 26px -8px var(--accent-glow);
  transition: box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

.header-cta:hover {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 14px 34px -8px rgba(255, 122, 26, 0.55);
}

/* ============================================================
   Типографика
   ============================================================ */

h1 {
  font-weight: 800;
  font-size: clamp(2.85rem, 6.2vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  max-width: 17ch;
  margin: 0;
}

h2 {
  font-weight: 800;
  font-size: clamp(2rem, 3.9vw, 3.7rem);
  line-height: 1;
  letter-spacing: -0.042em;
  margin-bottom: 0;
}

h3 {
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}

/* Приглушённая часть заголовка — задаёт ритм «тише → громче» */
.hl-soft {
  font-weight: 500;
  color: var(--muted-soft);
  -webkit-text-fill-color: var(--muted-soft);
}

/* Оранжевый градиент на ключевом слове */
.hl-accent {
  background-image: linear-gradient(96deg, var(--accent-hi) 0%, var(--accent) 46%, var(--accent-lo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* Отрицательный трекинг заголовков сужает строчный бокс спана, и правый край
     последней буквы выходит за его фон — там проступает белый градиент родителя.
     Расширяем область заливки, компенсируя отступ отрицательным margin,
     чтобы вёрстка не сдвинулась. */
  padding-right: 0.12em;
  margin-right: -0.12em;
}

/* Перелив жемчуга по крупным заголовкам */
.hero h1,
.section-intro h2,
.contact-lead h2,
.services-feature-copy h3,
.manifesto-block p {
  background-image: linear-gradient(
    100deg,
    var(--pearl-deep) 0%,
    var(--pearl-deep) 32%,
    var(--pearl-bright) 43%,
    #fff3e6 50%,
    var(--pearl-bright) 57%,
    var(--pearl-deep) 68%,
    var(--pearl-deep) 100%
  );
  background-size: 250% 100%;
  background-repeat: repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: text-shine 11s linear infinite;
}

.manifesto-block p {
  animation-duration: 14s;
}

@keyframes text-shine {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 250% 0;
  }
}

/* Латинские названия — фирменный дисплейный шрифт */
.marquee-track span,
.media-card h3,
.number-block strong,
.hero-stat strong {
  font-family: var(--font-display);
  font-weight: 600;
}

/* Метка раздела — капсула с оранжевой точкой */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  padding: 7px 15px 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(243, 239, 232, 0.035);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
}

.section-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 1px var(--accent-glow);
}

.hero-text,
.direction-card p,
.manifesto-block + p,
.showcase-card p,
.service-card p,
.contact-lead p,
.form-note {
  color: var(--muted);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: clamp(20px, 4.5vw, 76px);
  padding-right: clamp(20px, 4.5vw, 76px);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding-top: clamp(136px, 17vh, 196px);
  padding-bottom: clamp(56px, 8vh, 96px);
  display: flex;
  flex-direction: column;
  align-content: start;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 22px;
  max-width: none;
}

.hero-chip {
  margin-bottom: 4px;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 4.6vw, 4.2rem);
  max-width: 19ch;
}

.hero-text {
  max-width: 62ch;
  font-size: 1.03rem;
  line-height: 1.65;
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* — Кнопки — */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.28s var(--ease),
    background 0.28s var(--ease),
    border-color 0.28s var(--ease),
    filter 0.28s var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--coal-950);
  background: linear-gradient(180deg, var(--accent-hi), var(--accent) 56%, var(--accent-lo));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 14px 32px -10px var(--accent-glow);
}

.button-primary:hover {
  filter: brightness(1.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 20px 46px -12px rgba(255, 122, 26, 0.58);
}

.button-secondary {
  color: var(--pearl);
  background: rgba(243, 239, 232, 0.05);
  border-color: var(--line-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.button-secondary:hover {
  border-color: var(--line-accent);
  background: rgba(255, 122, 26, 0.09);
}

/* — Полоса статистики — */

.hero-stats {
  position: relative;
  isolation: isolate;
  margin-top: 12px;
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: center;
  row-gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease),
    border-color 0.5s var(--ease);
}

.hero-stats::after {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  background: radial-gradient(120% 150% at 50% 0%, rgba(255, 122, 26, 0.2), transparent 64%);
}

.hero-stats:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 122, 26, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 26px 60px -24px rgba(255, 122, 26, 0.5);
}

.hero-stats:hover::after {
  opacity: 1;
}

.hero-stat {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  padding: 2px 14px;
}

.hero-stat + .hero-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, transparent, var(--line-strong), transparent);
}

.hero-stat strong {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
  background-image: linear-gradient(180deg, var(--accent-hi), var(--accent) 62%, var(--accent-lo));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-stat span {
  color: var(--muted-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  white-space: nowrap;
}

/* ============================================================
   Ритм секций
   ============================================================ */

.section {
  padding: clamp(32px, 3.6vw, 50px) 0;
}

/* У соседних секций отступы складываются, поэтому верхний — меньше нижнего:
   50 + 32 = 82px между блоками вместо исходных 192. */
.section + .section {
  padding-top: clamp(22px, 2.2vw, 32px);
}

.section-intro {
  display: grid;
  gap: 18px;
  margin-bottom: 42px;
}

/* Ограничение по ширине — на самом заголовке: ch считается в его кегле,
   а не в шрифте контейнера. ~22 знака в строке = максимум 2 строки. */
.section-intro h2 {
  max-width: 22ch;
}

/* ============================================================
   Направления
   ============================================================ */

.directions-grid,
.showcase-grid,
.numbers-shell {
  display: grid;
  gap: 16px;
}

.directions-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  counter-reset: dir;
}

.direction-card {
  position: relative;
  isolation: isolate;
  counter-increment: dir;
  min-height: 250px;
  padding: 62px 26px 26px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  overflow: hidden;
  transition:
    transform 0.45s var(--ease),
    border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.direction-card::before {
  content: '0' counter(dir);
  position: absolute;
  top: 24px;
  left: 26px;
  font-family: var(--font-display);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  color: var(--muted-faint);
  transition: color 0.45s var(--ease);
}

.direction-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  background: radial-gradient(120% 80% at 50% 100%, rgba(255, 122, 26, 0.22), transparent 68%);
}

.direction-card h3 {
  margin: 0;
  color: var(--pearl);
  transition: color 0.35s var(--ease);
}

.direction-card p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
}

.direction-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 122, 26, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    var(--shadow-lift),
    0 30px 70px -30px rgba(255, 122, 26, 0.55);
}

.direction-card:hover::after {
  opacity: 1;
}

.direction-card:hover::before,
.direction-card:hover h3 {
  color: var(--accent-hi);
}

/* ============================================================
   Медиа-карточки
   ============================================================ */

.media-card {
  overflow: hidden;
  position: relative;
  padding: 0;
  min-height: 260px;
  border-radius: var(--radius-lg);
}

.card-hitbox {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.card-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.6s var(--ease);
}

.card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 6px;
  padding: 22px 22px 20px;
  background: linear-gradient(
    180deg,
    rgba(7, 7, 8, 0) 0%,
    rgba(7, 7, 8, 0.6) 38%,
    rgba(7, 7, 8, 0.94) 100%
  );
  transition: transform 0.4s var(--ease);
}

.card-copy h3 {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  color: var(--pearl-bright);
}

.card-copy span {
  color: var(--muted-soft);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.visual-grid .media-card {
  min-height: 300px;
}

.visual-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* Обложки светлые — приглушаем, чтобы сетка жила в угольной среде */
.visual-grid .card-preview {
  filter: brightness(0.88) saturate(0.94) contrast(1.02);
}

.visual-grid .media-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 70px 10px rgba(7, 7, 8, 0.45);
}

.visual-grid .media-card:hover .card-preview {
  transform: scale(1.05);
  filter: brightness(1) saturate(1) contrast(1.02);
}

/* — Наши работы: широкие горизонтальные строки — */

#showcase .showcase-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

#showcase .showcase-card {
  display: grid;
  grid-template-columns: clamp(180px, 24%, 300px) minmax(0, 1fr);
  align-items: stretch;
  height: clamp(146px, 12.5vw, 172px);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  transition:
    transform 0.4s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

#showcase .showcase-card .card-preview {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  /* Обложки в полном цвете сразу — на ховер только увеличение */
  filter: contrast(1.03) saturate(1.04);
  transition: transform 0.65s var(--ease);
}

#showcase .showcase-card .card-copy {
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px 22px 32px;
  background: transparent;
}

#showcase .showcase-card .card-copy h3 {
  font-size: clamp(1.35rem, 1.9vw, 1.85rem);
  margin: 0;
  flex: 1;
}

#showcase .showcase-card .card-copy span {
  white-space: nowrap;
}

/* Стрелка-указатель справа */
#showcase .showcase-card .card-copy::after {
  content: '→';
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted-soft);
  font-size: 1.05rem;
  transition:
    transform 0.4s var(--ease),
    color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    background 0.4s var(--ease);
}

#showcase .showcase-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 138, 40, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 122, 26, 0.22),
    0 26px 60px -24px rgba(255, 122, 26, 0.6),
    0 0 90px -30px rgba(255, 122, 26, 0.5);
}

#showcase .showcase-card:hover .card-preview {
  transform: scale(1.08);
}

#showcase .showcase-card:hover .card-copy::after {
  transform: translateX(4px);
  color: var(--coal-950);
  border-color: transparent;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
}

#showcase .card-hitbox:hover + .card-preview + .card-copy,
#showcase .card-hitbox:focus-visible + .card-preview + .card-copy {
  transform: none;
}

/* ============================================================
   Манифест
   ============================================================ */

.manifesto-block {
  padding: clamp(34px, 4.2vw, 58px) clamp(32px, 4vw, 56px);
  border-radius: var(--radius-xl);
}

.manifesto-block p {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  /* Текст занимает всю ширину плашки — без искусственного зажима по ширине */
  font-size: clamp(1.5rem, 2.5vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.038em;
  max-width: none;
  text-wrap: balance;
}

/* ============================================================
   Услуги
   ============================================================ */

.services-stack {
  display: grid;
  gap: 16px;
}

.services-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 20px;
  padding: clamp(26px, 3vw, 38px);
  border-radius: var(--radius-xl);
}

.services-feature-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.services-feature-copy h3 {
  font-size: clamp(1.8rem, 2.8vw, 2.7rem);
  line-height: 1.04;
  letter-spacing: -0.042em;
  margin: 0;
}

.services-feature-copy p {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
}

.services-metrics {
  display: grid;
  align-content: start;
  gap: 14px;
}

/* Компактные метрики — не растягивают блок услуг */
.services-metrics .number-block {
  min-height: 0;
  padding: 24px 26px;
}

.services-metrics .number-block strong {
  font-size: clamp(1.9rem, 2.6vw, 2.5rem);
  margin-bottom: 10px;
}

.services-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.service-card {
  min-height: 186px;
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 26, 0.28);
}

.service-card h3 {
  margin: 0;
  color: var(--pearl);
}

.service-card p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
}

.service-steps-intro {
  margin-top: 26px;
  margin-bottom: 12px;
}

.numbers-shell {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.number-block {
  min-height: 200px;
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.number-block strong {
  display: block;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  background-image: linear-gradient(170deg, var(--accent-hi) 0%, var(--accent) 48%, var(--accent-lo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.number-block p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

/* ============================================================
   Бегущая строка
   ============================================================ */

.marquee {
  position: relative;
  overflow: hidden;
  margin: clamp(12px, 1.6vw, 22px) 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(243, 239, 232, 0.035),
    rgba(255, 122, 26, 0.045) 50%,
    rgba(243, 239, 232, 0.02)
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 160px;
  z-index: 2;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--coal-900) 8%, transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--coal-900) 8%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee-scroll 44s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  white-space: nowrap;
  font-size: clamp(1.3rem, 2.2vw, 2.2rem);
  letter-spacing: -0.025em;
  color: var(--pearl-deep);
}

.marquee-track span.dot {
  font-size: 0.55em;
  color: var(--accent);
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 14px));
  }
}

/* ============================================================
   Контакты
   ============================================================ */

.contact-shell {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
}

.contact-prelude {
  align-items: stretch;
}

.contact-lead {
  padding: clamp(30px, 3.4vw, 46px);
  border-radius: var(--radius-xl);
  display: grid;
  align-content: start;
  gap: 18px;
}

/* Лид не растягивается под высоту формы — иначе остаётся пустая коробка */
#contact .contact-lead {
  align-self: start;
  position: sticky;
  top: 108px;
}

.contact-lead h2 {
  max-width: 16ch;
  margin: 0;
}

.contact-lead p {
  margin: 0;
  max-width: 52ch;
}

.contact-form {
  padding: clamp(30px, 3.4vw, 46px);
  border-radius: var(--radius-xl);
  display: grid;
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 10px;
}

.contact-form label > span {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(243, 239, 232, 0.04);
  border-radius: var(--radius-md);
  padding: 15px 18px;
  color: var(--pearl);
  font-weight: 500;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease), background 0.28s var(--ease);
}

.contact-form textarea {
  resize: vertical;
  min-height: 128px;
  line-height: 1.6;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted-faint);
  opacity: 1;
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-color: rgba(243, 239, 232, 0.24);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--line-accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.12);
  background: rgba(243, 239, 232, 0.06);
}

.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--pearl);
  -webkit-box-shadow: 0 0 0 1000px rgba(20, 20, 22, 0.96) inset;
}

.submit-button {
  width: 100%;
  margin-top: 4px;
}

.submit-button:disabled {
  cursor: progress;
  opacity: 0.65;
  transform: none;
  filter: none;
}

/* Ловушка для ботов — убрана из потока и недоступна с клавиатуры.
   Селектор с .contact-form, иначе общее правило полей формы вернёт ей размеры. */
.contact-form .form-honey {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.form-note {
  min-height: 24px;
  margin: 0;
  font-size: 0.9rem;
  transition: color 0.25s var(--ease);
}

.form-note.is-success {
  color: var(--pearl-bright);
  font-weight: 500;
}

.form-note.is-error {
  color: var(--accent-hi);
  font-weight: 500;
}

/* — Кастомный селект — */

.select-shell {
  position: relative;
}

.select-shell .direction-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.select-trigger {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line-strong);
  background: rgba(243, 239, 232, 0.04);
  border-radius: var(--radius-md);
  padding: 15px 48px 15px 18px;
  color: var(--pearl);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease), background 0.28s var(--ease);
}

.select-trigger::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -6px;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.32s var(--ease);
}

.select-trigger:hover {
  border-color: rgba(243, 239, 232, 0.24);
}

.select-shell.is-open .select-trigger {
  border-color: var(--line-accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.12);
}

.select-shell.is-open .select-trigger::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

.select-list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 268px;
  overflow-y: auto;
  padding: 8px;
  display: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: rgba(12, 12, 14, 0.96);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 28px 64px -20px rgba(0, 0, 0, 0.8);
}

.select-shell.is-open .select-list {
  display: block;
  animation: select-drop 0.26s var(--ease);
}

@keyframes select-drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.select-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 11px;
  padding: 11px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.select-option:hover,
.select-option:focus-visible {
  background: rgba(255, 122, 26, 0.12);
  color: var(--pearl);
  outline: none;
}

.select-option.is-selected {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  color: var(--coal-950);
}

.select-list::-webkit-scrollbar {
  width: 6px;
}

/* Нативный fallback, если JS не отработал */
.contact-form .direction-select option {
  background-color: var(--coal-800);
  color: var(--pearl);
}

/* ============================================================
   Галерея
   ============================================================ */

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.gallery-modal.is-open {
  display: block;
}

.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 7, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gallery-panel {
  position: relative;
  width: min(calc(100% - 32px), 1180px);
  margin: 40px auto;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: rgba(11, 11, 13, 0.9);
}

.gallery-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(243, 239, 232, 0.06);
  color: var(--pearl);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.gallery-close:hover {
  border-color: var(--line-accent);
  background: rgba(255, 122, 26, 0.14);
}

.gallery-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 6px 60px 18px 6px;
}

.gallery-counter {
  margin: 0;
  color: var(--muted-soft);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}

.gallery-body {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  gap: 14px;
  align-items: center;
}

.gallery-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(243, 239, 232, 0.03);
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-image,
.gallery-video {
  width: 100%;
  height: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.gallery-video {
  display: block;
}

.gallery-nav {
  width: 100%;
  min-height: 60px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(243, 239, 232, 0.05);
  color: var(--pearl);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.gallery-nav:hover:not(:disabled) {
  border-color: var(--line-accent);
  background: rgba(255, 122, 26, 0.14);
  color: var(--accent-hi);
}

.gallery-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ============================================================
   Прогресс, выделение, скроллбар
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  background: linear-gradient(90deg, var(--accent-lo), var(--accent) 55%, var(--accent-hi));
  box-shadow: 0 0 16px rgba(255, 122, 26, 0.6);
}

::selection {
  background: var(--accent);
  color: var(--coal-950);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(243, 239, 232, 0.03);
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo));
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ============================================================
   Адаптив
   ============================================================ */

@media (max-width: 1180px) {
  .visual-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .directions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-shell,
  .services-feature {
    grid-template-columns: 1fr;
  }

  .contact-lead h2 {
    max-width: 26ch;
  }
}

@media (max-width: 860px) {
  /* На узком экране видео кадрируется ярче — прижимаем в уголь */
  .bg-video {
    filter: saturate(0.7) contrast(1.02) brightness(0.9);
  }

  .nav {
    display: none;
  }

  .header-inner {
    padding: 0 10px 0 20px;
  }

  .visual-grid,
  .directions-grid,
  .numbers-shell,
  .services-ribbon {
    grid-template-columns: 1fr 1fr;
  }

  .numbers-shell,
  .services-ribbon {
    grid-template-columns: 1fr;
  }

  .manifesto-block p,
  .section-intro h2,
  .contact-lead h2 {
    max-width: none;
  }

  #showcase .showcase-card {
    grid-template-columns: 1fr;
    height: auto;
  }

  #showcase .showcase-card .card-preview {
    height: 200px;
  }

  #showcase .showcase-card .card-copy {
    padding: 20px 22px;
  }

  .contact-lead,
  .contact-form,
  .manifesto-block,
  .services-feature {
    padding: 26px;
  }
}

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

  .hero-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.4rem, 11vw, 3.8rem);
  }

  .hero-content {
    padding-top: 128px;
    padding-bottom: 88px;
    gap: 20px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .section-tag {
    max-width: 100%;
    padding: 6px 12px 6px 10px;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .visual-grid,
  .directions-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    flex-wrap: wrap;
    padding: 18px 16px;
    border-radius: var(--radius-md);
    row-gap: 16px;
  }

  .hero-stat {
    flex: 1 1 44%;
    justify-content: flex-start;
    gap: 8px;
    padding: 2px 6px;
  }

  .hero-stat + .hero-stat::before {
    display: none;
  }

  .hero-stat strong {
    font-size: 1.35rem;
  }

  .header-cta {
    padding: 0 18px;
    font-size: 0.86rem;
  }

  .gallery-panel {
    margin: 16px auto;
    width: min(calc(100% - 20px), 1180px);
  }

  .gallery-body {
    grid-template-columns: 1fr;
  }

  .gallery-image-wrap {
    min-height: 50vh;
  }

  .gallery-nav {
    min-height: 50px;
  }

  .gallery-head {
    flex-direction: column;
    align-items: flex-start;
    padding-right: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee-track,
  .hero h1,
  .section-intro h2,
  .contact-lead h2,
  .services-feature-copy h3,
  .manifesto-block p {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
