/* --- BASE STYLES --- */
html, body {
  font-family: var(--font-family-base);
  color: var(--color-text-main);
  background: var(--color-bg-light);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  box-sizing: border-box;
  height: 100%;
  min-height: 100%;
}

/* Smooth scrolling for in-page anchors */
html { scroll-behavior: smooth; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { 
    animation-duration: 0.01ms !important; 
    animation-iteration-count: 1 !important; 
    transition-duration: 0.01ms !important; 
  }
}

/* Prevent anchors from hiding under fixed header */
[id] { scroll-margin-top: var(--header-height); }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
  position: relative;
  z-index: 0;
}

.site-footer, .footer-container {
  flex-shrink: 0;
}

/* --- NAVIGATION BAR --- */
header {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-card-bg);
  border-bottom: 1px solid var(--color-divider);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  min-height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-weight: var(--font-weight-bold);
  font-size: 1.3rem;
  color: var(--color-text-main);
  gap: var(--space-xs);
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  background: #FFFFFF;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  max-width: 800px;
  margin: var(--space-lg) auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 50vh;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  margin-bottom: var(--space-xs);
  color: var(--color-text-main);
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

.hero .buttons {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
  justify-content: center;
}

.hero .subtext {
  display: inline-block;
  max-width: 480px;
  margin: var(--space-sm) auto 0;
  padding: 0.75rem 1rem;
  background: rgba(243, 244, 246, 0.9);
  border-radius: var(--radius-button);
  font-size: 1.05rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  color: var(--color-text-secondary);
  text-align: center;
}

/* --- SECTION WRAPPERS --- */
section {
  padding: var(--space-lg) var(--space-md);
  margin: 0 auto;
  max-width: 1200px;
  box-sizing: border-box;
}

/* --- FEATURES SECTION --- */
.features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  align-items: stretch;
  margin: var(--space-lg) auto;
  max-width: 1200px;
}

.feature {
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-md);
  text-align: center;
  flex: 1 1 260px;
  min-width: 260px;
  max-width: 340px;
  margin: 0;
}

.feature-icon {
  display: block;
  margin: 0 auto var(--space-sm) auto;
  height: 48px;
  width: 48px;
  color: var(--color-accent-blue);
}

/* --- CALLOUT & URGENCY --- */
.callout {
  background: var(--color-card-bg);
  margin: var(--space-lg) auto;
  max-width: 600px;
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.urgency {
  text-align: center;
  background: #FFF8E1;
  padding: 1.5rem 2rem;
  color: #D97706;
  font-weight: var(--font-weight-semibold);
  font-size: 1.1rem;
  margin: var(--space-lg) auto 0 auto;
  border-radius: var(--radius-card);
  max-width: 900px;
  box-sizing: border-box;
}

/* --- TESTIMONIALS --- */
.testimonials {
  margin: var(--space-lg) auto;
  text-align: center;
  max-width: 900px;
}

.testimonials-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-md) var(--space-lg);
  display: inline-block;
}

.testimonials h2 {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-main);
  margin-bottom: var(--space-xs);
}

/* --- FAQ SECTION --- */
.faq {
  max-width: 800px;
  margin: var(--space-lg) auto;
  padding: var(--space-lg) var(--space-md);
}

.faq h2 {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-main);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.faq-item {
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.faq-item h3 {
  font-size: 1.2rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-main);
  margin-bottom: var(--space-xs);
}

.faq-item p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* --- FOOTER --- */
.site-footer {
  border-top: 1px solid #E5E7EB;
  background-color: #FFFFFF;
  padding: 0.5rem 0;
  margin-top: 4rem;
  font-size: 0.9rem;
  color: #6B7280;
  font-family: 'Inter', sans-serif;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-main);
}

.footer-logo {
  height: 24px;
  width: 24px;
}

.footer-links {
  display: flex;
  gap: var(--space-sm);
}

.footer-links a {
  text-decoration: none;
  color: var(--color-text-secondary);
  margin-right: var(--space-xs);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--color-text-main);
}

.footer-legal {
  flex-basis: 100%;
  margin-top: var(--space-xs);
  text-align: center;
  color: var(--color-text-muted);
}

/* --- PRICING TABLE --- */
.pricing-section {
  max-width: 1200px;
  margin: 2.5rem auto 0 auto;
  padding: 0 1.5rem 3rem 1.5rem;
}

.pricing-table-wrapper {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(31,41,55,0.07);
  padding: 2.5rem 2rem 2rem 2rem;
  margin: 0 auto;
  max-width: 100%;
}

.pricing-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 2.2rem;
  color: #1F2937;
}

.pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: none;
  font-size: 1.08rem;
  color: #1F2937;
}

.pricing-table th,
.pricing-table td {
  text-align: center;
  padding: 1.1rem 0.7rem;
  border-bottom: 1px solid #F1F3F6;
}

.pricing-table th {
  font-size: 1.08rem;
  font-weight: 700;
  color: #374151;
  background: none;
  border-bottom: 2px solid #E5E7EB;
}

.pricing-table td {
  font-size: 1.08rem;
  font-weight: 500;
  background: none;
}

.pricing-table .yes {
  color: #00C853;
  font-size: 1.25rem;
  font-weight: 700;
}

.pricing-table .no {
  color: #FF3B30;
  font-size: 1.25rem;
  font-weight: 700;
}

.pricing-table .lock {
  color: #BDBDBD;
  font-size: 1.25rem;
}

/* Shared icon styling for pricing table inline SVGs */
.pricing-table .pricing-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  display: inline-block;
}

.pricing-table .plan-price {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #00C853;
  margin-top: 0.2rem;
}

.pricing-signup-row td {
  border-bottom: none;
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.pricing-signup-row .btn-primary {
  width: 100%;
  min-width: 120px;
  font-size: 1.08rem;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.7rem 0;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0,230,118,0.08);
}

@media (max-width: 900px) {
  .pricing-section {
    padding: 0 0.5rem 2rem 0.5rem;
  }
  .pricing-table-wrapper {
    padding: 1.2rem 0.2rem 1.2rem 0.2rem;
  }
  .pricing-title {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
  }
  .pricing-table th,
  .pricing-table td {
    padding: 0.7rem 0.2rem;
    font-size: 0.98rem;
  }
  .pricing-signup-row .btn-primary {
    min-width: 90px;
    font-size: 0.98rem;
    padding: 0.6rem 0;
  }
}

.btn-outline {
  background: #fff;
  color: #1976D2 !important;
  border: 1.5px solid #1976D2;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.7rem 1.3rem;
  font-size: 1.01rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary,
.btn-secondary * {
  color: #fff !important;
  fill: #fff !important;
  stroke: #fff !important;
}

.btn-secondary {
  background: #1976D2;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: #125bb5;
}

.cta-button {
  background: #00E676;
  color: #fff !important;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: background 0.18s, box-shadow 0.18s;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.cta-button:hover {
  background: #00c965;
}

/* --- PRICING B CARDS (A/B TEST) --- */
.pricing-b-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem; /* reduced from 2rem for tighter grouping */
  justify-content: center;
  margin-bottom: 1.5rem; /* reduced for less vertical space below */
  margin-top: 0.5rem; /* add a little space above if needed */
}

.pricing-b-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(31,41,55,0.07);
  padding: 1.7rem 1.3rem 1.3rem 1.3rem; /* reduced vertical padding */
  min-width: 260px;
  max-width: 340px;
  flex: 1 1 260px;
  display: flex;
    flex-direction: column;
  align-items: center;
}

@media (max-width: 900px) {
  .pricing-b-cards {
    gap: 0.7rem;
    margin-bottom: 1rem;
    margin-top: 0.2rem;
  }
  .pricing-b-card {
    padding: 1.1rem 0.7rem 1rem 0.7rem;
  }
}

input:focus,
textarea:focus {
  outline: 2px solid var(--color-accent-blue);
  border-color: transparent;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  font-weight: var(--font-weight-semibold);
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: var(--space-xs) var(--space-sm); /* 8px 16px */
  font-size: var(--font-size-base); /* 16px */
  line-height: 1.5;
  border-radius: var(--radius-md);
  text-decoration: none !important; /* Overriding default link styles */
  transition: var(--transition-normal);
}

/* Base .btn-primary definition to ensure consistent styling */
.btn-primary {
  background: #00E676;
  color: #fff !important;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: background 0.18s, box-shadow 0.18s;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #006335; /* Darker shade of cta-green */
  border-color: #006335;
  color: var(--color-card-bg);
}

.btn-secondary:hover {
  color: var(--color-card-bg);
  background-color: var(--color-accent-blue);
}

.btn-lg {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-lg);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-secondary-text {
  color: #fff !important;
}

/* ==== PRO FAQ SECTION ==== */
.faq-pro {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(31,41,55,0.07);
  padding: 3rem 2rem 2.5rem 2rem;
  margin: 3rem auto 2rem auto;
  max-width: 1200px;
  text-align: center;
}
.faq-pro h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  color: #1F2937;
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2.2rem;
  width: 100%;
  margin: 0 auto;
}
.faq-card {
  background: #F9FAFB;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(31,41,55,0.04);
  padding: 2rem 1.2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 250px;
  transition: box-shadow 0.18s;
}
.faq-card:hover {
  box-shadow: 0 6px 32px rgba(31,41,55,0.11);
}
.faq-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.faq-card p {
  color: #374151;
  font-size: 1.07rem;
  line-height: 1.5;
}
@media (max-width: 800px) {
  .faq-pro {
    padding: 2rem 0.5rem 1.3rem 0.5rem;
  }
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .faq-card {
    padding: 1.2rem 0.7rem;
    min-height: 150px;
  }
}

/* ===== UX IMPROVEMENTS: TRANSITIONS & LOADING STATES ===== */

/* Page transition animations */
.page-transition-out {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-transition-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Loading skeleton/shimmer effect */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.loading-skeleton-text {
  height: 1em;
  margin: 0.5em 0;
}

.loading-skeleton-button {
  height: 2.5em;
  width: 100%;
  margin: 1em 0;
}

.loading-skeleton-banner {
  height: 4em;
  width: 100%;
  margin: 1em 0;
  border-radius: 8px;
}

/* Smooth form transitions */
.auth-form {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.auth-form.loading {
  opacity: 0.7;
  pointer-events: none;
}

.auth-form.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.auth-form.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

/* Button loading states */
.auth-continue-btn:disabled {
  background: #BDBDBD;
  cursor: not-allowed;
  opacity: 0.7;
}

.auth-continue-btn.loading {
  position: relative;
  color: transparent;
}

.auth-continue-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Plan banner animations */
.selected-plan-banner {
  transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
}

.selected-plan-banner.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.selected-plan-banner.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

/* Navigation state transitions */
.nav-links a {
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:not(.cta-button):hover {
  color: var(--color-primary);
  background-color: transparent;
}

/* Smooth opacity transitions for state changes */
.fade-in {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Error state animations */
.auth-error {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Success state animations */
.auth-success {
  animation: successPulse 0.6s ease-in-out;
}

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

/* Mobile responsiveness for transitions */
@media (max-width: 600px) {
  .page-transition-out,
  .page-transition-in {
    transition-duration: 0.2s; /* Faster on mobile */
  }
  
  .auth-form {
    transition-duration: 0.2s;
  }
}