/* =========================================================
   Experiencia móvil (se carga al final y solo afecta pantallas pequeñas)
   Basado en: objetivos táctiles de 44–48 px (Apple HIG, Material, WCAG 2.2),
   acciones principales en la zona del pulgar, texto legible sin zoom,
   formularios sin auto-zoom en iOS y menor carga de animaciones.
   ========================================================= */

/* Barra de acciones fija (solo celular) */
.mbar { display: none; }

/* Respuesta táctil limpia en todos los dispositivos */
a, button, summary, .chip { -webkit-tap-highlight-color: transparent; }

/* En pantallas táctiles no hay "hover": evita que las tarjetas se queden levantadas */
@media (hover: none) {
  .service:hover, .plan:hover, .btn:hover, .chat__launcher:hover, .sound-toggle:hover { transform: none; }
  .service:hover { box-shadow: none; border-color: var(--line); }
  .service:hover .service__icon { background: var(--blue-50); color: var(--blue-600); }
  .service--feature:hover .service__icon { background: rgba(255,255,255,.15); color: #fff; }
  .plan--featured:hover { transform: none; }
  .btn:active, .chip:active, .mbar a:active, .intro__btn:active { transform: scale(.97); }
  .service:active, .why__item:active, .contact__list li:active { transform: scale(.99); }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  body { font-size: 16px; }

  /* ---- Espacio para la barra inferior ---- */
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

  .mbar {
    display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); backdrop-filter: saturate(160%) blur(14px);
    box-shadow: 0 -1px 0 var(--line), 0 -10px 30px -12px rgba(13,31,107,.25);
    transition: transform .3s ease;
  }
  .mbar a {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 52px; border-radius: 14px; font-weight: 700; font-size: 1rem;
    transition: transform .15s ease;
  }
  .mbar a svg { width: 22px; height: 22px; }
  .mbar__call { background: var(--blue-50); color: var(--navy-800); border: 1.5px solid #cfdcff; }
  .mbar__wa { background: var(--wa); color: #fff; box-shadow: 0 8px 18px -8px rgba(31,174,91,.7); }
  body.intro-open .mbar, body.chat-open .mbar { transform: translateY(110%); }

  /* Botones flotantes por encima de la barra */
  .chat { right: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .chat__launcher { width: 56px; height: 56px; }
  .sound-toggle { left: 14px; bottom: calc(90px + env(safe-area-inset-bottom)); width: 44px; height: 44px; }
  .chat__panel { inset: auto 8px calc(8px + env(safe-area-inset-bottom)) 8px; height: calc(100dvh - 90px); bottom: calc(8px + env(safe-area-inset-bottom)); }
  .chat.is-open .chat__launcher { opacity: 0; pointer-events: none; }
  .chat__close { width: 44px; height: 44px; }

  /* ---- Encabezado ---- */
  .brand__logo { width: 44px; height: 44px; border-radius: 12px; }
  .brand--logo .brand__top { font-size: .72rem; }
  .brand--logo .brand__bottom { font-size: 1.05rem; }
  .burger { width: 48px; height: 48px; }
  .nav { max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .nav a { min-height: 52px; display: flex; align-items: center; }
  .nav__cta-mobile {
    justify-content: center; margin-top: 14px; border-bottom: 0 !important; border-radius: 14px;
    background: var(--wa); color: #fff !important; font-weight: 700;
  }

  /* ---- Portada ---- */
  .hero { padding: calc(var(--header-h) + 28px) 0 76px; }
  .hero .eyebrow { font-size: .7rem; letter-spacing: .1em; }
  .hero h1 { font-size: 2.35rem; margin-bottom: 1rem; }
  .hero .lead { font-size: 1.02rem; margin-bottom: 1.6rem; }
  .hero__ctas { gap: .7rem; margin-bottom: 1.6rem; }
  .hero__ctas .btn { min-height: 54px; }
  .hero__bullets { flex-direction: column; align-items: flex-start; gap: .55rem; max-width: 320px; margin-inline: auto; }
  .hero__bullets li { font-size: .95rem; }
  .hero__visual { padding: 10px 0 0; }
  .pc__hint { font-size: .8rem; padding: .55rem 1rem; }

  /* ---- Secciones más compactas ---- */
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 2.2rem; }
  .section__head h2, .why__copy h2, .about__copy h2, .contact__info h2 { font-size: 1.85rem; }
  .section__head p { font-size: 1rem; }

  /* Servicios: tarjetas compactas (sin listas) para no hacer la página eterna */
  .services { gap: .85rem; }
  .service { padding: 1.25rem 1.25rem 1.3rem; display: grid; grid-template-columns: 48px 1fr; column-gap: 1rem; align-items: start; }
  .service__icon { width: 48px; height: 48px; border-radius: 14px; margin: 0; grid-row: span 2; }
  .service__icon svg { width: 24px; height: 24px; }
  .service h3 { font-size: 1.08rem; margin: .1rem 0 .35rem; }
  .service p { font-size: .95rem; margin: 0; }
  .service ul { display: none; }
  .service .link-arrow { grid-column: 2; margin-top: .6rem; min-height: 44px; }

  /* Proceso en dos columnas */
  .steps { grid-template-columns: 1fr 1fr; gap: 1.6rem 1rem; }
  .step__num { width: 58px; height: 58px; font-size: 1.1rem; margin-bottom: .9rem; }
  .step h3 { font-size: 1.02rem; }
  .step p { font-size: .9rem; }

  /* Por qué elegirnos en dos columnas */
  .why__grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
  .why__item { padding: 1.1rem; }
  .why__item h3 { font-size: .98rem; }
  .why__item p { font-size: .88rem; }
  .why__copy .btn { width: 100%; min-height: 52px; }

  /* Planes: deslizar de lado con la siguiente tarjeta asomándose */
  .plans {
    display: flex; gap: 14px; max-width: none; margin: 0 -18px; padding: 16px 18px 8px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .plans::-webkit-scrollbar { display: none; }
  .plan { flex: 0 0 84%; scroll-snap-align: center; padding: 1.7rem 1.5rem; }
  .plan--featured { order: -1; }
  .plans-hint { display: flex !important; }
  .plan .btn { min-height: 52px; }

  /* Nosotros */
  .about { gap: 2rem; }
  .about__logo-ring { width: min(240px, 72vw); }
  .about__contacts { flex-direction: column; }
  .about__contacts a { min-height: 52px; justify-content: center; }

  /* Preguntas */
  .faq summary { min-height: 56px; padding: 1rem 0; font-size: 1rem; }

  /* Contacto */
  .contact__list li { padding: .9rem 1rem; }
  .contact__list a { min-height: 44px; display: inline-flex; align-items: center; }
  .form { padding: 1.4rem; border-radius: 18px; }
  .form input, .form select, .form textarea { font-size: 16px; min-height: 50px; } /* 16 px evita el zoom automático de iOS */
  .form .btn { min-height: 56px; }

  /* Chat: 16 px para que iOS no haga zoom al escribir */
  .chat__input input { font-size: 16px; min-height: 46px; }
  .chip { min-height: 40px; padding: .5rem .95rem; font-size: .88rem; }

  /* Pie de página: enlaces cómodos para el dedo */
  .footer { padding: 56px 0 24px; }
  .footer__col { gap: 0; }
  .footer__col a, .footer__col span { min-height: 44px; display: flex; align-items: center; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .footer__bottom a { min-height: 44px; display: inline-flex; align-items: center; }

  /* Bienvenida */
  .intro__btn { min-height: 58px; width: 100%; max-width: 320px; justify-content: center; }
}

/* Indicación "desliza" de planes (solo celular) */
.plans-hint { display: none; justify-content: center; align-items: center; gap: .4rem; margin-top: .8rem; font-size: .82rem; font-weight: 600; color: rgba(225,234,255,.7); }
.plans-hint svg { width: 16px; height: 16px; }

@media (max-width: 360px) {
  .hero h1 { font-size: 2.05rem; }
  .steps, .why__grid { grid-template-columns: 1fr; }
  .mbar { grid-template-columns: 1fr 1.2fr; }
  .mbar a { font-size: .92rem; }
}
