/* ============================================================
   LOVILUZ · TEMA "Moderno con profundidad"
   Glassmorphism · mesh gradients · sombras de color · micro-interacciones
   Capa global: se enlaza en todas las páginas.
   - Reglas universales: prefijo `body ` (gana a las utilidades de Tailwind
     por especificidad y aplica en cualquier página que enlace este archivo).
   - Reglas exclusivas de la Home: `body.lv-home`.
   ============================================================ */

body {
  /* Tokens del rediseño */
  --lv-orange: #ff7a00;
  --lv-orange-2: #ff5e00;
  --lv-coral: #ff9a3d;
  --lv-ink: #1b1c22;
  --lv-radius: 22px;
  --lv-shadow-soft:
    0 2px 4px rgba(27, 28, 34, 0.04),
    0 10px 24px rgba(255, 122, 0, 0.1);
  --lv-shadow-lift:
    0 8px 16px rgba(27, 28, 34, 0.06),
    0 28px 56px rgba(255, 122, 0, 0.18);
  --lv-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  font-family:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  letter-spacing: -0.01em;

  /* Fondo con mesh suave de color (visible donde no hay secciones opacas) */
  background-color: #fff8f1;
  background-image:
    radial-gradient(circle at 12% 6%, rgba(255, 122, 0, 0.12), transparent 42%),
    radial-gradient(circle at 88% 2%, rgba(255, 154, 61, 0.1), transparent 38%),
    radial-gradient(circle at 50% 108%, rgba(255, 196, 120, 0.14), transparent 46%);
  background-attachment: fixed;
}

/* El contenedor principal deja ver el mesh del body */
body .bg-main {
  background-color: transparent;
}

/* === Tipografía: titulares con Sora === */
body h1,
body h2,
body h3,
body .title-orange {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.03em;
}
body h1 {
  line-height: 1.04;
}

/* === Profundidad: sombras suaves y de color sobre utilidades Tailwind === */
body .shadow-lg {
  box-shadow: var(--lv-shadow-soft);
}
body .shadow-xl,
body .shadow-2xl {
  box-shadow: var(--lv-shadow-lift);
}

/* Radios un punto más generosos */
body .rounded-xl {
  border-radius: 18px;
}
body .rounded-2xl {
  border-radius: var(--lv-radius);
}

/* === Glass: tarjetas translúcidas === */
body .backdrop-blur-sm {
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
}
body .bg-white\/15 {
  transition:
    transform 0.35s var(--lv-ease),
    background-color 0.35s var(--lv-ease),
    box-shadow 0.35s var(--lv-ease);
}
body .bg-white\/15:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

/* === Botones naranja: degradado + brillo + elevación === */
body .bg-\[\#ff8200\],
body button.bg-primary,
body a.bg-primary {
  background-image: linear-gradient(135deg, var(--lv-orange) 0%, var(--lv-orange-2) 100%);
  border-color: transparent !important;
  box-shadow: 0 8px 22px rgba(255, 94, 0, 0.35);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s var(--lv-ease),
    box-shadow 0.25s var(--lv-ease),
    filter 0.25s var(--lv-ease);
}
body .bg-\[\#ff8200\]:hover,
body button.bg-primary:hover,
body a.bg-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 34px rgba(255, 94, 0, 0.45);
  filter: saturate(1.08);
}
/* Brillo que cruza el botón al pasar el ratón */
body .bg-\[\#ff8200\]::after,
body button.bg-primary::after,
body a.bg-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 70%
  );
  transform: translateX(-130%);
  transition: transform 0.6s var(--lv-ease);
  pointer-events: none;
}
body .bg-\[\#ff8200\]:hover::after,
body button.bg-primary:hover::after,
body a.bg-primary:hover::after {
  transform: translateX(130%);
}

/* === Caja del comparador: glow y degradado más rico === */
body #tarifas-comparador {
  background-image: linear-gradient(135deg, #ff8a00 0%, #ff5e00 60%, #f24e00 100%) !important;
  box-shadow:
    0 18px 40px rgba(255, 94, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* === Titulares de sección: degradado de color === */
body section h2.text-\[\#ff8200\],
body section h2.text-primary {
  background: linear-gradient(100deg, var(--lv-orange-2), var(--lv-coral));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* === Paneles claros tipo glass (barra de confianza, cajas crema) === */
body section .bg-\[\#fff7ed\] {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(255, 154, 61, 0.35);
  box-shadow: var(--lv-shadow-soft);
}
body section .bg-\[\#fff7ed\] > div {
  transition: transform 0.3s var(--lv-ease);
}
body section .bg-\[\#fff7ed\] > div:hover {
  transform: translateY(-3px);
}

/* === Tarjetas con borde naranja (Luz/Gas y similares): elevación al hover === */
body a.border-2.border-primary {
  border-color: rgba(255, 122, 0, 0.25);
  box-shadow: var(--lv-shadow-soft);
  transition:
    transform 0.35s var(--lv-ease),
    box-shadow 0.35s var(--lv-ease),
    border-color 0.35s var(--lv-ease);
}
body a.border-2.border-primary:hover {
  transform: translateY(-6px);
  box-shadow: var(--lv-shadow-lift);
  border-color: var(--lv-orange);
  background: #fff !important;
}

/* ============================================================
   EXCLUSIVO HOME
   ============================================================ */

/* Hero: más profundidad y borde luminoso */
body.lv-home main > .bg-main > section:first-child > div {
  box-shadow:
    0 10px 30px rgba(27, 28, 34, 0.18),
    0 40px 80px rgba(255, 94, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   MOVIMIENTO · capa de vida (orbes, reveal, header, Ken Burns, shimmer)
   ============================================================ */

/* --- Orbes flotantes de fondo (inyectados por JS) --- */
.lv-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.lv-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}
.lv-orb-1 {
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  max-height: 520px;
  top: -8vw;
  left: -6vw;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.5), transparent 68%);
  animation: lvFloat1 26s ease-in-out infinite;
}
.lv-orb-2 {
  width: 36vw;
  height: 36vw;
  max-width: 460px;
  max-height: 460px;
  top: 30vh;
  right: -8vw;
  background: radial-gradient(circle, rgba(255, 94, 0, 0.4), transparent 68%);
  animation: lvFloat2 32s ease-in-out infinite;
}
.lv-orb-3 {
  width: 32vw;
  height: 32vw;
  max-width: 420px;
  max-height: 420px;
  bottom: -10vw;
  left: 28vw;
  background: radial-gradient(circle, rgba(255, 196, 120, 0.5), transparent 70%);
  animation: lvFloat3 28s ease-in-out infinite;
}
@keyframes lvFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vw, 6vh) scale(1.15); }
}
@keyframes lvFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1.1); }
  50% { transform: translate(-7vw, -5vh) scale(0.95); }
}
@keyframes lvFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5vw, -7vh) scale(1.2); }
}

/* --- Revelado escalonado al hacer scroll (todas las páginas) --- */
body.lv-anim .lv-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--lv-ease),
    transform 0.7s var(--lv-ease);
  transition-delay: var(--lv-delay, 0s);
  will-change: opacity, transform;
}
body.lv-anim .lv-reveal.lv-in {
  opacity: 1;
  transform: none;
}

/* --- Header: se compacta y difumina al bajar --- */
body header {
  transition:
    box-shadow 0.3s var(--lv-ease),
    background-color 0.3s var(--lv-ease),
    backdrop-filter 0.3s var(--lv-ease);
}
body header nav {
  transition: height 0.3s var(--lv-ease);
}
body.lv-scrolled header {
  background-color: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 8px 30px rgba(27, 28, 34, 0.1);
}
body.lv-scrolled header nav.h-16 {
  height: 3.25rem;
}

/* --- Ken Burns: zoom lento en los héroes con imagen de fondo --- */
body .bg-cover.bg-center {
  animation: lvKenBurns 22s ease-in-out infinite alternate;
}
@keyframes lvKenBurns {
  from { background-size: 100%; }
  to { background-size: 113%; }
}

/* --- Shimmer en titulares de sección con degradado --- */
body section h2.text-\[\#ff8200\],
body section h2.text-primary {
  background: linear-gradient(
    100deg,
    var(--lv-orange-2) 0%,
    var(--lv-coral) 35%,
    #ffd9a8 50%,
    var(--lv-coral) 65%,
    var(--lv-orange-2) 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: lvShimmer 7s linear infinite;
}
@keyframes lvShimmer {
  to { background-position: 220% center; }
}

/* Accesibilidad: respetar reduce-motion */
@media (prefers-reduced-motion: reduce) {
  body *,
  body *::after {
    transition: none !important;
    animation: none !important;
  }
  body.lv-anim .lv-reveal {
    opacity: 1;
    transform: none;
  }
  .lv-orbs { display: none; }
}
