/**
 * Onboarding Styles
 * Church Pictorial Directory - Marketing & Registration Flow
 *
 * Dependencies:
 * - _variables.css (design tokens)
 * - _components.css (shared UI components)
 *
 * Architecture: BEM-inspired naming, mobile-first responsive design
 * Security: No user-generated content in CSS, CSP-compliant (no inline styles)
 * Performance: Optimized selectors, minimal specificity, browser-cached
 *
 * Used by: Landing page, Registration, Checkout, Success pages
 */

/* =============================================================================
   LANDING PAGE - Clean Paper Design
   ============================================================================= */

/**
 * Landing Page Styles
 * Professional, warm, paper-based design for church directory application
 *
 * Color variables are defined in _variables.css (loaded first)
 * All --landing-* custom properties are available globally
 *
 * Button Strategy: Uses .btn-landing modifier to extend _components.css .btn
 * with landing-page-specific styling (larger size, brand colors, enhanced shadows)
 */

/* -----------------------------------------------------------------------------
   Landing Page CTA Button (extends .btn from _components.css)
   Used in: Hero, Pricing CTA, Closing CTA sections
   ----------------------------------------------------------------------------- */
.btn-landing {
  font-size: 1.1rem;
  padding: 1rem 2rem;
  background: var(--landing-brand-primary);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: var(--landing-radius-md);
  box-shadow: var(--landing-shadow-sm);
  transition: all var(--transition-slow);
  text-decoration: none;
}

.btn-landing:hover {
  background: var(--landing-brand-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--landing-shadow-md);
  filter: none; /* Override .btn:hover filter */
}

/* Landing page container with full-width background */
.landing-page {
  background: var(--landing-bg-page);
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Inner content container */
.landing-page > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: var(--space-2xl) 0;
  margin-bottom: var(--space-xl);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--landing-text-primary);
  font-weight: 700;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: var(--landing-text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Hero buttons use .btn-landing class defined above */

.hero .login-link {
  color: var(--landing-text-secondary);
  font-size: 0.95rem;
}

.hero .login-link a {
  color: var(--landing-brand-primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base);
}

.hero .login-link a:hover {
  border-bottom-color: var(--landing-brand-primary);
}

/* Features Section */
.features {
  margin-bottom: var(--space-3xl);
}

.features h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--landing-text-primary);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
}

.features .feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  /*
   * Padding aligns grid content with the inner edge of .social-proof section.
   * The +1px accounts for .social-proof's 1px border, ensuring visual alignment
   * between the social proof card's content and the feature cards below it.
   */
  padding: 0 calc(var(--space-xl) + 1px);
}

.features .feature-card {
  padding: var(--space-xl);
  border: 1px solid var(--landing-border-default);
  border-radius: var(--landing-radius-md);
  background: var(--landing-bg-card);
  transition: all var(--transition-slow);
  box-shadow: var(--landing-shadow-sm);
}

.features .feature-card:hover {
  border-color: var(--landing-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--landing-shadow-md);
}

.features .feature-card h3 {
  margin-bottom: var(--space-xs);
  color: var(--landing-text-primary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-lg);
}

.features .feature-card p {
  color: var(--landing-text-secondary);
  line-height: var(--line-height-normal);
  margin: 0;
}

/* Pricing Section */
.pricing {
  margin-bottom: var(--space-3xl);
}

.pricing h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--landing-text-primary);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
}

.pricing .pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.pricing-card {
  padding: 2rem;
  border: 1px solid var(--landing-border-default);
  border-radius: var(--landing-radius-md);
  text-align: center;
  position: relative;
  background: var(--landing-bg-card);
  transition: all var(--transition-slow);
  box-shadow: var(--landing-shadow-sm);
}

.pricing-card:hover {
  border-color: var(--landing-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--landing-shadow-md);
}

.pricing-card.recommended {
  border-color: var(--landing-brand-primary);
  border-width: 2px;
  box-shadow: var(--landing-shadow-lg);
}

.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--landing-brand-primary);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  white-space: nowrap;
  font-weight: 600;
}

.pricing-card h3 {
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  color: var(--landing-text-primary);
  font-size: 1.75rem;
  font-weight: 600;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--landing-brand-primary);
  margin: 1rem 0;
}

.pricing-card .period {
  color: var(--landing-text-secondary);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.pricing-card .savings {
  color: var(--landing-accent-success);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  text-align: left;
}

.pricing-card ul li {
  padding: 0.6rem 0;
  color: var(--landing-text-secondary);
  border-bottom: 1px solid var(--landing-border-default);
  line-height: 1.5;
  font-size: 1.05rem;
}

.pricing-card ul li:last-child {
  border-bottom: none;
}

.pricing .cta-button {
  text-align: center;
  margin-top: 2rem;
}

/* Pricing CTA buttons use .btn-landing class defined above */

/* CTA Section */
.cta {
  text-align: center;
  padding: 3rem;
  background: var(--landing-bg-card);
  border-radius: var(--landing-radius-md);
  border: 1px solid var(--landing-border-default);
  box-shadow: var(--landing-shadow-sm);
}

.cta h2 {
  margin-bottom: 1rem;
  color: var(--landing-text-primary);
  font-weight: 600;
}

.cta p {
  color: var(--landing-text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* CTA section buttons use .btn-landing class defined above */

/* =============================================================================
   HERO SUBTEXT
   ============================================================================= */

.hero-subtext {
  font-size: var(--font-size-base);
  color: var(--landing-text-secondary);
  margin-top: var(--space-md);
  margin-bottom: 0;
}

/* =============================================================================
   SOCIAL PROOF SECTION
   ============================================================================= */

.social-proof {
  margin-top: calc(-1 * var(--space-xl));  /* Pull up closer to hero */
  margin-bottom: var(--space-3xl);
  padding: var(--space-lg) var(--space-xl);
  background: var(--landing-bg-card);
  border-radius: var(--landing-radius-md);
  border: 1px solid var(--landing-border-default);
}

.social-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.social-proof-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  color: var(--landing-text-secondary);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  position: relative;
}

/* Vertical dividers between items */
.social-proof-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 40px;
  width: 1px;
  background: var(--landing-border-default);
}

.social-proof-icon {
  font-size: var(--font-size-3xl);
  line-height: 1;
}

/* =============================================================================
   BENEFITS SECTION
   ============================================================================= */

.benefits {
  margin-bottom: var(--space-3xl);
}

.benefits h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--landing-text-primary);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  /* Match the inner width of social-proof card (account for its padding + border) */
  padding: 0 calc(var(--space-xl) + 1px);
}

.benefit-card {
  padding: var(--space-xl);
  border: 1px solid var(--landing-border-default);
  border-radius: var(--landing-radius-md);
  background: var(--landing-bg-card);
  transition: all var(--transition-slow);
  box-shadow: var(--landing-shadow-sm);
  text-align: center;
}

.benefit-card:hover {
  border-color: var(--landing-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--landing-shadow-md);
}

.benefit-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-md);
}

.benefit-card h3 {
  margin-bottom: var(--space-sm);
  color: var(--landing-text-primary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-lg);
}

.benefit-card p {
  color: var(--landing-text-secondary);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

/* =============================================================================
   HOW IT WORKS SECTION
   ============================================================================= */

.how-it-works {
  margin-bottom: var(--space-3xl);
  padding: var(--space-2xl) calc(var(--space-xl) + var(--space-xl) + 1px);
  background: var(--landing-brand-primary);
  border-radius: var(--landing-radius-md);
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--text-inverse);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);  /* Reduced from xl to give cards more width */
}

.step-card {
  text-align: center;
  padding: var(--space-md);  /* Reduced from lg to give text more room */
}

.step-number {
  width: var(--step-number-size);
  height: var(--step-number-size);
  background: var(--neutral-white);
  color: var(--landing-brand-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin: 0 auto var(--space-md);  /* Centered in card */
}

.step-card h3 {
  color: var(--text-inverse);
  font-size: var(--font-size-xl);  /* Larger title now that cards have more width */
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
  text-align: left;
}

.step-card p {
  color: var(--text-inverse-muted);
  line-height: var(--line-height-normal);
  margin: 0;
  text-align: left;  /* Left-align body text for better readability */
}

/* =============================================================================
   PRIVACY & SECURITY SECTION
   ============================================================================= */

.privacy-block {
  margin-bottom: var(--space-3xl);
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  background: var(--landing-bg-card);
  border-radius: var(--landing-radius-md);
  border: 1px solid var(--landing-border-default);
  box-shadow: var(--landing-shadow-sm);
}

.privacy-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.privacy-block h2 {
  margin-bottom: var(--space-lg);
  color: var(--landing-text-primary);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
}

.privacy-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 400px;
  text-align: left;
}

.privacy-list li {
  padding: var(--space-sm) 0;
  color: var(--landing-text-secondary);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-normal);
  position: relative;
  padding-left: var(--space-lg);
}

.privacy-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-success);
  font-weight: var(--font-weight-bold);
}

/* =============================================================================
   SHOWCASE SECTION
   ============================================================================= */

.showcase {
  margin-bottom: var(--space-3xl);
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  background: var(--landing-bg-card);
  border-radius: var(--landing-radius-md);
  border: 1px solid var(--landing-border-default);
  box-shadow: var(--landing-shadow-sm);
}

.showcase h2 {
  margin-bottom: var(--space-md);
  color: var(--landing-text-primary);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
}

.showcase p {
  color: var(--landing-text-secondary);
  margin-bottom: var(--space-lg);
  line-height: var(--line-height-relaxed);
}

.showcase .btn-secondary {
  font-size: var(--font-size-md);
  padding: var(--space-sm) var(--space-lg);
  display: inline-block;
  background: var(--bg-white);
  color: var(--landing-brand-primary);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--landing-radius-md);
  border: 2px solid var(--landing-brand-primary);
  transition: all var(--transition-slow);
  text-decoration: none;
}

.showcase .btn-secondary:hover {
  background: var(--landing-brand-primary);
  color: var(--text-inverse);
  transform: translateY(-2px);
  box-shadow: var(--landing-shadow-md);
}

/* =============================================================================
   TESTIMONIALS SECTION
   ============================================================================= */

.testimonials {
  margin-bottom: var(--space-3xl);
}

.testimonials h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--landing-text-primary);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  /* Aligns with .social-proof inner edge (accounts for 1px border) */
  padding: 0 calc(var(--space-xl) + 1px);
}

.testimonial-card {
  padding: var(--space-xl);
  border: 1px solid var(--landing-border-default);
  border-radius: var(--landing-radius-md);
  background: var(--landing-bg-card);
  box-shadow: var(--landing-shadow-sm);
}

.testimonial-card blockquote {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--landing-text-primary);
  margin: 0 0 var(--space-md) 0;
  font-style: italic;
}

.testimonial-card cite {
  display: block;
  color: var(--landing-text-secondary);
  font-size: var(--font-size-base);
  font-style: normal;
  font-weight: var(--font-weight-medium);
}

/* =============================================================================
   FAQ SECTION
   ============================================================================= */

.faq {
  margin-bottom: var(--space-3xl);
}

.faq h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--landing-text-primary);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  /* Aligns with .social-proof inner edge (accounts for 1px border) */
  padding: 0 calc(var(--space-xl) + 1px);
}

.faq-item {
  padding: var(--space-lg);
  border: 1px solid var(--landing-border-default);
  border-radius: var(--landing-radius-md);
  background: var(--landing-bg-card);
  box-shadow: var(--landing-shadow-sm);
}

.faq-item h3 {
  color: var(--landing-text-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
}

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

/* =============================================================================
   LANDING PAGE RESPONSIVE (Mobile)
   ============================================================================= */

@media (max-width: 600px) {
  .social-proof-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .social-proof-item {
    padding: var(--space-sm) var(--space-md);
  }

  /* Horizontal dividers on mobile instead of vertical */
  .social-proof-item:not(:last-child)::after {
    right: 50%;
    transform: translateX(50%);
    top: auto;
    bottom: 0;
    height: 1px;
    width: 60px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .features .feature-grid {
    grid-template-columns: 1fr;
  }

  .how-it-works {
    padding: var(--space-xl) var(--space-md);
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet breakpoint for feature grid */
@media (min-width: 601px) and (max-width: 900px) {
  .features .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================================================
   REGISTRATION FORM
   ============================================================================= */

.registration-form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
}

.registration-form h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.registration-form .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.registration-form .messages {
  margin-bottom: 2rem;
}

.registration-form .alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.registration-form .alert-error {
  background: var(--brand-danger-bg);
  border: 1px solid var(--brand-danger-border);
  color: var(--brand-danger-text);
}

.registration-form .alert-success {
  background: var(--brand-success-bg);
  border: 1px solid var(--brand-success-border);
  color: var(--brand-success-text);
}

.registration-form form {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
}

.registration-form fieldset {
  border: none;
  padding: 0;
  margin-bottom: 2rem;
}

.registration-form legend {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.registration-form .form-field {
  margin-bottom: 1.5rem;
}

.registration-form .form-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.registration-form .form-row-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.registration-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.registration-form .required {
  color: var(--brand-danger);
}

.registration-form .help-text {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.registration-form .error-message {
  color: var(--brand-danger);
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

.registration-form .non-field-errors {
  color: var(--brand-danger-text);
  margin-bottom: 1rem;
  padding: var(--space-sm);
  background: var(--brand-danger-bg);
  border: 1px solid var(--brand-danger-border);
  border-radius: var(--radius-sm);
}

.registration-form hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid var(--border-light);
}

/* Plan Selection in Registration */
.plan-container {
  margin-bottom: 0.5rem;
}

.plan-header {
  background: var(--bg-light);
  padding: 0.5rem 1rem;
  border-radius: 4px 4px 0 0;
  border: 1px solid var(--border-medium);
  border-bottom: none;
}

.plan-header.recommended {
  background: var(--brand-primary-light);
  border: 2px solid var(--brand-primary);
  border-bottom: none;
}

.plan-header strong {
  color: var(--text-primary);
}

.plan-header small {
  color: var(--text-muted);
  display: block;
  font-weight: normal;
  font-size: 0.85rem;
}

.plan-header .badge {
  background: var(--brand-warning);
  color: var(--neutral-black);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  margin-left: var(--space-xs);
}

.plan-option {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-medium);
  border-bottom: none;
  cursor: pointer;
  transition: background var(--transition-base);
  background: white;
}

.plan-option:last-child {
  border-radius: 0 0 4px 4px;
  border-bottom: 1px solid var(--border-medium);
}

.plan-option.recommended-option {
  border: 2px solid var(--brand-primary);
  border-bottom: none;
  border-top: none;
}

.plan-option.recommended-option:last-child {
  border-bottom: 2px solid var(--brand-primary);
}

.plan-option:hover {
  background: var(--bg-light);
}

.plan-option input[type="radio"] {
  margin-right: 0.5rem;
}

.plan-option strong {
  font-weight: 600;
}

.plan-option .savings-badge {
  background: var(--brand-success);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.plan-option small {
  color: var(--text-muted);
  margin-left: 1rem;
}

/* Terms & Privacy */
.registration-form .terms-acceptance {
  margin: 1.5rem 0;
}

.registration-form .terms-acceptance label {
  display: flex;
  align-items: start;
  cursor: pointer;
}

.registration-form .terms-acceptance input[type="checkbox"] {
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  cursor: pointer;
}

.registration-form .terms-acceptance span {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.registration-form .terms-acceptance a {
  color: var(--brand-primary);
  text-decoration: underline;
}

/* Submit Button */
.registration-form button[type="submit"] {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  background: var(--brand-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition-base);
}

.registration-form button[type="submit"]:hover {
  background: var(--brand-primary-darker);
}

.registration-form .login-link {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.registration-form .login-link a {
  color: var(--brand-primary);
}

/* =============================================================================
   SUCCESS PAGE
   ============================================================================= */

.success-page {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
}

.success-page .celebration {
  text-align: center;
  margin-bottom: 3rem;
}

.success-page .celebration .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.success-page .celebration h1 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.success-page .celebration p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.success-page .celebration strong {
  color: var(--text-primary);
}

/* Trial Info */
.trial-info {
  padding: var(--space-lg);
  background: var(--brand-success-bg);
  border: 1px solid var(--brand-success-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
}

.trial-info h3 {
  margin: 0 0 var(--space-xs) 0;
  color: var(--brand-success-text);
}

.trial-info p {
  margin: 0;
  color: var(--brand-success-text);
}

.trial-info strong {
  font-weight: var(--font-weight-semibold);
}

/* What's Next Section */
.whats-next {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
  margin-bottom: 2rem;
}

.whats-next h2 {
  margin-top: 0;
  color: var(--text-primary);
}

.whats-next ol {
  color: var(--text-muted);
  line-height: 1.8;
}

.whats-next strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Account Details */
.account-details {
  background: white;
  padding: 2rem;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.account-details h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.account-details dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
}

.account-details dt {
  font-weight: 600;
  color: var(--text-muted);
}

.account-details dd {
  margin: 0;
  color: var(--text-primary);
}

/* Dashboard CTA */
.dashboard-cta {
  text-align: center;
}

.dashboard-cta .btn {
  font-size: 1.2rem;
  padding: 1rem 2.5rem;
  display: inline-block;
  background: var(--brand-primary);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background var(--transition-base);
}

.dashboard-cta .btn:hover {
  background: var(--brand-primary-darker);
}

/* Help Section */
.help-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-medium);
  text-align: center;
}

.help-section h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.help-section p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.help-section .help-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.help-section .help-links a {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--brand-primary);
  color: var(--brand-primary);
  text-decoration: none;
  border-radius: 4px;
  transition: background var(--transition-base), color var(--transition-base);
}

.help-section .help-links a:hover {
  background: var(--brand-primary);
  color: white;
}

/* =============================================================================
   PLAN SELECTION / CHECKOUT
   ============================================================================= */

.page-header {
  margin-bottom: 2rem;
  text-align: center;
}

.page-title {
  font-size: 2.25rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 0.25rem 0;
}

/* Trial Notices */
.trial-notice {
  background: var(--brand-warning-bg);
  border: 1px solid var(--brand-warning);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-xl) auto;
  max-width: 600px;
  text-align: center;
  color: var(--brand-warning-text);
}

.trial-notice strong {
  font-size: var(--font-size-lg);
}

.trial-notice.warning {
  background: var(--brand-warning-bg);
  border-color: var(--brand-warning);
  color: var(--brand-warning-text);
}

.trial-notice.error {
  background: var(--brand-danger-bg);
  border-color: var(--brand-danger);
  color: var(--brand-danger-text);
}

/* Billing Toggle */
.billing-toggle {
  text-align: center;
  margin: 2rem 0;
}

.toggle-container {
  display: inline-flex;
  background: var(--neutral-100);
  border-radius: 25px;
  padding: 4px;
}

.toggle-btn {
  padding: 0.5rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 20px;
  transition: all var(--transition-slow);
}

.toggle-btn.active {
  background: white;
  color: var(--brand-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-btn:hover:not(.active) {
  color: var(--text-primary);
}

.toggle-btn .savings-text {
  font-size: 0.75rem;
  color: var(--brand-success);
  font-weight: 600;
}

/* Pricing Grid (Checkout) */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card.recommended {
  border-color: var(--brand-primary);
  border-width: 3px;
}

.recommended-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-primary);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.plan-price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin: 0;
}

.plan-price-small {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 400;
}

.plan-yearly-savings {
  font-size: 0.9rem;
  color: var(--brand-success);
  font-weight: 600;
  margin: 0.5rem 0 1rem 0;
  min-height: 1.5rem;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  text-align: left;
}

.plan-features li {
  padding: 0.5rem 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-features li::before {
  content: "✓";
  color: var(--brand-success);
  font-weight: 700;
  font-size: 1.2rem;
}

.select-plan-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--brand-primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-slow);
  margin-top: 1rem;
}

.select-plan-btn:hover {
  background: var(--brand-primary-darker);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(65, 118, 144, 0.3);
}

.plan-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.plan-note strong {
  color: var(--text-primary);
}

/* Show/hide pricing based on billing period */
.monthly-price,
.yearly-price {
  transition: opacity var(--transition-base);
}

.hidden {
  display: none !important;
}

/* =============================================================================
   LOADING PAGE
   ============================================================================= */

.loading-page {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-system);
  background: var(--brand-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
}

.loading-container {
  text-align: center;
  padding: 2rem;
  max-width: 500px;
}

.loading-container h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  animation: fadeIn 0.5s ease-in;
}

.loading-container p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  animation: fadeIn 0.7s ease-in;
}

/* Spinner */
.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--neutral-white);
  border-radius: var(--radius-full);
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stripe-badge {
  margin-top: 2rem;
  font-size: 0.85rem;
  opacity: 0.8;
  animation: fadeIn 1s ease-in;
}

.stripe-badge svg {
  width: 50px;
  height: 20px;
  vertical-align: middle;
  margin-left: 8px;
}

.security-note {
  margin-top: 2rem;
  font-size: 0.9rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lock-icon {
  width: 16px;
  height: 16px;
}

.policy-links {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  opacity: 0.75;
}

.policy-links a {
  color: var(--text-inverse);
  text-decoration: none;
  margin: 0 var(--space-xs);
  transition: opacity var(--transition-base);
}

.policy-links a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* =============================================================================
   RESPONSIVE DESIGN (Mobile-First)
   ============================================================================= */

/* Mobile adjustments */
@media (max-width: 600px) {
  .landing-page {
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  .landing-page > * {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
    box-sizing: border-box;
  }

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

  .hero p {
    font-size: 1rem;
  }

  .hero {
    padding: 2rem 0;
    margin-bottom: 2rem;
  }

  .features .feature-grid {
    grid-template-columns: 1fr;
  }

  .pricing .pricing-grid {
    grid-template-columns: 1fr;
  }

  .registration-form {
    padding: 1rem;
  }

  .registration-form form {
    padding: 1rem;
  }

  .registration-form .form-row,
  .registration-form .form-row-equal {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.75rem;
  }
}

/* Tablet and up */
@media (min-width: 768px) {
  .pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: var(--brand-primary);
  }
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .spinner {
    animation: none;
    border-top-color: rgba(255, 255, 255, 0.3);
  }

  .pricing-card:hover,
  .select-plan-btn:hover {
    transform: none;
  }
}

/* Focus styles for keyboard navigation */
.plan-option:focus-within,
.toggle-btn:focus,
.select-plan-btn:focus {
  outline: 3px solid rgba(65, 118, 144, 0.5);
  outline-offset: 2px;
}

/* =============================================================================
   LOGIN PAGE (Standalone Authentication)
   ============================================================================= */
/**
 * login.css
 * Standalone login page styles
 * CSP-compliant external stylesheet
 *
 * Note: These styles only apply when .login-container is present
 */

/* Body styles for login page only */
/* Using both :has() for modern browsers and .login-page class for Firefox fallback */
body:has(.login-container),
body.login-page {
    font-family: var(--font-family-system);
    background: var(--landing-bg-page);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    margin: 0;
}

/* Body styles for landing page only */
body:has(.landing-page) {
    background: var(--landing-bg-page, #faf8f5);
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body:has(.landing-page) main {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--landing-shadow-lg, 0 6px 16px rgba(65, 118, 144, 0.2));
    max-width: 450px;
    width: 100%;
    padding: 3rem;
    border: 1px solid var(--landing-border-default, #e1d5c7);
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.logo-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-container .form-group {
    margin-bottom: 1.5rem;
}

.login-container .form-label {
    display: block;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
}

.login-container .form-input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    transition: border-color var(--transition-base);
}

.login-container .form-input:focus {
    outline: none;
    border-color: var(--brand-primary, #417690);
}

.login-container .error-message {
    background: var(--brand-danger-bg);
    border: 1px solid var(--brand-danger-border);
    color: var(--brand-danger-text);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.login-container .success-message {
    background: var(--brand-success-bg);
    border: 1px solid var(--brand-success-border);
    color: var(--brand-success-text);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    text-align: center;
    font-weight: var(--font-weight-medium);
}

.login-container .btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.login-container .btn-primary {
    background: var(--brand-primary, #417690);
    color: white;
}

.login-container .btn-primary:hover {
    background: var(--brand-primary-darker, #2e5670);
    transform: translateY(-2px);
    box-shadow: var(--landing-shadow-md, 0 4px 12px rgba(65, 118, 144, 0.15));
}

.login-container .divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.login-container .divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-medium);
}

.login-container .divider span {
    background: var(--bg-white);
    padding: 0 var(--space-md);
    position: relative;
    color: var(--text-muted);
    font-size: var(--font-size-base);
}

.login-container .signup-link {
    text-align: center;
    margin-top: 1.5rem;
}

.login-container .signup-link a {
    color: var(--brand-primary, #417690);
    text-decoration: none;
    font-weight: 600;
}

.login-container .signup-link a:hover {
    text-decoration: underline;
}

.help-text {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.help-text-error {
    color: var(--brand-danger);
}

/* =============================================================================
   OTP VERIFICATION PAGE STYLES
   ============================================================================= */

.code-input {
    font-family: monospace;
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    padding: 16px;
}

.resend-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light, #e5e7eb);
    text-align: center;
}

.resend-section p {
    color: var(--text-muted, #6b7280);
    font-size: 14px;
    margin-bottom: 12px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--brand-primary, #417690);
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
}

.btn-link:hover {
    color: var(--brand-primary-dark, #356578);
}

/* =============================================================================
   MEMBER FAMILY EDIT PAGE STYLES
   ============================================================================= */

.member-header {
    background: var(--bg-light, #f9fafb);
    border-bottom: 1px solid var(--border-light, #e5e7eb);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-header .org-name {
    font-weight: 600;
    color: var(--text-primary, #111827);
}

.member-header .user-info {
    font-size: 14px;
    color: var(--text-muted, #6b7280);
}

.member-header .logout-link {
    margin-left: 16px;
    color: var(--text-muted, #6b7280);
    text-decoration: none;
}

.member-header .logout-link:hover {
    color: var(--brand-danger, #ef4444);
}

.member-page-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 24px;
}

.member-page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.member-page-subtitle {
    color: var(--text-muted, #6b7280);
    margin-bottom: 32px;
}

.member-form-card {
    background: white;
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 8px;
    padding: 24px;
}

.member-form-group {
    margin-bottom: 20px;
}

.member-form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary, #111827);
}

.member-form-input,
.member-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

.member-form-input:focus,
.member-form-textarea:focus {
    outline: none;
    border-color: var(--brand-primary, #417690);
    box-shadow: 0 0 0 3px rgba(65, 118, 144, 0.1);
}

.member-help-text {
    font-size: 13px;
    color: var(--text-muted, #6b7280);
    margin-top: 4px;
}

.current-photo {
    margin-bottom: 16px;
}

.current-photo img {
    max-width: 200px;
    border-radius: 8px;
    border: 1px solid var(--border-light, #e5e7eb);
}

.current-photo-label {
    font-size: 13px;
    color: var(--text-muted, #6b7280);
    margin-top: 8px;
}

.btn-submit {
    width: 100%;
    padding: 12px 24px;
    background: var(--brand-primary, #417690);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 16px;
}

.btn-submit:hover {
    background: var(--brand-primary-dark, #356578);
}

.pending-notice {
    background: var(--brand-warning-bg, #fffbeb);
    border: 1px solid var(--brand-warning-border, #fcd34d);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.pending-notice h4 {
    color: var(--brand-warning-text, #92400e);
    margin-bottom: 8px;
    margin-top: 0;
}

.pending-notice p {
    color: var(--brand-warning-text, #92400e);
    font-size: 14px;
    margin: 0;
}

.member-back-link {
    text-align: center;
    margin-top: 24px;
}

.member-back-link a {
    color: var(--text-muted, #6b7280);
    text-decoration: none;
}

.member-back-link a:hover {
    color: var(--brand-primary, #417690);
}

/* Message styles for member pages */
.member-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 6px;
}

.member-message.error-message {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.member-message.success-message {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.member-message.info-message {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
