/* =========================================================================
   OVERHAUL.CSS — Rediseño visual premium de Sometomatic AI
   Se carga al final: refina y sobrescribe el sistema base sin romperlo.
   Mantiene la identidad de marca (morado #8c52ff + Inter) y eleva
   tipografía, profundidad, ritmo, estados y motion.
   ========================================================================= */

:root {
  /* Escala de acento de marca (morado) con tonos fríos consistentes */
  --brand: #8c52ff;
  --brand-600: #7a3df0;
  --brand-700: #6429d6;
  --brand-300: #b794ff;
  --brand-100: #ede5ff;

  /* Fondos con tinte frío (una sola familia de grises) */
  --surface-0: #ffffff;
  --surface-1: #faf9ff;   /* off-white tintado de morado, no blanco puro */
  --surface-2: #f3f1fb;
  --ink-900: #15101f;     /* casi negro tintado, no #000 */
  --ink-700: #2c2440;
  --ink-500: #5b5470;
  --ink-300: #8e88a3;
  --line: #e7e3f3;

  /* Sombras tintadas de morado (no negro puro) */
  --shadow-soft: 0 1px 2px rgba(76, 40, 130, .06), 0 4px 12px rgba(76, 40, 130, .06);
  --shadow-card: 0 2px 6px rgba(76, 40, 130, .07), 0 14px 36px rgba(76, 40, 130, .10);
  --shadow-pop:  0 10px 24px rgba(76, 40, 130, .14), 0 30px 60px rgba(76, 40, 130, .16);
  --shadow-brand: 0 14px 32px rgba(140, 82, 255, .34);

  --ease-spring: cubic-bezier(.22, 1, .36, 1);
}

/* ---- Tipografía global: más carácter y jerarquía ---- */
body {
  background: var(--surface-1);
  color: var(--ink-700);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, .section-title, .hero-title { text-wrap: balance; }
p { text-wrap: pretty; }

/* Cifras siempre tabulares (counters, precios, stats) */
[data-counter], .plan-price, .contact-stats h4, .stat h4 {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Contenedor un poco más amplio en pantallas grandes */
@media (min-width: 1280px) {
  .container { max-width: 1240px; }
}

/* Grano sutil global para romper la planitud digital */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Foco accesible coherente en todo el sitio */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
.btn:focus-visible,
.hero-btn:focus-visible,
.cta-button:focus-visible {
  outline: 3px solid var(--brand-300);
  outline-offset: 3px;
  border-radius: 6px;
}

/* =========================================================================
   HEADER — glassmorphism refinado
   ========================================================================= */
.header {
  background: rgba(15, 12, 26, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(140, 82, 255, .22);
}
.nav-tagline { color: var(--brand-300); }
.nav-link { position: relative; transition: color var(--transition-fast); }
.nav-link::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 2px; border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease-spring);
}
.nav-link:hover::after { transform: scaleX(1); }

/* =========================================================================
   HERO — más profundidad y presencia
   ========================================================================= */
.hero { min-height: 100dvh; }
.hero-title {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.hero-description { color: #d8d2ea; }

.hero-cta { align-items: center; }

/* Tercer CTA como enlace de texto (reduce ruido visual) */
.hero-link {
  color: var(--text-gray-light, #e2e8f0);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  opacity: .85;
  display: inline-flex; align-items: center; gap: .4rem;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.hero-link:hover { opacity: 1; transform: translateX(2px); }

.hero-btn { transition: transform .25s var(--ease-spring), box-shadow .25s var(--ease-spring), background .25s ease; }
.hero-btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-600)); }
.hero-btn:active { transform: translateY(0) scale(.98); }

/* =========================================================================
   RITMO DE SECCIONES — más aire, padding óptico
   ========================================================================= */
.section { padding: 6rem 1rem 6.75rem; }
.section-white { background: var(--surface-0); }
.section-light { background: var(--surface-2); }
.section-header { margin-bottom: 3.25rem; }
.section-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}
.section-subtitle {
  color: var(--ink-500);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.075rem;
}

/* =========================================================================
   SERVICE CARDS — superficie refinada con barra de acento y hover spotlight
   ========================================================================= */
.service-card {
  position: relative;
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2.25rem 1.9rem;
  box-shadow: var(--shadow-soft);
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-spring), border-color .3s ease;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-300));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-spring);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-pop);
  border-color: rgba(140, 82, 255, .35);
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 46px; height: 46px;
  color: var(--brand);
  margin-bottom: 1.1rem;
}
.service-title { color: var(--ink-900); font-weight: 700; letter-spacing: -0.01em; }
.service-description { color: var(--ink-500); }

/* Contadores / métricas */
[data-counter] { color: var(--brand) !important; letter-spacing: -0.03em; }

/* =========================================================================
   TIMELINE 14 días — tarjetas tipo "calendario / plazos"
   Paleta por fase: morado -> azul -> cian -> verde (un viaje de 14 días).
   ========================================================================= */
.timeline-step[data-phase="1"] { --accent: #8c52ff; --accent-2: #b794ff; }
.timeline-step[data-phase="2"] { --accent: #5b6cf0; --accent-2: #8aa0ff; }
.timeline-step[data-phase="3"] { --accent: #0fb6c4; --accent-2: #44d6e2; }
.timeline-step[data-phase="4"] { --accent: #14a06a; --accent-2: #34d399; }

.timeline-step {
  display: block;                 /* anula el grid móvil heredado de sections.css */
  position: relative;
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2.1rem 2rem;
  box-shadow: var(--shadow-card);
  text-align: left;
  overflow: hidden;
  transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease-spring), border-color .35s ease;
}
/* franja de acento por fase + halo de color difuso */
.timeline-step::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.timeline-step::after {
  content: "";
  position: absolute; top: -50px; right: -50px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
  pointer-events: none;
}
.timeline-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

/* eyebrow "Fase 0X — 04" */
.timeline-phase {
  display: inline-flex; align-items: center;
  align-self: flex-start;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: .7rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  padding: .34rem .75rem; border-radius: 999px;
  margin-bottom: 1.4rem;
}

.timeline-card-body {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 1.3rem;
}

/* calendario "tear-off" */
.timeline-cal {
  flex: none; width: 94px;
  border-radius: 16px; overflow: hidden;
  background: var(--surface-0);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.timeline-cal-top {
  display: block; height: 26px; position: relative;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.timeline-cal-top::before,
.timeline-cal-top::after {
  content: ""; position: absolute; top: 7px;
  width: 6px; height: 12px; border-radius: 3px;
  background: rgba(255, 255, 255, .85);
}
.timeline-cal-top::before { left: 26px; }
.timeline-cal-top::after  { right: 26px; }
.timeline-cal-label {
  display: block; margin-top: .45rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .62rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-300);
}
.timeline-cal-num {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 2.2rem; line-height: 1;
  color: var(--ink-900);
  padding: .12rem 0 .65rem;
}
.timeline-cal-num.is-range { font-size: 1.45rem; padding-top: .4rem; padding-bottom: .75rem; }

.timeline-content { min-width: 0; }
.timeline-icon {
  display: inline-flex;
  width: 38px; height: 38px;
  color: var(--accent);
  margin-bottom: .85rem;
}
.timeline-icon svg { width: 100%; height: 100%; }
.timeline-step-title {
  font-size: 1.2rem; font-weight: 700;
  color: var(--ink-900); letter-spacing: -.01em;
  margin: 0 0 .55rem;
}
.timeline-step-text {
  color: var(--ink-500);
  font-size: .97rem; line-height: 1.55;
  margin: 0 0 1.3rem;
}

/* mini línea de 14 días — el tramo de la fase resaltado */
.timeline-track {
  position: relative; height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.timeline-track-fill {
  position: absolute; top: 0; bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.timeline-range {
  display: block; margin-top: .6rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  color: var(--accent);
}

/* Morph de color suave cuando la tarjeta viva cambia de fase */
.proceso-live::before,
.proceso-live::after,
.proceso-live .timeline-cal-top,
.proceso-live .timeline-phase,
.proceso-live .timeline-icon,
.proceso-live .timeline-range,
.proceso-live .timeline-track-fill {
  transition: background .55s var(--ease-spring), color .55s var(--ease-spring),
              border-color .55s var(--ease-spring);
}

/* =========================================================================
   DEMO EMBEBIDA — "Pruébalo tú mismo" (sobrescribe demo.css)
   ========================================================================= */
#demo.demo-section {
  min-height: auto;
  padding: 6rem 1.5rem 6.5rem;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(183, 148, 255, .35), transparent),
    linear-gradient(135deg, var(--brand-700) 0%, var(--brand) 55%, #9d6bff 100%);
  position: relative;
  overflow: hidden;
}
#demo .demo-container { align-items: center; }
#demo .demo-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  padding: .4rem 1rem;
  border-radius: 999px;
  font-size: .85rem; font-weight: 600;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}
#demo .demo-text h2 { letter-spacing: -0.03em; }
#demo .demo-proof {
  margin-top: 2rem;
  display: flex; flex-wrap: wrap; gap: .6rem;
}
#demo .demo-proof span {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  padding: .35rem .8rem; border-radius: 999px;
  font-size: .85rem;
}
#demo .demo-cta-row { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .9rem; }
#demo .demo-cta-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; color: var(--brand-700);
  padding: .9rem 1.8rem; border-radius: 999px;
  font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
  transition: transform .25s var(--ease-spring), box-shadow .25s var(--ease-spring);
}
#demo .demo-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0, 0, 0, .3); }
#demo .demo-cta-primary:active { transform: translateY(0) scale(.98); }

/* El "teléfono" hereda demo.css; solo ajustamos sombra para el fondo morado */
#demo .smartphone { box-shadow: 0 30px 80px rgba(40, 12, 90, .55); }

/* =========================================================================
   TECH STACK — credibilidad prestada (reemplaza testimonios)
   ========================================================================= */
.tech-stack { background: var(--surface-0); }
.tech-stack .section-subtitle { margin-bottom: 2.5rem; }
/* Carrusel de tecnologías — solo íconos en grande, nombre en hover, loop infinito */
.tech-marquee {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  /* difuminado en los bordes para que los logos entren/salgan con suavidad */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.tech-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: clamp(2.25rem, 6vw, 4.5rem);
  padding: 3.5rem 0 1.75rem; /* espacio superior para el tooltip */
  animation: tech-scroll 38s linear infinite;
  will-change: transform;
}
.tech-marquee:hover .tech-track,
.tech-track:focus-within { animation-play-state: paused; }

@keyframes tech-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); } /* derecha → izquierda */
}

.tech-logo {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.tech-logo svg,
.tech-logo img {
  width: clamp(58px, 7.5vw, 84px);
  height: clamp(58px, 7.5vw, 84px);
  object-fit: contain;
  transition: transform .28s var(--ease-spring), filter .28s ease;
}
.tech-logo:hover svg,
.tech-logo:hover img { transform: scale(1.12) translateY(-3px); }

/* Tooltip con el nombre de la tecnología */
.tech-logo::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--ink-900, #1a1430);
  color: #fff;
  font-weight: 600; font-size: .82rem;
  white-space: nowrap;
  padding: .35rem .75rem;
  border-radius: 9px;
  box-shadow: var(--shadow-card);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 5;
}
.tech-logo::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  border: 6px solid transparent;
  border-top-color: var(--ink-900, #1a1430);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 5;
}
.tech-logo:hover::after,
.tech-logo:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .tech-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
}
.tech-note {
  text-align: center;
  color: var(--ink-300);
  font-size: .9rem;
  margin-top: 1.75rem;
}

/* =========================================================================
   PLANES — torre recomendada destacada con color y badge "Más popular"
   ========================================================================= */
.plan-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-spring);
  overflow: visible; /* el badge "Más popular" sobresale por arriba; sin esto .service-card lo recorta */
  margin-top: 14px;  /* espacio para que el badge no choque con el borde superior */
}
.plan-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-pop); }

/* Las features arrancan a la misma altura y el botón queda abajo */
.plan-features { flex: 1 0 auto; }
.plan-card .btn { margin-top: auto; }

.plan-card-highlight {
  position: relative;
  border: 2px solid var(--brand);
  box-shadow: var(--shadow-brand);
  background: linear-gradient(180deg, var(--brand-100), var(--surface-0) 38%);
}
@media (min-width: 1025px) {
  .plan-card-highlight { transform: translateY(-12px) scale(1.02); }
  .plan-card-highlight:hover { transform: translateY(-18px) scale(1.02); }
}
.plan-popular-badge {
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff;
  font-size: .72rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .45rem 1rem;
  border-radius: 999px;
  box-shadow: var(--shadow-brand);
  white-space: nowrap;
}
.plan-price { color: var(--ink-900); font-weight: 800; }
.plan-badge { color: var(--brand-700); }

/* =========================================================================
   FAQ — refinado
   ========================================================================= */
.faq-item {
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.faq-item[open] { border-color: rgba(140, 82, 255, .4); box-shadow: var(--shadow-soft); }
.faq-question { font-weight: 600; color: var(--ink-900); }

/* =========================================================================
   LEAD CAPTURE — banda de captura de email de bajo compromiso
   ========================================================================= */
.lead-capture {
  background:
    radial-gradient(700px 320px at 12% -20%, rgba(140, 82, 255, .12), transparent),
    var(--surface-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.lead-capture-inner {
  max-width: 860px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem; align-items: center;
}
.lead-capture-copy h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink-900); margin-bottom: .75rem;
}
.lead-capture-copy p { color: var(--ink-500); }
.lead-form { display: flex; flex-direction: column; gap: .75rem; }
.lead-form-row { display: flex; gap: .6rem; }
.lead-input {
  flex: 1; min-width: 0;
  padding: .95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-0);
  font-family: inherit; font-size: 1rem;
  color: var(--ink-900);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.lead-input::placeholder { color: var(--ink-300); }
.lead-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(140, 82, 255, .15);
  outline: none;
}
.lead-submit {
  border: none; cursor: pointer;
  padding: .95rem 1.6rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff; font-weight: 700; font-size: 1rem;
  box-shadow: var(--shadow-brand);
  transition: transform .2s var(--ease-spring), box-shadow .2s var(--ease-spring), opacity .2s ease;
  white-space: nowrap;
}
.lead-submit:hover { transform: translateY(-2px); }
.lead-submit:active { transform: translateY(0) scale(.98); }
.lead-submit:disabled { opacity: .6; cursor: progress; transform: none; }
.lead-hint { font-size: .82rem; color: var(--ink-300); }
.lead-feedback { font-size: .9rem; min-height: 1.2em; font-weight: 600; }
.lead-feedback.is-ok { color: var(--brand-700); }
.lead-feedback.is-error { color: var(--error); }

@media (max-width: 760px) {
  .lead-capture-inner { grid-template-columns: 1fr; gap: 1.75rem; text-align: center; }
  .lead-form-row { flex-direction: column; }
}

/* =========================================================================
   FOOTER — borde y enlaces con acento
   ========================================================================= */
.footer-social-link { transition: transform .25s var(--ease-spring), color .25s ease; }
.footer-social-link:hover { transform: translateY(-3px); color: var(--brand-300); }

/* =========================================================================
   MOTION — entrada escalonada al hacer scroll (progresivo, no rompe nada)
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s var(--ease-spring), transform .6s var(--ease-spring);
    will-change: opacity, transform;
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* =========================================================================
   PROCESO — pin + scrub + card stacking (activado por scroll-effects.js)
   La clase .proceso-stack solo la añade GSAP en desktop con movimiento
   permitido; sin JS / móvil / reduced-motion la grilla normal queda intacta.
   ========================================================================= */
.proceso-stack {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 5.5rem;   /* aire bajo el header fijo */
  padding-bottom: 3rem;
  overflow: hidden;
}
.proceso-stack .section-header { margin-bottom: 2rem; }

/* La lista deja de ser grilla y pasa a ser el "escenario" donde se apila */
.proceso-stack .timeline-14d {
  display: block;
  position: relative;
  width: 100%;
  max-width: 780px;
  height: clamp(280px, 40vh, 360px);
  margin: 0 auto;
}

/* Modo línea de tiempo: ocultar las tarjetas estáticas, mostrar la viva */
.proceso-live { display: none; }
.proceso-stack .timeline-step:not(.proceso-live) { display: none; }

.proceso-stack .proceso-live {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 2.4rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  text-align: left;
  box-shadow: var(--shadow-pop);
}
.proceso-live-fade { will-change: opacity, transform; }

/* En el escenario ancho: calendario a la izquierda, contenido a la derecha */
.proceso-stack .timeline-card-body {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 2.25rem;
}
.proceso-stack .timeline-content { flex: 1; }
.proceso-stack .timeline-icon { margin-bottom: .65rem; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 768px) {
  .section { padding: 4rem 1rem 4.5rem; }
  .section-header { margin-bottom: 2.25rem; }
}

/* =========================================================================
   FIXES MÓVIL — overflow, hamburguesa, contacto, demo, timeline
   ========================================================================= */

/* Backstop anti scroll horizontal (clip no rompe el pin de ScrollTrigger) */
html, body { overflow-x: clip; }

/* --- Bug 2: botón hamburguesa branded (en vez del cuadro blanco por defecto) --- */
.nav-toggle {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(140, 82, 255, .14);
  border: 1px solid rgba(140, 82, 255, .4);
  border-radius: 12px;
  padding: .55rem .5rem;
  margin: 0;
  transition: background .25s var(--ease-spring), border-color .25s ease;
}
.nav-toggle:hover { background: rgba(140, 82, 255, .26); border-color: var(--brand-300); }
.nav-toggle span {
  width: 22px; height: 2.5px; border-radius: 3px;
  background: linear-gradient(90deg, #fff, var(--brand-300));
}

/* La tarjeta de email tiene fondo claro: sus beneficios deben ir en texto oscuro
   (la regla global los pinta de blanco para las tarjetas de fondo de color). */
.contact-card-secondary .contact-benefits p { color: var(--ink-500); }
.contact-card-secondary .contact-benefits strong { color: var(--ink-900); word-break: break-word; }

/* --- Bugs 1, 4, 6: tarjetas de contacto en una sola columna en móvil --- */
@media (max-width: 768px) {
  .contact-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.25rem;
    padding: 2rem 1.5rem;
  }
  .contact-card-icon { width: 3.5rem; height: 3.5rem; }
  .contact-card-content { width: 100%; min-width: 0; }
  .contact-benefits {
    display: inline-block;
    text-align: left;
    margin: 1rem auto 0;
  }
  .contact-card-actions { width: 100%; align-items: stretch; }
  .contact-card-actions .cta-button,
  .contact-card-actions .cta-large {
    width: 100%;
    justify-content: center;
    padding: .95rem 1.25rem;
    font-size: 1.05rem;
  }
}

/* --- Bugs 1, 5: el teléfono de la demo nunca desborda --- */
@media (max-width: 768px) {
  .smartphone {
    width: min(340px, calc(100vw - 2.5rem));
    height: auto;
    aspect-ratio: 34 / 68;
  }
}

/* --- Bug 3: timeline de fases activa también en móvil, en columna --- */
@media (max-width: 767px) {
  .proceso-stack { padding-top: 4rem; padding-bottom: 2rem; }
  .proceso-stack .section-header { margin-bottom: 1.1rem; }
  .proceso-stack .section-header .section-subtitle { display: none; }
  .proceso-stack .timeline-14d {
    height: clamp(400px, 64vh, 540px);
    max-width: 100%;
  }
  .proceso-stack .proceso-live { padding: 1.6rem 1.25rem; }
  .proceso-stack .timeline-phase { align-self: center; margin-bottom: .9rem; }
  .proceso-stack .timeline-card-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .9rem;
  }
  .proceso-stack .timeline-content { width: 100%; }
  .proceso-stack .timeline-icon { margin: 0 auto .5rem; }
  .proceso-stack .timeline-cal { width: 80px; }
  .proceso-stack .timeline-cal-num { font-size: 1.8rem; }
  .proceso-stack .timeline-step-title { font-size: 1.12rem; margin-bottom: .4rem; }
  .proceso-stack .timeline-step-text { font-size: .92rem; line-height: 1.45; margin-bottom: 1rem; }
}
