/* =========================================================
   Lovish Rental Hub — Splash Screen (text-only, brand themed)
   Colors from logo.png (navy-indigo + red) + site theme.
   Shows ONCE per browser session (see js/splash.js)

   PERFORMANCE NOTE: every animation below uses only
   `transform` + `opacity` (GPU-composited, no reflow) so it
   stays smooth even while the page's own scripts (firebase,
   service worker, PWA prompts) are loading in the background.
   ========================================================= */

#lrh-splash {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 600px 360px at 50% 42%, rgba(227, 28, 61, 0.18) 0%, transparent 65%),
    linear-gradient(160deg, #241d5c 0%, #150f3a 45%, #0a081f 100%);
  overflow: hidden;
  opacity: 1;
  transform: translateZ(0) scale(1);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
  will-change: opacity, transform;
  backface-visibility: hidden;
}

/* Hide instantly (no flash) once already shown this session */
html.no-splash #lrh-splash {
  display: none !important;
}

/* Premium exit: pure opacity + scale (no filter/blur = no jank) */
#lrh-splash.lrh-fade-out {
  opacity: 0;
  transform: translateZ(0) scale(1.04);
  pointer-events: none;
}
#lrh-splash.lrh-fade-out .lrh-center {
  transition: opacity 0.45s cubic-bezier(.4,0,.2,1), transform 0.55s cubic-bezier(.4,0,.2,1);
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
}

body.lrh-splash-active {
  overflow: hidden;
}

#lrh-splash .lrh-center {
  position: relative;
  text-align: center;
  padding: 0 24px;
  transform: translateZ(0);
}

/* Eyebrow line */
#lrh-splash .lrh-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(8px);
}
#lrh-splash.play .lrh-eyebrow { animation: lrhFadeIn 0.6s cubic-bezier(.22,1,.36,1) 0.1s forwards; }
#lrh-splash .lrh-eyebrow .lrh-line { width: 26px; height: 1px; background: #ffffff; opacity: 0.35; }
#lrh-splash .lrh-eyebrow .lrh-txt {
  color: #ff5b73;
  font-size: 11px;
  letter-spacing: 4px;
  font-weight: 700;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Brand name — word by word rise (transform only) */
#lrh-splash .lrh-brand {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800;
  font-size: clamp(30px, 9vw, 40px);
  color: #ffffff;
  line-height: 1.15;
  margin: 0;
  letter-spacing: 1px;
  position: relative;
}
#lrh-splash .lrh-word { display: inline-block; overflow: hidden; vertical-align: top; }
#lrh-splash .lrh-word span { display: inline-block; transform: translateY(110%) translateZ(0); }
#lrh-splash.play .lrh-w1 span { animation: lrhRiseUp 0.65s cubic-bezier(.22,1,.36,1) 0.32s forwards; }
#lrh-splash.play .lrh-w2 span { animation: lrhRiseUp 0.65s cubic-bezier(.22,1,.36,1) 0.44s forwards; }
#lrh-splash.play .lrh-w3 span {
  animation: lrhRiseUp 0.65s cubic-bezier(.22,1,.36,1) 0.56s forwards;
  color: #e31c3d;
}
@keyframes lrhRiseUp { to { transform: translateY(0) translateZ(0); } }

/* Shine sweep — transform-based (translateX), NOT `left` (avoids reflow/jank) */
#lrh-splash .lrh-shine { position: relative; overflow: hidden; }
#lrh-splash .lrh-shine::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  transform: translateX(-220%) skewX(-20deg) translateZ(0);
  opacity: 0;
  will-change: transform, opacity;
}
#lrh-splash.play .lrh-shine::after { animation: lrhSweep 1s cubic-bezier(.3,.1,.2,1) 0.95s forwards; }
@keyframes lrhSweep {
  0%   { transform: translateX(-220%) skewX(-20deg) translateZ(0); opacity: 0; }
  15%  { opacity: 0.9; }
  55%  { opacity: 0.9; }
  100% { transform: translateX(220%) skewX(-20deg) translateZ(0); opacity: 0; }
}

/* Divider — scaleX instead of width (avoids reflow) */
#lrh-splash .lrh-divider {
  width: 180px; height: 2px; margin: 20px auto 20px;
  background: linear-gradient(90deg, transparent, #e31c3d, transparent);
  transform: scaleX(0) translateZ(0);
  transform-origin: center;
}
#lrh-splash.play .lrh-divider { animation: lrhGrowLine 0.6s cubic-bezier(.3,.1,.2,1) 0.85s forwards; }
@keyframes lrhGrowLine { to { transform: scaleX(1) translateZ(0); } }

/* Tagline: CAR • BIKE • SCOOTY */
#lrh-splash .lrh-tagline {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: clamp(12px, 3.6vw, 14px);
  font-weight: 700; letter-spacing: 5px; color: #e6e6f2;
  opacity: 0;
  transform: translateY(8px);
}
#lrh-splash.play .lrh-tagline { animation: lrhFadeIn 0.6s cubic-bezier(.22,1,.36,1) 1.12s forwards; }
#lrh-splash .lrh-tagline .lrh-dot { width: 4px; height: 4px; border-radius: 50%; background: #e31c3d; }
#lrh-splash .lrh-tagline .lrh-tword { position: relative; }
#lrh-splash .lrh-tagline .lrh-tword::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px; background: #e31c3d;
  transform: scaleX(0) translateZ(0); transform-origin: left;
}
#lrh-splash.play .lrh-tagline .lrh-t1::after { animation: lrhUnderline 0.35s ease 1.25s forwards; }
#lrh-splash.play .lrh-tagline .lrh-t2::after { animation: lrhUnderline 0.35s ease 1.38s forwards; }
#lrh-splash.play .lrh-tagline .lrh-t3::after { animation: lrhUnderline 0.35s ease 1.51s forwards; }
@keyframes lrhUnderline { to { transform: scaleX(1) translateZ(0); } }

@keyframes lrhFadeIn {
  from { opacity: 0; transform: translateY(8px) translateZ(0); }
  to   { opacity: 1; transform: translateY(0) translateZ(0); }
}

/* Ambient glow orbs — opacity only, blur value is STATIC (never animated) */
#lrh-splash .lrh-orb {
  position: absolute; border-radius: 50%;
  filter: blur(50px);
  opacity: 0;
  transform: translateZ(0);
}
#lrh-splash .lrh-orb1 { width: 220px; height: 220px; background: #e31c3d; top: -70px; left: -70px; }
#lrh-splash .lrh-orb2 { width: 200px; height: 200px; background: #3d2f8f; bottom: -60px; right: -60px; }
#lrh-splash.play .lrh-orb1 { animation: lrhOrbIn1 1.6s ease 0s forwards; }
#lrh-splash.play .lrh-orb2 { animation: lrhOrbIn2 1.6s ease 0.15s forwards; }
@keyframes lrhOrbIn1 { to { opacity: 0.16; } }
@keyframes lrhOrbIn2 { to { opacity: 0.22; } }

/* Reduced motion: keep it simple and instant for accessibility */
@media (prefers-reduced-motion: reduce) {
  #lrh-splash, #lrh-splash * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}