/* ============================================
   Freeturia · estilos compartidos
   ============================================ */

html { scroll-behavior: smooth; }
body { background: #FAF6EE; color: #1F1A14; font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }

/* Evita scroll horizontal global en móvil */
html, body { overflow-x: hidden; max-width: 100%; }

.liquid-glass-light {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(31, 26, 20, 0.08);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    0 1px 2px rgba(31, 26, 20, 0.04);
}

.display-tight { letter-spacing: -0.04em; }
.display-tight-3 { letter-spacing: -0.03em; }

.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

::selection { background: #F2C75A; color: #1F1A14; }

/* ---------- Motion utilities ---------- */
.hover-lift {
  transition: transform 600ms cubic-bezier(0.22,1,0.36,1), box-shadow 600ms cubic-bezier(0.22,1,0.36,1);
  will-change: transform;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px -20px rgba(31,26,20,0.18), 0 8px 20px -8px rgba(31,26,20,0.08);
}

.tour-card { transition: transform 700ms cubic-bezier(0.22,1,0.36,1); will-change: transform; }
.tour-card:hover { transform: translateY(-4px); }
.tour-card .tour-img { transition: transform 1400ms cubic-bezier(0.22,1,0.36,1), filter 800ms ease; will-change: transform; }
.tour-card:hover .tour-img { transform: scale(1.04); filter: saturate(1.1); }
.tour-card .tour-stripes { transition: opacity 600ms ease, transform 1200ms cubic-bezier(0.22,1,0.36,1); }
.tour-card:hover .tour-stripes { opacity: 0.55; transform: translateX(8px); }
.tour-card .tour-arrow { transition: transform 500ms cubic-bezier(0.22,1,0.36,1); display: inline-block; }
.tour-card:hover .tour-arrow { transform: translateX(6px); }
.tour-card .tour-pill { transition: transform 600ms cubic-bezier(0.22,1,0.36,1), background-color 400ms ease; }
.tour-card:hover .tour-pill { transform: translateY(-2px); background: rgba(255,255,255,0.78); }

/* Botón magnético */
.btn-magnetic { position: relative; transition: transform 350ms cubic-bezier(0.22,1,0.36,1), background-color 250ms ease, color 250ms ease; }
.btn-magnetic:hover { transform: translateY(-2px) scale(1.02); }
.btn-magnetic:active { transform: translateY(0) scale(0.99); }

/* Subrayado animado */
.link-grow { position: relative; }
.link-grow::after {
  content: ''; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left center;
  transition: transform 500ms cubic-bezier(0.22,1,0.36,1);
}
.link-grow:hover::after { transform: scaleX(1); }

/* Nav links */
.nav-link { position: relative; transition: color 250ms ease; }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left center;
  transition: transform 450ms cubic-bezier(0.22,1,0.36,1);
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active::after { transform: scaleX(1); }

/* Footer links */
.footer-link { display: inline-block; transition: transform 350ms cubic-bezier(0.22,1,0.36,1), color 250ms ease; }
.footer-link:hover { transform: translateX(4px); }

/* Stat tick */
.stat-block { transition: transform 600ms cubic-bezier(0.22,1,0.36,1); }
.stat-block:hover { transform: translateY(-3px); }
.stat-block .stat-num { transition: color 400ms ease, letter-spacing 600ms cubic-bezier(0.22,1,0.36,1); }
.stat-block:hover .stat-num { color: #F2C75A; }

/* Tarjetas numeradas */
.num-card { transition: transform 600ms cubic-bezier(0.22,1,0.36,1); }
.num-card:hover { transform: translateY(-4px); }
.num-card .num-glyph { display: inline-block; transition: transform 700ms cubic-bezier(0.22,1,0.36,1), color 400ms ease; }
.num-card:hover .num-glyph { transform: translateY(-4px) rotate(-3deg); color: #1F1A14; }

/* Píldoras de idioma */
.lang-pill { transition: transform 400ms cubic-bezier(0.22,1,0.36,1), background-color 300ms ease, color 300ms ease; }
.lang-pill:hover { transform: translateY(-2px); background: #1F1A14; color: #FAF6EE; }

/* Tarjetas de testimonios */
.quote-card { transition: transform 600ms cubic-bezier(0.22,1,0.36,1), box-shadow 600ms cubic-bezier(0.22,1,0.36,1); }
.quote-card:hover { transform: translateY(-6px) rotate(-0.4deg); box-shadow: 0 30px 60px -25px rgba(31,26,20,0.22); }
.quote-card .quote-mark { transition: transform 700ms cubic-bezier(0.22,1,0.36,1); display: inline-block; }
.quote-card:hover .quote-mark { transform: translate(2px, -4px) scale(1.08); }

/* Chip flotante */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.floaty { animation: floaty 5s ease-in-out infinite; }

/* Respiración del "Gratis." */
@keyframes breathe {
  0%, 100% { letter-spacing: -0.04em; }
  50%      { letter-spacing: -0.035em; }
}
.breathe { animation: breathe 6s ease-in-out infinite; }

/* Paletas de fondo */
.bg-warm     { background: #F4ECDA; }
.bg-rose     { background: #F2C2C5; }
.bg-gold     { background: #F2C75A; }
.bg-ink-sec  { background: #1F1A14; }

/* Eyebrow con punto animado */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; }
.eyebrow .eyebrow-dot { width: 6px; height: 6px; border-radius: 9999px; background: currentColor; opacity: 0.8; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.7); opacity: 0.35; } }

/* Línea que se dibuja al hacer scroll */
.draw-rule { display: block; height: 1px; background: currentColor; transform-origin: left; transform: scaleX(0); transition: transform 1400ms cubic-bezier(0.22,1,0.36,1); }
.in-view .draw-rule { transform: scaleX(1); }

/* Marquee */
.marquee { display: flex; gap: 4rem; white-space: nowrap; animation: marquee 38s linear infinite; }
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-pause:hover .marquee { animation-play-state: paused; }

/* Numeral fantasma gigante detrás de las secciones */
.ghost-num {
  position: absolute; pointer-events: none; user-select: none;
  font-family: 'Fraunces', serif; font-weight: 300; line-height: 0.8;
  color: rgba(31,26,20,0.04); letter-spacing: -0.06em;
  /* Evita que desborde en móvil */
  max-width: 100vw; overflow: hidden;
}

/* Tarjetas inclinadas (testimonios) */
.tilt-1 { transform: rotate(-1.2deg); }
.tilt-2 { transform: rotate(0.8deg) translateY(-12px); }
.tilt-3 { transform: rotate(-0.6deg); }
.tilt-1, .tilt-2, .tilt-3 { transition: transform 600ms cubic-bezier(0.22,1,0.36,1), box-shadow 600ms ease; }
.tilt-1:hover, .tilt-2:hover, .tilt-3:hover { transform: rotate(0) translateY(-8px); box-shadow: 0 30px 60px -25px rgba(31,26,20,0.25); }

/* Confeti del pricing */
@keyframes drift {
  0%   { transform: translate(0, -10px); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translate(var(--dx, 20px), 120vh); opacity: 0; }
}
.confetti { position: absolute; width: 8px; height: 8px; border-radius: 9999px; animation: drift linear infinite; }

/* SVG ondulado */
@keyframes sway {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-14px); }
}
.sway { animation: sway 9s ease-in-out infinite; }

/* Loop de ondas sin costuras */
@keyframes wave-shift-a {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
@keyframes wave-shift-b {
  0%   { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
.wave-divider { position: relative; width: 100%; overflow: hidden; line-height: 0; display: block; }
.wave-divider svg { display: block; width: 200%; height: 100%; }
.wave-back  { animation: wave-shift-a 22s linear infinite; }
.wave-front { animation: wave-shift-b 14s linear infinite; }

/* Barra de progreso de scroll */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: transparent; z-index: 60;
}
#scroll-progress > span {
  display: block; height: 100%; width: 100%; transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, #F2C75A, #F2C2C5);
}

/* Comilla */
.pull-quote::before {
  content: '"'; font-family: 'Fraunces', serif; font-weight: 300; color: rgba(242,199,90,0.55);
  font-size: 8rem; line-height: 1; position: absolute; top: -2rem; left: -0.5rem; pointer-events: none;
}
@media (min-width: 768px) {
  .pull-quote::before { font-size: 14rem; top: -3rem; left: -1rem; }
}

/* Línea dorada */
.gold-tick { width: 36px; height: 1px; background: #F2C75A; }

/* Tarjeta de guía */
.guide-card { transition: transform 600ms cubic-bezier(0.22,1,0.36,1), box-shadow 600ms ease; }
.guide-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -25px rgba(31,26,20,0.18); }
.guide-avatar {
  width: 100%; aspect-ratio: 4/5; border-radius: 1rem; overflow: hidden;
  background: linear-gradient(135deg, rgba(242,199,90,0.45), rgba(242,194,197,0.45));
  position: relative;
}
.guide-avatar::after {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(31,26,20,0.05) 0 12px, transparent 12px 24px);
}

/* ── Responsive fixes móvil ──────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* El marquee no desborda */
  .marquee-pause { overflow: hidden; }

  /* Las tarjetas inclinadas no se salen de pantalla */
  .tilt-1, .tilt-2, .tilt-3 { transform: none; }

  /* Wave divider más pequeño en móvil */
  .wave-divider { margin-top: -60px !important; height: 80px !important; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .floaty, .breathe, .marquee, .sway, .confetti, .wave-back, .wave-front { animation: none; }
  .hover-lift, .tour-card, .tour-card .tour-img, .btn-magnetic, .num-card, .quote-card, .stat-block, .guide-card { transition: none; }
}
