/* ============================================================
   LALA Kids — Bedtime Storytelling Website
   Design System & Styles
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Quicksand:wght@400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  --primary: #FF7A2F;
  --primary-light: #FFB380;
  --primary-dark: #E55A10;
  --secondary: #FFFFFF;
  --accent: #FFD966;
  --accent-light: #FFF0C2;
  --bg-dark: #1A1040;
  --bg-dark-lighter: #2A1D5C;
  --bg-warm: #FFF7F0;
  --bg-warm-alt: #FFF0E0;
  --text-dark: #2D2D2D;
  --text-muted: #6B6B6B;
  --text-light: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(255, 122, 47, 0.12);
  --shadow-md: 0 8px 30px rgba(255, 122, 47, 0.18);
  --shadow-lg: 0 16px 48px rgba(255, 122, 47, 0.22);
  --shadow-glow: 0 0 30px rgba(255, 122, 47, 0.4);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-full: 9999px;
  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Quicksand', sans-serif;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Rounded sub-text font --- */
.hero-description,
.section-subtitle,
.story-card-text,
.how-step-text,
.testimonial-text,
.app-feature-text,
.qr-text,
.footer-brand-text {
  font-family: var(--font-heading);
}

/* --- Reset + Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--secondary);
  overflow-x: hidden;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   ANIMATIONS — Keyframes
   ============================================================ */

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

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 122, 47, 0.3); }
  50% { box-shadow: 0 0 40px rgba(255, 122, 47, 0.6), 0 0 60px rgba(255, 217, 102, 0.3); }
}

@keyframes moonRise {
  0% { transform: translateY(60px) scale(0.8); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes cloudDrift {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(120vw); }
}

@keyframes cloudDriftReverse {
  0% { transform: translateX(120vw); }
  100% { transform: translateX(-100%); }
}

@keyframes slideInUp {
  0% { transform: translateY(60px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideInLeft {
  0% { transform: translateX(-60px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
  0% { transform: translateX(60px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes scaleIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

/* Scroll-triggered animation classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(255, 122, 47, 0.1);
  padding: 10px 0;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--secondary);
  transition: color var(--transition);
}

.header.scrolled .logo {
  color: var(--primary);
}

.logo-icon {
  font-size: 2rem;
  animation: floatSlow 3s ease-in-out infinite;
}

.logo-img {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter var(--transition);
}

.header.scrolled .logo-img {
  filter: none;
}

.footer-logo-img {
  filter: brightness(0) invert(1);
  height: 52px;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.header.scrolled .nav-links a {
  color: var(--text-dark);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--accent);
}

.header.scrolled .nav-links a:hover {
  color: var(--primary);
}

.nav-cta {
  background: var(--primary) !important;
  color: var(--secondary) !important;
  padding: 10px 24px !important;
  border-radius: var(--radius-full) !important;
  font-weight: 700 !important;
  transition: transform var(--transition), box-shadow var(--transition) !important;
}

.nav-cta:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-md) !important;
}

.nav-cta::after {
  display: none !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--secondary);
  border-radius: 3px;
  transition: var(--transition);
}

.header.scrolled .hamburger span {
  background: var(--primary);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-lighter) 40%, #3D2A7C 100%);
}

/* Stars background layer */
.hero-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
}

/* Moon */
.hero-moon {
  position: absolute;
  top: 8%;
  right: 10%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent), #FFC44D);
  box-shadow: 0 0 60px rgba(255, 217, 102, 0.5), 0 0 120px rgba(255, 217, 102, 0.2);
  animation: moonRise 2s ease-out forwards, floatSlow 6s ease-in-out 2s infinite;
  opacity: 0;
}

.hero-moon::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 240, 194, 0.5);
}

/* Clouds */
.hero-cloud {
  position: absolute;
  opacity: 0.08;
  font-size: 5rem;
  color: white;
}

.hero-cloud:nth-child(1) {
  top: 20%;
  animation: cloudDrift 35s linear infinite;
}

.hero-cloud:nth-child(2) {
  top: 50%;
  font-size: 3.5rem;
  animation: cloudDriftReverse 45s linear infinite;
  animation-delay: -15s;
}

.hero-cloud:nth-child(3) {
  top: 70%;
  font-size: 4rem;
  animation: cloudDrift 55s linear infinite;
  animation-delay: -25s;
}

/* Particles layer */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  animation: twinkle var(--duration, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.hero-text {
  animation: slideInLeft 1s ease-out 0.5s both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 122, 47, 0.2);
  border: 1px solid rgba(255, 122, 47, 0.3);
  color: var(--primary-light);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

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

.hero h1 {
  font-size: 3.8rem;
  color: var(--secondary);
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero h1 span {
  color: var(--primary);
  position: relative;
}

.hero h1 span::after {
  content: '✨';
  position: absolute;
  top: -10px;
  right: -30px;
  font-size: 1.5rem;
  animation: sparkle 2s ease-in-out infinite;
}

.hero-description {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 36px;
  max-width: 480px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--secondary);
  padding: 16px 36px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: glow 3s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--secondary);
  padding: 16px 36px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary-light);
  transform: translateY(-3px);
}

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
}

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

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

/* Hero illustration */
.hero-illustration {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideInRight 1s ease-out 0.7s both;
}

.hero-illustration img {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 20px 60px rgba(255, 122, 47, 0.3));
}

/* Decorative rings around illustration */
.hero-illustration::before {
  content: '';
  position: absolute;
  width: 110%;
  height: 110%;
  border-radius: 50%;
  border: 2px dashed rgba(255, 217, 102, 0.15);
  animation: floatSlow 8s ease-in-out infinite reverse;
}

.hero-illustration::after {
  content: '';
  position: absolute;
  width: 125%;
  height: 125%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 122, 47, 0.1);
  animation: floatSlow 10s ease-in-out infinite;
}

/* Hero wave divider */
.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: auto;
}

/* ============================================================
   SECTION SHARED STYLES
   ============================================================ */

.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-warm-alt);
  color: var(--primary);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title {
  font-size: 2.8rem;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.section-title span {
  color: var(--primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   FEATURED STORIES
   ============================================================ */

.stories-section {
  background: var(--bg-warm);
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.story-card {
  background: var(--secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
}

.story-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg);
}

.story-card-image {
  position: relative;
  overflow: hidden;
  height: 240px;
}

.story-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.story-card:hover .story-card-image img {
  transform: scale(1.08);
}

.story-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--primary);
  color: var(--secondary);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.story-card-duration {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--secondary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.story-card-body {
  padding: 24px;
}

.story-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.story-card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.story-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.story-card-age {
  background: var(--bg-warm-alt);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.story-card-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.story-card:hover .story-card-play {
  transform: scale(1.15);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */

.how-section {
  background: var(--secondary);
  position: relative;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  position: relative;
}

/* Connector line */
.how-grid::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 15%;
  width: 70%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-light));
  border-radius: 2px;
  z-index: 0;
}

.how-step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.how-step-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-warm), var(--bg-warm-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 3rem;
  position: relative;
  border: 4px solid var(--secondary);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.how-step:hover .how-step-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--shadow-lg);
}

.how-step-number {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  border: 3px solid var(--secondary);
}

.how-step-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.how-step-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */

.testimonials-section {
  background: var(--bg-warm);
  position: relative;
  overflow: hidden;
}

.testimonials-section::before {
  content: '❝';
  position: absolute;
  top: 40px;
  left: 5%;
  font-size: 12rem;
  color: rgba(255, 122, 47, 0.05);
  font-family: serif;
  pointer-events: none;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.testimonial-card {
  background: var(--secondary);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.testimonial-card::before {
  content: '★★★★★';
  display: block;
  color: var(--accent);
  font-size: 1.1rem;
  letter-spacing: 4px;
  margin-bottom: 16px;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.testimonial-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 600;
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   APP SHOWCASE SECTION
   ============================================================ */

.app-section {
  background: var(--secondary);
  position: relative;
  overflow: hidden;
}

.app-section::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 47, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.app-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.app-text .section-title {
  text-align: left;
}

.app-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.app-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-warm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.app-feature:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-sm);
}

.app-feature-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.app-feature-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.app-feature-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.app-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--text-dark);
  color: var(--secondary);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.app-store-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.app-store-icon {
  font-size: 1.6rem;
}

.app-store-btn small {
  display: block;
  font-size: 0.65rem;
  opacity: 0.7;
  font-weight: 500;
}

.app-store-btn strong {
  display: block;
  font-size: 1rem;
  font-family: var(--font-heading);
}

.app-mockup {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-mockup img {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 30px 60px rgba(255, 122, 47, 0.2));
  position: relative;
  z-index: 2;
}

.app-mockup-glow {
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 47, 0.15) 0%, transparent 70%);
  z-index: 1;
  animation: pulse 4s ease-in-out infinite;
}

/* --- App Section Animated Background --- */
.app-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.app-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.07;
}

.app-shape-1 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  top: -80px;
  right: -60px;
  animation: float 8s ease-in-out infinite;
}

.app-shape-2 {
  width: 200px;
  height: 200px;
  background: var(--primary-light);
  bottom: -40px;
  left: -40px;
  animation: floatSlow 10s ease-in-out infinite reverse;
}

.app-shape-3 {
  width: 120px;
  height: 120px;
  background: var(--accent);
  top: 40%;
  right: 15%;
  animation: float 6s ease-in-out infinite;
  animation-delay: -2s;
}

.app-shape-4 {
  width: 80px;
  height: 80px;
  background: var(--primary);
  top: 20%;
  left: 10%;
  animation: floatSlow 7s ease-in-out infinite;
  animation-delay: -3s;
}

.app-shape-5 {
  width: 160px;
  height: 160px;
  background: linear-gradient(45deg, var(--accent), var(--primary-light));
  bottom: 10%;
  right: 35%;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: float 9s ease-in-out infinite;
  animation-delay: -4s;
}

.app-bg-dots {
  position: absolute;
  inset: 0;
}

.app-bg-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.08;
  animation: twinkle var(--dot-dur, 4s) ease-in-out infinite;
  animation-delay: var(--dot-delay, 0s);
}

.app-bg-star {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.12;
  z-index: 0;
}

.app-bg-star-1 {
  top: 12%;
  right: 8%;
  animation: float 5s ease-in-out infinite;
}

.app-bg-star-2 {
  bottom: 18%;
  left: 5%;
  font-size: 1.2rem;
  animation: floatSlow 6s ease-in-out infinite reverse;
}

.app-bg-star-3 {
  top: 60%;
  right: 42%;
  font-size: 1rem;
  animation: sparkle 3s ease-in-out infinite;
}

.app-bg-moon {
  position: absolute;
  top: 6%;
  left: 45%;
  font-size: 2.5rem;
  opacity: 0.06;
  animation: floatSlow 8s ease-in-out infinite;
}

/* ============================================================
   APP STORE BADGE BUTTONS (Real SVG)
   ============================================================ */

.app-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  cursor: pointer;
}

.app-store-btn:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  filter: brightness(1.1);
}

.store-badge-svg {
  display: block;
  width: 160px;
  height: 50px;
}

/* ============================================================
   3D PHONE CAROUSEL
   ============================================================ */

.app-carousel-wrapper {
  position: relative;
  width: 100%;
  height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.app-carousel-stage {
  position: relative;
  width: 260px;
  height: 480px;
  transform-style: preserve-3d;
}

/* ---- Phone card base ---- */
.app-phone-card {
  position: absolute;
  inset: 0;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.6s ease,
              filter 0.6s ease,
              scale 0.6s ease;
  transform-origin: center center;
  will-change: transform, opacity;
  cursor: pointer;
}

/* States: active = front & center */
.app-phone-card.active {
  transform: translateZ(0) rotateY(0deg) scale(1);
  opacity: 1;
  filter: brightness(1) drop-shadow(0 30px 60px rgba(255, 122, 47, 0.35));
  z-index: 10;
}

/* Card to the right (next) */
.app-phone-card.card-next {
  transform: translateX(200px) translateZ(-200px) rotateY(-28deg) scale(0.82);
  opacity: 0.65;
  filter: brightness(0.6);
  z-index: 5;
}

/* Card to the left (prev) */
.app-phone-card.card-prev {
  transform: translateX(-200px) translateZ(-200px) rotateY(28deg) scale(0.82);
  opacity: 0.65;
  filter: brightness(0.6);
  z-index: 5;
}

/* All other cards hidden behind */
.app-phone-card.card-hidden {
  transform: translateZ(-400px) scale(0.5);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---- Phone Frame ---- */
.app-phone-frame {
  width: 260px;
  height: 480px;
  background: linear-gradient(145deg, #f5e6d3, #d4af37, #b8a38b);
  border-radius: 40px;
  border: 4px solid #c5a059;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 0 6px rgba(212, 175, 55, 0.15),
    0 40px 80px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.4s ease;
}

.app-phone-card.active .app-phone-frame {
  animation: phoneTilt 8s ease-in-out infinite;
}

@keyframes phoneTilt {
  0%,100%  { transform: rotateY(-4deg) rotateX(2deg); }
  25%      { transform: rotateY(4deg)  rotateX(3deg); }
  50%      { transform: rotateY(4deg)  rotateX(-2deg); }
  75%      { transform: rotateY(-4deg) rotateX(-3deg); }
}

/* Sheen overlay for 3D glass feel */
.app-phone-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.15) 100%
  );
  pointer-events: none;
  z-index: 5;
  border-radius: 38px;
}

/* Top metal edge highlight */
.app-phone-frame::after {
  content: '';
  position: absolute;
  top: 0; left: 8px; right: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

/* Notch */
.app-phone-notch {
  width: 100px;
  height: 26px;
  background: #0a0a1a;
  border-radius: 0 0 18px 18px;
  margin-top: 0;
  position: relative;
  z-index: 6;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.app-phone-notch::before {
  content: '';
  width: 50px; height: 4px;
  border-radius: 4px;
  background: #111127;
}

.app-phone-notch::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #111127;
  position: absolute;
  right: 14px;
}

/* Screen */
.app-phone-screen {
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.app-phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  border-radius: 0;
}

.app-phone-card.active .app-phone-screen img {
  transform: scale(1.02);
}

@keyframes screenpan {
  0%, 100% { transform: scale(1.02) translateY(0); }
  50%       { transform: scale(1.02) translateY(0); }
}

/* Home button */
.app-phone-btn {
  width: 40px;
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  margin: 10px auto;
  flex-shrink: 0;
  position: relative;
  z-index: 4;
}

/* ---- Carousel Label ---- */
.app-carousel-label {
  margin-top: 20px;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
  min-height: 1.4em;
  transition: opacity 0.3s ease;
}

/* ---- Dots ---- */
.app-carousel-dots {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
}

.app-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 122, 47, 0.25);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), width var(--transition);
  padding: 0;
}

.app-dot.active {
  background: var(--primary);
  transform: scale(1.2);
  width: 24px;
  border-radius: 8px;
}

/* ---- Arrow Buttons ---- */
.app-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--secondary);
  border: 2px solid rgba(255, 122, 47, 0.2);
  color: var(--primary);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.app-carousel-arrow:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-lg);
}

.app-arrow-prev { left: -22px; }
.app-arrow-next { right: -22px; }

/* ---- Ambient glow under carousel ---- */
.app-carousel-glow {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 122, 47, 0.3) 0%, transparent 70%);
  filter: blur(12px);
  animation: pulse 4s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}


/* ============================================================
   QR CODE POPUP
   ============================================================ */

/* Blur page content when popup is active */
body.qr-active > *:not(.qr-overlay):not(.qr-popup) {
  filter: blur(5px);
  transition: filter 0.4s ease;
}

.qr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 16, 64, 0.45);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.qr-overlay.active {
  opacity: 1;
  visibility: visible;
}

.qr-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  background: var(--secondary);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(26, 16, 64, 0.25), 0 0 0 1px rgba(255, 122, 47, 0.1);
  z-index: 9999;
  transform: translateY(120%) scale(0.9);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.4s ease,
              visibility 0.4s ease;
  overflow: hidden;
}

.qr-popup.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.qr-popup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

.qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-warm);
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 2;
}

.qr-close:hover {
  background: var(--primary);
  color: var(--secondary);
  transform: rotate(90deg);
}

.qr-popup-inner {
  padding: 32px 28px 28px;
  text-align: center;
}

.qr-emoji {
  font-size: 2.5rem;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
  display: inline-block;
}

.qr-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.qr-title span {
  color: var(--primary);
}

.qr-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.qr-image-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.qr-image {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-sm);
  border: 3px solid var(--bg-warm-alt);
  transition: transform var(--transition);
}

.qr-image-wrap:hover .qr-image {
  transform: scale(1.05);
}

.qr-image-glow {
  position: absolute;
  inset: -10px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle, rgba(255, 122, 47, 0.1) 0%, transparent 70%);
  z-index: -1;
  animation: pulse 3s ease-in-out infinite;
}

.qr-stores {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.qr-store-btn {
  padding: 8px 16px !important;
  font-size: 0.85rem;
  border-radius: var(--radius-sm) !important;
}

.qr-store-btn .app-store-icon {
  font-size: 1.2rem;
}

.qr-store-btn strong {
  font-size: 0.85rem !important;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.cta-section {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-lighter) 50%, #3D2A7C 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 120px 0;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 122, 47, 0.08) 0%, transparent 60%);
  animation: pulse 6s ease-in-out infinite;
}

.cta-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-emoji {
  font-size: 4rem;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
  display: inline-block;
}

.cta-title {
  font-size: 3rem;
  color: var(--secondary);
  margin-bottom: 16px;
}

.cta-title span {
  color: var(--primary);
}

.cta-text {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--primary), #FF9A5C);
  color: var(--secondary);
  padding: 20px 48px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: glow 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

.cta-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 40px rgba(255, 122, 47, 0.5);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: #0E0A24;
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand .logo {
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.footer-brand-text {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 300px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-social {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.footer-social:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--secondary);
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  transition: color var(--transition), padding-left var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 6px;
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a:hover {
  color: var(--primary);
}

/* ============================================================
   RESPONSIVE — Tablet (≤ 768px)
   ============================================================ */

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: rgba(26, 16, 64, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    transition: right var(--transition);
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.2rem;
    color: var(--secondary) !important;
  }

  .hamburger {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 140px 24px 100px;
    gap: 40px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-description {
    margin: 0 auto 36px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-illustration img {
    max-width: 360px;
  }

  .hero-moon {
    width: 60px;
    height: 60px;
    top: 12%;
    right: 5%;
  }

  .stories-grid,
  .how-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .app-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .app-text .section-title {
    text-align: center;
  }

  .app-mockup {
    order: -1;
  }

  .app-mockup img {
    max-width: 360px;
  }

  .how-grid::before {
    display: none;
  }

  .section-title {
    font-size: 2rem;
  }

  .cta-title {
    font-size: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ============================================================
   RESPONSIVE — Mobile (≤ 480px)
   ============================================================ */

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 14px 28px;
    font-size: 0.95rem;
  }

  .hero-stats {
    gap: 20px;
  }

  .hero-stat-number {
    font-size: 1.4rem;
  }

  .section {
    padding: 70px 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-btn {
    padding: 16px 36px;
    font-size: 1rem;
  }

  .qr-popup {
    width: calc(100% - 32px);
    right: 16px;
    bottom: 16px;
  }

  .qr-stores {
    flex-direction: column;
    align-items: center;
  }
}
