/* ============================================================
   intro.css - EduOoze cinematic welcome splash
   Only loads on index.php
   ============================================================ */
.splash-overlay {
  --splash-duration: 1.8s;
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  overflow: hidden;
  cursor: pointer;
  background: #030712;
  color: #fff;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  isolation: isolate;
}

html.skip-home-intro .splash-overlay {
  display: none;
}

.splash-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.06) brightness(0.62);
}

.splash-video-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 213, 114, 0.12), transparent 28%),
    radial-gradient(circle at 18% 80%, rgba(18, 199, 171, 0.18), transparent 34%),
    linear-gradient(115deg, rgba(3, 7, 18, 0.86), rgba(6, 16, 32, 0.62) 46%, rgba(31, 42, 29, 0.78));
}

.splash-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
  opacity: 0.28;
}

.splash-overlay::after {
  content: "EDUOOZE";
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: 2;
  transform: translate(-50%, -50%);
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(5.5rem, 18vw, 21rem);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.08);
  opacity: 0;
  animation: splashWatermark 3.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  white-space: nowrap;
}

.splash-orbs {
  position: absolute;
  inset: -120px;
  z-index: 3;
  pointer-events: none;
}

.splash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(82px);
  will-change: transform;
}

.splash-orb.o1 {
  width: 460px;
  height: 460px;
  top: 3%;
  left: -6%;
  background: rgba(245, 166, 35, 0.24);
  animation: splashOrbA 7s ease-in-out infinite alternate;
}

.splash-orb.o2 {
  width: 390px;
  height: 390px;
  bottom: 5%;
  right: -4%;
  background: rgba(18, 199, 171, 0.2);
  animation: splashOrbB 9s ease-in-out infinite alternate;
}

.splash-orb.o3 {
  width: 330px;
  height: 330px;
  top: 45%;
  left: 50%;
  background: rgba(133, 171, 139, 0.2);
  transform: translate(-50%, -50%);
  animation: splashOrbC 11s ease-in-out infinite alternate;
}

.splash-grid,
.splash-particles,
.splash-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.splash-grid {
  z-index: 4;
  background:
    radial-gradient(circle at center, transparent 0 44%, rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(180deg, transparent 0%, rgba(3, 7, 18, 0.35) 100%);
}

.splash-particles {
  z-index: 5;
}

.splash-content {
  position: relative;
  z-index: 6;
  width: min(920px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 42px 22px;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  animation: splashContentIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.splash-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 18px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 213, 114, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.splash-logo {
  position: relative;
  width: clamp(106px, 13vw, 142px);
  height: clamp(106px, 13vw, 142px);
  margin-bottom: 26px;
  perspective: 1000px;
}

.splash-logo-mark {
  position: absolute;
  inset: 0;
  margin: auto;
  width: clamp(74px, 8.5vw, 92px);
  height: clamp(74px, 8.5vw, 92px);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffd572, #f5a623);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #030712;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-weight: 900;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  letter-spacing: -0.04em;
  box-shadow:
    0 22px 70px rgba(245, 166, 35, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
  animation: splashLogoPulse 2.4s ease-in-out infinite;
}

.splash-logo-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: rgba(255, 213, 114, 0.72);
  border-right-color: rgba(18, 199, 171, 0.52);
  animation: splashRingSpin 3.2s linear infinite;
}

.splash-logo-ring.r2 {
  inset: -18px;
  border-top-color: rgba(133, 171, 139, 0.44);
  border-right-color: rgba(245, 166, 35, 0.38);
  animation: splashRingSpin 4.6s linear infinite reverse;
}

.splash-title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.9;
  margin-bottom: 12px;
}

.splash-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(34px) rotateX(-52deg);
  transform-origin: bottom;
  animation: splashCharIn 0.68s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-title .sc-gold {
  background: linear-gradient(90deg, #fff3c2, #ffd572 42%, #f5a623);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.splash-title .sc-teal {
  background: linear-gradient(90deg, #f6fff9, #85ab8b 36%, #5ef0e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.splash-title .sc-1 { animation-delay: 0.2s; }
.splash-title .sc-2 { animation-delay: 0.25s; }
.splash-title .sc-3 { animation-delay: 0.3s; }
.splash-title .sc-4 { animation-delay: 0.35s; }
.splash-title .sc-5 { animation-delay: 0.4s; }
.splash-title .sc-6 { animation-delay: 0.45s; }
.splash-title .sc-7 { animation-delay: 0.5s; }
.splash-title .sc-8 { animation-delay: 0.55s; }

.splash-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.88rem, 1.6vw, 1.04rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  animation: splashFadeUp 0.7s ease 0.88s forwards;
}

.splash-line {
  align-self: center;
  flex: 0 0 1px;
  width: min(420px, 74vw);
  height: 1px;
  margin: 24px auto 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 213, 114, 0.8), rgba(18, 199, 171, 0.52), transparent);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  animation: splashLineIn 0.85s ease 1.05s forwards;
}

.splash-promise {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(0.9rem, 1.55vw, 1.08rem);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(12px);
  animation: splashFadeUp 0.7s ease 1.18s forwards;
}

.splash-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  opacity: 0;
  transform: translateY(12px);
  animation: splashFadeUp 0.7s ease 1.35s forwards;
}

.splash-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(16px);
}

.splash-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 12px 26px;
  border: 1px solid rgba(255, 213, 114, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  animation: splashFadeUp 0.7s ease 1.5s forwards;
  transition: transform 0.25s, background 0.25s, border-color 0.25s;
  backdrop-filter: blur(16px);
}

.splash-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 213, 114, 0.65);
  background: rgba(255, 255, 255, 0.16);
}

.splash-btn span {
  position: relative;
  z-index: 1;
}

.splash-btn-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 213, 114, 0.3);
  animation: splashBtnPulse 2s ease-in-out infinite;
  pointer-events: none;
}

.splash-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: splashParticleFloat linear infinite;
}

.splash-hint {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 7;
  width: min(300px, calc(100% - 36px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translate(-50%, 12px);
  opacity: 0;
  animation: splashHintIn 0.7s ease 1.72s forwards;
}

.splash-hint span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.splash-progress {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
}

.splash-progress i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd572, #f5a623, #85ab8b);
  transform: scaleX(0);
  transform-origin: left;
  animation: splashProgress var(--splash-duration) linear forwards;
}

.splash-overlay.is-exiting .splash-video {
  animation: splashVideoOut 0.5s ease forwards;
}

.splash-overlay.is-exiting .splash-content {
  animation: splashExit 0.48s cubic-bezier(0.6, 0, 0.4, 1) forwards;
}

.splash-overlay.is-exiting .splash-orbs,
.splash-overlay.is-exiting .splash-hint {
  animation: splashOrbsExit 0.48s ease forwards;
}

.splash-flash {
  z-index: 8;
  background: radial-gradient(circle at center, rgba(255, 213, 114, 0.42), transparent 58%);
  opacity: 0;
}

.splash-overlay.is-exiting .splash-flash {
  animation: splashFlash 0.36s ease forwards;
}

@keyframes splashContentIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes splashWatermark {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
  30%, 82% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.03); }
}

@keyframes splashOrbA {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(90px, 50px) scale(1.25); }
}

@keyframes splashOrbB {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-70px, -60px) scale(1.22); }
}

@keyframes splashOrbC {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.55; }
  100% { transform: translate(-50%, -50%) scale(1.38); opacity: 0.9; }
}

@keyframes splashLogoPulse {
  0%, 100% { transform: rotateX(0) scale(1); }
  50% { transform: rotateX(5deg) scale(1.06); }
}

@keyframes splashRingSpin {
  to { transform: rotate(360deg); }
}

@keyframes splashCharIn {
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes splashFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes splashHintIn {
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes splashLineIn {
  to { opacity: 1; transform: scaleX(1); }
}

@keyframes splashBtnPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0; }
}

@keyframes splashParticleFloat {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.28; }
  100% { transform: translateY(calc(-100vh - 70px)) translateX(var(--dx, 30px)) scale(0.3); opacity: 0; }
}

@keyframes splashProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes splashVideoOut {
  to { transform: scale(1.1); filter: saturate(1.15) contrast(1.08) brightness(0.78) blur(4px); }
}

@keyframes splashExit {
  0% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-10px) scale(1.08); filter: blur(12px); }
}

@keyframes splashOrbsExit {
  to { opacity: 0; }
}

@keyframes splashFlash {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 640px) {
  .splash-content {
    padding: 30px 16px 80px;
  }

  .splash-kicker {
    margin-bottom: 14px;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }

  .splash-logo {
    margin-bottom: 18px;
  }

  .splash-title {
    font-size: clamp(2.65rem, 17vw, 4.2rem);
  }

  .splash-sub {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
  }

  .splash-promise {
    font-size: 0.84rem;
    line-height: 1.6;
  }

  .splash-meta {
    gap: 7px;
  }

  .splash-meta span {
    font-size: 0.58rem;
    min-height: 27px;
    padding: 5px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-overlay *,
  .splash-overlay::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
