/* ==========================================================================
   DAKAIRI HEREDIA - MARCA PERSONAL & COMERCIAL
   styles.css - Estilos personalizados, gradientes y microinteracciones
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Paleta Light Mode */
  --bg-primary: #faf7fd;
  --bg-secondary: #f3e8f8;
  --text-main: #1e1b2e;
  --text-muted: #5e5873;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(168, 85, 247, 0.16);
  --glass-nav: rgba(255, 255, 255, 0.88);
  --glow-pink: rgba(236, 72, 153, 0.18);
  --glow-purple: rgba(139, 92, 246, 0.18);
}

html.dark {
  /* Paleta Dark Mode (Slate Profundo con destellos Violeta/Fucsia) */
  --bg-primary: #0a0b12;
  --bg-secondary: #121320;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --card-bg: rgba(20, 21, 35, 0.75);
  --card-border: rgba(168, 85, 247, 0.22);
  --glass-nav: rgba(10, 11, 18, 0.88);
  --glow-pink: rgba(236, 72, 153, 0.25);
  --glow-purple: rgba(147, 51, 234, 0.28);
}

/* Base & Scroll */
html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
}

/* Prevención de parpadeo (Anti-FOUC) durante la carga inicial del tema */
html.no-theme-transition,
html.no-theme-transition *,
html.no-theme-transition *::before,
html.no-theme-transition *::after {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  transition: background-color 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* Gradientes de Texto de Alto Impacto */
.text-gradient {
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-rose {
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 50%, #d946ef 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-purple {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #7e22ce 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Efectos de Iluminación y Malla de Gradientes (Gradient Mesh Ambient Glow) */
.ambient-glow {
  position: absolute;
  width: 850px;
  height: 850px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  transition: opacity 0.5s ease;
  will-change: transform;
}

html.dark .ambient-glow {
  opacity: 0.50;
  mix-blend-mode: screen;
}

.glow-pink {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.55) 0%, rgba(217, 70, 239, 0.25) 40%, transparent 70%);
}

.glow-purple {
  background: radial-gradient(circle, rgba(147, 51, 234, 0.55) 0%, rgba(168, 85, 247, 0.25) 40%, transparent 70%);
}

.glow-indigo {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, rgba(129, 140, 248, 0.20) 40%, transparent 70%);
}

/* Halo Suave Interactivo del Cursor */
#orb-cursor {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, rgba(168, 85, 247, 0.15) 40%, transparent 70%);
  transform: translate(-50%, -50%);
}

html.dark #orb-cursor {
  mix-blend-mode: screen;
}

#copy-email-btn {
  max-width: 100%;
}

/* Tarjetas Glassmorphism Ultra Pulidas */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: rgba(217, 70, 239, 0.45);
  box-shadow: 0 20px 40px -15px rgba(168, 85, 247, 0.22);
}

.glass-nav {
  background: var(--glass-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
}

/* Badges de Distinción Académica y Técnica */
.distinction-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: rgba(236, 72, 153, 0.08);
  border: 1px solid rgba(236, 72, 153, 0.25);
  color: #db2777;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

html.dark .distinction-badge {
  background: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.35);
  color: #f472b6;
}

.distinction-badge:hover {
  transform: translateY(-1px);
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #a855f7;
}

html.dark .distinction-badge:hover {
  color: #c084fc;
}

/* Botones con Microinteracciones y Sombras Suaves */
.btn-primary-gradient {
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #7c3aed 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px -6px rgba(217, 70, 239, 0.45);
}

.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -6px rgba(217, 70, 239, 0.6);
  filter: brightness(1.06);
}

.btn-secondary-outline {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  transition: all 0.25s ease;
}

.btn-secondary-outline:hover {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.1);
  transform: translateY(-2px);
}

/* Chip Interactivo para Selector de Servicios en WhatsApp */
.service-chip {
  cursor: pointer;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-muted);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.service-chip:hover {
  border-color: #d946ef;
  color: #d946ef;
  transform: translateY(-1px);
}

.service-chip.active {
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px -2px rgba(168, 85, 247, 0.5);
}

/* Simulador Visual de Burbuja de WhatsApp */
.whatsapp-bubble-preview {
  position: relative;
  background: #ffffff;
  border-radius: 1rem 1rem 1rem 0.25rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

html.dark .whatsapp-bubble-preview {
  background: #1e2638;
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Acordeón FAQ suave */
.faq-item {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(168, 85, 247, 0.4);
}

.faq-item.active {
  border-color: #d946ef;
  background: rgba(168, 85, 247, 0.04);
}

html.dark .faq-item.active {
  background: rgba(168, 85, 247, 0.08);
}

.faq-content {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-content {
  max-height: 600px;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  opacity: 1;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Botón Flotante Volver Arriba */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(217, 70, 239, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.back-to-top-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top-btn:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 16px 32px -6px rgba(217, 70, 239, 0.7);
  filter: brightness(1.08);
}

.back-to-top-btn:active {
  transform: translateY(0) scale(0.96);
}

/* Toast flotante de copiado */
.toast-notification {
  position: fixed;
  bottom: 5.8rem;
  right: 2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #0f172a;
  color: #f8fafc;
  padding: 0.85rem 1.4rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .toast-notification {
  background: #1e1b2e;
  border-color: rgba(236, 72, 153, 0.4);
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Indicador de 80 minutos destacado */
.time-pill-badge {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px solid rgba(217, 70, 239, 0.35);
  color: #ec4899;
}

html.dark .time-pill-badge {
  color: #f472b6;
}

/* Scrollbar Personalizado */
::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(217, 70, 239, 0.6);
}

/* Animaciones sutiles de flotación */
@keyframes softFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-soft-float {
  animation: softFloat 6s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%, 100% {
    border-color: rgba(236, 72, 153, 0.3);
  }
  50% {
    border-color: rgba(168, 85, 247, 0.8);
  }
}

.animate-pulse-border {
  animation: pulseBorder 4s ease-in-out infinite;
}

/* ==========================================================================
   ANIMACIONES ESTILO APPLE (Scroll Reveal & Staggered Cards)
   ========================================================================== */

/* Revelación progresiva y suave para títulos y textos destacados */
.apple-reveal-text {
  opacity: 0.25;
  transform: translateY(14px);
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.apple-reveal-text.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Entrada suave y orgánica para tarjetas (Pilares, Programas, Soluciones Web y Contacto) */
.apple-fade-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.95s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.95s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.apple-fade-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   SIMULADOR DE 80 MINUTOS: MICROINTERACCIONES & GLOW
   ========================================================================== */

/* Píldoras interactivas con flotación suave al pasar el cursor o seleccionar */
.timeline-step-btn {
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow, border-color, color;
}

.timeline-step-btn:hover {
  transform: translateY(-2.5px);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.22);
}

.timeline-step-btn:not(.active):hover {
  border-color: rgba(168, 85, 247, 0.75) !important;
  color: rgb(168, 85, 247) !important;
  background-color: rgba(168, 85, 247, 0.12) !important;
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.25);
}

.dark .timeline-step-btn:not(.active):hover {
  border-color: rgba(192, 132, 252, 0.85) !important;
  color: rgb(216, 180, 254) !important;
  background-color: rgba(168, 85, 247, 0.15) !important;
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.3);
}

.timeline-step-btn.active {
  transform: translateY(-2.5px);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.35);
}

/* Tarjeta grande interactiva del simulador con resplandor perimetral en hover */
#timeline-detail-card {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow, border-color;
}

#timeline-detail-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.25), 0 12px 28px -6px rgba(0, 0, 0, 0.2);
}
