/* =========================================================
   IMPULSO — Asistente Inteligente para WhatsApp
   Hoja de estilos principal
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --color-primary: #1F3B73;      /* azul oscuro: confianza, liderazgo */
  --color-primary-dark: #16294f;
  --color-secondary: #FFF8F0;    /* arena clara: calidez, cercanía */
  --color-accent: #14B8A6;       /* turquesa: acción, positivo */
  --color-accent-dark: #109184;
  --color-ink: #1c2430;
  --color-ink-soft: #4b5566;
  --color-border: rgba(31, 59, 115, 0.10);
  --color-card-bg: #ffffff;

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-soft: 0 4px 24px rgba(31, 59, 115, 0.08);
  --shadow-card: 0 2px 16px rgba(31, 59, 115, 0.06);

  --container-width: 1160px;
  --transition-base: 200ms ease;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--color-primary);
  margin: 0;
  line-height: 1.2;
  font-weight: 600;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition-base);
}
.skip-link:focus {
  top: 16px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  white-space: nowrap;
}

.btn-accent {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.30);
}
.btn-accent:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.38);
}

.btn-large {
  padding: 17px 36px;
  font-size: 1.05rem;
}

.btn-header {
  padding: 10px 20px;
  font-size: 0.92rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 240, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--color-accent-dark);
  line-height: 1.2;
  margin-bottom: 12px;
}
.eyebrow--center { text-align: center; }
.eyebrow--hero {
  font-size: clamp(2.1rem, 3.6vw, 3.15rem);
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 88px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-copy > * {
  opacity: 0;
  transform: translateY(16px);
  animation: heroFadeUp 700ms ease forwards;
}
.hero-copy > .eyebrow { animation-delay: 60ms; }
.hero-copy > h1 { animation-delay: 180ms; }
.hero-copy > .hero-sub { animation-delay: 320ms; }
.hero-copy > .hero-actions { animation-delay: 460ms; }
.hero-copy > .trust-indicators { animation-delay: 580ms; }

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: clamp(2.1rem, 3.6vw, 3.15rem);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--color-ink-soft);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-actions {
  margin-bottom: 28px;
}

.trust-indicators {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trust-indicators li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--color-ink-soft);
}
.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* Hero visual: phone mock with chat */
.hero-visual {
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  animation: heroFadeUp 700ms ease forwards;
  animation-delay: 240ms;
}

.phone-mock {
  width: 300px;
  background: var(--color-primary);
  border-radius: 34px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
  position: relative;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.phone-notch {
  width: 70px;
  height: 6px;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  margin: 0 auto 12px;
}

.chat-window {
  background: var(--color-secondary);
  border-radius: 22px;
  padding: 20px 16px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  animation: bubbleIn 0.5s ease forwards;
}

.chat-bubble--in {
  align-self: flex-start;
  background: #ffffff;
  color: var(--color-ink);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-card);
}
.chat-bubble--in:nth-of-type(1) { animation-delay: 0.2s; }

.chat-bubble--out {
  align-self: flex-end;
  background: var(--color-accent);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.chat-bubble--out { animation-delay: 1s; }

.chat-bubble--in:nth-of-type(3),
.chat-window .chat-bubble--in:last-of-type { animation-delay: 1.8s; }

@keyframes bubbleIn {
  to { opacity: 1; transform: translateY(0); }
}

.typing-indicator {
  align-self: flex-end;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(20, 184, 166, 0.16);
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  opacity: 0;
  animation: bubbleIn 0.5s ease forwards;
  animation-delay: 2.6s;
}
.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-dark);
  animation: typingDot 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- Secciones generales ---------- */
.section {
  padding: 88px 0;
}

.section h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  text-align: center;
  max-width: 34ch;
  margin: 0 auto 48px;
}

.problema { background: var(--color-secondary); }
.beneficios { background: var(--color-secondary); }
.como-funciona { background: #ffffff; }
.para-quien { background: var(--color-secondary); }
.por-que { background: #ffffff; }

/* ---------- Tarjetas ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card-grid--four { grid-template-columns: repeat(4, 1fr); }
.card-grid--three { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base), opacity 500ms ease, translate 500ms ease;
  opacity: 0;
  translate: 0 20px;
}
.card.is-visible {
  opacity: 1;
  translate: 0 0;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

/* Entrada escalonada: cada tarjeta aparece un poco después que la anterior */
.card-grid > .card:nth-child(1) { transition-delay: 0ms; }
.card-grid > .card:nth-child(2) { transition-delay: 80ms; }
.card-grid > .card:nth-child(3) { transition-delay: 160ms; }
.card-grid > .card:nth-child(4) { transition-delay: 240ms; }
.card-grid > .card:nth-child(5) { transition-delay: 320ms; }

.card h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}
.card p {
  color: var(--color-ink-soft);
  font-size: 0.95rem;
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(31, 59, 115, 0.08);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }

.card-icon--accent {
  background: rgba(20, 184, 166, 0.12);
  color: var(--color-accent-dark);
}

.card--simple {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 110px;
}
.card--simple p {
  color: var(--color-primary);
  font-weight: 500;
  font-size: 1rem;
}

.card--pillar {
  position: relative;
}
.pillar-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

/* ---------- Solución ---------- */
.solucion-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.solucion-copy p {
  color: var(--color-ink-soft);
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.solucion-copy h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin-bottom: 20px;
  text-align: left;
}

.solucion-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.solucion-photo-frame {
  position: relative;
  width: 320px;
  height: 320px;
}
.solucion-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 1;
  transition: transform 500ms ease, box-shadow 500ms ease;
}
.solucion-photo-frame:hover .solucion-photo {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(31, 59, 115, 0.18);
}
.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-accent);
  opacity: 0;
  animation: pulse 3s ease-out infinite;
}
.pulse-ring--delay { animation-delay: 1.5s; }
@keyframes pulse {
  0% { transform: scale(0.97); opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 0; }
}

/* ---------- Cómo funciona ---------- */
.steps {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}
.step {
  flex: 1 1 0;
  min-width: 0;
  background: var(--color-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  text-align: center;
  transition: opacity 500ms ease, translate 500ms ease, transform var(--transition-base), box-shadow var(--transition-base);
  opacity: 0;
  translate: 0 20px;
}
.step.is-visible {
  opacity: 1;
  translate: 0 0;
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.steps > .step:nth-child(1) { transition-delay: 0ms; }
.steps > .step:nth-child(3) { transition-delay: 120ms; }
.steps > .step:nth-child(5) { transition-delay: 240ms; }
.steps > .step:nth-child(7) { transition-delay: 360ms; }
.step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.12);
  color: var(--color-accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-icon svg { width: 22px; height: 22px; }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--color-ink-soft); font-size: 0.92rem; }

.step-arrow {
  flex: 0 0 auto;
  align-self: center;
  color: var(--color-accent);
  font-size: 1.6rem;
  line-height: 1;
  padding: 0 2px;
}

/* ---------- CTA final ---------- */
.cta-final {
  background: var(--color-primary);
  padding: 96px 0;
}
.cta-inner {
  text-align: center;
  max-width: 640px;
}
.cta-final h2 {
  color: #ffffff;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 16px;
}
.cta-final p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.logo--footer {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #ffffff;
}
.footer-slogan {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
.footer-links a {
  transition: color var(--transition-base);
}
.footer-links a:hover {
  color: var(--color-accent);
}

/* ---------- Botón flotante de WhatsApp ---------- */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.40);
  z-index: 200;
  transition: transform var(--transition-base), box-shadow var(--transition-base), opacity var(--transition-base);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}
.floating-whatsapp.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.floating-whatsapp:hover {
  background: var(--color-accent-dark);
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.48);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE — Mobile first adjustments (tablet & desktop above)
   ========================================================= */

@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid--four { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .solucion-inner { grid-template-columns: 1fr; }
  .solucion-visual { order: -1; margin-bottom: 12px; }
  .solucion-copy h2, .solucion-copy p { text-align: center; }
  .solucion-copy { text-align: center; }

  .steps { flex-wrap: wrap; }
  .step { flex: 1 1 calc(50% - 40px); min-width: 220px; }
  .step-arrow { transform: rotate(90deg); }
}

@media (max-width: 620px) {
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
  .card-grid,
  .card-grid--four,
  .card-grid--three {
    grid-template-columns: 1fr;
  }
  .phone-mock { width: 100%; max-width: 300px; }
  .footer-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .btn-header { padding: 8px 16px; font-size: 0.85rem; }

  .step { flex: 1 1 100%; }
  .step-arrow { transform: rotate(90deg); }
}
