/* DrivingPR - estilos complementarios a Tailwind */

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Inputs: foco azul PR con glow suave */
input:focus, select:focus, textarea:focus {
  --tw-ring-color: rgba(0, 81, 179, 0.15) !important;
  border-color: #0051B3 !important;
  box-shadow: 0 0 0 3px rgba(0, 81, 179, 0.12) !important;
  outline: none;
}

/* Scrollbar discreto */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* Animación de entrada para tarjetas (legacy — superseded by data-reveal) */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .4s ease both; }

/* Truncado multi-línea para descripciones */
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Premium Pricing Cards ── */

/* Icon glow breathing animation */
@keyframes iconGlow {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.15); }
}
.plan-icon-glow {
  animation: iconGlow 3s ease-in-out infinite;
}

/* Shimmer sweep on CTA hover */
.plan-cta:hover .plan-shimmer {
  animation: shimmerSweep 0.75s ease forwards;
}
@keyframes shimmerSweep {
  from { transform: translateX(-100%) skewX(-12deg); }
  to   { transform: translateX(200%) skewX(-12deg); }
}

/* Card subtle border glow on hover */
.plan-card {
  background-clip: padding-box;
}
.plan-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 30%, rgba(0,81,179,0.08) 50%, transparent 70%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.plan-card:hover::before {
  opacity: 1;
}

/* ════════════════════════════════════════════════════════
   Motion System v1 — scroll reveals + micro-interacciones
   API: data-reveal[="fade|scale|left|right"] en elementos,
   data-reveal-group en un padre para stagger automático.
   El estado oculto solo aplica bajo html.js-motion (progressive
   enhancement: sin JS todo el contenido queda visible).
   ════════════════════════════════════════════════════════ */

:root {
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-duration: 650ms;
  --reveal-distance: 20px;
}

html { scroll-behavior: smooth; }

/* ── Scroll reveal ── */
html.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition:
    opacity var(--reveal-duration) var(--ease-premium),
    transform var(--reveal-duration) var(--ease-premium);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
html.js-motion [data-reveal="fade"]  { transform: none; }
html.js-motion [data-reveal="scale"] { transform: scale(0.96); }
html.js-motion [data-reveal="left"]  { transform: translateX(-24px); }
html.js-motion [data-reveal="right"] { transform: translateX(24px); }
html.js-motion [data-reveal].revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ── Botones: lift al hover, press al click ── */
.btn-lift {
  transition: transform .25s var(--ease-premium), box-shadow .25s var(--ease-premium);
}
.btn-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, .25);
}
.btn-lift:active {
  transform: translateY(0) scale(.98);
  transition-duration: .1s;
}

/* ── Cards: lift + sombra profunda ── */
.card-lift {
  transition: transform .4s var(--ease-premium), box-shadow .4s var(--ease-premium), border-color .3s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -12px rgba(15, 23, 42, .18);
}

/* Icon tiles dentro de cards */
.icon-tile { transition: transform .4s var(--ease-premium); }
.card-lift:hover .icon-tile { transform: scale(1.08) rotate(-3deg); }

/* ── Nav: subrayado animado ── */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 100%;
  background: #0051B3;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-premium);
}
.nav-link:hover::after { transform: scaleX(1); }

/* ── Blobs ambientales de los heros ── */
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(12px, -16px) scale(1.06); }
}
.blob-float   { animation: blobFloat 9s ease-in-out infinite; }
.blob-float-2 { animation: blobFloat 12s ease-in-out infinite reverse; }

/* ── Zoom en imágenes (galería / banners) ── */
.zoom-hover { overflow: hidden; }
.zoom-hover img { transition: transform .7s var(--ease-premium); }
.zoom-hover:hover img { transform: scale(1.05); }

/* ── Header con scroll ── */
body > header {
  transition: box-shadow .3s ease, background-color .3s ease;
}
body > header.is-scrolled {
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, .08);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Menú móvil: colapso animado ── */
#mobile-menu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  transition:
    max-height .45s var(--ease-premium),
    opacity .35s ease,
    padding .45s var(--ease-premium);
}
#mobile-menu.is-open {
  max-height: 320px;
  opacity: 1;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-top-width: 1px;
}
@media (min-width: 768px) {
  #mobile-menu { display: none; }
}

/* ── Acordeones <details>: chevron rotatorio ── */
details summary .chevron-rotate { transition: transform .35s var(--ease-premium); }
details[open] summary .chevron-rotate { transform: rotate(180deg); }

/* ── Quiz: transiciones de pantalla y feedback ── */
@keyframes screenEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.quiz-screen-enter { animation: screenEnter .45s var(--ease-premium) both; }

@keyframes answerPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}
.answer-pop { animation: answerPop .35s var(--ease-premium); }

@keyframes answerShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
.answer-shake { animation: answerShake .4s ease; }

@keyframes timerPulse {
  50% { transform: scale(1.08); opacity: .85; }
}
.timer-low { animation: timerPulse 1s ease-in-out infinite; }

/* ── Accesibilidad: kill switch global ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js-motion [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

