/* Core SaaS Product Styling */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@500;700;800&display=swap');

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Depth & Layers */
.card-soft {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
}

.gradient-mesh {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 800px;
  background: radial-gradient(circle at 15% 10%, var(--accent-light) 0%, transparent 40%),
              radial-gradient(circle at 85% 20%, var(--accent2-light) 0%, transparent 40%);
  opacity: 0.1;
  z-index: -1;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--surface-translucent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  margin-left: 2rem;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px 0 var(--accent-alpha);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--surface);
  border-color: var(--accent);
}

/* Hero Section */
.hero {
  text-align: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.hero-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--heading);
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Metrics / Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}
.stat-item {
  text-align: center;
}
.stat-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.stat-label {
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Pricing Toggle Widget */
.pricing-header {
  text-align: center;
  margin-bottom: 3rem;
}
.toggle-wrapper {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.25rem;
  margin-bottom: 3rem;
}
.toggle-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.3s ease;
}
.toggle-btn.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.pricing-card {
  position: relative;
}
.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 20px 40px var(--accent-alpha);
  transform: scale(1.02);
}
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Scheme Switcher */
.theme-switcher { position: fixed; bottom: 2rem; right: 2rem; z-index: 9999; }
.theme-toggle { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 25px rgba(0,0,0,0.1); font-size: 1.5rem; transition: all 0.3s ease; }
.theme-toggle:hover { transform: scale(1.1); border-color: var(--accent); }
.theme-menu { position: absolute; bottom: calc(100% + 1rem); right: 0; width: 280px; padding: 1rem; border-radius: 1rem; display: flex; flex-direction: column; gap: 0.5rem; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.theme-switcher.open .theme-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-option { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-radius: 0.5rem; cursor: pointer; transition: background 0.2s; border: 1px solid transparent; }
.theme-option:hover { background: var(--bg); }
.theme-option.active { border-color: var(--accent); background: var(--bg); }
.theme-color-preview { width: 24px; height: 24px; border-radius: 50%; }

/* --- Upgrades --- */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
[data-reveal] {
  opacity: 0;
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  animation: reveal-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Feature Grid */
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.feature-item {
  padding: 2rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

/* Testimonials */
.testimonial-card {
  padding: 2.5rem;
  border-radius: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.testimonial-text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 2rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.testimonial-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

/* Accordion FAQ */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.faq-question {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--muted);
  line-height: 1.6;
}
.faq-item.active .faq-answer {
  max-height: 300px;
  padding-top: 1rem;
}

/* CTA Block */
.cta-block {
  text-align: center;
  padding: 6rem 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 2rem;
  margin: 4rem 0;
}
.cta-block h2 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
}
.cta-block p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}
.cta-block .btn {
  background: #fff;
  color: var(--accent);
}
.cta-block .btn:hover {
  background: var(--surface);
  transform: translateY(-2px);
}

/* Footer */
footer {
  padding: 5rem 2rem 2rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 {
  margin-bottom: 1.5rem;
  color: var(--heading);
  font-size: 1rem;
}
.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  text-align: center;
  padding-top: 4rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* --- UNIVERSAL MOBILE PATCH --- */
@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .hero-btns { flex-direction: column !important; width: 100% !important; align-items: stretch !important; gap: 0.5rem !important; margin-bottom: 2rem !important; }
  .hero-btns .btn { width: 100% !important; justify-content: center !important; margin: 0 !important; }
  .bento-card, .feature-card, .pricing-card, .pricing-tier { grid-column: 1 / -1 !important; }
  .bento, .features-grid, .pricing-grid, .stats-grid, .footer-grid { grid-template-columns: 1fr !important; }
  .hero-title { font-size: 2.5rem !important; }
  .stat-value { font-size: 3.5rem !important; }
  .hero { flex-direction: column !important; padding-top: 6rem !important; gap: 3rem !important; height: auto !important; min-height: unset !important; }
  .hero > div { padding-right: 0 !important; padding-left: 0 !important; width: 100% !important; text-align: center !important; }
  .pricing-header h2 { font-size: 2.5rem !important; }
}
