/* ============ VRX DIGITAL ============ */
:root {
  --bg: #0a0a0c;
  --bg-2: #101014;
  --surface: #16161b;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f4f6;
  --muted: #94939e;
  --accent: #8a63ff;
  --accent-soft: rgba(138, 99, 255, 0.16);
  --silver: #c9cdd6;
  --red: #e8414d;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --container: 1240px;
  --pad: clamp(20px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

section[id] { scroll-margin-top: 72px; }

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

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

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

::selection { background: var(--accent); color: #fff; }

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.35s, box-shadow 0.35s;
}
.header.is-scrolled {
  background: rgba(10, 10, 12, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.header__logo img {
  width: 96px;
  height: auto;
  transition: opacity 0.2s;
}
.header__logo:hover img { opacity: 0.75; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 36px);
}
.nav__link {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}
.nav__link:hover { color: var(--text); }
.nav__link--cta {
  color: var(--text);
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: border-color 0.2s, background 0.2s;
}
.nav__link--cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  align-items: center;
  z-index: 110;
}
.burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.burger.is-open span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: 86px;
  padding-bottom: 110px; /* место под бегущую строку */
}
.hero__glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 55% 45% at 75% 15%, rgba(138, 99, 255, 0.16), transparent 65%),
    radial-gradient(ellipse 60% 50% at 15% 85%, rgba(201, 205, 214, 0.08), transparent 65%);
  pointer-events: none;
}
.hero__grain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
  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.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero__label {
  font-family: var(--display);
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(20px, 3vh, 36px);
}
.hero__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(56px, 13.5vw, 176px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin-bottom: clamp(24px, 4vh, 44px);
}
.hero__line { display: block; }
.hero__line--silver {
  background: linear-gradient(115deg, #ffffff 0%, #d7dbe4 35%, #8f95a3 70%, #c9cdd6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__line--outline {
  color: transparent;
  -webkit-text-stroke: 2px rgba(201, 205, 214, 0.8);
}
.hero__subtitle {
  max-width: 560px;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--muted);
  margin-bottom: clamp(28px, 4.5vh, 48px);
}
.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: #9d7dff; }
.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--text); }

/* marquee */
.marquee {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee__track span {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee__track i {
  font-style: normal;
  color: var(--accent);
  font-size: 11px;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============ SECTIONS ============ */
.section { padding: clamp(72px, 11vw, 140px) 0; }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: clamp(16px, 2.5vw, 28px);
}
.section__num {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.section__title {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.05;
}
.section__descr {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 17px);
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* ============ ABOUT ============ */
.about {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}
.about__lead {
  font-size: clamp(19px, 2.4vw, 27px);
  line-height: 1.5;
  font-weight: 500;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 40px);
}
.stat__value,
.stat__plus {
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.stat__plus { color: var(--accent); }
.stat__label {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* ============ SHOWREEL ============ */
.showreel__frame {
  position: relative;
  border-radius: clamp(14px, 2vw, 24px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 16 / 9;
}
.showreel__frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  width: 100%;
  height: 100%;
  border: 0;
}
.showreel__poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* компенсируем чёрные полосы, впечатанные в превью YouTube */
  transform: scale(1.45);
}
.showreel__play {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(180deg, rgba(10,10,12,0.25), rgba(10,10,12,0.55));
  transition: background 0.3s;
}
.showreel__play svg {
  width: clamp(64px, 8vw, 92px);
  height: clamp(64px, 8vw, 92px);
  padding: clamp(18px, 2.4vw, 26px);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(138, 99, 255, 0.4);
  animation: pulse 2.4s infinite;
  transition: transform 0.25s;
}
.showreel__play:hover svg { transform: scale(1.08); }
.showreel__play span {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.showreel__play.is-hidden { display: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(138, 99, 255, 0.45); }
  70% { box-shadow: 0 0 0 26px rgba(138, 99, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(138, 99, 255, 0); }
}

/* ============ PROJECTS ============ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.filter {
  padding: 10px 22px;
  border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}
.filter:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }
.filter.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 26px);
}
.card {
  position: relative;
  display: block;
}
.card.is-hidden { display: none; }
.card__poster {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 10 / 14.2;
  background: var(--surface);
  border: 1px solid var(--line);
}
.card__poster img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.card:hover .card__poster img { transform: scale(1.05); }
.card__poster::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 10, 12, 0.55));
  opacity: 0;
  transition: opacity 0.35s;
}
.card:hover .card__poster::after { opacity: 1; }
.card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card__title {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}
.card__meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.projects__more {
  margin: clamp(36px, 5vw, 56px) auto 0;
  display: flex;
}
.projects__more.is-hidden { display: none; }

/* ============ SERVICES ============ */
.services {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.services__list { list-style: none; }
.service {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(24px, 3.4vw, 40px) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s;
}
.service:first-child { border-top: 1px solid var(--line); }
.service:hover { padding-left: 12px; }
.service__num {
  font-family: var(--display);
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--accent);
  padding-top: 6px;
}
.service__title {
  font-family: var(--display);
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.25;
}
.service__text {
  color: var(--muted);
  max-width: 620px;
  font-size: 15px;
}

/* ============ CLIENTS ============ */
.clients__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.6vw, 18px);
}
.client {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.25s;
}
.client:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
}
/* абсолютное позиционирование вместо flex + max-height:
   в Safari проценты не резолвятся внутри aspect-ratio-контейнера */
.client img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: clamp(18px, 3vw, 34px);
  box-sizing: border-box;
  object-fit: contain;
}

/* ============ CONTACTS ============ */
.contacts__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
  margin-top: clamp(24px, 4vw, 48px);
}
.contacts__hook {
  font-family: var(--display);
  font-size: clamp(28px, 4.6vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  margin-bottom: clamp(20px, 3vw, 32px);
}
.contacts__mail {
  font-size: clamp(17px, 2.2vw, 24px);
  font-weight: 700;
  color: var(--accent);
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
  word-break: break-all;
}
.contacts__mail:hover { border-color: var(--accent); }
.contacts__info {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 36px);
}
.contacts__label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.contacts__link {
  display: block;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  padding: 3px 0;
  transition: color 0.2s;
}
.contacts__link:hover { color: var(--accent); }
.contacts__text { font-size: 16px; }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(28px, 4vw, 44px) 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__logo { width: 72px; height: auto; opacity: 0.85; }
.footer__nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer__nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}
.footer__nav a:hover { color: var(--text); }
.footer__copy { font-size: 13px; color: var(--muted); }

/* ============ FALLBACK: старые браузеры без aspect-ratio ============ */
@supports not (aspect-ratio: 1 / 1) {
  .card__poster { height: 0; padding-bottom: 142%; }
  .showreel__frame { height: 0; padding-bottom: 56.25%; }
  .client { height: clamp(110px, 14vw, 170px); }
}

/* ============ REVEAL ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .projects__grid { grid-template-columns: repeat(3, 1fr); }
  .clients__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .about__grid,
  .contacts__grid { grid-template-columns: 1fr; }

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: rgba(10, 10, 12, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 105;
  }
  .nav.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .nav__link {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 500;
    color: var(--text);
    padding: 12px;
  }
  .nav__link--cta { border: none; padding: 12px; }
  .nav__link--cta:hover { background: none; color: var(--accent); }
  .burger { display: flex; }
}

@media (max-width: 640px) {
  .projects__grid { grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
  .clients__grid { grid-template-columns: repeat(2, 1fr); }
  .card__title { font-size: 14px; }
  .card__meta { font-size: 12px; }
  .service { grid-template-columns: 48px 1fr; }
  .stats { gap: 22px 16px; }
  .btn { padding: 14px 26px; font-size: 14px; width: 100%; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
}
