/* ================================================
   LOST: FOUND FOOTAGE — Global Styles
   Plutonium Interactive © 2026
   Aesthetic: Analog horror / VHS degradation / Found footage
   ================================================ */

/* ── Font Faces ── */
@font-face {
  font-family: 'Bebas';
  src: url('../fonts/BebasRegular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Bebas';
  src: url('../fonts/BebasBold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Bebas';
  src: url('../fonts/BebasLight.otf') format('opentype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'BebasItalic';
  src: url('../fonts/BebasBookItalic.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

/* ── CSS Variables ── */
:root {
  /* Palette: washed yellowed whites, deep blacks, static whites */
  --black:       #000000;
  --void:        #060504;
  --tape:        #0c0b09;
  --surface:     #141210;
  --surface-2:   #1c1a17;
  --dirty-white: #d4cfc6;
  --tape-yellow: #e8d87a;
  --static:      #b8b4aa;
  --red-rec:     #cc2200;
  --border:      rgba(180, 174, 160, 0.08);
  --border-dim:  rgba(180, 174, 160, 0.18);
  --text:        #cbc5ba;
  --text-muted:  rgba(203, 197, 186, 0.45);
  --glow-tape:   0 0 8px rgba(232, 216, 122, 0.5), 0 0 24px rgba(232, 216, 122, 0.15);
  --glow-rec:    0 0 6px rgba(204, 34, 0, 0.8), 0 0 20px rgba(204, 34, 0, 0.3);

  --font-display: 'Bebas', sans-serif;
  --font-body:    'Courier New', 'Courier', monospace;
  --font-italic:  'BebasItalic', sans-serif;

  --nav-h:    64px;
  --radius:   2px;
  --radius-lg: 4px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  padding-top: var(--nav-h);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

img { display: block; max-width: 100%;}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── ANALOG FILM GRAIN (persistent) ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  animation: grainShift 0.08s steps(1) infinite;
  mix-blend-mode: overlay;
}

@keyframes grainShift {
  0%   { background-position: 0 0; }
  10%  { background-position: -42px 18px; }
  20%  { background-position: 15px -33px; }
  30%  { background-position: -28px -12px; }
  40%  { background-position: 38px 22px; }
  50%  { background-position: -18px 40px; }
  60%  { background-position: 28px -8px; }
  70%  { background-position: -35px 15px; }
  80%  { background-position: 12px -42px; }
  90%  { background-position: -22px 30px; }
  100% { background-position: 0 0; }
}

/* ── VHS SCANLINES ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9996;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.12) 2px,
    rgba(0,0,0,0.12) 4px
  );
  opacity: 0.35;
}

/* ── VHS TRACKING GLITCH ── */
.vhs-tracking {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255,255,255,0.06) 30%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.06) 70%,
    transparent 100%
  );
  z-index: 9998;
  pointer-events: none;
  animation: trackingDrift 14s linear infinite;
  opacity: 0;
}

@keyframes trackingDrift {
  0%   { top: -10px; opacity: 0; }
  2%   { opacity: 0.7; }
  15%  { top: 110vh; opacity: 0.4; }
  16%  { opacity: 0; top: -10px; }
  /* random glitch bursts */
  45%  { top: -10px; opacity: 0; }
  46%  { opacity: 0.5; }
  47%  { top: 30vh; opacity: 0; }
  80%  { opacity: 0; top: -10px; }
  81%  { opacity: 0.6; }
  90%  { top: 110vh; opacity: 0.3; }
  91%  { opacity: 0; top: -10px; }
  100% { opacity: 0; }
}

/* ── REC INDICATOR ── */
.rec-dot {
  position: fixed;
  top: 18px;
  right: 80px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: none;
  opacity: 0.75;
}

.rec-dot::before {
  content: '';
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red-rec);
  box-shadow: var(--glow-rec);
  animation: recBlink 1.2s steps(1) infinite;
}

.rec-dot::after {
  content: 'REC';
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--red-rec);
  text-shadow: var(--glow-rec);
}

@keyframes recBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ── TIMESTAMP ── */
.timestamp {
  position: fixed;
  bottom: 18px;
  left: 24px;
  z-index: 9999;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(203, 197, 186, 0.4);
  pointer-events: none;
}

/* ── PAGE TRANSITION ── */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.page-transition-overlay.active { opacity: 1; }

/* ── Container ── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Section Title ── */
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 96px);
  color: var(--dirty-white);
  letter-spacing: 5px;
  line-height: 1;
  text-transform: uppercase;
}

.section-title .accent {
  color: var(--tape-yellow);
  text-shadow: var(--glow-tape);
}

/* ── Glitch title ── */
.glitch-title {
  position: relative;
  will-change: contents;
}
.glitch-title.scrambling { color: var(--tape-yellow); }

/* ── Tape stripe divider ── */
.tape-line {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--tape-yellow);
  box-shadow: var(--glow-tape);
  margin: 14px 0 28px;
}

/* ── Highlight ── */
.hl { color: var(--tape-yellow); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 2px; }

/* ── Selection ── */
::selection { background: rgba(232,216,122,0.2); color: var(--tape-yellow); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Static flash (random glitch) ── */
@keyframes staticFlash {
  0%, 94%, 100% { opacity: 0; }
  95% { opacity: 0.04; }
  96% { opacity: 0; }
  97% { opacity: 0.06; }
  98% { opacity: 0; }
}

.static-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9995;
  background: white;
  animation: staticFlash 8s linear infinite;
}

/* ── SR Only ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ── Responsive Global ── */
@media (max-width: 768px) {
  .container { padding: 0 22px; }
  :root { --nav-h: 58px; }
}
