/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
}

.hero-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 80vh;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.brand-container {
  margin-bottom: 1rem;
}

/* EXTREME GLITCH LOGO EFFECTS */
.logo-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
  cursor: pointer;
  overflow: hidden;
}

.glitch-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: auto;
  transition: all 0.1s ease;
}

/* Original Logo */
.hero-logo.original {
  z-index: 10;
  filter: 
    drop-shadow(0 0 10px var(--neon-primary))
    contrast(1.2)
    brightness(1.1);
}

/* Glitch Color Layers */
.hero-logo.glitch-red {
  z-index: 9;
  opacity: 0;
  filter: 
    hue-rotate(0deg) 
    contrast(3) 
    brightness(2)
    drop-shadow(0 0 20px #ff0040);
  mix-blend-mode: screen;
}

.hero-logo.glitch-blue {
  z-index: 8;
  opacity: 0;
  filter: 
    hue-rotate(240deg) 
    contrast(2.5) 
    brightness(1.8)
    drop-shadow(0 0 15px #0080ff);
  mix-blend-mode: multiply;
}

.hero-logo.glitch-green {
  z-index: 7;
  opacity: 0;
  filter: 
    hue-rotate(120deg) 
    contrast(2.8) 
    brightness(1.5)
    drop-shadow(0 0 12px #00ff80);
  mix-blend-mode: overlay;
}

/* Digital Noise Overlay */
.digital-noise {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      rgba(255, 0, 64, 0.03) 1px,
      transparent 2px,
      rgba(0, 128, 255, 0.03) 3px,
      transparent 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      rgba(0, 255, 128, 0.02) 1px,
      transparent 3px
    );
  opacity: 0;
  pointer-events: none;
  z-index: 11;
  mix-blend-mode: overlay;
}

/* Scan Lines */
.scan-lines {
  position: absolute;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 255, 255, 0.1) 2px,
    rgba(0, 255, 255, 0.1) 4px
  );
  opacity: 0;
  pointer-events: none;
  z-index: 12;
}

/* Pixel Corruption */
.pixel-corruption {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 0, 64, 0.8) 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(0, 128, 255, 0.8) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(0, 255, 128, 0.8) 1px, transparent 1px),
    radial-gradient(circle at 90% 20%, rgba(255, 255, 0, 0.8) 1px, transparent 1px);
  background-size: 20px 20px, 15px 15px, 25px 25px, 18px 18px;
  opacity: 0;
  pointer-events: none;
  z-index: 13;
  mix-blend-mode: difference;
}

/* RGB Split Effect */
.rgb-split {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(90deg, 
      rgba(255, 0, 0, 0.1) 0%,
      transparent 33%,
      rgba(0, 255, 0, 0.1) 66%,
      rgba(0, 0, 255, 0.1) 100%
    );
  opacity: 0;
  pointer-events: none;
  z-index: 14;
  mix-blend-mode: screen;
}

/* Static Background */
.static-bg {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: 
    radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px),
    radial-gradient(circle, rgba(0,255,255,0.1) 1px, transparent 1px);
  background-size: 8px 8px, 12px 12px;
  background-position: 0 0, 4px 6px;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* Signal Distortion */
.signal-distortion {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(45deg, 
      transparent 40%, 
      rgba(255, 0, 64, 0.2) 50%, 
      transparent 60%
    );
  opacity: 0;
  pointer-events: none;
  z-index: 15;
}

/* MAIN GLITCH ANIMATION */
.logo-container.glitch-active .hero-logo.original {
  animation: extremeGlitch 0.6s steps(10, start);
}

.logo-container.glitch-active .hero-logo.glitch-red {
  animation: glitchRed 0.6s steps(8, start);
}

.logo-container.glitch-active .hero-logo.glitch-blue {
  animation: glitchBlue 0.6s steps(6, start);
}

.logo-container.glitch-active .hero-logo.glitch-green {
  animation: glitchGreen 0.6s steps(7, start);
}

.logo-container.glitch-active .digital-noise {
  animation: noiseFlicker 0.6s steps(20, start);
}

.logo-container.glitch-active .scan-lines {
  animation: scanAnimation 0.6s linear;
}

.logo-container.glitch-active .pixel-corruption {
  animation: pixelCorrupt 0.6s steps(15, start);
}

.logo-container.glitch-active .rgb-split {
  animation: rgbSplitAnim 0.6s steps(12, start);
}

.logo-container.glitch-active .static-bg {
  animation: staticNoise 0.6s steps(25, start);
}

.logo-container.glitch-active .signal-distortion {
  animation: signalGlitch 0.6s ease-in-out;
}

/* KEYFRAME ANIMATIONS */
@keyframes extremeGlitch {
  0% {
    transform: translate(-50%, -50%) skew(0deg) scale(1);
    filter: drop-shadow(0 0 10px var(--neon-primary)) contrast(1.2) brightness(1.1);
  }
  10% {
    transform: translate(-45%, -55%) skew(-5deg) scale(1.1) rotateZ(1deg);
    filter: drop-shadow(5px 0 #ff0040) drop-shadow(-5px 0 #0080ff) contrast(3) brightness(2);
  }
  20% {
    transform: translate(-55%, -45%) skew(3deg) scale(0.9) rotateZ(-2deg);
    filter: drop-shadow(0 5px #00ff80) drop-shadow(0 -5px #ff8000) contrast(2.5) brightness(1.8);
  }
  30% {
    transform: translate(-48%, -52%) skew(-2deg) scale(1.05) rotateZ(3deg);
    filter: drop-shadow(3px 3px #ff0040) drop-shadow(-3px -3px #0080ff) contrast(3.5) brightness(2.2);
  }
  40% {
    transform: translate(-52%, -48%) skew(4deg) scale(0.95) rotateZ(-1deg);
    filter: drop-shadow(-2px 4px #00ff80) drop-shadow(2px -4px #ff4080) contrast(2.8) brightness(1.5);
  }
  50% {
    transform: translate(-49%, -51%) skew(-3deg) scale(1.08) rotateZ(2deg);
    filter: drop-shadow(4px -2px #8000ff) drop-shadow(-4px 2px #ff8040) contrast(4) brightness(2.5);
  }
  60% {
    transform: translate(-51%, -49%) skew(2deg) scale(0.92) rotateZ(-3deg);
    filter: drop-shadow(0 0 20px #ff0040) drop-shadow(0 0 15px #0080ff) contrast(3.2) brightness(1.9);
  }
  70% {
    transform: translate(-47%, -53%) skew(-4deg) scale(1.12) rotateZ(1deg);
    filter: drop-shadow(6px 0 #00ff80) drop-shadow(0 6px #ff4080) contrast(2.7) brightness(1.7);
  }
  80% {
    transform: translate(-53%, -47%) skew(1deg) scale(0.88) rotateZ(-2deg);
    filter: drop-shadow(-3px -3px #8000ff) drop-shadow(3px 3px #ff8040) contrast(3.8) brightness(2.3);
  }
  90% {
    transform: translate(-49.5%, -50.5%) skew(-1deg) scale(1.02) rotateZ(0.5deg);
    filter: drop-shadow(1px 1px #ff0040) drop-shadow(-1px -1px #0080ff) contrast(2.2) brightness(1.4);
  }
  100% {
    transform: translate(-50%, -50%) skew(0deg) scale(1);
    filter: drop-shadow(0 0 10px var(--neon-primary)) contrast(1.2) brightness(1.1);
  }
}

@keyframes glitchRed {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%); }
  10%, 30% { opacity: 0.9; transform: translate(-45%, -50%) scaleX(1.1); }
  50%, 70% { opacity: 0.7; transform: translate(-55%, -50%) scaleY(1.1); }
  80% { opacity: 0.5; transform: translate(-48%, -52%) scale(1.05); }
}

@keyframes glitchBlue {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%); }
  15%, 35% { opacity: 0.8; transform: translate(-50%, -45%) scaleX(0.9); }
  55%, 75% { opacity: 0.6; transform: translate(-52%, -55%) scaleY(0.9); }
  85% { opacity: 0.4; transform: translate(-48%, -48%) scale(0.95); }
}

@keyframes glitchGreen {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) rotate(0deg); }
  20%, 40% { opacity: 0.7; transform: translate(-47%, -53%) rotate(2deg); }
  60%, 80% { opacity: 0.5; transform: translate(-53%, -47%) rotate(-2deg); }
  90% { opacity: 0.3; transform: translate(-51%, -49%) rotate(1deg); }
}

@keyframes noiseFlicker {
  0%, 100% { opacity: 0; }
  10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90% { opacity: 0.6; }
  15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95% { opacity: 0.1; }
}

@keyframes scanAnimation {
  0% { transform: translateY(-100%) scaleY(1); opacity: 0; }
  50% { transform: translateY(0%) scaleY(2); opacity: 0.8; }
  100% { transform: translateY(100%) scaleY(1); opacity: 0; }
}

@keyframes pixelCorrupt {
  0%, 100% { opacity: 0; transform: scale(1); }
  20%, 40%, 60%, 80% { opacity: 0.8; transform: scale(1.2); }
  30%, 50%, 70%, 90% { opacity: 0.3; transform: scale(0.8); }
}

@keyframes rgbSplitAnim {
  0%, 100% { opacity: 0; transform: translateX(0); }
  25% { opacity: 0.7; transform: translateX(-5px); }
  50% { opacity: 0.9; transform: translateX(5px); }
  75% { opacity: 0.5; transform: translateX(-3px); }
}

@keyframes staticNoise {
  0%, 100% { opacity: 0; }
  10%, 30%, 50%, 70%, 90% { opacity: 0.4; }
  20%, 40%, 60%, 80% { opacity: 0.1; }
}

@keyframes signalGlitch {
  0%, 100% { opacity: 0; transform: skewX(0deg); }
  25% { opacity: 0.6; transform: skewX(5deg); }
  50% { opacity: 0.8; transform: skewX(-5deg); }
  75% { opacity: 0.4; transform: skewX(3deg); }
}

/* HOVER EFFECT */
.logo-container:hover .hero-logo.original {
  filter: 
    drop-shadow(0 0 20px var(--neon-primary))
    drop-shadow(0 0 10px var(--cyber-red))
    contrast(1.5)
    brightness(1.3);
  transform: translate(-50%, -50%) scale(1.02);
}

.logo-container:hover .scan-lines {
  opacity: 0.2;
  animation: gentleScan 3s linear infinite;
}

@keyframes gentleScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: 1rem;
  position: relative;
}

.title-line {
  display: block;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.title-line.accent {
  color: var(--neon-primary);
  text-shadow: 0 0 20px var(--neon-primary);
  animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% { 
    text-shadow: 0 0 20px var(--neon-primary);
    transform: translateX(0);
  }
  50% { 
    text-shadow: 0 0 30px var(--neon-primary), 0 0 40px var(--neon-primary);
    transform: translateX(5px);
  }
}

.hero-tagline {
  margin-bottom: 2rem;
}

.tagline-text {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 300;
  font-style: italic;
}

.hero-description {
  margin-bottom: 2rem;
}

.description-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Cyber Buttons */
.cyber-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.cyber-btn.primary {
  background: var(--neon-primary);
  color: #000;
  border: 2px solid var(--neon-primary);
}

.cyber-btn.secondary {
  background: transparent;
  color: var(--neon-primary);
  border: 2px solid var(--neon-primary);
}

.cyber-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 239, 255, 0.3);
}

.cyber-btn.secondary:hover {
  background: var(--neon-primary);
  color: #000;
}

.btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.cyber-btn:hover .btn-glow {
  left: 100%;
}

/* Hero Right - Visual */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-container {
  position: relative;
  width: 400px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-secondary);
}

.scroll-line {
  width: 2px;
  height: 40px;
  background: var(--neon-primary);
  margin: 0 auto 0.5rem;
  animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-text {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; height: 40px; }
  50% { opacity: 1; height: 60px; }
}

/* Features Section */
.features-section {
  padding: 6rem 0;
  background: var(--glass-primary);
  backdrop-filter: blur(10px);
}

.section-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--glass-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 239, 255, 0.1), transparent);
  transition: left 0.6s;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--neon-primary);
  box-shadow: 0 20px 40px rgba(0, 239, 255, 0.2);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--neon-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: #000;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--neon-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.feature-link:hover {
  transform: translateX(5px);
  text-shadow: 0 0 10px var(--neon-primary);
}

.inline-link {
  color: var(--neon-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.inline-link:hover { border-bottom-color: var(--neon-primary); }

/* Home list sections (Latest Articles / Tool Guides) */
.home-list-section {
  padding: 5rem 0;
}
.home-list-section.alt {
  background: var(--glass-primary);
  backdrop-filter: blur(10px);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.home-card {
  background: var(--glass-primary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.home-card:hover {
  transform: translateY(-6px);
  border-color: var(--neon-primary);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}
.home-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.home-card-image {
  height: 170px;
  overflow: hidden;
}
.home-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-card-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-primary);
  font-size: 2.5rem;
  background: linear-gradient(135deg, rgba(0,238,255,0.08), transparent);
}
.home-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex-grow: 1;
}
.home-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.35;
}
.home-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}
.home-card-date {
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.8;
}
.home-list-more {
  text-align: center;
  margin-top: 2.5rem;
}

/* Stats Section */
.stats-section {
  padding: 4rem 0;
  background: rgba(0, 0, 0, 0.3);
}

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.stat-item {
  text-align: center;
  padding: 2rem;
  background: var(--glass-primary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  border-color: var(--neon-primary);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--neon-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--glass-primary), var(--glass-secondary));
  text-align: center;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.cta-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.cta-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.cta-btn.primary {
  background: var(--neon-primary);
  color: #000;
  border: 2px solid var(--neon-primary);
}

.cta-btn.secondary {
  background: transparent;
  color: var(--cyber-green);
  border: 2px solid var(--cyber-green);
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 239, 255, 0.3);
}

.cta-btn.secondary:hover {
  background: var(--cyber-green);
  color: #000;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-title {
    font-size: 3rem;
  }

  .logo-container {
    width: 250px;
    height: 250px;
  }

  .hero-logo {
    width: 150px;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .cta-title {
    font-size: 2rem;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .logo-container {
    width: 200px;
    height: 200px;
  }

  .hero-logo {
    width: 120px;
  }
}
