/**
 * Marketing Base CSS
 * Shared styles for all public marketing pages
 * Works with brand-theme.js CSS variables
 */

/* CSS Variables - Defaults (overridden by brand-theme.js) */
:root {
  --brand-primary: #1E3A5F;
  --brand-primary-light: #2a4a73;
  --brand-primary-dark: #162d4a;
  --brand-accent: #F4A261;
  --brand-accent-alt: #E9C46A;
  --brand-gradient: linear-gradient(135deg, #F4A261 0%, #E9C46A 100%);
  --brand-gradient-hero: linear-gradient(135deg, #1E3A5F 0%, #2a4a73 40%, #3d5a80 100%);
  --brand-background: #FAF8F5;
  --brand-text: #1F2937;
  --brand-text-muted: #6B7280;
  --brand-focus-ring: rgba(244, 162, 97, 0.3);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--brand-background);
  color: var(--brand-text);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--brand-primary);
  line-height: 1.3;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Shared Header Styles */
.site-header {
  background-color: var(--brand-primary);
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}

.site-header .logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.site-header .logo-emoji {
  font-size: 1.5rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-header nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.site-header nav a:hover {
  color: white;
  text-decoration: none;
}

.site-header .btn-cta {
  background: var(--brand-gradient);
  color: var(--brand-primary);
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.site-header .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

/* Mobile Header */
@media (max-width: 768px) {
  .site-header nav {
    gap: 1rem;
  }
  .site-header nav .nav-link {
    display: none;
  }
}

/* Shared Footer Styles */
.site-footer {
  background-color: var(--brand-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 1.5rem 2rem;
  margin-top: auto;
}

.site-footer .container {
  max-width: 1280px;
  margin: 0 auto;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .site-footer .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

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

.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.site-footer .footer-brand .emoji {
  font-size: 1.5rem;
}

.site-footer .footer-tagline {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.site-footer h4 {
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul li {
  margin-bottom: 0.5rem;
}

.site-footer ul a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.site-footer ul a:hover {
  color: white;
  text-decoration: none;
}

.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

/* Page Content Container */
.page-content {
  min-height: calc(100vh - 200px);
}

.page-content .container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Hero Section */
.page-hero {
  background: var(--brand-gradient-hero);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
}

.page-hero h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Prose Content */
.prose {
  max-width: 65ch;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.prose h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
  color: var(--brand-text);
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: var(--brand-gradient);
  color: var(--brand-primary);
  padding: 0.875rem 1.75rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

/* Cards */
.card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Utility Classes */
.text-muted {
  color: var(--brand-text-muted);
}

.text-accent {
  color: var(--brand-accent);
}

.bg-white {
  background-color: white;
}

.text-center {
  text-align: center;
}

.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

/* =============================================
   PHASE 5: Enhanced Mobile Styles
   ============================================= */

/* Mobile Navigation Enhancement */
@media (max-width: 768px) {
    .site-header .container {
        padding: 0.75rem 1rem;
    }
    
    .site-header .logo {
        font-size: 1.1rem;
    }
    
    .site-header .logo-emoji {
        font-size: 1.25rem;
    }
    
    /* Mobile menu toggle */
    .mobile-menu-btn {
        display: flex !important;
        padding: 0.5rem;
        background: none;
        border: none;
        cursor: pointer;
    }
    
    .mobile-menu-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* Hero Section Mobile */
@media (max-width: 768px) {
    .page-hero {
        padding: 2.5rem 1rem;
    }
    
    .page-hero h1 {
        font-size: 1.75rem;
    }
    
    .page-hero p {
        font-size: 1rem;
    }
}

/* Content Container Mobile */
@media (max-width: 768px) {
    .page-content .container {
        padding: 2rem 1rem;
    }
}

/* Pricing Cards Mobile */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .plan-card {
        padding: 1.5rem;
    }
    
    .plan-card.featured {
        transform: none;
    }
}

/* Prose Mobile */
@media (max-width: 768px) {
    .prose h2 {
        font-size: 1.25rem;
    }
    
    .prose h3 {
        font-size: 1.1rem;
    }
}

/* Footer Mobile */
@media (max-width: 768px) {
    .site-footer {
        padding: 2.5rem 1rem 1.5rem;
    }
    
    .site-footer .footer-grid {
        gap: 1.5rem;
    }
}

/* Buttons Mobile */
@media (max-width: 768px) {
    .btn-primary, .btn-checkout, .btn-outline {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
}

/* Forms Mobile */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important; /* Prevent iOS zoom */
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}

/* FAQ Mobile */
@media (max-width: 768px) {
    .faq-item {
        padding: 1rem;
    }
    
    .faq-question {
        font-size: 0.95rem;
    }
}

/* Touch Targets */
@media (pointer: coarse) {
    a, button, .btn-primary, .btn-outline, .btn-checkout {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Prevent Horizontal Scroll */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    pre, code {
        white-space: pre-wrap;
        word-wrap: break-word;
        max-width: 100%;
        overflow-x: auto;
    }
}
