/* ============================================
   ANIMAL SHADOW - Animations & Futuristic FX
   ============================================ */

/* ---- GSAP Animation States ---- */
.anim-fade { opacity: 0; }
.anim-fade-up { opacity: 0; transform: translateY(40px); }
.anim-fade-left { opacity: 0; transform: translateX(-40px); }
.anim-fade-right { opacity: 0; transform: translateX(40px); }
.anim-scale { opacity: 0; transform: scale(0.8); }

/* ---- Character Split ---- */
.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
}

/* ---- Particles Canvas ---- */
.particles-canvas {
  position: fixed;
  inset: 0;
  z-index: var(--z-particles);
  pointer-events: none;
}

/* ---- GLITCH TEXT ---- */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-text:hover::before {
  animation: glitch1 0.3s ease-in-out;
  color: var(--c-red);
  opacity: 0.8;
  clip-path: inset(20% 0 30% 0);
}

.glitch-text:hover::after {
  animation: glitch2 0.3s ease-in-out;
  color: var(--c-white);
  opacity: 0.4;
  clip-path: inset(60% 0 10% 0);
}

@keyframes glitch1 {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -1px); }
  60% { transform: translate(-2px, 1px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

@keyframes glitch2 {
  0% { transform: translate(0); }
  20% { transform: translate(3px, -2px); }
  40% { transform: translate(-3px, 1px); }
  60% { transform: translate(2px, -1px); }
  80% { transform: translate(-2px, 2px); }
  100% { transform: translate(0); }
}

/* ---- SCANLINES OVERLAY ---- */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  mix-blend-mode: multiply;
}

/* ---- GRID OVERLAY (futuristic) ---- */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.02;
  background-image:
    linear-gradient(rgba(174, 0, 0, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(174, 0, 0, 0.3) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ---- HUD ELEMENTS ---- */
.hud {
  position: fixed;
  z-index: var(--z-nav);
  pointer-events: none;
}

/* Section counter - left side */
.hud--left {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hud__counter {
  font-family: var(--ff-accent);
  font-size: 0.65rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.2em;
  color: var(--c-white-dim);
}

.hud__name {
  font-family: var(--ff-accent);
  font-size: 0.6rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.15em;
  color: var(--c-red);
  text-transform: uppercase;
}

.hud__line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--c-red), transparent);
}

/* Scroll progress - top of page */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--c-red), var(--c-red-light));
  z-index: calc(var(--z-nav) + 1);
  transition: width 0.1s linear;
}

/* ---- REVEAL SYSTEM ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  transform: translateX(-40px);
}

.reveal--left.reveal--visible {
  transform: translateX(0);
}

.reveal--scale {
  transform: scale(0.9);
}

.reveal--scale.reveal--visible {
  transform: scale(1);
}

/* ---- SECTION DIVIDER (animated) ---- */
.section-divider {
  position: relative;
  height: 1px;
  background: var(--c-dark-border);
  overflow: hidden;
  margin: 0;
}

.section-divider::after {
  content: '';
  position: absolute;
  left: -60%;
  top: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--c-red), transparent);
  animation: dividerSweep 4s ease-in-out infinite;
  will-change: transform;
}

@keyframes dividerSweep {
  0% { transform: translateX(0); }
  100% { transform: translateX(267%); }
}

/* ---- AMBIENT GLOW ---- */
.ambient-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--c-red-glow) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.3;
}

/* ---- STAGGER DELAYS ---- */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }

/* ---- KEYFRAMES ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---- PAGE TRANSITION ---- */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--c-black);
  z-index: calc(var(--z-loader) - 1);
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
}

/* ---- CLICK PARTICLE BURST ---- */
.click-particle {
  position: fixed;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--c-red);
  pointer-events: none;
  z-index: 9999;
  animation: particleBurst 0.6s ease-out forwards;
}

.click-particle:nth-child(odd) {
  background: var(--c-white);
  width: 2px;
  height: 2px;
}

@keyframes particleBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0);
  }
}

/* ---- SYSTEM READOUTS ---- */
.system-readout {
  position: absolute;
  bottom: 1.5rem;
  right: var(--s-container, 2rem);
  font-family: 'Courier New', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--c-white);
  opacity: 0.06;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 768px) {
  .system-readout {
    display: none;
  }
}

/* ---- AMBIENT PULSE ON TITLES ---- */
.ambient-pulse {
  animation: ambientGlow 4s ease-in-out infinite;
}

@keyframes ambientGlow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50% { text-shadow: 0 0 40px rgba(174, 0, 0, 0.06); }
}

/* ==================================================
   UPGRADE 1: CINEMATIC PINNED PILLARS
   ================================================== */
@media (min-width: 1025px) {
  .pillars-cinema {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }

  .pillars-cinema .pillar {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding: 2rem;
  }

  .pillars-cinema .pillar__number {
    font-size: clamp(6rem, 15vw, 12rem);
    color: rgba(174, 0, 0, 0.08);
    position: absolute;
    z-index: 0;
    letter-spacing: -0.02em;
    line-height: 1;
  }

  .pillars-cinema .pillar__icon {
    width: 80px;
    height: 80px;
    position: relative;
    z-index: 1;
  }

  .pillars-cinema .pillar__name {
    font-size: clamp(1.8rem, 4vw, 3rem);
    position: relative;
    z-index: 1;
  }

  .pillars-cinema .pillar__desc {
    max-width: 500px;
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    line-height: 1.8;
  }

  .pillars-cinema .pillar__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
  }

  .pillars-cinema .pillar__line {
    margin: 0 auto;
  }

  .pillars-cinema .pillar-group {
    z-index: 5;
  }

  .pillars-cinema .pillar-group__label {
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    letter-spacing: 0.4em;
  }
}

/* ==================================================
   LIGHT LEAKS
   ================================================== */
.light-leak {
  position: fixed;
  pointer-events: none;
  z-index: 9;
  border-radius: 50%;
  opacity: 0;
  mix-blend-mode: screen;
  will-change: opacity;
}
.light-leak--1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -150px;
  background: radial-gradient(circle, rgba(174, 0, 0, 0.06) 0%, transparent 70%);
}
.light-leak--2 {
  width: 500px;
  height: 500px;
  bottom: -100px;
  left: -200px;
  background: radial-gradient(circle, rgba(174, 0, 0, 0.04) 0%, transparent 70%);
}
@media (max-width: 768px) {
  .light-leak { display: none; }
}

/* ==================================================
   UPGRADE 3: ANIMATED FILM GRAIN
   ================================================== */
.film-grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.06;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* ==================================================
   UPGRADE 5: SCROLL-REACTIVE TEXT
   ================================================== */
.scroll-word {
  transition: transform 0.1s ease-out;
}

/* ==================================================
   UPGRADE 6: SOUND TOGGLE
   ================================================== */
.sound-toggle {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(174, 0, 0, 0.2);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.sound-toggle:hover {
  border-color: rgba(174, 0, 0, 0.5);
}

.sound-toggle--active {
  border-color: var(--c-red);
  box-shadow: 0 0 20px rgba(174, 0, 0, 0.3);
}

.sound-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: rgba(174, 0, 0, 0.5);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-toggle--active svg {
  stroke: var(--c-red);
}

.sound-toggle__off {
  display: block;
}

.sound-toggle--active .sound-toggle__off {
  display: none;
}

.sound-toggle__on {
  display: none;
}

.sound-toggle--active .sound-toggle__on {
  display: block;
}

@media (max-width: 768px) {
  .sound-toggle {
    bottom: 1rem;
    left: 1rem;
    width: 34px;
    height: 34px;
  }
}

/* ==================================================
   UPGRADE 7: HERO BREATHING GLOW
   ================================================== */
.hero__breathing-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(174, 0, 0, 0.2) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.4;
}

@media (max-width: 768px) {
  .hero__breathing-glow {
    width: 250px;
    height: 250px;
  }
}

/* ==================================================
   HERO ACCENT LINE
   ================================================== */
.hero__accent-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--c-red), transparent);
  z-index: 10;
}

/* ==================================================
   REDUCED MOTION - HERO FX
   ================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero__breathing-glow {
    animation: none !important;
    opacity: 0.2;
  }

  [data-glitch]::before,
  [data-glitch]::after,
  .glitch-text::before,
  .glitch-text::after,
  .loader__glitch-text {
    animation: none !important;
    opacity: 0 !important;
  }
}

/* ==================================================
   CINEMATIC FX: MOUSE-REACTIVE LIGHT
   ================================================== */
.mouse-light {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(174, 0, 0, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  top: 0;
  left: 0;
  will-change: transform;
  filter: blur(40px);
}

/* ==================================================
   CINEMATIC FX: CUSTOM SCROLLBAR
   ================================================== */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #0a0a0a;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(174, 0, 0, 0.3);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(174, 0, 0, 0.5);
}

/* Firefox */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(174, 0, 0, 0.3) #0a0a0a;
}

/* ==================================================
   CINEMATIC FX: TYPEWRITER CURSOR
   ================================================== */
.typewriter-cursor {
  display: inline-block;
  color: var(--c-red);
  animation: cursorBlink 0.6s step-end infinite;
  margin-left: 2px;
  font-weight: 300;
}

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

/* ==================================================
   CINEMATIC FX: RAGE MODE (Easter Egg)
   ================================================== */
.rage-mode {
  filter: hue-rotate(10deg) saturate(1.5);
}

.rage-flash {
  position: fixed;
  inset: 0;
  background: rgba(174, 0, 0, 0.15);
  z-index: 9990;
  pointer-events: none;
  animation: rageFlash 0.3s ease-out;
}

@keyframes rageFlash {
  0% { opacity: 1; }
  100% { opacity: 0.6; }
}

.rage-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #ae0000;
  text-shadow: 0 0 40px rgba(174, 0, 0, 0.6), 0 0 80px rgba(174, 0, 0, 0.3);
  z-index: 9991;
  pointer-events: none;
  white-space: nowrap;
}

/* ==================================================
   CINEMATIC FX: STATS / COUNTERS
   ================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
  padding: 4rem 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat__number {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--c-red, #ae0000);
  line-height: 1;
}

.stat__label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.4);
}

.stat__line {
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(174, 0, 0, 0.3), transparent);
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 1.5rem;
    padding: 3rem 0;
  }
}

/* ==================================================
   PREMIUM FX: 3D TILT CARD SHINE
   ================================================== */
.offer,
.pathway,
.article-card {
  transform-style: preserve-3d;
  will-change: transform;
}

.card-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 10;
}

/* ==================================================
   PREMIUM FX: MAGNETIC BUTTONS
   ================================================== */
.btn,
.pathway__cta,
.nav__cta {
  will-change: transform;
}

/* ==================================================
   PREMIUM FX: TEXT GRADIENT ANIMATION
   ================================================== */
.text-gradient-animate {
  background: linear-gradient(
    90deg,
    #f5f5f5 0%,
    #f5f5f5 30%,
    #ae0000 50%,
    #f5f5f5 70%,
    #f5f5f5 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGradientFlow 8s ease-in-out infinite;
}

.text-gradient-animate span {
  -webkit-text-fill-color: inherit;
}

@keyframes textGradientFlow {
  0% { background-position: 100% 50%; }
  50% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ==================================================
   PREMIUM FX: IMAGE SHADER HOVER
   ================================================== */
.shader-hover {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.shader-hover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(174, 0, 0, 0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 5;
}

.shader-hover:hover::after {
  opacity: 1;
}

.shader-hover:hover {
  filter: url(#liquid-distort);
  animation: shaderPulse 0.6s ease-out;
}

@keyframes shaderPulse {
  0% { transform: scale(1); }
  15% { transform: scale(1.02) skewX(0.5deg); }
  30% { transform: scale(0.99) skewX(-0.3deg); }
  50% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

/* ==================================================
   PREMIUM FX: FOOTER REVEAL
   ================================================== */
@media (min-width: 769px) {
  .footer {
    will-change: auto;
  }
}

/* ==================================================
   PREMIUM FX: IMAGE DISTORTION ON SCROLL
   ================================================== */
.founder__image img,
.article-card__image,
.hero-slider__bg {
  will-change: transform;
  transition: transform 0.05s linear;
}
