/* ============================================================
   GroceryGenius Landing Page — styles.css
   ============================================================ */

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

:root {
  --grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --green: #10b981;
  --green-shadow: rgba(16, 185, 129, 0.35);
  --text: #1f2937;
  --muted: #6b7280;
  --card-bg: #f8f9ff;
  --section-screens-bg: linear-gradient(135deg, #f0f0ff, #f5f0ff);
  --footer-bg: #1f2937;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Nunito', sans-serif;
  --font-serif: 'Playfair Display', serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

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

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

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: linear-gradient(135deg, #3d4fbb 0%, #4e2a82 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(102, 126, 234, 0.25);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

.navbar-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: -0.3px;
}

.btn-login {
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: opacity 0.2s;
}

.btn-login:hover { opacity: 0.88; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--grad);
  text-align: center;
  padding: 72px 24px 0;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.2px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: #fff;
  line-height: 1.12;
  margin-bottom: 16px;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  max-width: 440px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 18px var(--green-shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--green-shadow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s;
  display: inline-block;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.3); }

.hero-screenshot-wrap {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px 16px 0 0;
  padding: 20px 20px 0;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
}

.hero-screenshot-wrap img {
  border-radius: 10px 10px 0 0;
  width: 100%;
}

/* Screenshot placeholder (shown when image is missing) */
.screenshot-placeholder {
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
  border-radius: 10px 10px 0 0;
  width: 100%;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667eea;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  padding: 80px 24px;
  background: #fff;
}

.section-label {
  color: #667eea;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-align: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.feature-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ============================================================
   SCREENSHOTS CAROUSEL
   ============================================================ */
.screenshots {
  background: var(--section-screens-bg);
  padding: 80px 24px;
}

.carousel-outer {
  max-width: 720px;
  margin: 0 auto;
}

.carousel-window {
  overflow: hidden;
  border-radius: 16px;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(102, 126, 234, 0.15);
}

.carousel-slide img {
  width: 100%;
  display: block;
  border-bottom: 1px solid #e5e7eb;
}

/* Carousel slide placeholder */
.carousel-slide .slide-img-placeholder {
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667eea;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.slide-caption {
  padding: 18px 22px;
}

.slide-caption-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.slide-caption-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s;
}

.dot.active { background: #667eea; }

/* ============================================================
   FINAL CTA
   ============================================================ */
.cta-section {
  background: var(--grad);
  padding: 88px 24px;
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #fff;
  margin-bottom: 12px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--footer-bg);
  padding: 20px 24px;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.footer-links a {
  color: #9ca3af;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.footer-links .open-app {
  color: var(--green);
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .navbar-logo {
    font-size: 1.1rem;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}
