/* ===== Base Styles ===== */
:root {
  /* Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --secondary: #f43f5e;
  --secondary-dark: #e11d48;
  --secondary-light: #fda4af;

  /* Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;

  /* Border Colors */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Spacing */
  --spacing-xs: 0.25rem; /* 4px */
  --spacing-sm: 0.5rem; /* 8px */
  --spacing-md: 1rem; /* 16px */
  --spacing-lg: 1.5rem; /* 24px */
  --spacing-xl: 2rem; /* 32px */
  --spacing-2xl: 3rem; /* 48px */
  --spacing-3xl: 4rem; /* 64px */

  /* Border Radius */
  --radius-sm: 0.25rem; /* 4px */
  --radius-md: 0.5rem; /* 8px */
  --radius-lg: 1rem; /* 16px */
  --radius-xl: 1.5rem; /* 24px */
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Font */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;

  /* Container Width */
  --container-width: 1200px;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--primary-dark);
}

button {
  cursor: pointer;
  font-family: var(--font-sans);
  background: none;
  border: none;
  outline: none;
}

ul,
ol {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h4 {
  font-size: 1.125rem;
}

p {
  margin-bottom: var(--spacing-lg);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

section {
  padding: var(--spacing-3xl) 0;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-3xl);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
  color: white;
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.logo img {
  height: 2rem;
  margin-right: var(--spacing-sm);
}

.nav-menu {
  display: none;
  gap: var(--spacing-xl);
}

.nav-menu li a {
  color: var(--text-primary);
  font-weight: 500;
  transition: color var(--transition-normal);
}

.nav-menu li a:hover {
  color: var(--primary);
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.mobile-menu-btn span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: all var(--transition-normal);
}

/* Hero Section */
.hero {
  padding-top: var(--spacing-3xl);
  padding-bottom: var(--spacing-3xl);
  overflow: hidden;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-3xl);
}

.hero-content {
  text-align: center;
  max-width: 600px;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-xl);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.hero-image {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.phone-mockup {
  position: relative;
  width: 280px; /* Fixed width for phone */
  height: 570px; /* Fixed height for phone */
  margin: 0 auto;
}

.phone-frame {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  background-color: #000;
  padding: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 24px;
  background-color: #000;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 3;
}

.phone-screen {
  position: absolute;
  top: 12px;
  left: 12px;
  width: calc(100% - 24px); /* Important: keeps image inside frame borders */
  height: calc(100% - 24px); /* Important: keeps image inside frame borders */
  object-fit: cover; /* Important: maintains aspect ratio without distortion */
  border-radius: 28px;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.6;
  z-index: -1;
}

.blob-1 {
  width: 300px;
  height: 300px;
  background-color: var(--primary-light);
  top: -100px;
  right: -150px;
}

.blob-2 {
  width: 250px;
  height: 250px;
  background-color: var(--secondary-light);
  bottom: -80px;
  left: -120px;
}

/* Features Section */
.features {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

.feature-card {
  background-color: var(--bg-primary);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  margin-bottom: var(--spacing-lg);
}

.feature-icon svg {
  width: 30px;
  height: 30px;
  color: white;
}

.feature-card h3 {
  margin-bottom: var(--spacing-sm);
}

.feature-card p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* App Showcase Section */
.showcase {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-3xl) 0;
}

.showcase .container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.showcase-slider {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.showcase-track {
  position: relative;
  width: 100%;
  height: 570px;
  margin: 0 auto;
}

.showcase-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 280px;
  transform: none;
  display: flex;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.showcase-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.showcase-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--spacing-xl);
  gap: var(--spacing-md);
}

.showcase-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: all var(--transition-normal);
}

.showcase-arrow:hover {
  background-color: var(--primary);
  color: white;
}

.showcase-arrow svg {
  width: 20px;
  height: 20px;
}

.showcase-dots {
  display: flex;
  gap: var(--spacing-sm);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border-medium);
  transition: all var(--transition-normal);
}

.dot.active {
  background-color: var(--primary);
  transform: scale(1.2);
}

/* Fix animation conflict in showcase section */
.showcase .phone-mockup {
  animation: none !important;
  margin: 0 auto;
  transform: none !important;
}

/* Only apply float animation to hero section */
.hero .phone-mockup {
  animation: float 6s ease-in-out infinite;
}

/* Testimonials Section */
.testimonials {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

.testimonial-card {
  background-color: var(--bg-primary);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.testimonial-stars {
  display: flex;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}

.testimonial-stars svg {
  width: 20px;
  height: 20px;
  color: #fbbf24; /* Amber/yellow color for stars */
}

.testimonial-text {
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h4 {
  margin-bottom: 0;
  font-size: 1rem;
}

.author-info p {
  color: var(--text-secondary);
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* Download Section */
.download {
  padding-top: var(--spacing-3xl);
  padding-bottom: var(--spacing-3xl);
}

.download .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-3xl);
}

.download-content {
  text-align: center;
  max-width: 600px;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.store-button {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: #000;
  color: white;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.store-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: white;
}

.store-button svg {
  width: 24px;
  height: 24px;
  margin-right: var(--spacing-sm);
}

.store-button-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-button-text span {
  font-size: 0.75rem;
  font-weight: 400;
}

.store-button-text strong {
  font-size: 1.125rem;
  font-weight: 600;
}

.download-image {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.phone-group {
  position: relative;
  height: 400px;
}

.phone-mockup.phone-left {
  position: absolute;
  width: 220px;
  padding-bottom: 0;
  height: 450px;
  top: 0;
  left: 50%;
  transform: translateX(-130px);
  z-index: 2;
}

.phone-mockup.phone-right {
  position: absolute;
  width: 220px;
  padding-bottom: 0;
  height: 450px;
  top: 50px;
  left: 50%;
  transform: translateX(-50px) rotate(10deg);
  z-index: 1;
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
  border-top: 1px solid var(--border-light);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-brand img {
  height: 2rem;
  margin-bottom: var(--spacing-sm);
}

.footer-brand span {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

.footer-brand p {
  color: var(--text-secondary);
  max-width: 300px;
  margin-bottom: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
}

.footer-group h4 {
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
}

.footer-group ul li {
  margin-bottom: var(--spacing-sm);
}

.footer-group ul li a {
  color: var(--text-secondary);
  transition: color var(--transition-normal);
}

.footer-group ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--border-light);
  gap: var(--spacing-lg);
}

.footer-bottom p {
  color: var(--text-tertiary);
  margin-bottom: 0;
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all var(--transition-normal);
}

.social-links a:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
}

social-links a svg {
  width: 20px;
  height: 20px;
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0);
  }
}

.phone-mockup {
  animation: float 6s ease-in-out infinite;
}

.phone-left {
  animation-delay: 0s;
}

.phone-right {
  animation-delay: 2s;
}

/* Responsive Styles */
@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .hero .container {
    flex-direction: row;
    justify-content: space-between;
  }

  .hero-content {
    text-align: left;
    flex: 1;
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .hero-stats {
    justify-content: flex-start;
  }

  .hero-image {
    flex: 1;
    max-width: 400px;
  }

  .download .container {
    flex-direction: row;
    justify-content: space-between;
  }

  .download-content {
    text-align: left;
    flex: 1;
  }

  .download-buttons {
    justify-content: flex-start;
  }

  .download-image {
    flex: 1;
  }

  .footer-top {
    flex-direction: row;
  }

  .footer-brand {
    flex: 1;
  }

  .footer-links {
    flex: 2;
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .showcase-slider {
    max-width: 800px;
  }

  .showcase-track {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
  }

  .showcase-slide {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 280px;
    transform: none;
  }
}

/* Mobile Menu Animation */
.nav-menu.active {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
}

.nav-menu.active li {
  margin: var(--spacing-sm) 0;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Base responsive styles */
@media (max-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }
}

@media (max-width: 768px) {
  :root {
    /* Adjust spacing variables for mobile */
    --spacing-3xl: 3rem;
    --spacing-2xl: 2rem;
    --spacing-xl: 1.5rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  /* Navigation for mobile */
  .nav {
    padding: 1rem 0;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    opacity: 0;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  /* Hero section on mobile */
  .hero .container {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-image {
    margin-top: 3rem;
  }
  
  /* Features section on mobile */
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  /* Testimonials on mobile */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  /* Download section on mobile */
  .download .container {
    flex-direction: column;
  }
  
  .download-content {
    text-align: center;
  }
  
  .download-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .store-button {
    width: 100%;
    max-width: 220px;
  }
  
  /* Phone mockups in download section */
  .phone-group {
    position: relative;
    height: auto;
    width: 100%;
    max-width: 300px;
    margin: 3rem auto 0;
  }
  
  .phone-mockup.phone-left {
    position: relative;
    width: 220px;
    height: 450px;
    transform: none;
    margin: 0 auto 30px;
    top: auto;
    left: auto;
  }
  
  .phone-mockup.phone-right {
    position: relative;
    width: 220px;
    height: 450px;
    transform: none;
    margin: 0 auto;
    top: auto;
    left: auto;
  }
  
  /* Make sure phones don't overflow their container */
  .phone-frame {
    width: 100%;
    height: 100%;
  }
  
  .phone-screen {
    width: calc(100% - 24px);
    height: calc(100% - 24px);
  }
  
  /* Footer on mobile */
  .footer-top {
    flex-direction: column;
    gap: var(--spacing-xl);
  }
  
  .footer-brand {
    text-align: center;
    max-width: 100%;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero-stats {
    flex-direction: column;
    align-items: center;
  }
  
  .stat {
    width: 100%;
    max-width: 200px;
  }
  
  .showcase-slider {
    max-width: 280px;
  }
  
  .showcase-controls {
    gap: 0.75rem;
  }
  
  .showcase-arrow {
    width: 36px;
    height: 36px;
  }
  
  .phone-mockup {
    width: 240px;
    height: 490px;
  }
  
  .phone-mockup.phone-left,
  .phone-mockup.phone-right {
    width: 180px;
    height: 370px;
  }
  
  .phone-frame::before {
    height: 20px;
  }
  
  .download-buttons {
    gap: 1rem;
  }
}
