/* ==========================================================================
   NUMU KIDZ (نُمُو كيدز) - Coming Soon Landing Page Style
   Brand Guidelines & Design System Alignment
   ========================================================================== */

:root {
  /* Brand Primary Colors */
  --purple-950: #241338;
  --purple-900: #351C54;
  --purple-700: #5B3FA6;
  --purple-500: #8B6BF2;
  --purple-300: #C9B8FB;
  --lavender-50: #F3EFFF;
  --lavender-100: #EAE3FF;

  /* Playful Accent Tones */
  --gold-300: #FFE382;
  --gold-400: #FFC93C;
  --gold-500: #FFB200;
  --coral-400: #FF8C6B;
  --coral-500: #FF6F47;
  --mint-400: #6FE3C4;
  --mint-500: #10B981;
  --sky-400: #38BDF8;
  --sky-500: #0284C7;

  /* Text & Surfaces */
  --text-main: #241338;
  --text-muted: #524765;
  --text-light: #7E7492;
  --bg-canvas: #F8FAFF;
  
  /* Fonts */
  --font-arabic: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
  --font-heading: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
  --font-latin: 'Nunito', system-ui, -apple-system, sans-serif;
}

/* CSS Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(#DDE7F5 1.75px, transparent 1.75px), 
    radial-gradient(#EDF3FD 1.75px, transparent 1.75px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  direction: rtl;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Ambient Background Glow Orbs
   -------------------------------------------------------------------------- */
.ambient-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.orb-purple {
  width: 420px;
  height: 420px;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(139, 107, 242, 0.45) 0%, rgba(201, 184, 251, 0.1) 70%);
  animation: orb-float-1 14s ease-in-out infinite alternate;
}

.orb-gold {
  width: 380px;
  height: 380px;
  bottom: -60px;
  left: -60px;
  background: radial-gradient(circle, rgba(255, 201, 60, 0.4) 0%, rgba(255, 178, 0, 0.08) 70%);
  animation: orb-float-2 16s ease-in-out infinite alternate;
}

.orb-mint {
  width: 320px;
  height: 320px;
  top: 45%;
  left: -80px;
  background: radial-gradient(circle, rgba(111, 227, 196, 0.35) 0%, rgba(111, 227, 196, 0.05) 70%);
  animation: orb-float-3 12s ease-in-out infinite alternate;
}

.orb-coral {
  width: 340px;
  height: 340px;
  top: 15%;
  left: 55%;
  background: radial-gradient(circle, rgba(255, 140, 107, 0.25) 0%, rgba(255, 111, 71, 0.05) 70%);
  animation: orb-float-2 18s ease-in-out infinite alternate-reverse;
}

@keyframes orb-float-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 30px) scale(1.08); }
}

@keyframes orb-float-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(35px, -35px) scale(1.05); }
}

@keyframes orb-float-3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(25px, 20px) scale(0.95); }
}

/* --------------------------------------------------------------------------
   Floating Educational & Playful Decorative Layer
   -------------------------------------------------------------------------- */
.floating-elements-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.floating-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  will-change: transform;
}

/* 3D-styled Rounded Playful Bubbles */
.bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  border-radius: 50%;
  box-shadow: 
    0 10px 22px -4px rgba(36, 19, 56, 0.12),
    inset 0 -4px 6px rgba(0, 0, 0, 0.1),
    inset 0 3px 5px rgba(255, 255, 255, 0.85);
  transition: transform 0.3s ease;
}

.bubble-mint {
  background: linear-gradient(135deg, #7CF3D6 0%, #4CD7B3 100%);
  color: #106652;
}

.bubble-gold {
  background: linear-gradient(135deg, #FFE885 0%, #FFB514 100%);
  color: #7A4E00;
}

.bubble-coral {
  background: linear-gradient(135deg, #FFAE96 0%, #FF6840 100%);
  color: #782109;
}

.bubble-purple {
  background: linear-gradient(135deg, #D4C3FF 0%, #8C6BF3 100%);
  color: #2F175C;
}

.bubble-sky {
  background: linear-gradient(135deg, #7DE0FE 0%, #20B3EE 100%);
  color: #075070;
}

/* Geometric Ring (Donut Shape) */
.donut-shape {
  border-radius: 50%;
  border-style: solid;
  box-shadow: 
    0 8px 20px -4px rgba(91, 63, 166, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.ring-lavender {
  width: 44px;
  height: 44px;
  border-width: 10px;
  border-color: #D3C4FC;
  opacity: 0.85;
}

/* SVG Stars */
.star-icon {
  filter: drop-shadow(0 4px 10px rgba(255, 178, 0, 0.4));
}

.star-gold {
  color: #FFC93C;
}

.sparkle-icon {
  color: #8B6BF2;
  filter: drop-shadow(0 4px 10px rgba(139, 107, 242, 0.4));
}

/* Item Positions */
.item-letter-alif {
  top: 10%;
  right: 8%;
}
.item-letter-alif .bubble {
  width: 54px;
  height: 54px;
  font-size: 1.75rem;
}

.item-num-1 {
  top: 18%;
  left: 10%;
}
.item-num-1 .bubble {
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  font-family: var(--font-latin);
}

.item-star-1 {
  top: 12%;
  left: 28%;
}
.item-star-1 .star-icon {
  width: 36px;
  height: 36px;
}

.item-letter-baa {
  bottom: 22%;
  right: 11%;
}
.item-letter-baa .bubble {
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
}

.item-letter-a {
  bottom: 16%;
  left: 8%;
}
.item-letter-a .bubble {
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
  font-family: var(--font-latin);
}

.item-num-2 {
  top: 48%;
  right: 4%;
}
.item-num-2 .bubble {
  width: 42px;
  height: 42px;
  font-size: 1.35rem;
  font-family: var(--font-latin);
}

.item-ring {
  top: 44%;
  left: 5%;
}

.item-sparkle {
  bottom: 12%;
  right: 28%;
}
.item-sparkle .sparkle-icon {
  width: 32px;
  height: 32px;
}

.item-num-3 {
  bottom: 35%;
  left: 15%;
}
.item-num-3 .bubble {
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  font-family: var(--font-latin);
}

/* Floating & Twinkle Keyframes */
.float-slow {
  animation: float-drift 7s ease-in-out infinite alternate;
}
.float-mid {
  animation: float-drift 5.5s ease-in-out infinite alternate;
}
.float-fast {
  animation: float-drift 4.2s ease-in-out infinite alternate;
}

.twinkle-slow {
  animation: twinkle-pulse 4.5s ease-in-out infinite alternate;
}
.twinkle-fast {
  animation: twinkle-pulse 3s ease-in-out infinite alternate;
}

@keyframes float-drift {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(5deg);
  }
  100% {
    transform: translateY(-8px) rotate(-4deg);
  }
}

@keyframes twinkle-pulse {
  0% {
    transform: scale(0.9) rotate(0deg);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.18) rotate(12deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.92) rotate(-8deg);
    opacity: 0.8;
  }
}

/* --------------------------------------------------------------------------
   Main Layout & Centered Stage Card
   -------------------------------------------------------------------------- */
.page-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: clamp(28px, 5vw, 44px);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 
    0 24px 64px -16px rgba(91, 63, 166, 0.14),
    0 10px 24px -10px rgba(36, 19, 56, 0.05),
    inset 0 2px 4px rgba(255, 255, 255, 0.95);
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: card-appear 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes card-appear {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Top Subtle Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--lavender-50) 0%, var(--lavender-100) 100%);
  border: 1.5px solid #DDD0FF;
  padding: 6px 18px;
  border-radius: 9999px;
  box-shadow: 0 3px 10px rgba(91, 63, 166, 0.06);
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

.pulsing-dot {
  width: 9px;
  height: 9px;
  background-color: var(--purple-500);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pulsing-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: var(--purple-500);
  opacity: 0.6;
  animation: pulse-wave 1.8s ease-out infinite;
}

@keyframes pulse-wave {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

.pill-text {
  font-family: var(--font-arabic);
  font-size: clamp(0.8rem, 1.8vw, 0.92rem);
  font-weight: 800;
  color: var(--purple-700);
  letter-spacing: 0.02em;
}

/* Brand Logo Styling */
.logo-wrapper {
  margin: 0.25rem auto clamp(1rem, 2.5vw, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.brand-logo {
  width: 100%;
  max-width: clamp(230px, 40vw, 340px);
  height: auto;
  object-contain: contain;
  filter: drop-shadow(0 12px 24px rgba(91, 63, 166, 0.12));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.stage-card:hover .brand-logo {
  transform: translateY(-4px) scale(1.02);
}

/* Content Group */
.content-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.75rem, 1.8vw, 1.15rem);
  max-width: 520px;
}

/* Main Arabic Heading */
.main-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 900;
  color: var(--purple-950);
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(36, 19, 56, 0.04);
}

/* Stay Tuned Supporting Badge */
.stay-tuned-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FFC93C 0%, #FFB200 100%);
  color: #241338;
  padding: 8px 24px;
  border-radius: 9999px;
  box-shadow: 
    0 8px 20px -4px rgba(255, 178, 0, 0.45),
    inset 0 2px 3px rgba(255, 255, 255, 0.7);
  border: 1px solid #FFE68A;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stay-tuned-badge:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 24px -3px rgba(255, 178, 0, 0.55);
}

.stay-tuned-text {
  font-family: var(--font-latin);
  font-size: clamp(0.88rem, 2vw, 1.05rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sparkle-mini {
  font-size: 1rem;
  display: inline-block;
  animation: sparkle-rotate 2.5s ease-in-out infinite;
}

@keyframes sparkle-rotate {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(20deg) scale(1.2); }
}

/* Optional Warm Tagline */
.tagline {
  font-family: var(--font-arabic);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  font-weight: 800;
  color: var(--purple-700);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Interactive Playground Touch Hint */
.interactive-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  padding: 6px 14px;
  background: rgba(243, 239, 255, 0.75);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.interactive-hint:hover {
  background: rgba(234, 227, 255, 0.95);
  transform: scale(1.03);
}

.hint-icon {
  font-size: 0.95rem;
  animation: hint-bounce 1.6s ease-in-out infinite;
}

@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hint-text {
  font-family: var(--font-arabic);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Minimal Discreet Footer */
.minimal-footer {
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 238, 252, 0.9);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-latin);
  font-size: clamp(0.72rem, 1.5vw, 0.82rem);
  color: var(--text-light);
  font-weight: 700;
}

.domain-tag {
  color: var(--purple-700);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.separator {
  opacity: 0.5;
}

.copyright {
  font-family: var(--font-arabic);
}

/* --------------------------------------------------------------------------
   Confetti & Sparkle Burst Effects (Vanilla JS)
   -------------------------------------------------------------------------- */
.particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  will-change: transform, opacity;
  animation: particle-burst 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes particle-burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Mobile Composition & Responsive Breakpoints
   Tested for: 360px, 390px, 430px, 768px, 1024px+
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body {
    padding: 12px 10px;
    height: auto;
    min-height: 100dvh;
    justify-content: center;
  }

  .stage-card {
    padding: 1.75rem 1.25rem 1.25rem;
    border-radius: 30px;
  }

  .brand-logo {
    max-width: 230px;
  }

  .main-heading {
    font-size: 1.75rem;
  }

  /* Keep screen clean on mobile by hiding non-corner floating elements */
  .item-star-1,
  .item-sparkle,
  .item-ring,
  .item-num-3 {
    display: none;
  }

  /* Scale down remaining floating elements on small screens */
  .item-letter-alif {
    top: 3%;
    right: 3%;
  }
  .item-letter-alif .bubble {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }

  .item-num-1 {
    top: 4%;
    left: 4%;
  }
  .item-num-1 .bubble {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }

  .item-letter-baa {
    bottom: 4%;
    right: 4%;
  }
  .item-letter-baa .bubble {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }

  .item-letter-a {
    bottom: 4%;
    left: 4%;
  }
  .item-letter-a .bubble {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }

  .item-num-2 {
    display: none;
  }

  .minimal-footer {
    flex-wrap: wrap;
    gap: 4px;
  }
}

/* Extra small screens (e.g. 360px - 390px) */
@media (max-width: 380px) {
  .stage-card {
    padding: 1.5rem 1rem 1rem;
    border-radius: 24px;
  }

  .brand-logo {
    max-width: 200px;
  }

  .main-heading {
    font-size: 1.55rem;
  }

  .stay-tuned-badge {
    padding: 6px 18px;
  }

  .tagline {
    font-size: 0.95rem;
  }
}

/* --------------------------------------------------------------------------
   Accessibility: prefers-reduced-motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .glow-orb,
  .floating-item,
  .sparkle-mini,
  .hint-icon,
  .pulsing-dot::after {
    animation: none !important;
    transform: none !important;
  }

  .stage-card:hover .brand-logo,
  .stay-tuned-badge:hover {
    transform: none !important;
  }
}
