/* ══════════════════════════════════════════════
   303 CREATIVE STUDIO — ENHANCEMENTS v1.0
   Glassmorphism, Ripple Effects, Animated Gradients
   Opción B: Enhanced Visual Effects
   ══════════════════════════════════════════════ */

/* ═══ 1. GLASSMORPHISM MEJORADO ═══ */

/* Mejorar nav backdrop blur */
.nav {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav.scrolled {
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  background: rgba(13, 13, 16, 0.85);
  border-bottom: 1px solid rgba(201, 169, 126, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Glass effect en secciones hero */
.hero-overlay {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Glass cards */
.case-img,
.about-visual {
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 169, 126, 0.15);
}

/* ═══ 2. GLOW EFFECTS EN CARDS ═══ */

/* About cards glow */
.about-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(201, 169, 126, 0),
    transparent
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.about-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow:
    0 20px 60px rgba(201, 169, 126, 0.25),
    inset 0 1px 0 rgba(245, 244, 239, 0.1);
}

.about-card:hover::before {
  opacity: 1;
}

/* Service cards / Case cards glow */
.service-card,
.plan,
.pricing-card {
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover,
.plan:hover,
.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 24px 48px rgba(201, 169, 126, 0.2),
    inset 0 1px 0 rgba(201, 169, 126, 0.1);
  border-color: rgba(201, 169, 126, 0.3);
}

/* Testimonial cards */
.testimonial {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 3px solid rgba(201, 169, 126, 0.6);
}

.testimonial:hover {
  transform: translateX(12px);
  border-left-color: var(--gold);
  box-shadow:
    0 12px 32px rgba(201, 169, 126, 0.15),
    inset 0 1px 0 rgba(245, 244, 239, 0.05);
}

/* ═══ 3. ANIMATED GRADIENTS ═══ */

/* Gradient animado en hero */
.hero,
#hero {
  position: relative;
  background: linear-gradient(
    -45deg,
    #0d0d10 0%,
    #1a1a2e 25%,
    #0d0d10 50%,
    #131316 75%,
    #0d0d10 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Gradient animado sutil en overlay */
.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(201, 169, 126, 0.05) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  animation: overlayPulse 8s ease-in-out infinite;
}

@keyframes overlayPulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.7;
  }
}

/* ═══ 4. SCROLL-BASED BLUR & FADE ═══ */

/* Hero sub texto desaparece con blur */
.hero-sub {
  transition: filter 0.3s ease;
}

.hero-exit {
  position: relative;
}

/* ═══ 5. BUTTON ENHANCEMENTS ═══ */

.btn-primary,
.btn-gold,
.nav-cta,
.btn-ghost,
.btn-outline {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ripple effect en buttons (manejado por JS) */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: block;
}

.btn-primary::after,
.btn-gold::after,
.nav-cta::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Enhanced hover state */
.btn-primary:hover,
.btn-gold:hover {
  background: var(--gold2);
  transform: translateY(-4px);
  box-shadow:
    0 16px 48px rgba(201, 169, 126, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: 0.2em;
}

.nav-cta:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 36px rgba(201, 169, 126, 0.35);
  letter-spacing: 0.18em;
}

/* ═══ 6. HEADER TEXT IMPROVEMENTS ═══ */

.hero h1,
.section-header h2,
.sec h2 {
  position: relative;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Subtle glow text en headings */
.hero h1 {
  filter: drop-shadow(0 0 30px rgba(201, 169, 126, 0.15));
}

/* ═══ 7. IMAGE PARALLAX REFINEMENT ═══ */

.case-img img,
.case-images img,
.about-visual img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.case-img:hover img {
  filter: brightness(1.1) saturate(1.1);
}

/* ═══ 8. LINK & ANCHOR ENHANCEMENTS ═══ */

a {
  position: relative;
}

a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

a:hover::before {
  width: 100%;
}

/* ═══ 9. SCROLL PROGRESS INDICATOR ═══ */

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    var(--gold2) 50%,
    var(--gold3) 100%
  );
  transform-origin: left;
  transform: scaleX(0);
  z-index: 999;
  pointer-events: none;
}

/* ═══ 10. FORM IMPROVEMENTS ═══ */

input,
select,
textarea {
  transition: all 0.3s ease;
  border: 1px solid rgba(201, 169, 126, 0.2);
  background: rgba(19, 19, 22, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  background: rgba(19, 19, 22, 0.95);
  box-shadow:
    0 0 20px rgba(201, 169, 126, 0.2),
    inset 0 0 10px rgba(201, 169, 126, 0.05);
  outline: none;
}

/* ═══ 11. SECTION BACKGROUNDS ═══ */

section {
  position: relative;
  overflow: hidden;
}

/* Subtle animated background patterns */
.about,
.framework,
.stack,
.guarantee {
  background-attachment: fixed;
  background-size: 200% 200%;
}

/* ═══ 12. PERFORMANCE & ACCESSIBILITY ═══ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero {
    animation: none;
  }

  .hero-overlay {
    animation: none;
  }
}

@media (max-width: 1024px) {
  .nav.scrolled {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  /* Reducir algunos efectos en tablet */
  .about-card:hover,
  .service-card:hover {
    transform: translateY(-8px) scale(1.01);
  }
}

@media (max-width: 768px) {
  /* Mobile: reducir blur para performance */
  .nav.scrolled {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  /* Desactivar algunos glow effects en mobile */
  .about-card::before,
  .service-card::before {
    display: none;
  }

  /* Gradient animado solo en desktop */
  .hero {
    animation: none;
  }

  .hero-overlay {
    animation: none;
  }

  /* Reducir hover effects */
  .about-card:hover,
  .plan:hover {
    transform: translateY(-6px) scale(1);
    box-shadow: 0 12px 32px rgba(201, 169, 126, 0.15);
  }

  a::before {
    display: none;
  }
}

/* ═══ 13. DARK MODE SUPPORT ═══ */

@media (prefers-color-scheme: dark) {
  input,
  select,
  textarea {
    color: var(--white);
  }
}

/* ═══ 14. LOADING STATE ═══ */

.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 169, 126, 0.2),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
