/* Thai welcome screen shown for ~4 seconds before the homepage (see index.html) */
#lt-splash { display: none; }

html.lt-splash-on body { overflow: hidden; }

html.lt-splash-on #lt-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  color: #fbf3df;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 38%, rgba(216, 179, 90, .22), transparent 70%),
    radial-gradient(ellipse at 50% 120%, #2b4a1d 0%, transparent 55%),
    radial-gradient(ellipse at center, #2a1d10 0%, #120c07 62%, #070504 100%);
  animation: lt-out .7s ease-in 3.3s forwards;
}

#lt-splash .lt-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

/* Buddha with rotating mandala and glowing halo */
#lt-splash .lt-buddha-wrap {
  position: relative;
  width: min(34vh, 230px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  animation: lt-rise 1.1s cubic-bezier(.2, .7, .2, 1) .1s forwards;
}
#lt-splash .lt-mandala {
  position: absolute;
  inset: -22%;
  width: 144%;
  height: 144%;
  animation: lt-spin 40s linear infinite;
  opacity: .55;
}
#lt-splash .lt-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 231, 183, .35), rgba(216, 179, 90, .08) 55%, transparent 72%);
  animation: lt-pulse 2.6s ease-in-out infinite;
}
#lt-splash .lt-buddha {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 10px rgba(240, 216, 143, .45));
}
#lt-splash .lt-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: lt-draw 1.8s ease-out .3s forwards;
}
#lt-splash .lt-fill {
  opacity: 0;
  animation: lt-fade 1s ease-out 1.4s forwards;
}

/* Greeting text */
#lt-splash .lt-thai {
  margin: 2.2vh 0 0;
  font-family: "Charm", "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  line-height: 1.25;
  background: linear-gradient(100deg, #8a5725 0%, #d8b35a 25%, #f5e7b7 45%, #d8b35a 60%, #b6872e 80%, #f0d88f 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  animation: lt-rise 1s cubic-bezier(.2, .7, .2, 1) .8s forwards, lt-shine 3s linear .8s infinite;
}
#lt-splash .lt-roman {
  margin: .2rem 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(.8rem, 2.6vw, 1rem);
  font-weight: 600;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: #e9d29a;
  opacity: 0;
  animation: lt-rise .9s ease-out 1.15s forwards;
}
#lt-splash .lt-orchid {
  width: min(64vw, 300px);
  aspect-ratio: 935 / 295;
  overflow: hidden;
  margin: 2.4vh 0 1.6vh;
  opacity: 0;
  animation: lt-bloom 1.2s cubic-bezier(.2, .7, .2, 1) 1.4s forwards;
}
#lt-splash .lt-orchid img {
  display: block;
  width: 108.13%;
  max-width: none;
  margin-left: -5.35%;
  margin-top: -7.49%;
  filter: drop-shadow(0 0 12px rgba(240, 216, 143, .35));
}
#lt-splash .lt-welcome {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(1.25rem, 4.4vw, 1.9rem);
  color: #fbf3df;
  opacity: 0;
  animation: lt-rise .9s ease-out 1.8s forwards;
}
#lt-splash .lt-brand {
  margin: 1.4vh 0 0;
  display: flex;
  align-items: center;
  gap: .8em;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(.7rem, 2.2vw, .85rem);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #c8a24c;
  opacity: 0;
  animation: lt-fade .9s ease-out 2.1s forwards;
}
#lt-splash .lt-brand::before,
#lt-splash .lt-brand::after {
  content: "";
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c8a24c, transparent);
}

/* Drifting golden petals */
#lt-splash .lt-petal {
  position: absolute;
  top: -40px;
  width: 14px;
  height: 22px;
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #f5e7b7, #c8a24c);
  opacity: 0;
  animation: lt-fall 4.2s linear forwards;
}
#lt-splash .lt-petal:nth-child(1) { left: 8%;  animation-delay: .2s; }
#lt-splash .lt-petal:nth-child(2) { left: 22%; animation-delay: 1.1s; transform: scale(.7); }
#lt-splash .lt-petal:nth-child(3) { left: 38%; animation-delay: .6s;  transform: scale(.55); }
#lt-splash .lt-petal:nth-child(4) { left: 63%; animation-delay: .9s; }
#lt-splash .lt-petal:nth-child(5) { left: 78%; animation-delay: .3s;  transform: scale(.8); }
#lt-splash .lt-petal:nth-child(6) { left: 91%; animation-delay: 1.4s; transform: scale(.6); }

/* Thin gold frame */
#lt-splash .lt-frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(200, 162, 76, .28);
  pointer-events: none;
  opacity: 0;
  animation: lt-fade 1.2s ease-out .2s forwards;
}
#lt-splash .lt-frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(200, 162, 76, .14);
}

@keyframes lt-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes lt-fade { to { opacity: 1; } }
@keyframes lt-draw { to { stroke-dashoffset: 0; } }
@keyframes lt-spin { to { transform: rotate(360deg); } }
@keyframes lt-pulse { 0%, 100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes lt-shine { to { background-position: -220% 0; } }
@keyframes lt-bloom { from { opacity: 0; transform: scale(.82); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes lt-fall {
  0% { opacity: 0; translate: 0 0; rotate: 0deg; }
  10% { opacity: .85; }
  100% { opacity: 0; translate: 60px 110vh; rotate: 540deg; }
}
@keyframes lt-out { to { opacity: 0; visibility: hidden; transform: scale(1.04); } }

@media (prefers-reduced-motion: reduce) {
  #lt-splash *, #lt-splash *::before, #lt-splash *::after {
    animation-duration: .01s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
  }
  #lt-splash .lt-petal { display: none; }
}
