/* ============================================================
   efirstream.uz — фирменный стиль
   Градиент из логотипа: синий #2f7bf6 → фиолетовый #a21ef0
   ============================================================ */

:root {
  --blue: #2f7bf6;
  --blue-soft: #6aa6ff;
  --purple: #a21ef0;
  --pink: #d946ef;

  --bg: #05070f;
  --bg-2: #080d1c;
  --bg-3: #0b1226;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);

  --text: #eef2fb;
  --muted: #9aa8c4;
  --muted-2: #6f7d99;

  --grad: linear-gradient(115deg, var(--blue) 0%, var(--purple) 100%);
  --grad-soft: linear-gradient(115deg, rgba(47, 123, 246, .16), rgba(162, 30, 240, .16));

  --radius: 22px;
  --radius-sm: 14px;
  --container: 1200px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.025em; font-weight: 800; }
p { margin: 0; }
::selection { background: rgba(162, 30, 240, .45); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 26px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- фоновое свечение (motion) ---------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: .4;
  will-change: transform;
}
.aurora .a1 { width: 620px; height: 620px; background: #1e5bd6; top: -180px; left: -140px; animation: drift1 22s ease-in-out infinite; }
.aurora .a2 { width: 560px; height: 560px; background: #8b1ae0; top: 12%; right: -180px; animation: drift2 26s ease-in-out infinite; }
.aurora .a3 { width: 520px; height: 520px; background: #1147a8; bottom: -160px; left: 25%; animation: drift3 30s ease-in-out infinite; }

@keyframes drift1 { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(90px, 70px, 0) scale(1.15); } }
@keyframes drift2 { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-110px, 60px, 0) scale(1.1); } }
@keyframes drift3 { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(60px, -80px, 0) scale(1.2); } }

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .header, .footer { position: relative; z-index: 2; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font: 700 15px/1 var(--font);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 14px 40px -14px rgba(120, 60, 240, .9);
}
/* блик, пробегающий по кнопке при наведении */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .38) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform .75s var(--ease);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 50px -14px rgba(120, 60, 240, 1); }
.btn-primary:hover::after { transform: translateX(120%); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-3px); border-color: rgba(255, 255, 255, .3); }

.btn-lg { padding: 17px 34px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- шапка ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 16px 0;
  transition: padding .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  padding: 9px 0;
  background: rgba(5, 7, 15, .82);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line);
}

.header-inner { display: flex; align-items: center; gap: 24px; }

.logo { flex-shrink: 0; display: block; }
/* фирменный логотип в белом варианте — красить фильтром нельзя, потеряется градиент значка */
.logo img {
  height: 44px;
  width: auto;
  transition: height .35s var(--ease);
}
.header.scrolled .logo img { height: 36px; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.header-phone:hover { border-color: var(--blue); background: var(--surface); }
.header-phone svg { width: 16px; height: 16px; color: var(--blue-soft); }

/* переключатель языка */
.lang {
  position: relative;
  display: flex;
  padding: 4px;
  gap: 2px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
/* каждый язык — ссылка на свой адрес: / , /uz/ , /en/ */
.lang a {
  display: block;
  color: var(--muted);
  font: 700 13px/1 var(--font);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color .3s var(--ease), background .3s var(--ease);
}
.lang a:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.lang a.active { color: #fff; background: var(--grad); }

.burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  padding: 13px 12px;
  flex-direction: column;
  justify-content: space-between;
}
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .35s var(--ease), opacity .25s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- герой ---------- */

.hero {
  position: relative;
  padding: 170px 0 110px;
  overflow: hidden;
}

.hero-inner { display: grid; grid-template-columns: 1.08fr .92fr; gap: 60px; align-items: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 17px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2ee08a;
  box-shadow: 0 0 0 0 rgba(46, 224, 138, .6);
  animation: ping 2s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(46, 224, 138, .55); }
  70% { box-shadow: 0 0 0 10px rgba(46, 224, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 224, 138, 0); }
}

.hero h1 { font-size: clamp(34px, 4.2vw, 54px); margin-bottom: 24px; letter-spacing: -.035em; }

/* построчное появление заголовка */
.line { display: block; overflow: hidden; }
.line > span {
  display: block;
  transform: translateY(105%);
  animation: lineUp 1s var(--ease) forwards;
}
.line:nth-child(1) > span { animation-delay: .08s; }
.line:nth-child(2) > span { animation-delay: .2s; }
.line:nth-child(3) > span { animation-delay: .32s; }
@keyframes lineUp { to { transform: translateY(0); } }

.fade-up { opacity: 0; transform: translateY(24px); animation: fadeUp .9s var(--ease) forwards; }
.d1 { animation-delay: .45s; } .d2 { animation-delay: .58s; } .d3 { animation-delay: .7s; } .d4 { animation-delay: .82s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.hero-sub {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 34px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }

.hero-facts { display: flex; gap: 34px; flex-wrap: wrap; }

/* ---------- соцсети в первом экране ---------- */

.hero-socials {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hs-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.hs-list { display: flex; gap: 10px; }

.hs {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: color .3s var(--ease), transform .3s var(--ease),
              border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.hs svg { width: 21px; height: 21px; position: relative; z-index: 2; }

/* фирменный цвет наливается снизу при наведении */
.hs::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand);
  transform: translateY(101%);
  transition: transform .35s var(--ease);
}
.hs:hover {
  color: #fff;
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 14px 28px -12px var(--brand-shadow, rgba(0, 0, 0, .8));
}
.hs:hover::before { transform: none; }

.hs-tg { --brand: #2aabee; --brand-shadow: rgba(42, 171, 238, .8); }
.hs-wa { --brand: #25d366; --brand-shadow: rgba(37, 211, 102, .8); }
.hs-ig {
  --brand: linear-gradient(45deg, #f09433, #dc2743 45%, #bc1888);
  --brand-shadow: rgba(220, 39, 67, .8);
}
.hs-fb { --brand: #1877f2; --brand-shadow: rgba(24, 119, 242, .8); }

@media (max-width: 760px) {
  .hero-socials { gap: 12px; margin-top: 26px; padding-top: 20px; }
  .hs { width: 44px; height: 44px; }

  /* На узком экране карточка ролика мала, а на самой обложке уже есть надписи —
     наша подпись налезала на них. Оставляем только метку LIVE. */
  .video-caption > div { display: none; }
  .video-caption { justify-content: flex-end; }
}
.fact b { display: block; font-size: 30px; line-height: 1.1; letter-spacing: -.03em; }
.fact span { font-size: 13.5px; color: var(--muted-2); }

/* видеокарточка в герое */
.hero-visual { position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle at 60% 40%, rgba(162, 30, 240, .3), transparent 65%);
  filter: blur(30px);
}

.video-card {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg-3);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .95);
  aspect-ratio: 16 / 9;
  cursor: pointer;
  transition: transform .5s var(--ease);
}
.video-card:hover { transform: translateY(-6px) scale(1.012); }
.video-card video, .video-card img { width: 100%; height: 100%; object-fit: cover; }
.video-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 7, 15, .85) 0%, transparent 55%);
  pointer-events: none;
}

.play-btn {
  position: absolute;
  z-index: 3;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 0;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 16px 44px -12px rgba(120, 60, 240, 1);
  transition: transform .35s var(--ease);
}
.play-btn::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  animation: haloPulse 2.4s ease-out infinite;
}
@keyframes haloPulse {
  0% { transform: scale(.85); opacity: .9; }
  100% { transform: scale(1.35); opacity: 0; }
}
.play-btn svg { width: 30px; height: 30px; margin-left: 4px; }
.video-card:hover .play-btn { transform: translate(-50%, -50%) scale(1.09); }

.video-caption {
  position: absolute;
  z-index: 3;
  left: 24px; right: 24px; bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}
.video-caption b { font-size: 15px; }
.video-caption small { display: block; color: var(--muted); font-size: 13px; }

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ef2b4b;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .1em;
  padding: 6px 11px;
  border-radius: 7px;
}
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* ---------- бегущая строка платформ ---------- */

.marquee {
  position: relative;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: rgba(255, 255, 255, .015);
}
.marquee-track { display: flex; width: max-content; animation: scrollX 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollX { to { transform: translateX(-50%); } }
.marquee-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 34px;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-item svg { width: 22px; height: 22px; }

/* ---------- секции ---------- */

.section { padding: 110px 0; position: relative; }
/* лёгкая тёмная подложка: держит контраст текста поверх фонового свечения */
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 15, .4);
  pointer-events: none;
  z-index: -1;
}
.section-alt { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .022), transparent); }

.section-head { max-width: 720px; margin-bottom: 60px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--grad);
  border-radius: 2px;
}
.section-head.center .eyebrow::before { display: none; }

.section-head h2 { font-size: clamp(30px, 3.8vw, 48px); margin-bottom: 18px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* ---------- о компании + видео ---------- */

.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.about-text h2 { font-size: clamp(28px, 3.4vw, 44px); margin-bottom: 20px; }
.about-text p { color: var(--muted); font-size: 17px; margin-bottom: 18px; }

/* правая колонка секции «О компании»: ключевые пункты карточками */
.about-points { display: grid; gap: 14px; }
.about-point {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.about-point:hover { transform: translateX(6px); border-color: var(--line-strong); }
.about-point .tick {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  margin-top: 1px;
}
.about-point .tick svg { width: 13px; height: 13px; color: #fff; }
.about-point span { font-size: 15.5px; color: var(--text); }

/* ---------- услуги ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.card {
  position: relative;
  padding: 34px 30px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .45s var(--ease), border-color .45s var(--ease), background .45s var(--ease);
}
/* мягкое свечение, следующее за курсором */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%),
              rgba(150, 110, 255, .34), rgba(120, 60, 240, .12) 42%, transparent 68%);
  transition: opacity .35s var(--ease);
  pointer-events: none;
}
.card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
/* подъём при наведении задаём здесь: правило появления .reveal.anim-rise.visible
   перебивает .card:hover по весу, и без этого карточка не поднималась */
.card.reveal.visible:hover { transform: translateY(-7px); }

.card-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--grad-soft);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  margin-bottom: 22px;
  color: var(--blue-soft);
  transition: transform .45s var(--ease);
}
.card:hover .card-icon { transform: scale(1.08) rotate(-4deg); }
.card-icon svg { width: 27px; height: 27px; }

/* карточка — колонка, чтобы строка с ценой прижималась к низу и цены выровнялись */
.card { display: flex; flex-direction: column; }
.card ul { flex: 1 0 auto; }

.card-price {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
}
.card-price.accent {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card h3 { font-size: 20px; margin-bottom: 11px; }
.card p { color: var(--muted); font-size: 15px; }
.card ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 9px; }
.card li { position: relative; padding-left: 20px; font-size: 14.5px; color: var(--muted); }
.card li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--grad);
}

/* ---------- портфолио ---------- */

.cases { display: grid; gap: 34px; }

.case {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 44px;
  align-items: center;
  padding: 34px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .45s var(--ease);
}
.case:hover { border-color: var(--line-strong); }
.case:nth-child(even) .case-media { order: -1; }

.case-media {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 16 / 10;
  cursor: pointer;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
}
/* width: 100% обязателен — без него блок считает ширину по содержимому
   и схлопывается в ноль, как только обложка скрывается на время проигрывания */
.case-media.square {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* Размытая копия обложки под основным фото. Закрывает поля, когда пропорции
   видео не совпадают с рамкой (вертикальное видео Medion в квадратном кадре). */
.case-media::before {
  content: "";
  position: absolute;
  inset: -12%;
  background-image: var(--cover);
  background-size: cover;
  background-position: center;
  filter: blur(34px) brightness(.5) saturate(1.2);
  z-index: 0;
}

.case-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.case-media:hover img { transform: scale(1.045); }

/* мягкое затемнение снизу — кнопка play читается на любом фото */
.case-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to top, rgba(4, 6, 12, .72) 0%, rgba(4, 6, 12, .12) 45%, transparent 70%);
  transition: opacity .45s var(--ease);
}
.case-media:hover::after { opacity: .75; }
.case-media.playing::after { opacity: 0; }

/* обложки кейсов и то, какая часть кадра важнее при обрезке */
.case-media.c1 { --cover: url("../assets/img/case-1-cover.jpg"); }
.case-media.c1 img { object-position: center 46%; }
.case-media.c2 { --cover: url("../assets/img/case-2-cover.jpg"); }
.case-media.c2 img { object-position: 58% center; }
.case-media.c3 { --cover: url("../assets/img/case-3-cover.jpg"); }
.case-media.c3 img { object-position: center 24%; }
.case-media .play-btn { width: 66px; height: 66px; }
.case-media .play-btn svg { width: 24px; height: 24px; }

/* плашка с логотипом клиента: фон задаётся отдельно для каждого кейса */
.case-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 26px;
  border-radius: 16px;
  background: var(--logo-bg, #fff);
  border: 1px solid var(--line);
  margin-bottom: 22px;
  min-height: 96px;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .9);
}
.case-logo img { max-height: 62px; width: auto; object-fit: contain; }

.case-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 12px;
}
.case h3 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 14px; }
.case > div > p { color: var(--muted); font-size: 16px; margin-bottom: 22px; }

.case-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.chip svg { width: 14px; height: 14px; color: var(--blue-soft); }

.case-note {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(47, 123, 246, .08);
  border: 1px solid rgba(47, 123, 246, .22);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- процесс: лента шагов ---------- */

.timeline { position: relative; padding: 10px 0; }

/* вертикальная линия по центру */
.tl-line {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background: rgba(255, 255, 255, .08);
  border-radius: 3px;
  overflow: hidden;
}
/* заполняется по мере прокрутки — высоту задаёт скрипт */
.tl-progress {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--blue), var(--purple));
  border-radius: 3px;
  box-shadow: 0 0 18px rgba(120, 60, 240, .75);
  transition: height .15s linear;
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 108px 1fr;
  align-items: center;
  margin-bottom: 46px;
}
.tl-item:last-child { margin-bottom: 0; }

/* сторона карточки задаётся классом в разметке, а не порядком элементов */
.tl-item.tl-left  .tl-card { grid-column: 1; text-align: right; }
.tl-item.tl-right .tl-card { grid-column: 3; }

.tl-badge {
  grid-column: 2;
  justify-self: center;
  width: 62px; height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--muted-2);
  background: var(--bg-2);
  border: 2px solid rgba(255, 255, 255, .12);
  z-index: 2;
  transition: color .45s var(--ease), background .45s var(--ease),
              border-color .45s var(--ease), box-shadow .45s var(--ease),
              transform .45s var(--ease);
}
/* шаг, до которого читатель уже долистал */
.tl-item.passed .tl-badge {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 0 0 6px rgba(120, 60, 240, .16), 0 12px 30px -10px rgba(120, 60, 240, .9);
  transform: scale(1.06);
}

.tl-card {
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  opacity: .55;
  transform: translateY(16px);
  transition: opacity .55s var(--ease), transform .55s var(--ease), border-color .45s var(--ease);
}
.tl-item.passed .tl-card { opacity: 1; transform: none; border-color: var(--line-strong); }
.tl-card:hover { border-color: rgba(255, 255, 255, .26); }

.tl-card h3 { font-size: 19px; margin-bottom: 10px; }
.tl-card p { color: var(--muted); font-size: 15px; }

.tl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tl-item.tl-left .tl-tags { justify-content: flex-end; }
.tl-tags .chip { padding: 7px 13px; font-size: 12.5px; }

@media (max-width: 860px) {
  .tl-line { left: 31px; }
  .tl-item { grid-template-columns: 62px 1fr; gap: 18px; margin-bottom: 30px; align-items: start; }
  .tl-item.tl-left  .tl-card,
  .tl-item.tl-right .tl-card { grid-column: 2; text-align: left; }
  .tl-item.tl-left .tl-tags { justify-content: flex-start; }
  .tl-badge { grid-column: 1; width: 62px; height: 62px; }
  .tl-card { padding: 22px 20px; }
}

/* ---------- преимущества ---------- */

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature {
  position: relative;
  display: flex;
  gap: 18px;
  padding: 28px 28px 28px 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: background .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
/* пункт, до которого доехала прокрутка, подсвечивается */
.feature.active {
  background: var(--surface-2);
  border-color: var(--line-strong);
  box-shadow: 0 20px 46px -26px rgba(120, 60, 240, .95);
}
/* растущая градиентная полоса у левого края */
.feature::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--grad);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform .55s var(--ease);
}
.feature.active::after { transform: scaleY(1); }
.feature.active .feature-icon {
  box-shadow: 0 0 0 6px rgba(120, 60, 240, .14), 0 14px 30px -8px rgba(120, 60, 240, .95);
}
.feature-icon {
  flex-shrink: 0;
  width: 50px; height: 50px;
  border-radius: 14px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff;
}
.feature-icon svg { width: 23px; height: 23px; }
.feature-icon { transition: box-shadow .5s var(--ease); }
.feature h3 { font-size: 17.5px; margin-bottom: 7px; }
.feature p { color: var(--muted); font-size: 15px; }

/* ---------- вопросы и ответы ---------- */

/* Сделано на обычном <details> — раскрывается силами самого браузера,
   без скриптов. Работает даже если JavaScript отключён. */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }

.faq-item {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .35s var(--ease), background .35s var(--ease);
}
.faq-item:hover { border-color: var(--line-strong); }
.faq-item[open] { background: var(--surface-2); border-color: var(--line-strong); }

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-size: 16.5px;
  font-weight: 700;
  list-style: none;
  transition: color .25s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--blue-soft); }

/* плюс, который поворачивается в крестик при раскрытии */
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-left: auto;
  background:
    linear-gradient(var(--muted), var(--muted)) center/2px 14px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center/14px 2px no-repeat;
  transition: transform .35s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(135deg); }

.faq-item p {
  padding: 0 24px 22px;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 68ch;
}

@media (max-width: 760px) {
  .faq-item summary { padding: 17px 18px; font-size: 15.5px; gap: 12px; }
  .faq-item p { padding: 0 18px 18px; font-size: 15px; }
}

/* ---------- форма и контакты ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: start; }

.contact-items { display: grid; gap: 14px; margin-top: 34px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
a.contact-item:hover { border-color: var(--blue); transform: translateX(5px); }
.contact-item .ci-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--grad-soft);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--blue-soft);
}
.contact-item .ci-icon svg { width: 20px; height: 20px; }
.contact-item small { display: block; color: var(--muted-2); font-size: 12.5px; }
.contact-item b { font-size: 16.5px; }

.form-card {
  padding: 38px;
  border-radius: 26px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .95);
}
.form-card h3 { font-size: 25px; margin-bottom: 8px; }
.form-card > p { color: var(--muted); font-size: 15px; margin-bottom: 26px; }

.field { margin-bottom: 17px; position: relative; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 8px; color: var(--muted); }
.field label .req { color: #ff5c7a; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: rgba(0, 0, 0, .28);
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.field select option { background: #0b1226; color: var(--text); }
.field textarea { resize: vertical; min-height: 100px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(0, 0, 0, .4);
  box-shadow: 0 0 0 4px rgba(47, 123, 246, .14);
}
.field.invalid input, .field.invalid select { border-color: #ff5c7a; }
.field .error { display: none; color: #ff5c7a; font-size: 13px; margin-top: 7px; font-weight: 600; }
.field.invalid .error { display: block; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.hp { position: absolute; left: -9999px; opacity: 0; width: 0; height: 0; }

.form-note { font-size: 12.5px; color: var(--muted-2); text-align: center; margin-top: 15px; }
.form-status { display: none; margin-top: 16px; padding: 14px 17px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 600; }
.form-status.show { display: block; background: rgba(255, 92, 122, .12); border: 1px solid rgba(255, 92, 122, .3); color: #ff8fa5; }

.form-success { display: none; text-align: center; padding: 30px 10px; }
.form-success.show { display: block; }
.form-card.sent form { display: none; }
.ok-icon {
  width: 84px; height: 84px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  animation: pop .55s cubic-bezier(.2, 1.5, .4, 1);
}
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ok-icon svg { width: 38px; height: 38px; color: #fff; }
.form-success h3 { font-size: 23px; margin-bottom: 11px; }
.form-success p { color: var(--muted); margin-bottom: 8px; }
.form-success .lead-id b { color: var(--blue-soft); }

/* ---------- подвал ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 66px 0 28px;
  background: rgba(0, 0, 0, .3);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; margin-bottom: 46px; }
.footer-logo { height: 48px; margin-bottom: 20px; }
.footer p { color: var(--muted); font-size: 15px; }
.footer h4 { font-size: 15.5px; margin-bottom: 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer li a, .footer li span { color: var(--muted); font-size: 15px; transition: color .25s var(--ease); }
.footer li a:hover { color: var(--text); }

.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .3s var(--ease), transform .3s var(--ease), color .3s var(--ease);
}
.socials a:hover { background: var(--grad); color: #fff; transform: translateY(-4px); border-color: transparent; }
.socials svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted-2);
}

/* ---------- проигрывание видео на своём месте ---------- */

.video-card video.inline,
.case-media video.inline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* вертикальное видео не обрезается */
  background: #000;
  display: block;
  z-index: 4;
  opacity: 1;   /* без анимации: в фоновой вкладке она подвисает и видео остаётся прозрачным */
}
/* в кейсах фон прозрачный — вместо чёрных полос видна размытая обложка */
.case-media video.inline { background: transparent; }

/* пока видео играет, убираем всё, что мешало бы плееру */
.video-card.playing,
.case-media.playing { cursor: default; }
.video-card.playing:hover { transform: none; }
.video-card.playing::after { display: none; }
.video-card.playing .play-btn,
.video-card.playing .video-caption,
.video-card.playing > img,
.case-media.playing .play-btn,
.case-media.playing > img { display: none; }

/* ---------- плавающие кнопки ---------- */

.floats { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: grid; gap: 12px; }
.float-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .9);
  transition: transform .3s var(--ease);
}
.float-btn:hover { transform: scale(1.1); }
.float-tg { background: #2aabee; }
.float-wa { background: #25d366; }
.float-call { background: var(--grad); }
.float-btn svg { width: 24px; height: 24px; }

/* ---------- появление при прокрутке ---------- */

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* --- услуги: карточки поднимаются с наклоном и наводятся на резкость --- */
.reveal.anim-rise {
  transform: perspective(1000px) rotateX(16deg) translateY(56px);
  transform-origin: 50% 100%;
  filter: blur(7px);
  transition: opacity .9s var(--ease), transform 1s var(--ease), filter .8s var(--ease);
}
.reveal.anim-rise.visible { transform: none; filter: none; }
/* после появления карточка живёт «быстрыми» переходами — иначе наведение мышью
   тянулось бы целую секунду, унаследованную от анимации въезда */
.card.reveal.anim-rise.visible {
  transition: transform .4s var(--ease), border-color .4s var(--ease),
              background .4s var(--ease), opacity .4s var(--ease);
}

/* полоса под заголовком раздела услуг — заполняется при прокрутке */
.hbar {
  position: relative;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .08);
  margin: -22px auto 46px;
  max-width: 720px;
  overflow: hidden;
}
.hbar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  border-radius: 3px;
  box-shadow: 0 0 16px rgba(120, 60, 240, .8);
  transition: width .15s linear;
}

/* --- почему нам доверяют: пункты заезжают с боков, иконка выскакивает следом --- */
.reveal.anim-left  { transform: translateX(-90px) scale(.95); }
.reveal.anim-right { transform: translateX(90px) scale(.95); }
.reveal.anim-left.visible,
.reveal.anim-right.visible { transform: none; }

.reveal.anim-left .feature-icon,
.reveal.anim-right .feature-icon {
  transform: scale(.35) rotate(-12deg);
  opacity: 0;
  transition: transform .65s cubic-bezier(.2, 1.5, .4, 1) .2s, opacity .45s ease .2s;
}
.reveal.anim-left.visible .feature-icon,
.reveal.anim-right.visible .feature-icon { transform: none; opacity: 1; }

@media (max-width: 760px) {
  /* на узком экране боковой заезд превращаем в обычное появление снизу */
  .reveal.anim-left, .reveal.anim-right { transform: translateY(30px); }
  .reveal.anim-rise { transform: translateY(40px); filter: none; }
  .hbar { margin: -14px auto 32px; }
}

/* ---------- адаптив ---------- */

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .about-grid { grid-template-columns: 1fr; gap: 42px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .case, .case:nth-child(even) .case-media { grid-template-columns: 1fr; order: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .burger { display: flex; }
}

@media (max-width: 760px) {
  .container { padding: 0 18px; }
  .header-phone span { display: none; }
  .hero { padding: 130px 0 80px; }
  .section { padding: 74px 0; }
  .cards, .steps, .features { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .form-card { padding: 26px 22px; }
  .case { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-facts { gap: 22px; }
  .floats { right: 14px; bottom: 14px; }
  .aurora span { filter: blur(90px); }
}

/* мобильное меню */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(5, 7, 15, .97);
  backdrop-filter: blur(20px);
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 90px 26px 40px;
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
.mobile-nav.open { transform: none; }
.mobile-nav a {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.03em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn { margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .line > span, .fade-up { transform: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}
