/* ============================================
   SPLASH LANDING PAGE
   ============================================ */

/* Override body for splash */
body.splash-page {
  overflow: hidden;
  height: 100vh;
  direction: ltr; /* Splash is symmetrical */
}

/* ---------- Split Screen Container ---------- */
.splash {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* ---------- Each Side ---------- */
.splash__side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: flex var(--duration-slow) var(--ease-out);
}

.splash__side--company {
  background: linear-gradient(135deg, #003D39 0%, #007D75 40%, #00A99D 100%);
}

.splash__side--institute {
  background: linear-gradient(135deg, #24113F 0%, #3E1D62 40%, #5B2D8E 100%);
}

/* Hover: expand hovered side */
.splash:hover .splash__side {
  flex: 0.85;
}

.splash:hover .splash__side:hover {
  flex: 1.15;
}

/* ---------- Animated Background Pattern ---------- */
.splash__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.15;
}

.splash__bg-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  animation: float-circle 20s ease-in-out infinite;
  will-change: transform;
  transform: translateZ(0);
}

.splash__side--company .splash__bg-circle:nth-child(1) {
  width: 300px; height: 300px;
  top: -50px; right: -80px;
  animation-delay: 0s;
}
.splash__side--company .splash__bg-circle:nth-child(2) {
  width: 200px; height: 200px;
  bottom: 20%; left: 10%;
  animation-delay: -5s;
}
.splash__side--company .splash__bg-circle:nth-child(3) {
  width: 150px; height: 150px;
  top: 40%; right: 20%;
  animation-delay: -10s;
}

.splash__side--institute .splash__bg-circle:nth-child(1) {
  width: 280px; height: 280px;
  bottom: -60px; left: -60px;
  animation-delay: -3s;
}
.splash__side--institute .splash__bg-circle:nth-child(2) {
  width: 180px; height: 180px;
  top: 15%; right: 15%;
  animation-delay: -8s;
}
.splash__side--institute .splash__bg-circle:nth-child(3) {
  width: 120px; height: 120px;
  bottom: 30%; left: 25%;
  animation-delay: -13s;
}

@keyframes float-circle {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(20px, -15px) scale(1.05); }
  50%      { transform: translate(-10px, 20px) scale(0.95); }
  75%      { transform: translate(15px, 10px) scale(1.03); }
}

/* ---------- Glow line between sides ---------- */
.splash__divider {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255,255,255,0.1) 15%,
    rgba(255,255,255,0.5) 50%,
    rgba(255,255,255,0.1) 85%,
    transparent 100%
  );
  z-index: var(--z-base);
  pointer-events: none;
}

/* ---------- Side Content ---------- */
.splash__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.splash__logo {
  height: 70px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: transform var(--duration-normal) var(--ease-out);
}

.splash__side:hover .splash__logo {
  transform: scale(1.08);
}

.splash__type {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
  font-family: var(--font-en);
}

.splash__name-ar {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.3;
  font-family: var(--font-ar);
}

.splash__name-en {
  font-size: var(--text-lg);
  font-weight: 300;
  opacity: 0.8;
  font-family: var(--font-en);
  letter-spacing: 0.05em;
}

.splash__tagline {
  font-size: var(--text-sm);
  opacity: 0.6;
  max-width: 280px;
  line-height: 1.6;
}

.splash__enter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--white);
  transition: all var(--duration-normal) var(--ease-out);
  font-family: var(--font-ar);
}

.splash__enter-arrow {
  transition: transform var(--duration-normal) var(--ease-out);
  font-size: 1.2em;
}

.splash__side:hover .splash__enter {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.splash__side--company:hover .splash__enter-arrow {
  transform: translateX(-4px);
}

.splash__side--institute:hover .splash__enter-arrow {
  transform: translateX(4px);
}

/* ---------- Central Logo Mark ---------- */
.splash__center-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 0 40px rgba(255,255,255,0.1);
  pointer-events: none;
}

.splash__center-mark-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition: transform var(--duration-normal) var(--ease-out);
}

.splash__side--company:hover ~ .splash__center-mark .splash__center-mark-img,
.splash__side--institute:hover ~ .splash__center-mark .splash__center-mark-img {
  transform: scale(1.08);
}

/* ---------- Bottom Tagline ---------- */
.splash__bottom {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  color: rgba(255,255,255,0.75);
  font-size: var(--text-sm);
  pointer-events: none;
  background: rgba(10, 10, 18, 0.35);
  padding: 8px 24px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  white-space: nowrap;
}

.splash__bottom-tagline {
  font-family: var(--font-ar);
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 2px;
  letter-spacing: 0.02em;
}

.splash__bottom-tagline-en {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
}

/* ---------- Entrance Animation ---------- */
.splash__side--company .splash__content {
  animation: slideInLeft 1s var(--ease-out) both;
}

.splash__side--institute .splash__content {
  animation: slideInRight 1s var(--ease-out) both;
  animation-delay: 0.15s;
}

.splash__center-mark {
  animation: fadeScaleIn 0.8s var(--ease-out) both;
  animation-delay: 0.5s;
}

.splash__divider {
  animation: fadeIn 1.2s var(--ease-out) both;
  animation-delay: 0.3s;
}

.splash__bottom {
  animation: fadeIn 1s var(--ease-out) both;
  animation-delay: 0.8s;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeScaleIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Mobile: Stack Vertically ---------- */
@media (max-width: 768px) {
  .splash {
    flex-direction: column;
  }

  .splash__divider {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 2px;
    background: linear-gradient(
      to right,
      transparent 0%,
      rgba(255,255,255,0.1) 15%,
      rgba(255,255,255,0.5) 50%,
      rgba(255,255,255,0.1) 85%,
      transparent 100%
    );
  }

  .splash:hover .splash__side {
    flex: 1;
  }

  .splash:hover .splash__side:hover {
    flex: 1.1;
  }

  .splash__name-ar {
    font-size: var(--text-2xl);
  }

  .splash__name-en {
    font-size: var(--text-base);
  }

  .splash__logo {
    height: 50px;
  }

  .splash__center-mark {
    width: 54px;
    height: 54px;
  }

  .splash__center-mark-img {
    width: 36px;
    height: 36px;
  }

  .splash__tagline {
    display: none;
  }

  .splash__side--institute {
    padding-bottom: 3.5rem;
  }

  .splash__bottom {
    bottom: var(--space-2);
    padding: 4px 16px;
    font-size: var(--text-xs);
  }

  .splash__bottom-tagline {
    font-size: 0.72rem;
    margin-bottom: 0;
  }

  .splash__bottom-tagline-en {
    display: none;
  }

  .splash__content {
    gap: var(--space-3);
  }

  .splash__side--company .splash__content {
    animation-name: slideInUp;
  }

  .splash__side--institute .splash__content {
    animation-name: slideInDown;
  }

  @keyframes slideInUp {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes slideInDown {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 480px) {
  .splash__name-ar {
    font-size: var(--text-xl);
  }

  .splash__enter {
    padding: var(--space-2) var(--space-6);
    font-size: var(--text-sm);
  }
}
