/* ============================================================
   variants/05-pixel-tech-3/css/components.css
   Neon Cyberpunk buttons with green phosphor glow,
   CRT monitor effects, hover animations
   ============================================================ */

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: var(--space-md) var(--space-xl);
  min-height: var(--touch-target);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  border-radius: 0;
}

/* Primary button - neon green phosphor glow */
.btn-primary {
  background: var(--color-text-secondary);
  color: var(--color-bg-primary);
  border-color: var(--color-text-secondary);
  box-shadow:
    0 0 15px rgb(57, 255, 20, 0.4),
    inset 0 0 20px rgb(57, 255, 20, 0.1);
}

.btn-primary:hover {
  background: #39ff14;
  box-shadow:
    0 0 25px rgb(57, 255, 20, 0.6),
    0 0 50px rgb(57, 255, 20, 0.3),
    inset 0 0 30px rgb(57, 255, 20, 0.2);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 0 10px rgb(57, 255, 20, 0.4),
    inset 0 0 15px rgb(57, 255, 20, 0.1);
}

/* Secondary button - outline style */
.btn-secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-text-secondary);
}

.btn-secondary:hover {
  background: rgb(57, 255, 20, 0.1);
  box-shadow:
    0 0 20px rgb(57, 255, 20, 0.2),
    inset 0 0 15px rgb(57, 255, 20, 0.05);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
  background: rgb(57, 255, 20, 0.15);
}

/* Small button */
.btn-small {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.75rem;
  min-height: 44px;
}

/* Large button */
.btn-large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1rem;
  min-height: 56px;
}

/* Button neon sweep effect on hover */
.btn-primary:hover::before,
.btn-secondary:hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgb(57, 255, 20, 0.4), transparent);
  animation: neon-sweep 0.5s ease forwards;
}

@keyframes neon-sweep {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* ─── Neon Text Effects ─── */
.neon-text {
  color: var(--color-text-secondary);
  text-shadow:
    0 0 5px var(--color-text-secondary),
    0 0 10px var(--color-text-secondary),
    0 0 20px rgb(57, 255, 20, 0.5);
}

.neon-text-alt {
  color: var(--color-text-primary);
  text-shadow:
    0 0 5px rgb(107, 91, 123, 0.5),
    0 0 10px rgb(107, 91, 123, 0.3);
}

/* ─── Glitch Effect ─── */
.glitch {
  position: relative;
}

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

.glitch::before {
  color: var(--color-text-secondary);
  animation: glitch-1 3s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch::after {
  color: var(--color-text-primary);
  animation: glitch-2 4s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
  0%,
  90% {
    transform: translate(0);
  }

  92% {
    transform: translate(-2px, 1px);
  }

  94% {
    transform: translate(2px, -1px);
  }

  96% {
    transform: translate(-1px, 2px);
  }

  98% {
    transform: translate(1px, -2px);
  }
}

@keyframes glitch-2 {
  0%,
  85% {
    transform: translate(0);
  }

  87% {
    transform: translate(2px, 1px);
  }

  89% {
    transform: translate(-2px, -1px);
  }

  91% {
    transform: translate(1px, 2px);
  }

  93% {
    transform: translate(-1px, -2px);
  }
}

/* Disable glitch animation when user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .glitch::before,
  .glitch::after {
    animation: none;
  }
}

/* ─── Hover Lift Effect ─── */
.hover-lift {
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow:
    0 10px 30px rgb(0, 0, 0, 0.5),
    0 0 20px rgb(57, 255, 20, 0.15);
}

/* ─── Pitch Bullets ─── */
.pitch-bullets {
  list-style: none;
  max-width: 700px;
  margin: 0 auto;
}

.pitch-bullets li {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--color-text-primary);
  padding: var(--space-md) 0 var(--space-md) var(--space-2xl);
  position: relative;
  border-bottom: 1px solid var(--color-bg-secondary);
}

.pitch-bullets li::before {
  content: '[ ]';
  position: absolute;
  left: 0;
  color: var(--color-text-primary);
  font-family: var(--font-code);
}

.pitch-bullets li:nth-child(odd)::before {
  content: '[x]';
  color: var(--color-text-secondary);
}

/* ─── Features More Link ─── */
.features-more {
  text-align: center;
  margin-top: var(--space-2xl);
}

.features-more a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-text-secondary);
  display: inline-block;
  transition: all var(--transition-fast);
  box-shadow: 0 0 10px rgb(57, 255, 20, 0.2);
}

.features-more a:hover {
  background: var(--color-text-secondary);
  color: var(--color-bg-primary);
  box-shadow: 0 0 20px rgb(57, 255, 20, 0.4);
}

/* ─── Icon Animations ─── */
.feature-icon svg,
.client-card-icon svg {
  transition: transform var(--transition-base);
}

.feature-card:hover .feature-icon svg,
.client-card:hover .client-card-icon svg {
  transform: scale(1.1);
}

/* ─── Link Arrow ─── */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-ui);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.link-arrow::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.link-arrow:hover {
  color: var(--color-text-secondary);
  text-shadow: 0 0 8px var(--color-text-secondary);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ─── Neon Border Animation ─── */
@keyframes border-flow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.animated-border {
  position: relative;
}

.animated-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(
    90deg,
    var(--color-text-secondary),
    var(--color-text-primary),
    var(--color-text-secondary),
    var(--color-text-primary)
  );
  background-size: 300% 100%;
  z-index: -1;
  animation: border-flow 3s linear infinite;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.animated-border:hover::before {
  opacity: 1;
}

/* ─── Cyber Glow Effect ─── */
.cyber-glow {
  position: relative;
}

.cyber-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: radial-gradient(ellipse at center, rgb(57, 255, 20, 0.2) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

.cyber-glow:hover::after {
  opacity: 1;
}

/* ─── Noise Texture Overlay ─── */
.noise-overlay {
  position: relative;
}

.noise-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.02;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  z-index: 1;
}

/* ─── Neon Grid Overlay ─── */
.grid-overlay {
  position: relative;
}

.grid-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(57, 255, 20, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgb(57, 255, 20, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}

/* ─── Scan Line Effect ─── */
.scanlines {
  position: relative;
  overflow: hidden;
}

.scanlines::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgb(0, 0, 0, 0.1) 0,
    rgb(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 10;
}

/* ─── Neon Loading Animation ─── */
@keyframes neon-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.neon-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-bg-secondary);
  border-top-color: var(--color-text-secondary);
  border-right-color: var(--color-text-primary);
  border-radius: 50%;
  animation: neon-spin 1s linear infinite;
  box-shadow:
    0 0 10px var(--color-text-secondary),
    inset 0 0 10px rgb(57, 255, 20, 0.1);
}

/* ─── Counter Animation ─── */
.counter {
  display: inline-block;
  font-family: var(--font-code);
  color: var(--color-text-secondary);
}

/* ─── Pixel Reveal Animation ─── */
@keyframes pixel-reveal {
  0% {
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  }

  50% {
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
  }

  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

.pixel-reveal {
  animation: pixel-reveal 0.6s ease-out forwards;
}
