@font-face {
  font-family: "RebelTypeDog";
  src: url("../fonts/RebelTypeDog-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07050d;
  --white: #f7f4ff;
  --soft: rgba(247, 244, 255, 0.72);
  --muted: rgba(247, 244, 255, 0.48);
  --line: rgba(247, 244, 255, 0.48);
  --line-strong: rgba(247, 244, 255, 0.84);
  --violet: #9b55ff;
  --violet-bright: #bd7cff;
  --violet-soft: rgba(155, 85, 255, 0.24);
  --font-site: "Michroma", "Eurostile", "Microgramma D Extended", "Arial", sans-serif;
  --font-button: "RebelTypeDog", "Arial Narrow", "Segoe UI", Arial, sans-serif;
  --page-x: clamp(24px, 4.2vw, 82px);
  --page-y: clamp(22px, 4vh, 54px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-site);
  font-weight: 400;
  letter-spacing: 0.018em;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }

::selection { background: rgba(155,85,255,.5); color: #fff; }

.site-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg);
}

.hero-video,
.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  z-index: -5;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0;
  filter: saturate(1.05) contrast(1.04) brightness(.86);
  transition: opacity 1.1s ease;
}

.is-ready .hero-video { opacity: 1; }

.hero-fallback {
  z-index: -6;
  background: url("../images/hero-poster.webp") center / cover no-repeat;
  filter: saturate(1.05) contrast(1.04) brightness(.8);
}

.color-wash,
.vignette,
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.color-wash {
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(3,2,8,.92) 0%, rgba(3,2,8,.58) 25%, rgba(3,2,8,.08) 49%, rgba(3,2,8,.18) 72%, rgba(3,2,8,.76) 100%),
    linear-gradient(180deg, rgba(0,0,0,.42) 0%, transparent 28%, transparent 70%, rgba(0,0,0,.58) 100%);
}

.vignette {
  z-index: -2;
  box-shadow: inset 0 0 16vw 5vw rgba(0,0,0,.72);
}

.grain {
  z-index: -1;
  opacity: .08;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.brand {
  position: absolute;
  z-index: 3;
  top: calc(var(--page-y) + env(safe-area-inset-top));
  left: calc(var(--page-x) + env(safe-area-inset-left));
}

.brand__link {
  display: block;
  width: clamp(62px, 5vw, 92px);
  opacity: .92;
  transition: opacity .3s ease, transform .3s ease;
}

.brand__link:hover { opacity: 1; transform: translateY(-2px); }

.brand__logo {
  display: block;
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 0 6px rgba(164,90,255,.62))
    drop-shadow(0 0 22px rgba(126,42,255,.3));
}

.hero-copy {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: calc(var(--page-x) + env(safe-area-inset-left));
  width: min(42vw, 690px);
  transform: translateY(-48%);
}

.eyebrow {
  margin: 0 0 clamp(18px, 2.2vh, 30px);
  color: rgba(255,255,255,.48);
  font-size: clamp(9px, .7vw, 12px);
  letter-spacing: .27em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(43px, 4.15vw, 80px);
  line-height: .95;
  font-weight: 400;
  letter-spacing: .015em;
  text-transform: uppercase;
  text-shadow: 0 6px 34px rgba(0,0,0,.55);
}

h1 span { display: block; white-space: nowrap; }
h1 .accent {
  color: var(--violet-bright);
  text-shadow: 0 0 30px rgba(151,64,255,.3), 0 6px 34px rgba(0,0,0,.55);
}

.copy-rule {
  display: block;
  width: clamp(38px, 3vw, 62px);
  height: 2px;
  margin: clamp(24px, 3.2vh, 42px) 0 clamp(21px, 2.8vh, 34px);
  background: var(--violet-bright);
  box-shadow: 0 0 18px rgba(155,85,255,.48);
}

.hero-copy__lead {
  margin: 0;
  max-width: 610px;
  color: rgba(255,255,255,.88);
  font-size: clamp(16px, 1.32vw, 25px);
  line-height: 1.45;
  letter-spacing: .025em;
  text-shadow: 0 3px 22px rgba(0,0,0,.72);
}

.primary-actions {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: calc(var(--page-x) + env(safe-area-inset-right));
  display: grid;
  width: clamp(250px, 20vw, 344px);
  gap: clamp(12px, 1.5vh, 18px);
  transform: translateY(-50%);
}

.action-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: clamp(68px, 8.4vh, 92px);
  padding: 0 clamp(22px, 2vw, 34px);
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(7,5,13,.26);
  color: var(--white);
  cursor: pointer;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-family: var(--font-button);
  font-size: clamp(12px, .86vw, 16px);
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: border-color .35s ease, background .35s ease, transform .35s ease, box-shadow .35s ease;
}

.action-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(155,85,255,.14));
  transform: translateX(-105%);
  z-index: 2;
  pointer-events: none;
  transition: transform .48s cubic-bezier(.2,.7,.2,1);
}

.action-button > span:not(.action-button__shade),
.action-button__label,
.action-button svg { position: relative; z-index: 3; }

.action-button__video,
.action-button__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.action-button__video {
  z-index: 0;
  display: block;
  object-fit: cover;
  object-position: center;
}

.action-button__shade {
  z-index: 1;
  display: block;
  background: rgba(0, 0, 0, .72);
}

.action-button--showreel {
  background: rgba(7,5,13,.5);
}

.action-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--violet-bright);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.action-button:first-child svg path { fill: none; }

.action-button:hover,
.action-button:focus-visible {
  outline: none;
  border-color: var(--line-strong);
  background: rgba(12,8,22,.46);
  transform: translateX(-6px);
  box-shadow: 0 0 30px rgba(98,34,176,.14), inset 0 0 34px rgba(92,37,160,.08);
}

.action-button:hover::before,
.action-button:focus-visible::before { transform: translateX(0); }

.social-links {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(clamp(18px, 3.2vh, 38px) + env(safe-area-inset-bottom));
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.social-link {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(38px, 2.8vw, 48px);
  height: clamp(38px, 2.8vw, 48px);
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(5,4,10,.34);
  color: rgba(255,255,255,.8);
  text-decoration: none;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.social-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.social-link--behance span {
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.08em;
}

.social-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  padding: 6px 8px;
  background: rgba(5,4,10,.9);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.82);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .2s ease, transform .2s ease;
}

.social-link:hover,
.social-link:focus-visible {
  outline: none;
  color: var(--violet-bright);
  border-color: rgba(190,126,255,.75);
  background: rgba(14,8,24,.65);
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(155,85,255,.2);
}

.social-link:hover::after,
.social-link:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

.ambient-control {
  position: absolute;
  z-index: 4;
  left: calc(var(--page-x) + env(safe-area-inset-left));
  bottom: calc(clamp(18px, 3.2vh, 38px) + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: clamp(142px, 11.5vw, 184px);
  height: clamp(38px, 2.8vw, 48px);
  padding: 0 clamp(11px, 1vw, 15px);
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(5,4,10,.34);
  color: rgba(255,255,255,.8);
  font-family: var(--font-button);
  cursor: pointer;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.ambient-control:hover,
.ambient-control:focus-visible,
.ambient-control.is-playing {
  outline: none;
  color: var(--violet-bright);
  border-color: rgba(190,126,255,.75);
  background: rgba(14,8,24,.65);
  box-shadow: 0 0 22px rgba(155,85,255,.2);
}

.ambient-control:hover,
.ambient-control:focus-visible { transform: translateY(-3px); }

.ambient-control__copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
}

.ambient-control__label {
  font-size: clamp(9px, .62vw, 11px);
  letter-spacing: .16em;
}

.ambient-control__state {
  color: rgba(255,255,255,.38);
  font-size: 8px;
  letter-spacing: .12em;
}

.ambient-control.is-playing .ambient-control__state { color: var(--violet-bright); }

.ambient-meter {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  width: 44px;
  height: 18px;
}

.ambient-meter i {
  display: block;
  width: 2px;
  height: var(--level, 16%);
  min-height: 2px;
  max-height: 100%;
  background: currentColor;
  opacity: .58;
  transform-origin: center;
  transition: height 80ms linear, opacity .25s ease;
}

.ambient-control.is-playing .ambient-meter i { opacity: .95; }

.screen-note {
  position: absolute;
  z-index: 2;
  right: calc(var(--page-x) + env(safe-area-inset-right));
  bottom: calc(var(--page-y) + env(safe-area-inset-bottom));
  margin: 0;
  color: rgba(255,255,255,.25);
  font-size: 9px;
  letter-spacing: .25em;
}

.preloader {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  background: #05040a;
  transition: opacity .65s ease, visibility .65s ease;
}

.preloader__logo {
  width: 90px;
  filter: drop-shadow(0 0 28px rgba(155,85,255,.45));
  animation: preloaderPulse 1.25s ease-in-out infinite alternate;
}

.preloader__line {
  position: absolute;
  left: 50%;
  top: calc(50% + 82px);
  width: 120px;
  height: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.12);
  transform: translateX(-50%);
}

.preloader__line::after {
  content: "";
  display: block;
  width: 50%;
  height: 100%;
  background: var(--violet-bright);
  animation: preloaderLine 1.2s ease-in-out infinite;
}

.is-ready .preloader { opacity: 0; visibility: hidden; pointer-events: none; }

@keyframes preloaderPulse { to { opacity: .62; transform: scale(.96); } }
@keyframes preloaderLine { from { transform: translateX(-120%); } to { transform: translateX(260%); } }

.modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 64px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .34s ease, visibility .34s ease;
}

.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; visibility: visible; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,1,6,.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.modal__frame {
  position: relative;
  z-index: 1;
  width: min(100%, 900px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.34);
  background:
    linear-gradient(145deg, rgba(22,13,38,.92), rgba(7,5,12,.96)),
    #08050d;
  box-shadow: 0 30px 90px rgba(0,0,0,.65), 0 0 70px rgba(100,35,180,.14);
  transform: translateY(18px) scale(.985);
  transition: transform .42s cubic-bezier(.2,.8,.2,1);
}

.modal.is-open .modal__frame { transform: translateY(0) scale(1); }
.modal__frame--video { width: min(92vw, 1500px); }
.modal__frame--text { width: min(92vw, 820px); }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  padding: 24px clamp(24px, 3vw, 44px);
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.modal__kicker {
  margin: 0 0 6px;
  color: var(--violet-bright);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.modal h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 48px);
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.close-button {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.28);
  background: transparent;
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.close-button span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1px;
  background: var(--white);
}
.close-button span:first-child { transform: translate(-50%,-50%) rotate(45deg); }
.close-button span:last-child { transform: translate(-50%,-50%) rotate(-45deg); }
.close-button:hover,
.close-button:focus-visible { outline: none; border-color: var(--violet-bright); background: rgba(155,85,255,.1); transform: rotate(3deg); }

.showreel-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.showreel-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.modal__content {
  padding: clamp(30px, 4vw, 58px);
  color: rgba(255,255,255,.72);
  font-family: var(--font-site);
  font-size: clamp(15px, 1.2vw, 20px);
  line-height: 1.7;
  letter-spacing: .03em;
}

.modal__content p { margin: 0 0 1.3em; }
.modal__content p:last-child { margin-bottom: 0; }
.modal__intro { color: var(--white); font-size: clamp(20px, 2vw, 30px); line-height: 1.45; }

.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.capabilities span {
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.78);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.contacts-grid dl { margin: 34px 0 0; }
.contacts-grid dl div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,.14);
}
.contacts-grid dt { color: rgba(255,255,255,.42); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.contacts-grid dd { margin: 0; color: var(--white); }
.contacts-grid a { text-decoration: none; border-bottom: 1px solid rgba(155,85,255,.55); transition: color .2s ease, border-color .2s ease; }
.contacts-grid a:hover { color: var(--violet-bright); border-color: currentColor; }

body.modal-open .site-shell { filter: saturate(.6) brightness(.7); }
body.modal-open { cursor: default; }

@media (max-width: 1180px) {
  :root { --page-x: clamp(24px, 3.4vw, 48px); }
  .hero-copy { width: 50vw; }
  h1 { font-size: clamp(43px, 5.2vw, 68px); }
  .primary-actions { width: min(31vw, 300px); }
  .action-button { padding-inline: 22px; }
}

@media (max-width: 820px) {
  .hero-video { object-position: 60% 50%; }
  .color-wash {
    background:
      linear-gradient(180deg, rgba(3,2,8,.68) 0%, rgba(3,2,8,.1) 28%, rgba(3,2,8,.12) 52%, rgba(3,2,8,.88) 100%),
      linear-gradient(90deg, rgba(3,2,8,.66) 0%, transparent 64%, rgba(3,2,8,.35) 100%);
  }
  .brand__link { width: 64px; }
  .hero-copy {
    top: auto;
    bottom: calc(224px + env(safe-area-inset-bottom));
    width: calc(100vw - (var(--page-x) * 2));
    transform: none;
  }
  .eyebrow { display: none; }
  h1 { font-size: clamp(38px, 8.5vw, 64px); line-height: .96; }
  .hero-copy__lead { font-size: clamp(14px, 3.3vw, 18px); }
  .copy-rule { margin: 20px 0 18px; }
  .primary-actions {
    top: auto;
    right: var(--page-x);
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: var(--page-x);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: auto;
    gap: 8px;
    transform: none;
  }
  .action-button {
    justify-content: center;
    min-height: 58px;
    padding: 0 10px;
    font-size: clamp(9px, 2.3vw, 12px);
    letter-spacing: .1em;
    text-align: center;
  }
  .action-button svg { display: none; }
  .action-button:hover,
  .action-button:focus-visible { transform: translateY(-3px); }
  .social-links { bottom: calc(18px + env(safe-area-inset-bottom)); gap: 9px; }
  .social-link { width: 38px; height: 38px; }
  .ambient-control { bottom: calc(18px + env(safe-area-inset-bottom)); height: 38px; width: 132px; }
  .screen-note { display: none; }
  .modal { padding: 12px; }
  .modal__header { min-height: 82px; padding: 18px 20px; }
  .modal__frame--video, .modal__frame--text { width: 100%; }
  .modal__content { padding: 28px 22px; }
}

@media (max-width: 520px) {
  :root { --page-x: 20px; --page-y: 20px; }
  .hero-video { object-position: 61% 50%; }
  .brand__link { width: 54px; }
  .hero-copy { bottom: calc(220px + env(safe-area-inset-bottom)); }
  h1 { font-size: clamp(34px, 10.6vw, 49px); }
  .hero-copy__lead br { display: none; }
  .primary-actions { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .action-button { min-height: 54px; }
  .ambient-control { left: 14px; width: 78px; padding-inline: 9px; }
  .ambient-control__state { display: none; }
  .ambient-control__label { font-size: 8px; letter-spacing: .1em; }
  .ambient-meter { width: 23px; gap: 1px; }
  .ambient-meter i { width: 1px; }
  .contacts-grid dl div { grid-template-columns: 1fr; gap: 6px; }
  .close-button { width: 42px; height: 42px; }
}

@media (max-height: 680px) and (min-width: 821px) {
  .brand { top: 22px; }
  .hero-copy { transform: translateY(-44%); }
  h1 { font-size: clamp(42px, 4.4vw, 68px); }
  .copy-rule { margin-block: 22px; }
  .primary-actions { gap: 10px; }
  .action-button { min-height: 64px; }
  .social-links { bottom: 16px; }
  .ambient-control { bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .hero-video, .action-button__video { display: none; }
}
