:root {
  color-scheme: dark;
  --ink: #07090d;
  --blue-black: #0a101a;
  --hard-white: #f4f5f2;
  --line: rgba(223, 230, 239, 0.11);
  --line-strong: rgba(231, 236, 242, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

body {
  color: var(--hard-white);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 34rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 48% 44%, rgba(31, 45, 67, 0.55) 0%, transparent 54%),
    linear-gradient(180deg, #0c1420 0%, #090d14 52%, #050609 100%);
}

.motion-field {
  position: absolute;
  z-index: -5;
  inset: -18%;
  overflow: hidden;
  filter: saturate(0.72);
}

.wash,
.ribbon,
.light-sweep {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
}

.wash {
  border-radius: 50%;
  filter: blur(clamp(50px, 8vw, 130px));
}

.wash--a {
  width: 78vw;
  height: 76vw;
  left: -12vw;
  top: -34vw;
  background: rgba(68, 98, 135, 0.56);
  animation: wash-a 19s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

.wash--b {
  width: 58vw;
  height: 58vw;
  right: -8vw;
  bottom: -34vw;
  background: rgba(76, 84, 100, 0.34);
  animation: wash-b 24s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

.ribbon {
  border: clamp(3.8rem, 8vw, 8.5rem) solid rgba(236, 238, 232, 0.28);
  border-radius: 48%;
  filter: blur(clamp(18px, 2.1vw, 34px));
  box-shadow:
    0 0 5rem rgba(235, 239, 236, 0.08),
    inset 0 0 5rem rgba(235, 239, 236, 0.07);
  mix-blend-mode: screen;
}

.ribbon--a {
  width: 74vw;
  height: 108vh;
  left: -5vw;
  top: -45vh;
  transform: rotate(23deg);
  animation: ribbon-a 17s ease-in-out infinite alternate;
}

.ribbon--b {
  width: 66vw;
  height: 88vh;
  right: -5vw;
  top: -10vh;
  border-color: rgba(227, 231, 226, 0.31);
  border-radius: 43% 57% 58% 42% / 56% 44% 56% 44%;
  transform: rotate(-19deg);
  animation: ribbon-b 21s ease-in-out infinite alternate;
}

.ribbon--c {
  width: 54vw;
  height: 70vh;
  left: 15vw;
  bottom: -20vh;
  border-width: clamp(3rem, 6vw, 6.5rem);
  border-color: rgba(176, 188, 198, 0.2);
  transform: rotate(7deg);
  animation: ribbon-c 26s ease-in-out infinite alternate;
}

.light-sweep {
  width: 120vw;
  height: 18vh;
  left: -25vw;
  top: 34%;
  opacity: 0.25;
  background: linear-gradient(90deg, transparent 0%, rgba(234, 237, 233, 0.28) 45%, transparent 75%);
  filter: blur(34px);
  transform: rotate(-14deg) translateX(-30%);
  animation: sweep 15s ease-in-out infinite;
}

.technical-grid {
  position: absolute;
  z-index: -3;
  inset: 0;
  opacity: 0.48;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: clamp(3.6rem, 7.4vw, 7.4rem) clamp(3.6rem, 7.4vw, 7.4rem);
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.82) 70%, transparent 100%);
}

.dot-field {
  position: absolute;
  z-index: -2;
  width: min(43rem, 56vw);
  height: min(29rem, 52vh);
  opacity: 0.36;
  background-image: radial-gradient(circle, rgba(242, 244, 240, 0.8) 0 1px, transparent 1.5px);
  background-size: 12px 12px;
  mask-image: radial-gradient(ellipse at center, black 0%, rgba(0, 0, 0, 0.7) 38%, transparent 72%);
  will-change: transform, opacity;
}

.dot-field--left {
  left: 11%;
  top: 25%;
  transform: rotate(-8deg);
  animation: dots-left 13s ease-in-out infinite alternate;
}

.dot-field--right {
  right: 4%;
  top: 34%;
  transform: rotate(12deg) scale(0.82);
  animation: dots-right 16s ease-in-out infinite alternate;
}

.interface {
  position: absolute;
  z-index: 1;
  inset: 0;
  color: var(--line-strong);
  pointer-events: none;
}

.top-rule {
  position: absolute;
  top: clamp(4.8rem, 8vw, 7.2rem);
  left: clamp(1.6rem, 4vw, 4.8rem);
  right: clamp(1.6rem, 4vw, 4.8rem);
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent 34%, transparent 72%, var(--line));
}

.top-rule::before,
.top-rule::after,
.top-rule i {
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--line-strong);
  content: "";
}

.top-rule::before { left: 0; }
.top-rule::after { right: 0; }
.top-rule i { left: 38%; }

.rail {
  position: absolute;
  top: 19%;
  bottom: 16%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line-strong) 22%, var(--line) 80%, transparent);
}

.rail--left { left: clamp(1.6rem, 4vw, 4.8rem); }
.rail--right { right: clamp(1.6rem, 4vw, 4.8rem); }

.rail span {
  position: absolute;
  width: 8px;
  height: 1px;
  background: var(--line-strong);
}

.rail--left span { left: 0; }
.rail--right span { right: 0; }
.rail span:nth-child(1) { top: 12%; }
.rail span:nth-child(2) { top: 28%; }
.rail span:nth-child(3) { top: 52%; }
.rail span:nth-child(4) { top: 76%; }
.rail span:nth-child(5) { top: 92%; }

.module {
  position: absolute;
  width: clamp(10rem, 16vw, 15rem);
  height: clamp(7rem, 12vw, 11rem);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(216, 225, 235, 0.035), rgba(3, 5, 8, 0.13));
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 2rem rgba(225, 230, 234, 0.025);
}

.module--left {
  left: clamp(1.6rem, 4vw, 4.8rem);
  bottom: clamp(2rem, 5vh, 4.4rem);
}

.module--right {
  right: clamp(1.6rem, 4vw, 4.8rem);
  top: clamp(7.4rem, 14vh, 10rem);
}

.module__bar {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  height: 1.85rem;
  padding: 0 0.7rem;
  border-bottom: 1px solid var(--line);
}

.module__bar i {
  width: 0.31rem;
  height: 0.31rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.module__graph {
  position: absolute;
  inset: 3rem 0.8rem 1.35rem;
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
}

.module__graph::before {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 13px, var(--line) 14px 15px);
  content: "";
}

.module__graph i {
  z-index: 1;
  flex: 1;
  height: 34%;
  border: 1px solid rgba(232, 237, 241, 0.15);
  background: rgba(232, 237, 241, 0.055);
  animation: graph 3.6s ease-in-out infinite alternate;
}

.module__graph i:nth-child(2) { height: 67%; animation-delay: -0.8s; }
.module__graph i:nth-child(3) { height: 45%; animation-delay: -1.8s; }
.module__graph i:nth-child(4) { height: 82%; animation-delay: -0.4s; }
.module__graph i:nth-child(5) { height: 55%; animation-delay: -2.3s; }
.module__graph i:nth-child(6) { height: 72%; animation-delay: -1.3s; }

.module__line {
  position: absolute;
  right: 0.8rem;
  bottom: 0.7rem;
  width: 42%;
  height: 1px;
  background: var(--line-strong);
}

.module__cross {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 76%;
  height: 76%;
  transform: translate(-50%, -50%);
}

.module__cross::before,
.module__cross::after {
  position: absolute;
  background: var(--line);
  content: "";
}

.module__cross::before { top: 50%; left: 0; width: 100%; height: 1px; }
.module__cross::after { left: 50%; top: 0; width: 1px; height: 100%; }

.module__rings {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 4rem;
  height: 4rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: scope 8s linear infinite;
}

.module__rings::before,
.module__rings i {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.module__rings::before { inset: 0.65rem; }
.module__rings i:first-child { inset: 1.3rem; }
.module__rings i:last-child {
  width: 0.32rem;
  height: 0.32rem;
  top: 0.45rem;
  left: 50%;
  border: 0;
  background: rgba(244, 245, 242, 0.6);
}

.module__ticks i {
  position: absolute;
  width: 0.35rem;
  height: 1px;
  background: var(--line-strong);
}

.module__ticks i:nth-child(1) { left: 0.6rem; top: 0.6rem; }
.module__ticks i:nth-child(2) { right: 0.6rem; top: 0.6rem; }
.module__ticks i:nth-child(3) { left: 0.6rem; bottom: 0.6rem; }
.module__ticks i:nth-child(4) { right: 0.6rem; bottom: 0.6rem; }

.hero-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(78vw, 74rem);
  height: clamp(11rem, 28vh, 17rem);
  transform: translate(-50%, -50%);
}

.corner {
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  opacity: 0.56;
}

.corner--tl { left: 0; top: 0; border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); }
.corner--tr { right: 0; top: 0; border-right: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); }
.corner--bl { left: 0; bottom: 0; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.corner--br { right: 0; bottom: 0; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }

.signal {
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 1.4rem;
}

.signal--a { left: 19%; top: 19%; }
.signal--b { right: 22%; bottom: 13%; }

.signal i {
  display: block;
  width: 2px;
  height: 30%;
  background: var(--line-strong);
  animation: meter 2.5s ease-in-out infinite alternate;
}

.signal i:nth-child(2) { height: 65%; animation-delay: -0.7s; }
.signal i:nth-child(3) { height: 100%; animation-delay: -1.1s; }
.signal i:nth-child(4) { height: 48%; animation-delay: -1.7s; }
.signal i:nth-child(5) { height: 78%; animation-delay: -0.3s; }

.scanner {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(238, 241, 238, 0.34), transparent);
  box-shadow: 0 0 1rem rgba(238, 241, 238, 0.2);
  animation: scanner 8s ease-in-out infinite;
}

.logo {
  position: absolute;
  z-index: 8;
  top: clamp(1.45rem, 2.6vw, 2.8rem);
  left: clamp(1.45rem, 3.2vw, 3.8rem);
  display: inline-flex;
  align-items: flex-start;
  color: #fff;
  font-size: clamp(1.4rem, 1.75vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.08em;
  line-height: 1;
}

.logo span {
  margin: -0.1em 0 0 0.06em;
  font-size: 0.55em;
}

.hero {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(4.3rem, 14.2vw, 14.5rem);
  font-weight: 560;
  letter-spacing: -0.087em;
  line-height: 0.8;
  text-indent: -0.08em;
  white-space: nowrap;
  text-shadow: 0 0.08em 0.45em rgba(0, 0, 0, 0.45);
  animation: title-enter 1.35s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.hero p {
  margin: clamp(1.65rem, 3vw, 2.7rem) 0 0;
  color: rgba(246, 247, 244, 0.84);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.66rem, 0.78vw, 0.83rem);
  font-weight: 500;
  letter-spacing: 0.25em;
  line-height: 1;
  text-transform: uppercase;
  animation: sub-enter 1s 0.55s ease both;
}

.icp-record {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  color: rgba(235, 239, 241, 0.34);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.54rem, 0.58vw, 0.62rem);
  font-weight: 400;
  letter-spacing: 0.07em;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: color 180ms ease;
}

.icp-record:hover {
  color: rgba(244, 246, 244, 0.68);
}

.icp-record:focus-visible {
  color: rgba(244, 246, 244, 0.82);
  outline: 1px solid rgba(244, 246, 244, 0.42);
  outline-offset: 0.35rem;
}

.vignette {
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 3, 6, 0.05) 0%, transparent 58%, rgba(2, 3, 5, 0.72) 100%),
    radial-gradient(ellipse at center, transparent 20%, rgba(2, 3, 6, 0.22) 72%, rgba(2, 3, 6, 0.5) 100%);
}

.grain {
  position: absolute;
  z-index: 7;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

@keyframes wash-a {
  0% { transform: translate3d(-8%, -8%, 0) scale(0.94); opacity: 0.62; }
  100% { transform: translate3d(28%, 15%, 0) scale(1.13); opacity: 0.92; }
}

@keyframes wash-b {
  0% { transform: translate3d(8%, 10%, 0) scale(0.88); }
  100% { transform: translate3d(-31%, -25%, 0) scale(1.18); }
}

@keyframes ribbon-a {
  0% { transform: translate3d(-3%, -4%, 0) rotate(18deg) scale(0.94); border-radius: 48%; }
  55% { opacity: 0.78; }
  100% { transform: translate3d(25%, 22%, 0) rotate(34deg) scale(1.08); border-radius: 57% 43% 52% 48% / 44% 59% 41% 56%; }
}

@keyframes ribbon-b {
  0% { transform: translate3d(8%, -8%, 0) rotate(-27deg) scale(0.94); }
  100% { transform: translate3d(-30%, 25%, 0) rotate(-7deg) scale(1.1); }
}

@keyframes ribbon-c {
  0% { transform: translate3d(-8%, 12%, 0) rotate(2deg) scale(0.94); opacity: 0.45; }
  100% { transform: translate3d(22%, -36%, 0) rotate(21deg) scale(1.12); opacity: 0.82; }
}

@keyframes sweep {
  0%, 14% { transform: rotate(-14deg) translateX(-40%); opacity: 0; }
  48% { opacity: 0.28; }
  82%, 100% { transform: rotate(-14deg) translateX(38%); opacity: 0; }
}

@keyframes dots-left {
  to { transform: translate3d(7%, -9%, 0) rotate(-3deg); opacity: 0.56; }
}

@keyframes dots-right {
  to { transform: translate3d(-12%, 8%, 0) rotate(5deg) scale(0.94); opacity: 0.52; }
}

@keyframes graph {
  to { height: 92%; opacity: 0.35; }
}

@keyframes scope {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes meter {
  to { height: 100%; opacity: 0.32; }
}

@keyframes scanner {
  0%, 20% { transform: translateY(-26vh); opacity: 0; }
  35% { opacity: 0.38; }
  72% { opacity: 0.2; }
  88%, 100% { transform: translateY(28vh); opacity: 0; }
}

@keyframes title-enter {
  from { opacity: 0; transform: translateY(0.28em); letter-spacing: -0.13em; filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); letter-spacing: -0.087em; filter: blur(0); }
}

@keyframes sub-enter {
  from { opacity: 0; transform: translateY(0.8rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .stage { min-height: 30rem; }

  .motion-field { inset: -10%; }

  .technical-grid {
    opacity: 0.38;
    background-size: 4.3rem 4.3rem;
  }

  .ribbon { border-width: 4.2rem; filter: blur(16px); }
  .ribbon--a { width: 150vw; height: 78vh; left: -40vw; top: -18vh; }
  .ribbon--b { width: 140vw; height: 72vh; right: -40vw; top: 12vh; }
  .ribbon--c { width: 110vw; height: 54vh; left: 3vw; bottom: -22vh; }

  .wash--a { width: 140vw; height: 140vw; left: -70vw; top: -50vw; }
  .wash--b { width: 130vw; height: 130vw; right: -70vw; bottom: -66vw; }

  .dot-field {
    width: 100vw;
    height: 42vh;
    background-size: 11px 11px;
  }

  .dot-field--left { left: -30%; top: 26%; }
  .dot-field--right { right: -45%; top: 40%; }

  .top-rule { top: 5.1rem; }
  .rail { top: 17%; bottom: 10%; }
  .module--right { width: 7rem; height: 7rem; right: -2.4rem; top: 7.3rem; opacity: 0.68; }
  .module--left { width: 8rem; height: 6rem; left: -2.5rem; bottom: 2rem; opacity: 0.62; }
  .module__graph { inset: 2.5rem 0.6rem 1rem; }
  .hero-frame { width: calc(100vw - 2.9rem); height: 12rem; }
  .signal--a { left: 16%; top: 16%; }
  .signal--b { right: 16%; bottom: 12%; }

  .hero h1 {
    font-size: clamp(4rem, 18vw, 6.2rem);
    letter-spacing: -0.09em;
  }

  .hero p {
    margin-top: 1.65rem;
    font-size: 0.62rem;
    letter-spacing: 0.24em;
  }

  .icp-record {
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    font-size: 0.54rem;
  }

  .vignette {
    background:
      linear-gradient(180deg, transparent 0%, transparent 60%, rgba(2, 3, 5, 0.62) 100%),
      radial-gradient(ellipse at center, transparent 26%, rgba(2, 3, 6, 0.22) 76%, rgba(2, 3, 6, 0.48) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
