/* ============================================================
   Twin Tail Digital — Shared Stylesheet
   Applies to all pages. Page-specific styles live inline.
   ============================================================ */

/* ===== FONTS ===== */
@font-face {
  font-family: 'Orbitron';
  src: url('../fonts/Orbitron-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Orbitron';
  src: url('../fonts/Orbitron-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Orbitron';
  src: url('../fonts/Orbitron-Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: 'Rajdhani';
  src: url('../fonts/Rajdhani-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Rajdhani';
  src: url('../fonts/Rajdhani-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Rajdhani';
  src: url('../fonts/Rajdhani-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Rajdhani';
  src: url('../fonts/Rajdhani-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Rajdhani';
  src: url('../fonts/Rajdhani-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Share Tech Mono';
  src: url('../fonts/ShareTechMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

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

/* ===== ACCESSIBILITY ===== */

/* Visually hidden but available to screen readers and search engines */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip navigation link — invisible until focused by keyboard */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 10000;
  padding: 0.75rem 1.5rem;
  background: var(--green-bright);
  color: var(--bg-dark);
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ===== VARIABLES ===== */
:root {
  --purple-deep: #1a0a2e;
  --purple-mid: #3d1a78;
  --purple-bright: #7b2ff7;
  --purple-glow: #a855f7;
  --green-bright: #39ff14;
  --green-mid: #2ecc40;
  --green-dim: #1a9928;
  --white: #f0f0f0;
  --white-dim: #b0b0c0;
  --bg-dark: #0a0612;
  --red-alert: #ff3333;
  --scanline-opacity: 0.04;
}

/* ===== BASE ===== */
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--purple-bright) var(--bg-dark);
}

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg-dark);
  color: var(--white);
  line-height: 1.6;
}

/* ===== SCANLINE OVERLAY ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, var(--scanline-opacity)) 2px,
    rgba(0, 0, 0, var(--scanline-opacity)) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ===== NOISE TEXTURE ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
}

/* ===== CRT SCANLINE SWEEP ===== */
.crt-scanline {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(168, 85, 247, 0.06) 20%,
    rgba(57, 255, 20, 0.08) 50%,
    rgba(168, 85, 247, 0.06) 80%,
    transparent 100%
  );
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.05);
  z-index: 9997;
  pointer-events: none;
  animation: scanlineSweep 8s linear infinite;
}

@keyframes scanlineSweep {
  0%   { transform: translateY(-4px); }
  100% { transform: translateY(100vh); }
}

/* ===== SHARED ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.7; }
}
