/* ============================================
   ANTAEI — DARK DRAMATIC LANDING PAGE
   "We've noticed a disturbing trend."
   ============================================ */

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

:root {
  /* Reds */
  --red-core: #c0110b;
  --red-bright: #ff1a1a;
  --red-glow: #ff3333;
  --red-deep: #8b0000;
  --red-blood: #6e0000;
  --red-ember: rgba(192, 17, 11, 0.15);

  /* Darks */
  --bg-void: #050505;
  --bg-dark: #0a0a0a;
  --bg-card: #0e0e0e;
  --bg-card-border: #1a1a1a;

  /* Text */
  --text-primary: #e8e0d8;
  --text-muted: #6a6a6a;
  --text-faint: #3a3a3a;

  /* Fonts */
  --font-headline: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Special Elite', 'Courier New', monospace;

  /* Timing */
  --ease-dramatic: cubic-bezier(0.23, 1, 0.32, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--bg-void);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--red-core);
  color: #fff;
}

/* ---------- SLEEPER NAV ---------- */
.sleeper-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sleeper-brand,
.sleeper-link {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--red-core);
  text-decoration: none;
  letter-spacing: 0.2em;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.sleeper-brand:hover,
.sleeper-link:hover {
  opacity: 0.8;
}

/* ---------- ATMOSPHERIC LAYERS ---------- */

/* Film grain / noise overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  mix-blend-mode: overlay;
}

/* CRT scanlines */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.04) 2px,
      rgba(0, 0, 0, 0.04) 4px);
}

/* Vignette */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 9996;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
      transparent 40%,
      rgba(0, 0, 0, 0.7) 100%);
}

/* Particles canvas */
#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ---------- HERO SECTION ---------- */
.hero {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  overflow: hidden;
}

/* Ominous red glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle,
      rgba(192, 17, 11, 0.12) 0%,
      rgba(110, 0, 0, 0.06) 40%,
      transparent 70%);
  pointer-events: none;
  animation: glow-pulse 6s ease-in-out infinite;
}

@keyframes glow-pulse {

  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

.hero-inner {
  text-align: center;
  max-width: 900px;
  animation: hero-fade-in 2s var(--ease-dramatic) forwards;
  opacity: 0;
}

@keyframes hero-fade-in {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pretitle — classified stamp */
.hero-pretitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--red-core);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  opacity: 0.8;
  position: relative;
  display: inline-block;
  animation: flicker 4s infinite;
}

@keyframes flicker {

  0%,
  97%,
  100% {
    opacity: 0.8;
  }

  98% {
    opacity: 0.2;
  }

  99% {
    opacity: 0.9;
  }
}

/* Headline — MASSIVE */
.hero-headline {
  font-family: var(--font-headline);
  font-size: clamp(3.5rem, 10vw, 9rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 2rem;
  position: relative;
}

.hero-headline .highlight {
  color: var(--red-bright);
  text-shadow:
    0 0 20px rgba(255, 26, 26, 0.4),
    0 0 60px rgba(255, 26, 26, 0.15),
    0 0 100px rgba(192, 17, 11, 0.1);
  position: relative;
}

/* Glitch on hover */
.hero-headline:hover {
  animation: glitch-shift 0.3s steps(2) infinite;
}

@keyframes glitch-shift {
  0% {
    text-shadow: 2px 0 var(--red-bright), -2px 0 cyan;
  }

  25% {
    text-shadow: -2px 0 var(--red-bright), 2px 0 cyan;
  }

  50% {
    text-shadow: 1px 2px var(--red-bright), -1px -2px cyan;
  }

  75% {
    text-shadow: -1px -1px var(--red-bright), 1px 1px cyan;
  }

  100% {
    text-shadow: 2px 0 var(--red-bright), -2px 0 cyan;
  }
}

/* Redacted bar */
.redacted-bar {
  width: 280px;
  height: 6px;
  background: var(--red-core);
  margin: 0 auto 2.5rem;
  position: relative;
  box-shadow: 0 0 30px rgba(192, 17, 11, 0.5);
  animation: bar-expand 1.5s 1.5s var(--ease-dramatic) forwards;
  transform: scaleX(0);
}

@keyframes bar-expand {
  0% {
    transform: scaleX(0);
  }

  100% {
    transform: scaleX(1);
  }
}

/* Subtitle / Typewriter */
.hero-sub {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  min-height: 1.5em;
}

.cursor {
  color: var(--red-core);
  animation: blink 0.8s step-end infinite;
  font-weight: 700;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Pulse line */
.pulse-line {
  width: 100%;
  max-width: 500px;
  height: 1px;
  margin: 3rem auto 0;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--red-core) 50%,
      transparent 100%);
  animation: pulse-sweep 3s ease-in-out infinite;
  opacity: 0.4;
}

@keyframes pulse-sweep {

  0%,
  100% {
    opacity: 0.2;
    transform: scaleX(0.5);
  }

  50% {
    opacity: 0.6;
    transform: scaleX(1);
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: scroll-fade 2s 3s ease forwards;
  opacity: 0;
}

@keyframes scroll-fade {
  to {
    opacity: 1;
  }
}

.scroll-indicator span {
  display: block;
  width: 2px;
  height: 12px;
  background: var(--red-core);
  opacity: 0.3;
  animation: scroll-pulse 1.5s ease-in-out infinite;
}

.scroll-indicator span:nth-child(2) {
  animation-delay: 0.15s;
  opacity: 0.5;
}

.scroll-indicator span:nth-child(3) {
  animation-delay: 0.3s;
  opacity: 0.7;
}

@keyframes scroll-pulse {

  0%,
  100% {
    transform: scaleY(1);
    opacity: 0.3;
  }

  50% {
    transform: scaleY(1.8);
    opacity: 0.8;
  }
}

/* ---------- SIGNAL SECTION ---------- */
.signal-section {
  position: relative;
  z-index: 10;
  padding: 6rem 2rem;
  background: linear-gradient(180deg, var(--bg-void) 0%, var(--bg-dark) 50%, var(--bg-void) 100%);
}

.signal-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: var(--red-core);
  text-transform: uppercase;
  margin-bottom: 3rem;
  opacity: 0.7;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-core), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.stat-card:hover {
  border-color: var(--red-deep);
  box-shadow: 0 0 40px rgba(192, 17, 11, 0.1);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-family: var(--font-headline);
  font-size: 4rem;
  color: var(--red-bright);
  line-height: 1;
  text-shadow: 0 0 30px rgba(255, 26, 26, 0.3);
}

.stat-suffix {
  font-family: var(--font-headline);
  font-size: 2.5rem;
  color: var(--red-bright);
}

.stat-desc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.75rem;
}

/* Waveform canvas */
.waveform {
  width: 100%;
  height: 80px;
  position: relative;
}

#waveform-canvas {
  width: 100%;
  height: 100%;
}

/* ---------- MESSAGE SECTION ---------- */
.message-section {
  position: relative;
  z-index: 10;
  padding: 8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.message-inner {
  max-width: 800px;
  text-align: center;
}

.message-quote {
  font-family: var(--font-headline);
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  line-height: 1.2;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: none;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease-dramatic), transform 1s var(--ease-dramatic);
}

.message-quote.is-visible,
.message-quote.fallback-visible {
  opacity: 1;
  transform: translateY(0);
}

.message-quote .highlight {
  color: var(--red-bright);
  text-shadow:
    0 0 20px rgba(255, 26, 26, 0.35),
    0 0 60px rgba(255, 26, 26, 0.1);
}

.message-attribution {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 2rem;
  letter-spacing: 0.15em;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s 0.3s var(--ease-dramatic), transform 0.8s 0.3s var(--ease-dramatic);
}

.message-quote.is-visible~.message-attribution,
.message-quote.fallback-visible~.message-attribution {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- CTA SECTION ---------- */
.cta-section {
  position: relative;
  z-index: 10;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
}

.cta-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: var(--red-core);
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0.7;
}

.cta-form-wrapper {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
}

.cta-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-right: none;
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s;
}

.cta-input::placeholder {
  color: var(--text-faint);
}

.cta-input:focus {
  border-color: var(--red-deep);
}

.cta-btn {
  background: var(--red-core);
  color: #fff;
  border: 1px solid var(--red-core);
  padding: 1rem 2rem;
  font-family: var(--font-headline);
  font-size: 1rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
}

.cta-btn:hover {
  background: var(--red-bright);
  box-shadow: 0 0 40px rgba(255, 26, 26, 0.4);
  transform: translateY(-1px);
}

.cta-btn:active {
  transform: translateY(0);
}

.btn-glitch {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.1) 50%,
      transparent 100%);
  transform: translateX(-100%);
  transition: none;
}

.cta-btn:hover .btn-glitch {
  animation: btn-sweep 0.6s forwards;
}

@keyframes btn-sweep {
  to {
    transform: translateX(100%);
  }
}

.cta-fine {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---------- FOOTER ---------- */
.site-footer {
  position: relative;
  z-index: 10;
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--bg-card-border);
}

.site-footer p {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.redact-inline {
  background: var(--text-faint);
  color: var(--text-faint);
  padding: 0 0.2em;
  user-select: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .cta-form-wrapper {
    flex-direction: column;
  }

  .cta-input {
    border-right: 1px solid var(--bg-card-border);
    border-bottom: none;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- AMBIENT GLITCH (PERIODIC) ---------- */
@keyframes ambient-glitch {

  0%,
  92%,
  94%,
  96%,
  98%,
  100% {
    clip-path: inset(0 0 0 0);
    transform: translate(0);
  }

  93% {
    clip-path: inset(20% 0 60% 0);
    transform: translate(-4px, 2px);
  }

  95% {
    clip-path: inset(50% 0 20% 0);
    transform: translate(3px, -1px);
  }

  97% {
    clip-path: inset(70% 0 5% 0);
    transform: translate(-2px, 3px);
  }

  99% {
    clip-path: inset(10% 0 80% 0);
    transform: translate(4px, -2px);
  }
}

.hero-headline {
  animation: ambient-glitch 8s infinite;
}