/* ============================================
   YALLA MOBILE - HERO SECTION
   ============================================
   
   TABLE OF CONTENTS:
   1. Hero Container
   2. Background Effects
   3. Floating Shapes
   4. Hero Content
   5. Hero Visual (Phone Mockup)
   6. Floating Info Cards
   7. Stats Section
   8. Scroll Indicator
   9. Animations
   
   ============================================ */

/* ===========================================
   1. HERO CONTAINER
   =========================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport for mobile */
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + var(--space-8));
  padding-bottom: var(--space-16);
  overflow: hidden;
  background: var(--gradient-hero);
}

@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height-mobile) + var(--space-8));
    padding-bottom: var(--space-12);
  }
}

.hero-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

/* ===========================================
   2. BACKGROUND EFFECTS
   =========================================== */

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* Gradient orbs */
.hero-bg::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 70%;
  height: 140%;
  background: var(--gradient-radial-glow);
  animation: hero-pulse 8s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 50%;
  height: 80%;
  background: radial-gradient(
    ellipse at center,
    rgb(var(--color-secondary-rgb) / 0.1) 0%,
    transparent 70%
  );
  animation: hero-pulse 10s ease-in-out infinite reverse;
}

/* RTL adjustments */
[dir="rtl"] .hero-bg::before {
  right: auto;
  left: -15%;
}

[dir="rtl"] .hero-bg::after {
  left: auto;
  right: -10%;
}

/* Grid pattern overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgb(var(--color-primary-rgb) / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--color-primary-rgb) / 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black, transparent);
  pointer-events: none;
}

/* ===========================================
   3. FLOATING SHAPES
   =========================================== */

.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-shape {
  position: absolute;
  border-radius: var(--radius-2xl);
  opacity: 0.6;
}

.hero-shape-1 {
  top: 15%;
  right: 10%;
  width: 300px;
  height: 300px;
  background: linear-gradient(
    135deg,
    rgb(var(--color-primary-rgb) / 0.1) 0%,
    transparent 100%
  );
  animation: hero-float 6s ease-in-out infinite;
}

.hero-shape-2 {
  bottom: 20%;
  left: 5%;
  width: 200px;
  height: 200px;
  background: linear-gradient(
    135deg,
    rgb(var(--color-secondary-rgb) / 0.1) 0%,
    transparent 100%
  );
  animation: hero-float 8s ease-in-out infinite reverse;
}

.hero-shape-3 {
  top: 40%;
  left: 15%;
  width: 100px;
  height: 100px;
  background: linear-gradient(
    135deg,
    rgb(var(--color-accent-rgb) / 0.1) 0%,
    transparent 100%
  );
  border-radius: var(--radius-full);
  animation: hero-float 5s ease-in-out infinite;
}

/* RTL shape positions */
[dir="rtl"] .hero-shape-1 {
  right: auto;
  left: 10%;
}

[dir="rtl"] .hero-shape-2 {
  left: auto;
  right: 5%;
}

[dir="rtl"] .hero-shape-3 {
  left: auto;
  right: 15%;
}

/* Hide shapes on mobile for performance */
@media (max-width: 767px) {
  .hero-shapes {
    opacity: 0.3;
  }
  
  .hero-shape {
    transform: scale(0.5);
  }
}

/* ===========================================
   4. HERO CONTENT
   =========================================== */

.hero-content {
  text-align: center;
}

@media (min-width: 1024px) {
  .hero-content {
    text-align: left;
  }
  
  [dir="rtl"] .hero-content {
    text-align: right;
  }
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary-subtle);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
  animation: hero-fade-up 0.6s ease-out;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: hero-dot-pulse 2s ease-in-out infinite;
}

.hero-badge-text {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-primary);
}

/* Title */
.hero-title {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-6);
  animation: hero-fade-up 0.6s ease-out 0.1s backwards;
}

.hero-title-highlight {
  display: inline-block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Description */
.hero-description {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 540px;
  margin-bottom: var(--space-8);
  animation: hero-fade-up 0.6s ease-out 0.2s backwards;
}

/* Center description on mobile */
.hero-content .hero-description {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .hero-content .hero-description {
    margin-left: 0;
  }
  
  [dir="rtl"] .hero-content .hero-description {
    margin-right: 0;
  }
}

/* Action buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  animation: hero-fade-up 0.6s ease-out 0.3s backwards;
}

@media (min-width: 1024px) {
  .hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 639px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
}

/* ===========================================
   5. HERO VISUAL (PHONE MOCKUP)
   =========================================== */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  animation: hero-scale-in 0.8s ease-out 0.4s backwards;
}

.hero-phone {
  position: relative;
  width: 280px;
  height: 560px;
  background: var(--color-bg-elevated);
  border-radius: 40px;
  border: 8px solid var(--color-border-emphasis);
  box-shadow: 
    0 50px 100px -20px rgb(0 0 0 / 0.25),
    0 30px 60px -30px rgb(var(--color-primary-rgb) / 0.3),
    inset 0 0 0 2px rgb(255 255 255 / 0.1);
  overflow: hidden;
}

/* Phone notch */
.hero-phone::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: var(--color-border-emphasis);
  border-radius: var(--radius-full);
  z-index: 2;
}

/* Phone screen */
.hero-phone-screen {
  position: absolute;
  top: 48px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: var(--gradient-primary);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  color: white;
}

.hero-phone-logo {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  margin-bottom: var(--space-2);
}

.hero-phone-tagline {
  font-size: var(--text-sm);
  opacity: 0.9;
  text-align: center;
}

/* Responsive phone sizing */
@media (max-width: 767px) {
  .hero-phone {
    width: 240px;
    height: 480px;
    border-width: 6px;
    border-radius: 32px;
  }
  
  .hero-phone::before {
    width: 60px;
    height: 20px;
    top: 10px;
  }
  
  .hero-phone-screen {
    top: 40px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border-radius: 22px;
  }
}

/* ===========================================
   6. FLOATING INFO CARDS
   =========================================== */

.hero-float {
  position: absolute;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border-default);
}

.hero-float-1 {
  top: 15%;
  left: -40px;
  animation: hero-float 4s ease-in-out infinite;
}

.hero-float-2 {
  bottom: 20%;
  right: -40px;
  animation: hero-float 5s ease-in-out infinite reverse;
}

.hero-float-3 {
  top: 50%;
  right: 10%;
  animation: hero-float 6s ease-in-out infinite;
}

/* RTL float positions */
[dir="rtl"] .hero-float-1 {
  left: auto;
  right: -40px;
}

[dir="rtl"] .hero-float-2 {
  right: auto;
  left: -40px;
}

[dir="rtl"] .hero-float-3 {
  right: auto;
  left: 10%;
}

.hero-float-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.hero-float-icon svg {
  width: 24px;
  height: 24px;
}

/* Hide floats on mobile */
@media (max-width: 767px) {
  .hero-float {
    display: none;
  }
}

/* ===========================================
   7. STATS SECTION
   =========================================== */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border-default);
  animation: hero-fade-up 0.6s ease-out 0.5s backwards;
}

@media (max-width: 767px) {
  .hero-stats {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    text-align: center;
  }
}

.hero-stat {
  text-align: inherit;
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.hero-stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

/* ===========================================
   8. SCROLL INDICATOR
   =========================================== */

.hero-scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  animation: hero-fade-in 1s ease-out 1s backwards;
}

.hero-scroll-icon {
  width: 24px;
  height: 40px;
  border: 2px solid var(--color-border-emphasis);
  border-radius: var(--radius-full);
  position: relative;
}

.hero-scroll-icon::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  animation: hero-scroll-bounce 2s ease-in-out infinite;
}

/* Hide on mobile */
@media (max-width: 767px) {
  .hero-scroll {
    display: none;
  }
}

/* ===========================================
   9. ANIMATIONS
   =========================================== */

@keyframes hero-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes hero-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes hero-dot-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

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

@keyframes hero-scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes hero-scroll-bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) translateY(10px);
    opacity: 0.5;
  }
}