/* =====================================================
   Gestión de Turnos — Landing
   Sistema de diseño basado en ALIA Turismo, recoloreado
   del verde esmeralda original a azul corporativo (#1D4ED8 / #2563EB),
   el mismo tono que usa la herramienta.
   ===================================================== */

:root {
  /* Tema claro "Blanco Limpio" */
  --background: 0 0% 100%;
  --foreground: 215 28% 7%;

  --card: 210 20% 98%;
  --card-foreground: 215 28% 7%;

  --popover: 0 0% 100%;
  --popover-foreground: 215 28% 7%;

  /* Primary: Azul corporativo (antes verde esmeralda) */
  --primary: 224 76% 48%;
  --primary-foreground: 0 0% 100%;

  --secondary: 210 16% 93%;
  --secondary-foreground: 215 25% 27%;

  --muted: 210 16% 93%;
  --muted-foreground: 215 16% 47%;

  --accent: 210 16% 96%;
  --accent-foreground: 215 25% 27%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;

  --border: 214 18% 82%;
  --input: 214 18% 82%;
  --ring: 224 76% 48%;

  --radius: 0.75rem;

  /* Gradientes azules bicolor (azul corporativo → azure brillante; vivos pero
     sin salirnos del azul: hue 202–226, nunca verde/teal) */
  --gradient-primary: linear-gradient(135deg, hsl(226 74% 46%) 0%, hsl(202 92% 50%) 100%);
  --gradient-accent: linear-gradient(120deg, hsl(224 76% 48%) 0%, hsl(210 90% 52%) 100%);
  --gradient-hero: linear-gradient(180deg, hsl(0 0% 100%) 0%, hsl(210 30% 98%) 100%);

  /* Sombras (algo más definidas para un acabado premium) */
  --shadow-soft: 0 6px 24px -6px hsl(222 47% 25% / 0.10);
  --shadow-card: 0 4px 18px -8px hsl(222 47% 25% / 0.14);
  --shadow-elevated: 0 18px 40px -16px hsl(222 47% 25% / 0.20);
  --shadow-glow: 0 0 18px -4px hsl(210 90% 52% / 0.30);
}

* { border-color: hsl(var(--border)); }

html { scroll-behavior: smooth; font-size: 17.5px; }
@media (max-width: 480px) { html { font-size: 16px; } }
html, body { overflow-x: hidden; }

body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
}

h1, h2, h3 { letter-spacing: -0.035em; font-weight: 800; }
/* Titulares de sección a escala editorial (estilo Hartmann) */
section h2 { line-height: 1.04; }
/* Cifras tabulares: dígitos alineados (oficio editorial en métricas) */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ── Antetítulo estilo YNI: etiqueta en mayúsculas con línea de acento ───────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsl(var(--primary));
}
.eyebrow::before {
  content: '';
  width: 1.85rem;
  height: 2px;
  border-radius: 2px;
  /* Azul de marca con un remate cálido (terracota) — acento editorial sutil */
  background: linear-gradient(90deg, hsl(224 76% 48%) 0%, hsl(217 91% 60%) 60%, #b06a4f 100%);
}

/* Titular de impacto en mayúsculas (statement) */
.heading-upper { text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.08; }

/* Firma de marca "Lo hacemos posible" */
.tagline {
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Los anclajes no quedan tapados por la cabecera fija */
section[id] { scroll-margin-top: 5rem; }

/* Foco visible para teclado */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid hsl(224 76% 48%);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Enlace "saltar al contenido" */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: hsl(224 76% 48%);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* Navegación: enlace activo (scroll-spy) */
.nav-link.active { color: hsl(var(--foreground)); }
.nav-link.active::after { width: 100%; }

/* FAQ nativo (details/summary) */
.faq-item { border-bottom: 1px solid hsl(var(--border) / 0.6); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: hsl(var(--foreground));
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-icon { transition: transform 0.3s ease; flex-shrink: 0; color: hsl(224 76% 48%); }
.faq-item[open] summary .faq-icon { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 0 1.35rem; color: hsl(var(--muted-foreground)); line-height: 1.65; font-size: 1.02rem; }

/* ── Utilidades de gradiente y fondo ─────────────────────────────────────────── */
.bg-gradient-hero {
  background: var(--gradient-hero);
  position: relative;
}
.bg-gradient-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, hsl(221 83% 53% / 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 80% 90%, hsl(210 20% 90% / 0.4) 0%, transparent 50%);
  pointer-events: none;
}
.bg-gradient-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  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)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  opacity: 0.4;
}

/* Sombras */
.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow-card { box-shadow: var(--shadow-card); }
.shadow-elevated { box-shadow: var(--shadow-elevated); }
.shadow-glow { box-shadow: var(--shadow-glow); }

/* Glass */
.glass {
  background: hsl(0 0% 100% / 0.8);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid hsl(214 20% 90%);
}

/* Subrayado de enlaces */
.neon-underline { position: relative; }
.neon-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1px;
  background: hsl(224 76% 48%);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 1px;
}
.neon-underline:hover::after { width: 100%; }

/* Texto con brillo */
.text-shimmer {
  background: linear-gradient(
    110deg,
    hsl(224 76% 48%) 0%,
    hsl(217 91% 65%) 40%,
    hsl(224 76% 48%) 50%,
    hsl(217 91% 65%) 60%,
    hsl(224 76% 48%) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* Animación flotante */
.animate-float { animation: float 4s ease-in-out infinite; }

/* Badge de paso (pulso) */
.step-badge { animation: pulse-glow 3s ease-in-out infinite; }

/* Borde animado */
.animated-border { position: relative; overflow: hidden; }
.animated-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, transparent 0%, hsl(221 83% 53% / 0.3) 10%, transparent 20%, transparent 100%);
  animation: rotate-gradient 6s linear infinite;
  z-index: -1;
}
.animated-border::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: hsl(210 20% 98%);
  z-index: -1;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Separador con gradiente */
.gradient-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, hsl(221 83% 53% / 0.3) 50%, transparent 100%);
}

/* Botón con gradiente animado */
.btn-animated {
  position: relative;
  background-size: 200% auto;
  background-image: linear-gradient(135deg, hsl(224 76% 48%) 0%, hsl(226 71% 40%) 50%, hsl(224 76% 48%) 100%);
  transition: background-position 0.5s ease, box-shadow 0.35s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 2px 8px -2px hsl(224 76% 48% / 0.4), 0 1px 2px hsl(0 0% 0% / 0.08);
  border: 1px solid hsl(224 76% 40% / 0.3);
}
/* Hover: glow azul claro + elevación (el "sombreado azul" al pasar el ratón) */
.btn-animated:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 10px 32px -6px hsl(210 90% 52% / 0.55), 0 0 0 4px hsl(210 90% 55% / 0.14);
}

/* Stagger fade-in */
.stagger-children > * {
  opacity: 0;
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.08s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.16s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.24s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.32s; }

/* Banda CTA / superficies en gradiente azul */
.bg-gradient-primary { background: var(--gradient-primary); }
.text-gradient-primary {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Patrón de rejilla tenue para fondos de sección */
.bg-grid-faint {
  background-image:
    linear-gradient(to right, hsl(224 30% 50% / 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, hsl(224 30% 50% / 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* Flotación lenta (mockup del hero) */
.animate-float-slow { animation: float 6s ease-in-out infinite; }

/* ── Keyframes ───────────────────────────────────────────────────────────────── */
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-8px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 hsl(221 83% 53% / 0.2); }
  50% { box-shadow: 0 0 20px 4px hsl(221 83% 53% / 0.15); }
}
@keyframes rotate-gradient { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════════════════
   Componentes de secciones (cada sección con su propio formato)
   ════════════════════════════════════════════════════════════════════════════ */

/* Marco tipo ventana de aplicación (sección "Un vistazo") */
.window-frame {
  background: #fff;
  border: 1px solid hsl(214 20% 88%);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  background: hsl(210 24% 97%);
  border-bottom: 1px solid hsl(214 20% 90%);
}
.window-dot { width: 0.72rem; height: 0.72rem; border-radius: 50%; flex: none; }

/* Diagrama de flujo (sección "Integraciones") — flecha que gira en móvil */
.flow-arrow { display: flex; align-items: center; justify-content: center; color: hsl(var(--primary)); }
.flow-arrow svg { width: 1.75rem; height: 1.75rem; transform: rotate(90deg); }
@media (min-width: 1024px) { .flow-arrow svg { transform: rotate(0deg); } }

/* Línea de tiempo conectada (sección "Cómo funciona") */
.process-track { position: relative; }
@media (min-width: 768px) {
  .process-track::before {
    content: '';
    position: absolute;
    left: 9%;
    right: 9%;
    top: 1.65rem;
    height: 3px;
    border-radius: 3px;
    /* Narrativa de flujo: azul vivo al inicio que se enfría hacia el final, con remate cálido */
    background: linear-gradient(90deg, hsl(var(--primary) / 0), hsl(224 76% 48%) 10%, hsl(217 91% 60%) 55%, rgb(176 106 79 / 0.45) 92%, rgb(176 106 79 / 0));
  }
}
.step-num { box-shadow: 0 0 0 6px hsl(var(--background)); }

/* Respeta "reducir movimiento": sin animaciones y contenido siempre visible */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
