@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #08090B;
  --text: #EEEAE4;
  --muted: #8B919A;
  --accent: #5B7FF0;
  --accent-deep: #1F4AD8;
  --accent-side: #13308F;
  --line: rgba(238, 234, 228, 0.08);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 20;
  background: var(--accent);
  color: #0B1020;
  padding: 8px 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  border-radius: 4px;
}
.skip:focus { top: 12px; }

.stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 32px;
}

/* Grid */
.grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(91, 127, 240, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 127, 240, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 42%, #000 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 42%, #000 0%, transparent 68%);
  z-index: 0;
}

/* Animated facet glow — GPU transforms/opacity only */
.glow {
  position: absolute;
  width: min(720px, 90vw);
  height: min(720px, 90vw);
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
  opacity: 0.55;
}
.glow span {
  position: absolute;
  inset: 18%;
  border-radius: 40% 55% 45% 60%;
  background:
    radial-gradient(circle at 30% 30%, rgba(91, 127, 240, 0.55), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(31, 74, 216, 0.45), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(19, 48, 143, 0.4), transparent 50%);
  animation: drift 18s ease-in-out infinite alternate;
  will-change: transform;
}
.glow span:nth-child(2) {
  inset: 26%;
  border-radius: 55% 40% 60% 45%;
  animation-duration: 22s;
  animation-direction: alternate-reverse;
  opacity: 0.8;
}

@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) rotate(0deg) scale(1); }
  to   { transform: translate3d(3%, 3%, 0) rotate(12deg) scale(1.08); }
}

/* Floating SVG facets */
.facets {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.facets svg {
  position: absolute;
  width: 120px;
  height: 120px;
  opacity: 0.18;
  animation: float 16s ease-in-out infinite;
  will-change: transform, opacity;
}
.facets svg:nth-child(1) { top: 14%; left: 10%; animation-duration: 18s; }
.facets svg:nth-child(2) { top: 18%; right: 12%; width: 88px; height: 88px; animation-duration: 22s; animation-delay: -4s; }
.facets svg:nth-child(3) { bottom: 16%; left: 16%; width: 72px; height: 72px; animation-duration: 20s; animation-delay: -8s; }
.facets svg:nth-child(4) { bottom: 18%; right: 14%; width: 96px; height: 96px; animation-duration: 24s; animation-delay: -2s; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.14; }
  50% { transform: translate3d(0, -14px, 0); opacity: 0.28; }
}

.card {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 40rem;
}

.logo {
  display: block;
  margin: 0 auto 2.5rem;
  width: min(420px, 86vw);
  height: auto;
  animation: logo-in 1.1s cubic-bezier(.22, 1, .36, 1) both;
}
.logo--stacked { display: none; }

@keyframes logo-in {
  from { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.97); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

h1 {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 450;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #F3F5F7;
  animation: rise 1s cubic-bezier(.22, 1, .36, 1) 0.25s both;
}

.line {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--muted);
  animation: rise 1s cubic-bezier(.22, 1, .36, 1) 0.4s both;
}

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

footer {
  position: relative;
  z-index: 1;
  padding: 0 24px 28px;
  text-align: center;
}
footer p {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

@media (max-width: 520px) {
  .logo--horizontal { display: none; }
  .logo--stacked { display: block; width: min(220px, 64vw); margin-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .glow span, .facets svg, .logo, h1, .line {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .glow { opacity: 0.35; }
}
