:root {
  --black: #090909;
  --black-2: #030407;
  --white: #f7f8fb;
  --soft-white: rgba(247, 248, 251, 0.78);
  --blue: #0049cd;
  --blue-hot: #0061ff;
  --blue-dark: #001a58;
  --line: rgba(255, 255, 255, 0.08);
  --x: 50vw;
  --y: 50vh;
  --mx: 0;
  --my: 0;
  --font-logo-close: "Arial Rounded MT Bold", "SF Pro Rounded", "Avenir Next", "Inter Tight", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-text: "Avenir Next", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 118%, rgba(0, 73, 205, 0.24), transparent 34%),
    radial-gradient(circle at 50% -12%, rgba(255, 255, 255, 0.05), transparent 24%),
    linear-gradient(135deg, var(--black-2), var(--black) 46%, #020205);
  color: var(--white);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button, a { font: inherit; }

#signal,
.aurora,
.grid,
.noise,
.scan,
.cursor-light {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#signal { z-index: 1; opacity: 0.78; mix-blend-mode: screen; }

.aurora {
  z-index: 0;
  background:
    radial-gradient(circle at calc(var(--x) + 10vw) calc(var(--y) - 10vh), rgba(0, 97, 255, 0.18), transparent 34vmin),
    radial-gradient(circle at calc(var(--x) - 22vw) calc(var(--y) + 18vh), rgba(255, 255, 255, 0.07), transparent 28vmin),
    conic-gradient(from 220deg at 50% 50%, transparent, rgba(0, 73, 205, 0.10), transparent 20%, transparent 100%);
  filter: blur(18px) saturate(1.15);
  transform: translate3d(calc(var(--mx) * -10px), calc(var(--my) * -10px), 0) scale(1.05);
}

.grid {
  z-index: 2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.038) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.034) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 68%);
  transform: perspective(700px) rotateX(64deg) translateY(26vh) translateZ(-100px) scale(1.55);
  transform-origin: center bottom;
  animation: grid-drift 12s linear infinite;
}

.noise {
  z-index: 20;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.scan {
  z-index: 21;
  opacity: 0.28;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(255,255,255,0.045) 3px, transparent 4px);
}

.cursor-light {
  z-index: 3;
  background: radial-gradient(circle at var(--x) var(--y), rgba(0, 97, 255, 0.18), transparent 24vmin);
}

.page {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(22px, 3.2vw, 54px);
  isolation: isolate;
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  letter-spacing: 0.04em;
}

.footer {
  justify-content: space-around;
}

.logo {
  display: block;
  width: clamp(142px, 17vw, 250px);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(0, 73, 205, 0.28));
  transform: translateZ(0);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(247, 248, 251, 0.58);
  font-size: clamp(10px, 0.84vw, 12px);
  text-transform: uppercase;
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--blue-hot);
  box-shadow: 0 0 0 6px rgba(0, 97, 255, 0.12), 0 0 22px rgba(0, 97, 255, 0.9);
  animation: pulse 1.8s ease-in-out infinite;
}

.hero {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(18px, 3vw, 36px);
  min-height: 62vh;
  text-align: center;
  perspective: 900px;
}

.portal {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: clamp(260px, 42vw, 610px);
  aspect-ratio: 1 / 1.08;
  transform-style: preserve-3d;
  transform:
    translate3d(-50%, -52%, 0)
    rotateX(calc(var(--my) * -7deg))
    rotateY(calc(var(--mx) * 11deg));
  filter: drop-shadow(0 0 52px rgba(0, 73, 205, 0.24));
  opacity: 0.72;
}

.portal__plate,
.portal__edge {
  position: absolute;
  inset: 0;
  clip-path: polygon(31% 12%, 80% 12%, 80% 70%, 62% 88%, 31% 88%, 31% 41%);
}

.portal__plate--main {
  background:
    linear-gradient(135deg, rgba(0, 97, 255, 0.92), rgba(0, 58, 166, 0.92) 72%),
    var(--blue);
  transform: translateZ(-120px) scale(0.9);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.11), inset 0 -60px 120px rgba(0,0,0,0.25);
}

.portal__plate--back {
  background: linear-gradient(135deg, transparent 2%, rgba(255,255,255,0.18), transparent 55%);
  transform: translate3d(-2.8%, -3%, -180px) scale(1.06);
  opacity: 0.32;
}

.portal__plate--main span {
  position: absolute;
  top: 46%;
  left: 54%;
  transform: translate(-50%, -50%);
  color: rgba(3, 4, 7, 0.9);
  font-family: var(--font-logo-close);
  font-size: clamp(78px, 12vw, 170px);
  font-weight: 1000;
  letter-spacing: -0.11em;
}

.portal__edge--one {
  inset: 10%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.38), transparent);
  transform: translateZ(-20px) rotate(12deg);
  opacity: 0.18;
  animation: slice 5.8s ease-in-out infinite;
}

.portal__edge--two {
  inset: 20% 4%;
  background: linear-gradient(90deg, transparent, rgba(0, 97, 255, 0.64), transparent);
  transform: translateZ(40px) rotate(-18deg);
  opacity: 0.22;
  animation: slice 7.2s ease-in-out infinite reverse;
}

.kicker {
  margin: 0;
  color: rgba(247, 248, 251, 0.62);
  font-size: clamp(10px, 1.08vw, 14px);
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.headline {
  margin: 0;
  display: grid;
  gap: 0.01em;
  font-family: var(--font-logo-close);
  font-size: clamp(50px, 8.8vw, 150px);
  font-weight: 1000;
  line-height: 0.82;
  letter-spacing: -0.085em;
  text-transform: lowercase;
  text-wrap: balance;
}

.headline span {
  display: block;
  position: relative;
  color: transparent;
  background:
    linear-gradient(90deg, rgba(247,248,251,0.92), var(--white) 42%, rgba(0,97,255,0.96) 78%, rgba(247,248,251,0.98));
  background-size: 180% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  text-shadow: 0 0 32px rgba(0, 73, 205, 0.12);
  animation: text-wave 7.5s ease-in-out infinite;
}

.headline span:nth-child(2) { animation-delay: -1.2s; }
.headline span:nth-child(3) { animation-delay: -2.1s; }

.headline span::before,
.headline span::after {
  content: attr(data-copy);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.message {
  margin: 0;
  max-width: 790px;
  color: var(--soft-white);
  font-size: clamp(18px, 2.15vw, 31px);
  font-weight: 780;
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.message::selection,
.headline span::selection,
.kicker::selection { background: var(--blue); color: var(--white); }

.footer {
  color: rgba(247, 248, 251, 0.42);
  font-size: clamp(10px, 0.95vw, 13px);
  font-weight: 800;
  text-transform: uppercase;
}

.footer span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 64px, 0 64px; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.65; }
  50% { transform: scale(1.35); opacity: 1; }
}

@keyframes text-wave {
  0%, 100% { background-position: 0% 50%; filter: brightness(1); }
  50% { background-position: 100% 50%; filter: brightness(1.25); }
}

@keyframes slice {
  0%, 100% { transform: translate3d(-7%, 0, 40px) rotate(-18deg); opacity: 0.06; }
  45% { transform: translate3d(13%, -8%, 40px) rotate(-10deg); opacity: 0.32; }
}

@media (hover: hover) {
  .headline:hover span:nth-child(1) { animation: glitch-a 520ms steps(2, jump-none) infinite; }
  .headline:hover span:nth-child(2) { animation: glitch-b 460ms steps(2, jump-none) infinite; }
  .headline:hover span:nth-child(3) { animation: glitch-a 640ms steps(2, jump-none) infinite reverse; }
}

@keyframes glitch-a {
  0%, 100% { transform: translate(0); text-shadow: 0 0 34px rgba(0,73,205,.12); }
  25% { transform: translate(-2px, 1px); text-shadow: 4px 0 0 rgba(0,97,255,.5); }
  50% { transform: translate(2px, -1px); text-shadow: -5px 0 0 rgba(247,248,251,.24); }
  75% { transform: translate(-1px, -2px); text-shadow: 2px 0 0 rgba(0,73,205,.7); }
}

@keyframes glitch-b {
  0%, 100% { transform: translate(0) skewX(0deg); }
  35% { transform: translate(2px, 0) skewX(-2deg); }
  65% { transform: translate(-2px, 1px) skewX(2deg); }
}

@media (max-width: 720px) {
  body { overflow: auto; }
  .page { min-height: 100svh; padding: 22px; }
  .topbar { align-items: flex-start; }
  .logo { width: 138px; }
  .status { font-size: 9px; max-width: 110px; justify-content: flex-end; text-align: right; }
  .hero { min-height: 70vh; gap: 22px; }
  .headline { font-size: clamp(48px, 18vw, 92px); }
  .message { font-size: clamp(18px, 7vw, 28px); }
  .message br { display: none; }
  .footer { gap: 18px; flex-wrap: wrap; justify-content: center; }
  .portal { width: 112vw; opacity: 0.54; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  #signal { display: none; }
}
