/* ============================================
   REMYC - Extra Visual Effects
   LIGHT THEME - Red accent
   ============================================ */

/* --- Glitch Text (only in hero/dark sections) --- */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  overflow: hidden;
  clip-path: inset(0);
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #c8102e;
  animation: glitchTop 3s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: 2px 0 #e02040;
  animation: glitchBottom 2.5s infinite linear alternate-reverse;
}

@keyframes glitchTop {
  0% { clip-path: inset(0 0 85% 0); }
  5% { clip-path: inset(40% 0 30% 0); }
  10% { clip-path: inset(0 0 85% 0); }
  15% { clip-path: inset(80% 0 0 0); }
  20% { clip-path: inset(0 0 85% 0); }
  25% { clip-path: inset(10% 0 70% 0); }
  100% { clip-path: inset(0 0 85% 0); }
}

@keyframes glitchBottom {
  0% { clip-path: inset(85% 0 0 0); }
  5% { clip-path: inset(20% 0 50% 0); }
  10% { clip-path: inset(85% 0 0 0); }
  15% { clip-path: inset(0 0 60% 0); }
  20% { clip-path: inset(85% 0 0 0); }
  25% { clip-path: inset(60% 0 10% 0); }
  100% { clip-path: inset(85% 0 0 0); }
}

/* Scramble char color */
.scramble-char {
  color: var(--c-accent);
  opacity: 0.7;
}

/* --- Card Hover Glow (follows mouse) --- */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-md);
  background: radial-gradient(
    circle 200px at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(200,16,46,0.06) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  pointer-events: none;
  z-index: 1;
}

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

.product-card__body,
.product-card__img {
  position: relative;
  z-index: 2;
}

/* --- Noise Texture Overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.008;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Glassmorphism Cards (light version) --- */
.glass-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* --- Animated Border Gradient --- */
.gradient-border {
  position: relative;
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--c-accent), transparent 40%, transparent 60%, var(--c-accent-dark));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  pointer-events: none;
}

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

/* --- Shimmer Loading --- */
.shimmer {
  background: linear-gradient(
    90deg,
    #e8e8e8 25%,
    #f0f0f0 37%,
    #e8e8e8 63%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Neon Glow on hover --- */
.neon-hover:hover {
  text-shadow:
    0 0 7px rgba(200,16,46,0.6),
    0 0 15px rgba(200,16,46,0.4),
    0 0 30px rgba(200,16,46,0.2);
}

/* --- Pulsing border --- */
.pulse-border {
  animation: pulseBorder 3s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%, 100% { border-color: rgba(200,16,46,0.1); }
  50% { border-color: rgba(200,16,46,0.3); }
}

/* --- Marquee / scrolling text --- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: var(--space-sm) 0;
  background: #f0f0f0;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

.marquee__inner {
  display: inline-flex;
  gap: var(--space-2xl);
  animation: marqueeScroll 30s linear infinite;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  color: #555555;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.marquee__item .dot {
  width: 6px;
  height: 6px;
  background: var(--c-accent);
  border-radius: 50%;
  opacity: 0.5;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Animated underline --- */
.animated-underline {
  position: relative;
  display: inline-block;
}

.animated-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-accent);
  transition: width var(--duration-normal) var(--ease-out);
}

.animated-underline:hover::after {
  width: 100%;
}

/* --- Split reveal --- */
.split-reveal {
  overflow: hidden;
}

.split-reveal > span {
  display: inline-block;
  transform: translateY(120%);
  transition: transform var(--duration-slow) var(--ease-out);
}

.split-reveal.visible > span {
  transform: translateY(0);
}

/* --- Background grain animation --- */
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  20% { transform: translate(-15%, 5%); }
  30% { transform: translate(7%, -25%); }
  40% { transform: translate(-5%, 25%); }
  50% { transform: translate(-15%, 10%); }
  60% { transform: translate(15%, 0%); }
  70% { transform: translate(0%, 15%); }
  80% { transform: translate(3%, 35%); }
  90% { transform: translate(-10%, 10%); }
}

/* --- Spotlight on hero --- */
.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200,16,46,0.04) 0%, transparent 60%);
  transform: translateX(-50%);
  animation: spotlight 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes spotlight {
  0%, 100% { top: -50%; left: 30%; }
  25% { top: -40%; left: 60%; }
  50% { top: -60%; left: 70%; }
  75% { top: -45%; left: 40%; }
}

/* --- Line drawing effect --- */
.line-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s var(--ease-out);
}

.line-draw.visible {
  stroke-dashoffset: 0;
}

/* --- Floating badge --- */
.floating-badge {
  animation: floatBadge 4s ease-in-out infinite;
}

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

/* --- Ring pulse effect (for CTA) --- */
.ring-pulse {
  position: relative;
}

.ring-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--c-accent);
  border-radius: inherit;
  opacity: 0;
  animation: ringExpand 2s ease-out infinite;
}

@keyframes ringExpand {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* --- Smooth image reveal --- */
img[data-src] {
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

img.loaded {
  opacity: 1;
}

/* --- Section divider --- */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-accent-light));
  border-radius: 2px;
  margin: 0 auto var(--space-lg);
}

/* --- Horizontal scroll snap for mobile products --- */
@media (max-width: 640px) {
  .products-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--space-md);
    padding-bottom: var(--space-md);
    -webkit-overflow-scrolling: touch;
  }

  .products-grid::-webkit-scrollbar {
    height: 4px;
  }

  .products-grid::-webkit-scrollbar-thumb {
    background: var(--c-accent);
    border-radius: 2px;
  }

  .product-card {
    min-width: 280px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}
