/**
 * Animaciones, Glassmorphism y Micro-interacciones (Spec 199 / Spec 200)
 * Cliente: Lic. Viviana Colucci
 */

/* 1. Navbar Glassmorphism Dinámico */
header {
  background-color: transparent !important;
  box-shadow: none !important;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

header.header-scrolled {
  background-color: rgba(250, 247, 241, 0.88) !important;
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: 0 4px 20px rgba(30, 41, 59, 0.05) !important;
  border-bottom: 1px solid rgba(125, 24, 59, 0.08) !important;
}

/* 2. Micro-interacción: Subrayado expansivo en navegación */
.nav-links a:not(.btn) {
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn).active::after {
  transform: scaleX(1);
}

/* 3. Elevación elástica y sombra de vino en botones principales */
.btn {
  transition: background-color 0.25s ease,
              color 0.25s ease,
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(125, 24, 59, 0.28) !important;
}

/* 4. Enlaces editoriales interactivos con desplazamiento de flecha */
.link-editorial {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(125, 24, 59, 0.25);
  padding-bottom: 4px;
  transition: color 0.25s ease,
              border-bottom-color 0.25s ease,
              transform 0.25s ease;
}

.link-editorial:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  transform: translateX(3px);
}

.link-editorial .arrow-icon {
  display: inline-block;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-editorial:hover .arrow-icon {
  transform: translateX(5px);
}

/* 5. Animación de llegada en Hero y Encabezados de Página */
@keyframes pageArrival {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header h1,
.page-header-anim-1 {
  animation: pageArrival 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.page-header p,
.page-header-anim-2 {
  animation: pageArrival 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero-anim-1 {
  animation: pageArrival 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}
.hero-anim-2 {
  animation: pageArrival 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.14s both;
}
.hero-anim-3 {
  animation: pageArrival 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both;
}
.hero-anim-4 {
  animation: pageArrival 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.34s both;
}

/* 6. Scroll Reveal Progresivo */
.reveal-item {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 7. Franja Banner CTA a Sangre Completa (Full-Bleed - Spec 198 / Spec 200) */
.cta-fullbleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background-color: var(--color-primary);
  color: #FAF7F2;
  padding: 5rem 1.5rem;
  text-align: center;
}

.cta-fullbleed h2 {
  color: #FAF7F2 !important;
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
}

.cta-fullbleed p {
  color: rgba(250, 247, 242, 0.90);
  font-size: 1.18rem;
  max-width: 720px;
  margin: 0 auto 2.25rem auto;
  line-height: 1.75;
}

.cta-fullbleed .btn {
  background-color: #FAF7F2 !important;
  color: var(--color-primary) !important;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

.cta-fullbleed .btn:hover {
  background-color: #FFFFFF !important;
  color: var(--color-primary) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

@media (max-width: 768px) {
  .cta-fullbleed {
    padding: 4rem 1.25rem;
  }
  .cta-fullbleed h2 {
    font-size: 1.75rem;
  }
}

/* 8. Accesibilidad: Reducción de Movimiento */
@media (prefers-reduced-motion: reduce) {
  header,
  .nav-links a::after,
  .link-editorial,
  .link-editorial .arrow-icon,
  .btn,
  .hero-anim-1,
  .hero-anim-2,
  .hero-anim-3,
  .hero-anim-4,
  .page-header h1,
  .page-header p,
  .page-header-anim-1,
  .page-header-anim-2,
  .reveal-item {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
