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

:root {
  --bg: #050505;
  --ink: #f2f2f6;
  --mute: #b8b8c4;
  --acid: #c4ff0e;
  --hot: #ff2d6a;
  --cyan: #00ffd5;
}

html, body { height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100dvh;
}

.collage-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #08080c;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: url("./assets/collages/remix-desktop.jpg");
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.collage-bg.visible {
  opacity: 1;
}

@media (orientation: portrait) and (max-width: 899px) {
  .collage-bg {
    background-image: url("./assets/collages/remix-mobile.jpg");
    background-position: center 38%;
  }
}

@media (min-width: 900px) {
  .collage-bg {
    background-image: url("./assets/collages/remix-desktop.jpg");
    background-position: center 40%;
  }
}

#breakcore-gl {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

#breakcore-gl.ready {
  opacity: 1;
}

.collage-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 5, 8, 0.45) 0%, rgba(5, 5, 8, 0.68) 45%, rgba(5, 5, 8, 0.88) 100%),
    linear-gradient(90deg, rgba(5, 5, 8, 0.55) 0%, transparent 55%);
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  mix-blend-mode: overlay;
  opacity: 0.55;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 0, 0, 0.28) 1px,
    rgba(0, 0, 0, 0.28) 3px
  );
}

.shader-fx {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(196, 255, 14, 0.04) 0 2px,
      transparent 2px 6px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 45, 106, 0.05) 0 1px,
      transparent 1px 5px
    );
  animation: shader-jitter 0.12s steps(2) infinite;
}

@keyframes shader-jitter {
  0% { transform: translate(0, 0); filter: hue-rotate(0deg); }
  50% { transform: translate(-1px, 1px); filter: hue-rotate(8deg); }
  100% { transform: translate(1px, -1px); filter: hue-rotate(-6deg); }
}

@media (prefers-reduced-motion: reduce) {
  .shader-fx { animation: none; opacity: 0.15; }
  .title .glitch::before,
  .title .glitch::after { animation: none; }
}

.page {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: max(24px, env(safe-area-inset-top)) 20px max(88px, calc(72px + env(safe-area-inset-bottom))) 20px;
  max-width: 920px;
}

@media (max-width: 899px) {
  .page {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .title {
    font-size: clamp(2rem, 12vw, 3rem);
    line-height: 0.95;
  }

  .shader-fx {
    opacity: 0.22;
  }

  .scanlines {
    opacity: 0.4;
  }

  #deployMetaDock {
    left: 10px !important;
    right: 10px !important;
    max-width: none !important;
  }
}

.eyebrow {
  font: 700 11px/1.2 ui-monospace, Consolas, monospace;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hot);
  margin: 0 0 10px;
}

.title {
  font-size: clamp(2.4rem, 9vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin: 0 0 16px;
  text-transform: lowercase;
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.title .glitch {
  position: relative;
  display: inline-block;
}

.title .glitch::before,
.title .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.title .glitch::before {
  color: var(--cyan);
  animation: glitch-a 2.6s infinite linear alternate-reverse;
  clip-path: inset(0 0 62% 0);
}

.title .glitch::after {
  color: var(--hot);
  animation: glitch-b 2.1s infinite linear alternate-reverse;
  clip-path: inset(38% 0 0 0);
}

@keyframes glitch-a {
  0% { transform: translate(0); }
  33% { transform: translate(-3px, 1px); }
  66% { transform: translate(2px, -1px); }
  100% { transform: translate(-1px, 0); }
}

@keyframes glitch-b {
  0% { transform: translate(0); }
  40% { transform: translate(3px, 0); }
  80% { transform: translate(-2px, 1px); }
  100% { transform: translate(1px, -1px); }
}

.lede {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  max-width: 36em;
  margin: 0 0 18px;
  color: #e8e8f0;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}

.lede strong { color: var(--acid); }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.stats li {
  font: 600 11px/1 ui-monospace, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 11px;
  border: 1px solid rgba(196, 255, 14, 0.45);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  color: var(--acid);
}

.footer-note {
  font-size: 0.78rem;
  color: var(--mute);
  max-width: 32em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.footer-note a { color: var(--cyan); }

.gh-preview-bar {
  font: 600 11px/1.35 ui-monospace, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 255, 213, 0.55);
  background: rgba(0, 0, 0, 0.72);
  color: var(--cyan);
  max-width: 36em;
}

.beta .collage-bg::after {
  background:
    linear-gradient(180deg, rgba(20, 0, 12, 0.5) 0%, rgba(5, 5, 8, 0.85) 100%),
    linear-gradient(90deg, rgba(40, 0, 20, 0.5) 0%, transparent 60%);
}

.beta-badge {
  display: inline-block;
  font: 700 10px/1 ui-monospace, Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 10px;
  margin-bottom: 12px;
  background: var(--hot);
  color: #050505;
}
