@font-face {
  font-family: 'Eurocentric'; /*a name to be used later*/
  src: url('assets/fonts/eurcntrc.ttf'); /*URL to font*/
}

@font-face {
  font-family: '1942'; /*a name to be used later*/
  src: url('assets/fonts/1942-webfont.ttf'); /*URL to font*/
}

:root {
  /* Base font-size scales between 14px and 18px depending on viewport */
  font-size: clamp(14px, 1.6vw, 18px);
}

body {
  background: black;
  font-family: Eurocentric;
  font-style: bold;
  overflow: hidden; /* hide scrollbars */
  font-size: 1rem; /* use root-scaled base */
}

.container {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 40%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0; /* remove gap entirely */
  width: 100%;
  box-sizing: border-box;
}

.glitch {
  position: relative;
  font-size: clamp(2.5rem, 9vw, 8rem); /* responsive headline */
  /* red scanlines clipped to the text, animated top->bottom */
  background-image: repeating-linear-gradient(to bottom,
      rgba(255, 40, 40, 0.18) 0 1px,
      rgba(255, 20, 20, 0.06) 1px 2px,
      transparent 2px 4px),
    linear-gradient(#dd2029,#dd2029);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 100% 300%;
  animation: scanlines-text 0.9s linear infinite, glitch 5s 5s infinite, vhs-scan 6s infinite;
}

.glow {
  color: #dd2029;
  position: relative;
  font-size: clamp(2.5rem, 9vw, 8rem); /* responsive headline */
  animation: glitch 5s 5s infinite, vhs-scan 6s infinite;
}

.glitch::before, .glow::before {
  content: attr(data-text);
  position: absolute;
  left: -2px;
  text-shadow: -5px 0 #b14a4a;
  overflow: hidden;
  top: 0;
  color: #ff5e00;
  mix-blend-mode: screen;
  filter: contrast(1.2) blur(0.6px);
  animation: noise-1 3s linear infinite alternate-reverse, glitch 5s 5.05s infinite, vhs-color 6s infinite;
}

.glitch::after, .glow::after {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  text-shadow: -5px 0 white;
  overflow: hidden;
  top: 0;
  color: #ff00b2;
  mix-blend-mode: screen;
  filter: contrast(1.1) blur(0.4px);
  animation: noise-2 3s linear infinite alternate-reverse, glitch 5s 5s infinite, vhs-color 6s infinite;
}

@keyframes glitch {
  1% {
    transform: rotateX(10deg) skewX(90deg);
  }
  2% {
    transform: rotateX(0deg) skewX(0deg);
  }
}
@keyframes noise-1 {
  3.3333333333% {
    clip-path: inset(95px 0 2px 0);
  }
  6.6666666667% {
    clip-path: inset(81px 0 18px 0);
  }
  10% {
    clip-path: inset(43px 0 7px 0);
  }
  13.3333333333% {
    clip-path: inset(38px 0 25px 0);
  }
  16.6666666667% {
    clip-path: inset(65px 0 18px 0);
  }
  20% {
    clip-path: inset(11px 0 45px 0);
  }
  23.3333333333% {
    clip-path: inset(49px 0 43px 0);
  }
  26.6666666667% {
    clip-path: inset(77px 0 12px 0);
  }
  30% {
    clip-path: inset(36px 0 7px 0);
  }
  33.3333333333% {
    clip-path: inset(93px 0 6px 0);
  }
  36.6666666667% {
    clip-path: inset(16px 0 42px 0);
  }
  40% {
    clip-path: inset(92px 0 2px 0);
  }
  43.3333333333% {
    clip-path: inset(56px 0 35px 0);
  }
  46.6666666667% {
    clip-path: inset(20px 0 34px 0);
  }
  50% {
    clip-path: inset(88px 0 1px 0);
  }
  53.3333333333% {
    clip-path: inset(3px 0 92px 0);
  }
  56.6666666667% {
    clip-path: inset(92px 0 3px 0);
  }
  60% {
    clip-path: inset(85px 0 2px 0);
  }
  63.3333333333% {
    clip-path: inset(90px 0 5px 0);
  }
  66.6666666667% {
    clip-path: inset(69px 0 14px 0);
  }
  70% {
    clip-path: inset(47px 0 45px 0);
  }
  73.3333333333% {
    clip-path: inset(47px 0 6px 0);
  }
  76.6666666667% {
    clip-path: inset(64px 0 25px 0);
  }
  80% {
    clip-path: inset(53px 0 7px 0);
  }
  83.3333333333% {
    clip-path: inset(56px 0 45px 0);
  }
  86.6666666667% {
    clip-path: inset(49px 0 47px 0);
  }
  90% {
    clip-path: inset(34px 0 21px 0);
  }
  93.3333333333% {
    clip-path: inset(78px 0 9px 0);
  }
  96.6666666667% {
    clip-path: inset(44px 0 13px 0);
  }
  100% {
    clip-path: inset(43px 0 47px 0);
  }
}
@keyframes noise-2 {
  0% {
    clip-path: inset(86px 0 15px 0);
  }
  3.3333333333% {
    clip-path: inset(56px 0 45px 0);
  }
  6.6666666667% {
    clip-path: inset(39px 0 44px 0);
  }
  10% {
    clip-path: inset(61px 0 34px 0);
  }
  13.3333333333% {
    clip-path: inset(10px 0 77px 0);
  }
  16.6666666667% {
    clip-path: inset(61px 0 7px 0);
  }
  20% {
    clip-path: inset(54px 0 42px 0);
  }
  23.3333333333% {
    clip-path: inset(73px 0 15px 0);
  }
  26.6666666667% {
    clip-path: inset(85px 0 2px 0);
  }
  30% {
    clip-path: inset(52px 0 47px 0);
  }
  33.3333333333% {
    clip-path: inset(74px 0 21px 0);
  }
  36.6666666667% {
    clip-path: inset(95px 0 5px 0);
  }
  40% {
    clip-path: inset(91px 0 10px 0);
  }
  43.3333333333% {
    clip-path: inset(26px 0 16px 0);
  }
  46.6666666667% {
    clip-path: inset(94px 0 1px 0);
  }
  50% {
    clip-path: inset(8px 0 92px 0);
  }
  53.3333333333% {
    clip-path: inset(99px 0 1px 0);
  }
  56.6666666667% {
    clip-path: inset(49px 0 29px 0);
  }
  60% {
    clip-path: inset(55px 0 43px 0);
  }
  63.3333333333% {
    clip-path: inset(100px 0 1px 0);
  }
  66.6666666667% {
    clip-path: inset(99px 0 2px 0);
  }
  70% {
    clip-path: inset(44px 0 36px 0);
  }
  73.3333333333% {
    clip-path: inset(20px 0 46px 0);
  }
  76.6666666667% {
    clip-path: inset(50px 0 29px 0);
  }
  80% {
    clip-path: inset(3px 0 17px 0);
  }
  83.3333333333% {
    clip-path: inset(11px 0 81px 0);
  }
  86.6666666667% {
    clip-path: inset(8px 0 73px 0);
  }
  90% {
    clip-path: inset(96px 0 1px 0);
  }
  93.3333333333% {
    clip-path: inset(94px 0 7px 0);
  }
  96.6666666667% {
    clip-path: inset(8px 0 73px 0);
  }
  100% {
    clip-path: inset(72px 0 29px 0);
  }
}
.scanlines {
  overflow: hidden;
  mix-blend-mode: difference;
}

.scanlines::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: repeating-linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.05) 0.5%, transparent 1%);
  /* background-image: url(../../logo.svg); */
  /* tile vertically and make the tile tall so animation starts off-screen */
  background-size: 100% 200%;
  background-repeat: repeat;
  background-position: center -100%; /* start above the viewport */
  /* vertical scroll to simulate TV roll + faster jitter for stronger effect */
  animation: scanlines-scroll 0.8s linear infinite, fudge 1.2s ease-in-out alternate infinite;
}

/* noise / static overlay (SVG turbulence) */
.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='512' height='512' preserveAspectRatio='none'><filter id='n'><feTurbulence baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='1' /></svg>");
  background-size: cover;
  mix-blend-mode: screen;
  opacity: 0.06;
  animation: static-flicker 120ms steps(2, end) infinite alternate, static-drift 6s linear infinite;
}

@keyframes fudge {
  from {
    transform: translate(0px, 0px);
  }
  50% {
    transform: translate(0px, 1%);
  }
  to {
    transform: translate(0px, 0px);
  }
}

@keyframes scanlines-scroll {
  from {
    background-position: center -100%;
  }
  to {
    background-position: center 100%;
  }
}

/* scanlines clipped to text: move from top (-100%) to bottom (100%) */
@keyframes scanlines-text {
  from { background-position: 50% -100%; }
  to   { background-position: 50% 100%; }
}
.glow {
  text-shadow: 0 0 1000px #a32323;
  color: transparent;
  position: relative;
}

.subtitle {
  font-family: '1942', Arial, Helvetica, sans-serif;
  font-weight: 250;
  color: rgba(230, 230, 230, 0.4);
  text-transform: uppercase;
  text-align: center;
  position: relative;
  animation: glitch-2 5s 5.02s infinite;
  font-size: clamp(0.9rem, 2.4vw, 1.6rem); /* responsive subtitle */
  letter-spacing: clamp(0.2em, 0.8vw, 1em);
  margin: 0;
  margin-top: -0.1rem; /* pull subtitle up much closer */
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .container {
    top: 45%;
    left: 50%;
    padding: 0 6vw;
    transform: translate(-50%, -50%);
    position: absolute;
    width: 100%;
    box-sizing: border-box;
  }

  .glitch, .glow {
    font-size: clamp(3rem, 14vw, 10rem);
  }

  .subtitle {
    font-size: clamp(0.9rem, 3.6vw, 1.6rem);
    letter-spacing: 0.5em;
    margin-top: -0.2rem;
  }

  .scanlines::before {
    background-position: center center;
    background-size: cover;
  }
}

@keyframes glitch-2 {
  1% {
    transform: rotateX(10deg) skewX(70deg);
  }
  2% {
    transform: rotateX(0deg) skewX(0deg);
  }
}

/* VHS-style horizontal skips */
@keyframes vhs-scan {
  0% { transform: translateX(0) skewX(0); }
  5% { transform: translateX(-6px) skewX(-4deg); }
  6% { transform: translateX(0) skewX(0); }
  30% { transform: translateX(0) skewX(0); }
  35% { transform: translateX(5px) skewX(3deg); }
  36% { transform: translateX(0) skewX(0); }
  100% { transform: translateX(0) skewX(0); }
}

/* color shift flicker for pseudo-channel elements */
@keyframes vhs-color {
  0% { opacity: 0.95; transform: translateY(0); }
  8% { opacity: 0.9; transform: translateY(-1px); }
  9% { opacity: 0.95; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(0.5px); }
  100% { opacity: 0.95; transform: translateY(0); }
}

@keyframes static-flicker {
  0% { opacity: 0.02; }
  50% { opacity: 0.12; }
  100% { opacity: 0.04; }
}

@keyframes static-drift {
  from { background-position: 0% 0%; }
  to   { background-position: 0% 100%; }
}