/* ==========================================================================
   ARTETA Y ASOCIADOS - Corredores de Seguros S.R.L.
   Dirección de Arte Editorial & Sistema Visual Institucional
   Lima, Perú · Fundada en 1994 · Supervisada por la SBS (Registro J0541)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --color-ink: #0A192F;          /* Azul marino abisal para titulares y máxima legibilidad */
  --color-secondary: #0A192F;    /* Color secundario institucional oficial (Azul marino) */
  --color-brand-pink: #F41081;   /* Rosa institucional oficial (fuente de verdad del logotipo) */
  --color-brand-pink-hover: #DB0D73; /* Tono de interacción oscuro para contraste óptimo */
  --color-cobalt: #F41081;       /* Alias retrocompatible hacia el nuevo acento de marca */
  --color-steel: #334155;        /* Pizarra oscurecido para cuerpo de texto y metadatos (WCAG AA) */
  --color-muted: #64748B;        /* Gris medio para notas al pie y subtítulos */
  --color-line: #E5E5E0;         /* Línea de registro arquitectónico armónica con #F7F7F5 */
  --color-line-focus: #F41081;   /* Borde activo o hover con acento de marca */
  --color-canvas: #F7F7F5;       /* Fondo Alabastro Editorial (#F7F7F5) */
  --color-paper: #FFFFFF;        /* Superficie blanca nítida para tarjetas */
  --color-accent: #F41081;       /* Acento focal institucional para acciones principales */
  --color-accent-subtle: #FDF2F8;/* Tono de fondo suave para estados seleccionados */
  --color-accent-border: #FCE7F3;/* Borde sutil para contenedores con acento */
  
  --whatsapp-green: #25D366;
  --whatsapp-dark: #128C7E;
}

/* ==========================================================================
   1. ESTABILIDAD DEL HEADER (INMÓVIL, CERO DESPLAZAMIENTOS O SALTOS)
   ========================================================================== */
html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-ink);
  background-color: var(--color-canvas);
  /* scrollbar-gutter permanente garantiza que no haya salto de layout entre vistas */
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

/* ==========================================================================
   PROTECCIÓN Y COMPORTAMIENTO DE IMÁGENES (NO CLICKEABLES / NO DESCARGABLES)
   ========================================================================== */
img {
  pointer-events: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

::selection {
  background-color: #FCE7F3;
  color: var(--color-ink);
}

/* Tipografía Amigable y Cercana: Plus Jakarta Sans */
h1, h2, h3, .font-heading {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p, span, li, button, input, textarea, select {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Header con dimensiones exactas y fijas */
#main-header {
  height: 68px;
  width: 100%;
  box-sizing: border-box;
  background-color: rgba(247, 247, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-line);
}

@media (max-width: 768px) {
  #main-header {
    height: 62px;
  }
}

/* Enlaces del menú con métricas idénticas */
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-steel);
  box-sizing: border-box;
  padding: 0 14px;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--color-brand-pink);
  background-color: var(--color-accent-subtle);
}

.nav-link.active {
  color: var(--color-ink);
  background-color: var(--color-accent-subtle);
  border-bottom: 2px solid var(--color-brand-pink);
  font-weight: 700;
}

/* ==========================================================================
   2. SINGLE PAGE APPLICATION (SPA) - VISTAS Y TRANSICIÓN RÁPIDA
   ========================================================================== */
.spa-view {
  display: none;
}

.spa-view.active {
  display: block;
  animation: viewFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   HERO SECTIONS: ENTRADA DINÁMICA, RÁPIDA Y CORPORATIVA (SIEMPRE VISIBLE)
   ========================================================================== */
.hero-pill,
.hero-title,
.hero-subtitle,
.hero-actions,
.hero-chips {
  opacity: 1;
  transform: none;
}

.spa-view.active .hero-pill {
  animation: heroItemIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) 0s forwards;
}

.spa-view.active .hero-title {
  animation: heroItemIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.03s forwards;
}

.spa-view.active .hero-subtitle {
  animation: heroItemIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.06s forwards;
}

.spa-view.active .hero-actions {
  animation: heroItemIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.09s forwards;
}

.spa-view.active .hero-chips {
  animation: heroItemIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.12s forwards;
}

@keyframes heroItemIn {
  from {
    opacity: 0.3;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   SCROLL REVEAL: ROBUSTO, VISIBLE POR DEFECTO (CERO ESTADOS EN BLANCO)
   ========================================================================== */
.reveal-on-scroll {
  opacity: 1;
  transform: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible,
.spa-view.active .reveal-on-scroll {
  opacity: 1;
  transform: none;
}

/* Stagger ágil con cadencia de lectura sin ralentizar la navegación */
.stagger-1 { transition-delay: 0.02s; }
.stagger-2 { transition-delay: 0.04s; }
.stagger-3 { transition-delay: 0.06s; }
.stagger-4 { transition-delay: 0.08s; }
.stagger-5 { transition-delay: 0.10s; }
.stagger-6 { transition-delay: 0.12s; }
.stagger-7 { transition-delay: 0.14s; }
.stagger-8 { transition-delay: 0.16s; }

/* ==========================================================================
   3. ARQUITECTURA DE TARJETAS Y ELEMENTOS DE REGISTRO EDITORIAL
   ========================================================================== */

/* Ficha / Tarjeta limpia de 1px con elevación elegante sobre #F7F7F5 */
.ledger-card {
  background-color: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(10, 25, 47, 0.04), 0 1px 2px -1px rgba(10, 25, 47, 0.04);
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ledger-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 10px 25px -5px rgba(10, 25, 47, 0.08), 
              0 8px 10px -6px rgba(10, 25, 47, 0.03);
  transform: translateY(-2px);
}

/* Tarjeta de seguro */
.card-insurance {
  background-color: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(10, 25, 47, 0.04);
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-insurance:hover {
  border-color: #CBD5E1;
  box-shadow: 0 10px 25px -5px rgba(10, 25, 47, 0.08);
  transform: translateY(-2px);
}

/* Tarjeta de aseguradora aliada con respuesta ágil */
.insurer-card {
  background-color: #FFFFFF;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  box-shadow: 0 1px 2px 0 rgba(10, 25, 47, 0.03);
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.insurer-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 10px 20px -6px rgba(10, 25, 47, 0.08);
  transform: translateY(-2px);
}

/* Tarjetas de Galería Horizontal (Personas y Empresas) - Scroll Snap Fluido */
#personas-gallery,
#empresas-gallery {
  scroll-behavior: smooth !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch;
}

.gallery-card {
  scroll-snap-align: start !important;
  background-color: #FFFFFF;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  box-shadow: 0 1px 3px 0 rgba(10, 25, 47, 0.04);
  transition: border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.gallery-card:hover {
  border-color: #CBD5E1 !important;
  box-shadow: 0 12px 24px -6px rgba(10, 25, 47, 0.08) !important;
  transform: translateY(-3px);
}

/* Alineación estricta y pixel-perfect de tarjetas de seguros */
.persona-card-header {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.persona-card-title {
  height: 60px;
  display: flex;
  align-items: center;
  line-height: 1.25;
}

.persona-card-coverage {
  height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Microinteracciones ágiles para botones y enlaces de acción */
a[href*="wa.me"],
button {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.15s ease,
              border-color 0.15s ease,
              color 0.15s ease;
}

a[href*="wa.me"]:active,
button:active {
  transform: scale(0.975);
}

/* Ficha de Asesoría Hero */
.dispatch-ledger {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: 0 12px 32px -8px rgba(10, 25, 47, 0.09);
}

/* Botón flotante WhatsApp (Disciplinado, sin pulso artificial) */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 10px;
}

.whatsapp-bubble {
  background: white;
  color: var(--color-ink);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  gap: 6px;
}

.whatsapp-btn {
  background-color: var(--whatsapp-green);
  color: white;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.whatsapp-btn:hover {
  background-color: var(--whatsapp-dark);
  transform: translateY(-2px);
}

/* Botón volver arriba */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  background-color: white;
  color: var(--color-ink);
  width: 42px;
  height: 42px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-line);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  border-color: var(--color-brand-pink);
  color: var(--color-brand-pink);
}

/* Focus accesible universal */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-brand-pink);
  outline-offset: 2px;
}

/* Clases de Accesibilidad para Lectores de Pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:focus,
.sr-only-focusable:focus-visible {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background-color: var(--color-ink);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 6px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  outline: 2px solid var(--color-brand-pink);
}

/* Soporte para Preferencia de Reducción de Movimiento (WCAG 2.1) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .spa-view.active,
  .hero-pill,
  .hero-title,
  .hero-subtitle,
  .hero-actions,
  .hero-chips {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Galería Horizontal Ocultar Scrollbar */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   4. ACORDEÓN / FAQ CON ANIMACIÓN FLUIDA OPEN & CLOSE
   ========================================================================== */
.faq-item summary {
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, color 0.25s ease;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
  background-color: rgba(244, 16, 129, 0.1);
  color: #F41081;
}

.faq-content {
  overflow: hidden;
  will-change: height, opacity;
}

/* ==========================================================================
   5. DIRECCIÓN DE ARTE DIFERENCIADA POR INTENCIÓN
   ========================================================================== */

/* --- 5.1 MEMORIA INSTITUCIONAL (NOSOTROS) --- */
.memorial-folio {
  font-family: 'Plus Jakarta Sans', monospace, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-track {
  position: relative;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background-color: var(--color-line);
}

@media (min-width: 768px) {
  .timeline-track::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-node {
  position: relative;
}

.timeline-marker {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--color-paper);
  border: 2px solid var(--color-brand-pink);
  color: var(--color-brand-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8125rem;
  box-shadow: 0 2px 8px rgba(244, 16, 129, 0.15);
  z-index: 2;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.timeline-node:hover .timeline-marker {
  transform: scale(1.1);
  background-color: var(--color-brand-pink);
  color: #FFFFFF;
}

.seal-card {
  position: relative;
  background-color: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.seal-card:hover {
  border-color: var(--color-brand-pink);
  box-shadow: 0 8px 24px -4px rgba(10, 25, 47, 0.08);
}

.seal-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  border: 1px solid var(--color-line);
  background-color: var(--color-canvas);
  color: var(--color-steel);
}

/* --- 5.2 BROCHURE CORPORATIVO B2B (EMPRESAS) --- */
.b2b-kpi {
  border-left: 3px solid var(--color-brand-pink);
  background-color: var(--color-paper);
  border-top: 1px solid var(--color-line);
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: all 0.2s ease;
}

.b2b-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(10, 25, 47, 0.06);
}

.compliance-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}

.compliance-table th {
  background-color: #0A192F;
  color: #FFFFFF;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  padding: 0.875rem 1rem;
  text-align: left;
}

.compliance-table th:first-child {
  border-top-left-radius: 8px;
}

.compliance-table th:last-child {
  border-top-right-radius: 8px;
}

.compliance-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-line);
  background-color: var(--color-paper);
  color: var(--color-steel);
  vertical-align: middle;
}

.compliance-table tr:hover td {
  background-color: #FAF9F6;
}

.compliance-table tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

.compliance-table tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

.b2b-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.b2b-badge-law {
  background-color: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.b2b-badge-benefit {
  background-color: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.b2b-badge-protect {
  background-color: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

/* --- 5.3 CATÁLOGO DE PROTECCIÓN FAMILIAR (PERSONAS) --- */
.family-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-steel);
  background-color: var(--color-paper);
  border: 1px solid var(--color-line);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.family-filter-btn:hover {
  color: var(--color-ink);
  border-color: #CBD5E1;
  background-color: #FFFFFF;
}

.family-filter-btn.active {
  background-color: var(--color-brand-pink);
  color: #FFFFFF;
  border-color: var(--color-brand-pink);
  box-shadow: 0 2px 8px rgba(244, 16, 129, 0.25);
}

.emergency-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: 8px;
}

.emergency-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-brand-pink);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  shrink: 0;
}


