/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Nav links ===== */
.nav-link {
  position: relative;
  color: #eeeadd;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.nav-link:hover {
  opacity: 1;
  color: #0047FF;
}

/* ===== Glitch / chromatic aberration headings ===== */
.glitch {
  position: relative;
  color: #eeeadd;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  overflow: hidden;
}
.glitch::before {
  color: #FF1F3D;
  transform: translate(-2px, 1px);
  mix-blend-mode: screen;
  animation: glitch-shift 6s infinite steps(1);
}
.glitch::after {
  color: #0047FF;
  transform: translate(2px, -1px);
  mix-blend-mode: screen;
  animation: glitch-shift 6s infinite steps(1) reverse;
}

@keyframes glitch-shift {
  0%, 92%, 100% { transform: translate(0, 0); opacity: 0; }
  93% { transform: translate(-3px, 1px); opacity: 0.9; }
  94% { transform: translate(3px, -1px); opacity: 0.9; }
  95% { transform: translate(-2px, 0); opacity: 0.9; }
  96% { transform: translate(0, 0); opacity: 0; }
}

/* ===== HUD corner brackets (nav) ===== */
.hud-corners {
  position: relative;
}

/* ===== Crosshair decoration ===== */
.crosshair {
  width: 24px;
  height: 24px;
  pointer-events: none;
}
.crosshair::before,
.crosshair::after {
  content: '';
  position: absolute;
  background: #0047FF;
}
.crosshair::before {
  width: 24px;
  height: 1px;
  top: 50%;
}
.crosshair::after {
  width: 1px;
  height: 24px;
  left: 50%;
}

/* ===== Scanlines overlay ===== */
.scanlines {
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(238, 234, 221, 0.02),
    rgba(238, 234, 221, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* ===== Hero logo frame ===== */
.hud-frame {
  position: relative;
  padding: 2rem;
}
.hud-frame::before,
.hud-frame::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid #0047FF;
}
.hud-frame::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}
.hud-frame::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-color: #FF1F3D;
}

/* ===== Service cards ===== */
.service-card {
  background: #0a0a0a;
  padding: 2rem 1.5rem;
  transition: background 0.2s ease;
}
.service-card:hover {
  background: #111111;
}

/* ===== Stat cards ===== */
.stat-card {
  background: #0a0a0a;
  padding: 1.75rem 1.5rem;
}

/* ===== CRT gallery ===== */
.crt-shell {
  background: linear-gradient(160deg, #2c2c2c, #111111 60%, #050505);
  border-radius: 28px;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.6),
    inset 0 0 0 2px rgba(238, 234, 221, 0.05);
  position: relative;
}
.crt-shell::before {
  content: '';
  position: absolute;
  top: 14px;
  right: 24px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF1F3D;
  box-shadow: 0 0 6px 1px rgba(255, 31, 61, 0.8);
}

.crt-screen {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    inset 0 0 50px 12px rgba(0, 0, 0, 0.85),
    inset 0 0 90px rgba(0, 71, 255, 0.08);
}
.crt-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.025);
  mix-blend-mode: overlay;
  animation: crt-flicker 6s infinite;
  pointer-events: none;
  z-index: 15;
}

.crt-static {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 140px 140px;
  opacity: 0.14;
  mix-blend-mode: screen;
  animation: crt-static 0.5s steps(8) infinite;
  pointer-events: none;
}

@keyframes crt-static {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 70%; }
}

.crt-track {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.crt-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crt-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: saturate(0.75) contrast(1.15) brightness(0.92);
}

.crt-vignette {
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.7) 100%);
}

@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.85; }
  94% { opacity: 1; }
  97% { opacity: 0.9; }
  98% { opacity: 1; }
}

.crt-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(238, 234, 221, 0.25);
  background: #0a0a0a;
  color: #eeeadd;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.crt-btn:hover {
  border-color: #0047FF;
  color: #0047FF;
}

.crt-thumb {
  position: relative;
  width: clamp(44px, 14vw, 64px);
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(238, 234, 221, 0.2);
  background: #000;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.crt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.5) contrast(1.1) brightness(0.65);
  transition: filter 0.2s ease;
}
.crt-thumb-ch {
  position: absolute;
  left: 2px;
  bottom: 1px;
  font-family: 'Anton', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  color: rgba(238, 234, 221, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.crt-thumb:hover {
  border-color: rgba(238, 234, 221, 0.5);
}
.crt-thumb:hover img {
  filter: saturate(0.7) contrast(1.1) brightness(0.85);
}
.crt-thumb.active {
  border-color: #FF1F3D;
  transform: translateY(-2px);
}
.crt-thumb.active img {
  filter: saturate(0.9) contrast(1.15) brightness(1);
}
.crt-thumb.active .crt-thumb-ch {
  color: #FF1F3D;
}

/* ===== Form inputs ===== */
.hud-input {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(238, 234, 221, 0.2);
  color: #eeeadd;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.hud-input:focus {
  border-color: #0047FF;
}
.hud-input::placeholder {
  color: rgba(238, 234, 221, 0.35);
}
