/* ==========================================================================
   VEDIWAY UI - CINEMATIC ENTRANCE & MOBILE APP OPTIMIZED
   ========================================================================== */

:root {
  --lux-brand-prime: #0a192f; /* Deep Navy */
  --lux-brand-accent: #10b981; /* Emerald Action */
  --lux-bg-main: #f8fafc; /* Light cool gray */
  --lux-bg-card: #ffffff;

  --lux-text-dark: #1e293b;
  --lux-text-muted: #64748b;

  --lux-border: #e2e8f0;
  --lux-radius: 20px;
  --lux-shadow-soft: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
  --lux-shadow-hover: 0 20px 35px -5px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body.lux-body {
  background-color: #e2e8f0; /* Desktop canvas background */
  display: flex;
  justify-content: center;
  align-items: center; /* Center vertically on desktop */
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
}

/* --- The App Shell (Mobile Form Factor) --- */
.lux-app-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;

  /* Animation Sequence 1: Shell Background transition */
  background-color: var(--lux-brand-prime);
  animation: shellTheme 0.8s cubic-bezier(0.8, 0, 0.2, 1) 3s forwards;
}

/* Desktop Premium Feel */
@media (min-width: 500px) {
  .lux-app-shell {
    height: 90vh;
    max-height: 850px;
    border-radius: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 6px solid #ffffff;
  }
}

@keyframes shellTheme {
  0% {
    background-color: var(--lux-brand-prime);
  }
  100% {
    background-color: var(--lux-bg-main);
  }
}

/* --- Cinematic Splash Header --- */
.lux-entrance-hero {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 90%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 100;

  /* Animation Sequence 2: Morph to Top Header */
  animation: heroMorph 1s cubic-bezier(0.8, 0, 0.2, 1) 3s forwards;
}

@keyframes heroMorph {
  0% {
    top: 45%;
    transform: translate(-50%, -50%) scale(1);
    width: 90%;
  }
  100% {
    top: 3%;
    transform: translate(-50%, 0) scale(1);
    width: 100%;
    padding: 1.5rem 2rem 0 2rem;
  }
}

.lux-logo-img {
  height: 100px;
  margin-bottom: 1.5rem;
  object-fit: contain;
  /* Invert to white for dark bg, then revert to original colors on light bg */
  border-radius: 10%;

  /* Animation Sequence 3: Logo Entrance & Color Invert */
  animation:
    logoPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
    logoColor 0.8s cubic-bezier(0.8, 0, 0.2, 1) 3s forwards;
}

@keyframes logoPop {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes logoColor {
  0% {
    height: 100px;
    margin-bottom: 1.5rem;
  }
  100% {
    filter: none;
    height: 85px;
    margin-bottom: 0.5rem;
  }
}

.lux-title {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  opacity: 0;

  /* Animation Sequence 4: Title Entrance & Color Switch */
  animation:
    textRise 0.8s ease 0.3s forwards,
    titleMorph 0.8s cubic-bezier(0.8, 0, 0.2, 1) 3s forwards;
}

.lux-subtitle {
  color: #94a3b8;
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0;

  /* Animation Sequence 5: Subtitle Entrance & Color Switch */
  animation:
    textRise 0.8s ease 0.5s forwards,
    subtitleMorph 0.8s cubic-bezier(0.8, 0, 0.2, 1) 3s forwards;
}

@keyframes textRise {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleMorph {
  0% {
    color: #ffffff;
    font-size: 2.2rem;
  }
  100% {
    color: var(--lux-brand-prime);
    font-size: 1.6rem;
  }
}

@keyframes subtitleMorph {
  0% {
    color: #94a3b8;
    font-size: 1.1rem;
  }
  100% {
    color: var(--lux-text-muted);
    font-size: 0.95rem;
  }
}

.lux-content-reveal {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  padding: 0 1.5rem;
  opacity: 0;
  pointer-events: none;
  /* Notice we updated the animation name to the centered version */
  animation: contentFadeInCenter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 3.4s
    forwards;
}

/* Restore the standard fade-in for the Footer and Language Toggle */
@keyframes contentFadeIn {
  0% {
    opacity: 0;
    transform: translateY(40px);
    pointer-events: none;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

/* UPDATE 2: New Keyframes that handle BOTH the entrance slide AND exact vertical centering */
@keyframes contentFadeInCenter {
  0% {
    opacity: 0;
    /* Starts slightly lower for the slide-up effect, but relative to the 50% center */
    transform: translateY(calc(-50% + 40px));
    pointer-events: none;
  }
  100% {
    opacity: 1;
    /* Locks precisely into the vertical middle of the screen */
    transform: translateY(-50%);
    pointer-events: auto;
  }
}
.lux-lang-wrapper {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  margin-bottom: 0;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  /* Fade in at the same time as the rest of the content */
  animation: contentFadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 3.4s forwards;
}

.lux-lang-mini {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 30px;
  padding: 4px;
  gap: 2px;
}

.lux-lang-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--lux-text-muted);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lux-lang-btn.active {
  background: var(--lux-brand-prime);
  color: #fff;
  box-shadow: 0 4px 10px rgba(10, 25, 47, 0.2);
}

/* --- Role Selector Cards --- */
.lux-roles {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 50px;
}

.lux-action-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 800;
  color: var(--lux-text-muted);
  margin-bottom: 0.25rem;
}

.lux-role-card {
  display: flex;
  align-items: center;
  background: var(--lux-bg-card);
  border: 2px solid transparent;
  border-radius: var(--lux-radius);
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--lux-shadow-soft);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lux-role-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--lux-shadow-hover);
  border-color: #e2e8f0;
}

.lux-role-card:active {
  transform: scale(0.97);
}

/* Beautiful Glowing Icons */
.lux-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  margin-right: 1.25rem;
  flex-shrink: 0;
}

.bg-navy-glow {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #4338ca;
  box-shadow: 0 8px 16px rgba(67, 56, 202, 0.15);
}

.bg-amber-glow {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
  box-shadow: 0 8px 16px rgba(217, 119, 6, 0.15);
}

.lux-card-text {
  flex: 1;
}

.lux-card-text h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--lux-text-dark);
  margin-bottom: 0.2rem;
}

.lux-card-text p {
  font-size: 0.85rem;
  color: var(--lux-text-muted);
  font-weight: 500;
}

.lux-card-arrow {
  color: #cbd5e1;
  font-size: 1.25rem;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.lux-role-card:hover .lux-card-arrow {
  transform: translateX(5px);
  color: var(--lux-brand-prime);
}

/* --- Footer Reveal --- */
.lux-footer {
  position: absolute;
  bottom: 2rem;
  left: 0;
  width: 100%;
  text-align: center;
  opacity: 0;
  pointer-events: none;

  /* Animation Sequence 7: Footer slide up */
  animation: contentFadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 3.6s forwards;
}

.lux-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lux-brand-prime);
  margin-bottom: 1.5rem;
  box-shadow: var(--lux-shadow-soft);
  border: 1px solid #f1f5f9;
}

.lux-trust-badge i {
  color: var(--lux-brand-accent);
  font-size: 1.1rem;
}

.lux-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.lux-footer-links a {
  color: var(--lux-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s;
}

.lux-footer-links a:hover {
  color: var(--lux-brand-prime);
}

.lux-footer-links .dot {
  color: #cbd5e1;
  font-size: 0.8rem;
}

.skip-anim .lux-app-shell {
  animation: none !important;
  background-color: var(--lux-bg-main);
}
.skip-anim .lux-entrance-hero {
  animation: none !important;
  top: 3%;
  transform: translate(-50%, 0) scale(1);
  width: 100%;
  padding: 1.5rem 2rem 0 2rem;
}
.skip-anim .lux-logo-img {
  animation: none !important;
  filter: none;
  height: 85px;
  margin-bottom: 0.5rem;
  opacity: 1;
  transform: none;
}
.skip-anim .lux-title {
  animation: none !important;
  color: var(--lux-brand-prime);
  font-size: 1.6rem;
  opacity: 1;
  transform: none;
}
.skip-anim .lux-subtitle {
  animation: none !important;
  color: var(--lux-text-muted);
  font-size: 0.95rem;
  opacity: 1;
  transform: none;
}
.skip-anim .lux-content-reveal,
.skip-anim .lux-lang-wrapper,
.skip-anim .lux-footer {
  animation: none !important;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.skip-anim .lux-content-reveal {
  animation: none !important;
  opacity: 1;
  transform: translateY(-50%); /* <--- This is the crucial change */
  pointer-events: auto;
}

/* --- Premium Ambient Background (Splash Screen Only) --- */
.lux-ambient-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Sits behind the text */
  pointer-events: none;
  overflow: hidden;

  /* The subtle logistics dot grid */
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.06) 1.5px,
    transparent 1.5px
  );
  background-size: 32px 32px;

  /* Fades out perfectly when the app morphs to light mode */
  animation: fadeAmbient 0.8s cubic-bezier(0.8, 0, 0.2, 1) 3s forwards;
}

/* Glowing Orb 1 (Emerald) */
.lux-ambient-bg::before {
  content: "";
  position: absolute;
  width: 350px;
  height: 350px;
  background: var(--lux-brand-accent); /* Emerald */
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  top: -100px;
  left: -100px;
  animation: floatGlow 6s ease-in-out infinite alternate;
}

/* Glowing Orb 2 (Indigo) */
.lux-ambient-bg::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: #4338ca; /* Indigo */
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.2;
  bottom: 10%;
  right: -150px;
  animation: floatGlow 8s ease-in-out infinite alternate-reverse;
}

/* Ambient Animations */
@keyframes fadeAmbient {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes floatGlow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(40px, 50px) scale(1.1);
  }
}

/* UPDATE: Hide ambient background instantly on refresh */
.skip-anim .lux-ambient-bg {
  display: none !important;
}
/* Add this block anywhere in your css/index-lux.css file, 
   ideally near the .lux-entrance-hero styles */

/* --- Updated Badges Container --- */
.lux-entrance-badges {
  position: absolute;
  top: max(75dvh, calc(45dvh + 200px)); 
  left: 50%;
  transform: translate(-50%, -30%); /* Starts slightly lower for a slide-up effect */
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  z-index: 100;
  
  /* Start completely hidden */
  opacity: 0; 
  visibility: hidden;
  
  /* Chain the two animations: 
     1. Fade IN at 1.2 seconds
     2. Fade OUT at 3.0 seconds */
  animation: 
    badgeFadeIn 0.8s ease 1.2s forwards,
    badgeFadeOut 0.8s cubic-bezier(0.8, 0, 0.2, 1) 3s forwards;
}

/* 1. The Entrance Animation */
@keyframes badgeFadeIn {
  0% { 
    opacity: 0; 
    visibility: visible;
    transform: translate(-50%, -30%); 
  }
  100% { 
    opacity: 1; 
    visibility: visible;
    transform: translate(-50%, -50%); 
  }
}

/* 2. The Exit Animation */
@keyframes badgeFadeOut {
  0% { 
    opacity: 1; 
    visibility: visible; 
  }
  100% { 
    opacity: 0; 
    visibility: hidden; 
  }
}

.lux-badge {
  max-height: 100px; /* Adjust trust badge size as needed */
  width: auto;
  object-fit: contain;
}
/* Update this rule at the very bottom of your CSS file 
   to include the new badges container */
.skip-anim .lux-ambient-bg,
.skip-anim .lux-entrance-badges { display: none !important; }