/* bae64.net — y2k / hyperpop landing */

:root {
  --bg-0: #050010;
  --bg-1: #0a0024;
  --bg-2: #1a0040;
  --neon-pink: #ff2bd6;
  --neon-cyan: #00f0ff;
  --neon-lime: #c8ff00;
  --neon-violet: #a020f0;
  --chrome-0: #f4f4ff;
  --chrome-1: #b9b9d4;
  --chrome-2: #6b6b80;
  --chrome-3: #2a2a40;
  --window: #c0c0c8;
  --window-dark: #808088;
  --window-shadow: #404048;
  --title-grad-a: #1a0034;
  --title-grad-b: #ff2bd6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--chrome-0);
  font-family: "VT323", ui-monospace, "Courier New", monospace;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 43, 214, 0.25), transparent 50%),
    radial-gradient(ellipse at 85% 85%, rgba(0, 240, 255, 0.20), transparent 55%),
    radial-gradient(ellipse at 60% 50%, rgba(160, 32, 240, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 60%, var(--bg-2));
  background-attachment: fixed;
}

/* perspective grid floor */
.bg-grid {
  position: fixed;
  inset: 55% 0 -20% 0;
  background-image:
    linear-gradient(rgba(255, 43, 214, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.5) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(400px) rotateX(60deg);
  transform-origin: top center;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1), transparent 90%);
  animation: gridscroll 4s linear infinite;
  opacity: 0.7;
}

@keyframes gridscroll {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 60px, 60px 0; }
}

/* crt scanlines */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.0) 0,
    rgba(255, 255, 255, 0.0) 2px,
    rgba(0, 0, 0, 0.18) 3px,
    rgba(0, 0, 0, 0.0) 4px
  );
  mix-blend-mode: multiply;
  z-index: 2;
}

/* floating stars */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  font-family: "VT323", monospace;
}
.stars span {
  position: absolute;
  color: var(--chrome-0);
  text-shadow: 0 0 6px var(--neon-cyan), 0 0 12px var(--neon-pink);
  animation: twinkle 3s ease-in-out infinite;
  font-size: clamp(10px, 1.5vw, 18px);
}
.stars span:nth-child(1) { top: 8%;  left: 12%; animation-delay: 0.0s; }
.stars span:nth-child(2) { top: 18%; left: 82%; animation-delay: 0.3s; font-size: 22px; }
.stars span:nth-child(3) { top: 35%; left: 6%;  animation-delay: 0.8s; }
.stars span:nth-child(4) { top: 28%; left: 65%; animation-delay: 1.1s; }
.stars span:nth-child(5) { top: 70%; left: 92%; animation-delay: 1.6s; font-size: 14px; }
.stars span:nth-child(6) { top: 78%; left: 18%; animation-delay: 2.0s; font-size: 24px; }
.stars span:nth-child(7) { top: 88%; left: 55%; animation-delay: 0.5s; }
.stars span:nth-child(8) { top: 50%; left: 95%; animation-delay: 2.4s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8) rotate(0deg); }
  50%      { opacity: 1.0; transform: scale(1.2) rotate(90deg); }
}

/* layout */
.screen {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 48px);
}

/* OS window */
.window {
  width: min(640px, 100%);
  background: var(--window);
  color: #000;
  border: 2px solid;
  border-color: #ffffff var(--window-shadow) var(--window-shadow) #ffffff;
  box-shadow:
    inset -1px -1px 0 #ffffff,
    inset 1px 1px 0 var(--window-dark),
    0 0 0 1px #000,
    0 0 30px rgba(255, 43, 214, 0.5),
    0 0 60px rgba(0, 240, 255, 0.3);
  padding: 3px;
  font-family: "VT323", monospace;
}

.title-bar {
  background: linear-gradient(90deg, var(--title-grad-a), var(--neon-violet) 40%, var(--neon-pink));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  font-family: "Press Start 2P", "VT323", monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #000;
  border: 1px solid #000;
}
.title-bar-text { padding-left: 2px; }
.title-bar-controls {
  display: flex;
  gap: 2px;
}
.title-bar-controls button {
  width: 18px;
  height: 16px;
  font-family: "VT323", monospace;
  font-size: 14px;
  line-height: 1;
  background: var(--window);
  color: #000;
  border: 1px solid;
  border-color: #ffffff var(--window-shadow) var(--window-shadow) #ffffff;
  cursor: default;
  padding: 0;
}

.window-body {
  background: linear-gradient(180deg, #0a0014, #1a0040);
  color: var(--chrome-0);
  padding: clamp(16px, 4vw, 28px) clamp(14px, 4vw, 32px);
  text-align: center;
  border: 1px solid #000;
  border-top: none;
  position: relative;
  overflow: hidden;
}

/* noise on window body */
.window-body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: screen;
}

/* chrome logo */
.logo {
  margin: 8px 0 4px;
  font-family: "Press Start 2P", "VT323", monospace;
  font-size: clamp(32px, 9vw, 72px);
  letter-spacing: 2px;
  line-height: 1;
  position: relative;
}

.chrome {
  display: inline-block;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #c8c8e0 18%,
    #6a6a8a 35%,
    #2a2a40 50%,
    #6a6a8a 65%,
    #c8c8e0 82%,
    #ffffff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 1px var(--chrome-1),
    0 0 14px rgba(255, 43, 214, 0.55),
    0 0 28px rgba(0, 240, 255, 0.35);
  filter: drop-shadow(2px 2px 0 #000);
  position: relative;
}

/* rgb-split glitch on logo */
.chrome::before, .chrome::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: transparent;
  pointer-events: none;
  mix-blend-mode: screen;
}
.chrome::before {
  color: var(--neon-pink);
  transform: translate(-2px, 0);
  animation: glitch-x 4s steps(8) infinite;
  opacity: 0.7;
}
.chrome::after {
  color: var(--neon-cyan);
  transform: translate(2px, 0);
  animation: glitch-x 3.2s steps(8) infinite reverse;
  opacity: 0.7;
}
@keyframes glitch-x {
  0%, 92%, 100% { transform: translate(-2px, 0); }
  93% { transform: translate(-6px, 1px); }
  95% { transform: translate(2px, -1px); }
  97% { transform: translate(-3px, 1px); }
}

.tagline {
  font-size: clamp(16px, 2.4vw, 22px);
  color: var(--chrome-0);
  margin: 6px 0 18px;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
}
.cursor {
  display: inline-block;
  color: var(--neon-lime);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* marquee */
.marq {
  display: block;
  background: #000;
  color: var(--neon-lime);
  font-family: "VT323", monospace;
  font-size: clamp(16px, 2.2vw, 20px);
  letter-spacing: 1.5px;
  padding: 6px 0;
  border: 1px solid var(--neon-violet);
  box-shadow: 0 0 12px rgba(160, 32, 240, 0.6) inset, 0 0 12px rgba(160, 32, 240, 0.4);
  margin: 12px 0 20px;
}

/* link buttons */
.links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}
@media (max-width: 480px) {
  .links { grid-template-columns: 1fr; }
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  background: linear-gradient(180deg, #ffffff, #c8c8d8 50%, #888898);
  color: #000;
  text-decoration: none;
  font-family: "Press Start 2P", "VT323", monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  border: 2px solid;
  border-color: #ffffff #404048 #404048 #ffffff;
  box-shadow: inset -1px -1px 0 var(--window-dark), inset 1px 1px 0 #ffffff;
  cursor: pointer;
  position: relative;
  transition: transform 0.05s ease;
}
.btn:hover {
  background: linear-gradient(180deg, #ffd8f6, #ff2bd6 50%, #a020f0);
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}
.btn:active {
  transform: translate(1px, 1px);
  border-color: #404048 #ffffff #ffffff #404048;
  box-shadow: inset 1px 1px 0 var(--window-dark), inset -1px -1px 0 #ffffff;
}
.btn-icon {
  font-family: "VT323", monospace;
  font-size: 16px;
}
.btn-label { font-size: 9px; }

/* LCD readout */
.lcd {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 6px 12px;
  align-items: center;
  background: #001100;
  color: var(--neon-lime);
  font-family: "VT323", monospace;
  font-size: clamp(14px, 2vw, 18px);
  padding: 8px 12px;
  border: 2px solid #003300;
  box-shadow: inset 0 0 12px rgba(0, 255, 0, 0.25), 0 0 8px rgba(0, 255, 0, 0.15);
  text-shadow: 0 0 6px rgba(200, 255, 0, 0.8);
  margin-top: 8px;
}
.lcd-label {
  color: #88dd55;
  font-size: 12px;
  letter-spacing: 1px;
}
.lcd-time, .lcd-count {
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
@media (max-width: 480px) {
  .lcd { grid-template-columns: auto 1fr; }
}

/* status bar */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--window);
  color: #000;
  border: 1px solid;
  border-color: var(--window-shadow) #ffffff #ffffff var(--window-shadow);
  padding: 3px 8px;
  margin-top: 3px;
  font-size: 14px;
  font-family: "VT323", monospace;
}
.status-bar .dot {
  color: #00aa00;
  text-shadow: 0 0 6px #00ff00;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

/* a11y: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .marq { animation: none; }
}
