/* ==========================================================================
   CamEnhance Landing Page - Global Stylesheet
   Dark theme with purple-to-pink gradient accents matching the app UI.
   ========================================================================== */

/* ---------- CSS Custom Properties (edit these to re-theme quickly) ---------- */
:root {
  /* Backgrounds */
  --bg-primary:    #08081a;
  --bg-secondary:  #0f0f2d;
  --bg-card:       #151538;
  --bg-card-hover: #1c1c48;

  /* Accent gradient */
  --gradient-start: #8b5cf6;
  --gradient-mid:   #a855f7;
  --gradient-end:   #ec4899;
  --gradient:       linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));

  /* Text */
  --text-primary:   #f0f0ff;
  --text-secondary: #a0a0c0;
  --text-muted:     #6b6b8d;

  /* Borders */
  --border-color:   rgba(139, 92, 246, .25);
  --border-subtle:  rgba(255,255,255,.06);

  /* Misc */
  --radius:         12px;
  --radius-lg:      20px;
  --shadow-glow:    0 0 40px rgba(139,92,246,.15);
  --transition:     .3s ease;
  --max-width:      1180px;

  /* Gold accent for stars / highlights */
  --gold: #f5c542;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: var(--gradient-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gradient-end); }

.container { width: 92%; max-width: var(--max-width); margin: 0 auto; }

/* ---------- Utility ---------- */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 24px rgba(168,85,247,.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(168,85,247,.5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}
.btn-outline:hover {
  border-color: var(--gradient-mid);
  color: var(--gradient-mid);
}

.section-label {
  display: inline-block;
  padding: .35rem 1rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: rgba(139,92,246,.15);
  color: var(--gradient-mid);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: .75rem;
}

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

/* ---------- HEADER / NAV ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(8,8,26,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}
.nav-logo:hover { color: var(--text-primary); }

.nav-logo img.nav-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}
.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  display: inline-flex;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: var(--transition);
}

/* ---------- HERO SECTION ---------- */
.hero {
  padding: 10rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative glow blobs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .3;
  pointer-events: none;
}
.hero::before {
  width: 500px; height: 500px;
  background: var(--gradient-start);
  top: -150px; left: -100px;
}
.hero::after {
  width: 400px; height: 400px;
  background: var(--gradient-end);
  bottom: -100px; right: -80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  background: rgba(139,92,246,.12);
  border: 1px solid var(--border-color);
  color: var(--gradient-mid);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  max-width: 820px;
  margin: 0 auto 1.25rem;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-visual {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero-mockup {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-glow);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat .number {
  font-size: 1.8rem;
  font-weight: 800;
}
.hero-stat .label {
  font-size: .85rem;
  color: var(--text-muted);
}

/* ---------- LOGO BAR (Social Proof) ---------- */
.logo-bar {
  padding: 3rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}
.logo-bar p {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.logo-bar-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
  opacity: .5;
}
.logo-bar-logos span {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text-secondary);
}

/* ---------- HOW IT WORKS ---------- */
.how-it-works {
  padding: 6rem 0;
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  transition: transform var(--transition), border-color var(--transition);
  position: relative;
}
.step:hover {
  transform: translateY(-4px);
  border-color: var(--border-color);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}
.step-icon {
  font-size: 2.4rem;
  margin-bottom: .6rem;
}
.step h3 {
  font-size: 1.15rem;
  margin-bottom: .5rem;
}
.step p {
  font-size: .95rem;
  color: var(--text-secondary);
}

/* ---------- FEATURES ---------- */
.features {
  padding: 6rem 0;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: left;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color);
  box-shadow: var(--shadow-glow);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: var(--radius);
  background: rgba(139,92,246,.12);
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
}
.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: .5rem;
}
.feature-card p {
  font-size: .95rem;
  color: var(--text-secondary);
}

/* ---------- AI SHOWCASE (before/after style) ---------- */
.ai-showcase {
  padding: 6rem 0;
  text-align: center;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.showcase-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition);
}
.showcase-item:hover { transform: translateY(-4px); }

.showcase-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.showcase-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.showcase-item .tag {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--gradient);
  color: #fff;
  margin: 1rem 1rem .4rem;
}
.showcase-item h4 {
  padding: 0 1rem;
  font-size: 1rem;
}
.showcase-item .showcase-subtitle {
  padding: 0 1rem;
  font-size: .85rem;
  color: var(--text-secondary);
}

.showcase-item .showcase-prompt {
  margin: .85rem 1rem 1.2rem;
  padding: .55rem .75rem;
  border: 1px solid rgba(139, 92, 246, .55);
  border-radius: .75rem;
  background: rgba(139, 92, 246, .14);
  font-size: .8rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ---------- USE CASES / TESTIMONIALS ---------- */
.use-cases,
.testimonials {
  padding: 6rem 0;
  text-align: center;
}

.use-case-grid,
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.use-case-card,
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: left;
  transition: transform var(--transition);
}
.use-case-card:hover,
.testimonial-card:hover { transform: translateY(-3px); }

.use-case-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(139, 92, 246, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: .8rem;
}

.use-case-card h3 {
  font-size: 1.05rem;
  margin-bottom: .55rem;
}

.use-case-card p {
  font-size: .92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.use-case-card .use-case-meta {
  margin-top: .8rem;
  font-size: .82rem;
  color: var(--text-muted);
}

.testimonial-stars {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: .75rem;
}
.testimonial-card blockquote {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
}
.testimonial-author .name {
  font-weight: 600;
  font-size: .95rem;
}
.testimonial-author .role {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ---------- CTA / SIGNUP ---------- */
.cta-section {
  padding: 6rem 0;
  text-align: center;
}

.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(139,92,246,.08) 0%, transparent 60%);
  pointer-events: none;
}
.cta-box h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: .75rem;
}
.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.signup-form {
  display: flex;
  gap: .75rem;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.signup-form input[type="email"] {
  flex: 1 1 260px;
  padding: .85rem 1.25rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
}
.signup-form input[type="email"]::placeholder { color: var(--text-muted); }
.signup-form input[type="email"]:focus { border-color: var(--gradient-mid); }

.signup-note {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* ---------- FOOTER ---------- */
.site-footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .nav-logo-img {
  width: 32px;
  height: 32px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-top: .75rem;
  max-width: 280px;
}

.footer-col h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .6rem; }
.footer-col a {
  color: var(--text-secondary);
  font-size: .9rem;
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: .85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-socials {
  display: flex;
  gap: 1rem;
}
.footer-socials a {
  color: var(--text-muted);
  font-size: 1.1rem;
}
.footer-socials a:hover { color: var(--text-primary); }

/* ---------- LEGAL / TEXT PAGES ---------- */
.legal-page {
  padding: 8rem 0 5rem;
}
.legal-page .container {
  max-width: 820px;
}
.legal-page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: .5rem;
}
.legal-page .last-updated {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 2.5rem;
}
.legal-page h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: .75rem;
}
.legal-page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}
.legal-page p,
.legal-page li {
  color: var(--text-secondary);
  font-size: .95rem;
  margin-bottom: .75rem;
}
.legal-page ul, .legal-page ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-page a {
  text-decoration: underline;
}

/* ---------- FAQ PAGE ---------- */
.faq-page {
  padding: 8rem 0 5rem;
  text-align: center;
}
.faq-page .container {
  max-width: 780px;
}

.faq-list {
  margin-top: 2rem;
  text-align: left;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--border-color); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  text-align: left;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question:hover { color: var(--gradient-mid); }

.faq-chevron {
  flex-shrink: 0;
  transition: transform var(--transition);
  font-size: 1.2rem;
  color: var(--text-muted);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s ease;
}
.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 1.5rem 1.25rem;
}
.faq-answer p {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- SUPPORT PAGE ---------- */
.support-page .container {
  max-width: 780px;
}

.support-card {
  margin-top: 1.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
}

.support-card h2 {
  margin-top: 0;
  margin-bottom: .5rem;
}

.support-form label {
  display: block;
  margin: 0 0 .35rem;
  font-weight: 600;
}

.support-form .form-field {
  margin-top: 1rem;
}

.support-form input,
.support-form textarea {
  display: block;
  width: 100%;
  background: #10102d;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 10px;
  padding: .8rem .9rem;
  font: inherit;
}

.support-form textarea {
  resize: vertical;
}

.support-form input:focus,
.support-form textarea:focus {
  outline: none;
  border-color: var(--gradient-mid);
}

.support-actions {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.support-alert {
  margin-bottom: 1rem;
}

.support-alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

.support-alert-success {
  border-color: rgba(46, 204, 113, .45);
}

.support-alert-error {
  border-color: rgba(231, 76, 60, .55);
}

/* ---------- MOBILE RESPONSIVE ---------- */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  /* Nav */
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { text-align: center; }
  .nav-links a {
    display: block;
    padding: .75rem 0;
    font-size: 1.05rem;
  }
  .nav-links a::after { display: none; }

  .nav-cta { display: none; }

  /* Hero */
  .hero { padding: 8rem 0 4rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-mockup {
    max-height: 480px;
  }

  /* Grids */
  .features-grid,
  .use-case-grid,
  .testimonial-grid,
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-buttons .btn { width: 100%; }
  .cta-box { padding: 2.5rem 1.25rem; }
  .hero-mockup {
    max-height: 360px;
  }
}

/* ---------- ANIMATIONS ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.stagger.visible > *:nth-child(1) { transition-delay: .1s; }
.stagger.visible > *:nth-child(2) { transition-delay: .2s; }
.stagger.visible > *:nth-child(3) { transition-delay: .3s; }
.stagger.visible > *:nth-child(4) { transition-delay: .4s; }
.stagger.visible > *:nth-child(5) { transition-delay: .5s; }
.stagger.visible > *:nth-child(6) { transition-delay: .6s; }
.stagger.visible > * {
  opacity: 0;
  transform: translateY(20px);
}
.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}
