/* =================================================================
   The AI Biographer - Professional Landing Page Styles
   =================================================================
   Replaces rainbow navigation and childish colors with a 
   professional, trustworthy design system
   ================================================================= */

/* =================================================================
   1. CSS Variables - Professional Color Palette
   ================================================================= */
:root {
  /* Primary Professional Colors */
  --navy-blue: #1e3a8a;
  --navy-blue-dark: #1e40af;
  --navy-blue-light: rgba(30, 58, 138, 0.1);
  
  --sage-green: #059669;
  --sage-green-dark: #047857;
  --sage-green-light: rgba(5, 150, 105, 0.1);
  
  --warm-gold: #d97706;
  --warm-gold-dark: #b45309;
  --warm-gold-light: rgba(217, 119, 6, 0.1);
  
  /* Neutrals */
  --charcoal: #374151;
  --charcoal-light: #6b7280;
  --light-gray: #f3f4f6;
  --white: #ffffff;
  --off-white: #fafafa;
  
  /* Text Colors */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  
  /* Shadows */
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-base: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* =================================================================
   2. Typography System - Simplified
   ================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Crimson+Text:wght@400;600&display=swap');

/* Base Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

/* Headings - Only 3 sizes needed */
h1, .hero-headline {
  font-family: 'Crimson Text', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

h2, .section-headline {
  font-family: 'Crimson Text', serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h3, .feature-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Body Text - Consistent sizing */
p, .body-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.0625rem; /* 17px */
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Small text for captions, labels */
.text-sm {
  font-size: 0.875rem; /* 14px */
}

/* Links and Buttons - Inherit font family */
a, button {
  font-family: inherit;
}

/* =================================================================
   3. Navigation Header - Clean Professional Design
   ================================================================= */
.landing-header {
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  box-shadow: var(--shadow-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

/* Logo - Keep Exactly the Same */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 40px;
  width: auto;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-blue);
  margin: 0;
}

/* Navigation Links - Clean Text-Based Design */
.landing-nav,
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.landing-nav a:not(.nav-cta):not(.nav-gift) {
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s ease;
  position: relative;
}

.landing-nav a:not(.nav-cta):not(.nav-gift):hover {
  color: var(--navy-blue);
}

.landing-nav a:not(.nav-cta):not(.nav-gift)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--navy-blue);
  transition: width 0.2s ease;
}

.landing-nav a:not(.nav-cta):not(.nav-gift):hover::after {
  width: 100%;
}

/* Remove Rainbow Button Colors */
.nav-gift {
  background: transparent !important;
  color: var(--charcoal) !important;
  padding: 0 !important;
  font-weight: 500 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-right: 0 !important;
}

.nav-gift:hover {
  color: var(--navy-blue) !important;
  background: transparent !important;
  transform: none !important;
}

/* Single Primary CTA Button */
.nav-cta {
  background: var(--navy-blue);
  color: var(--white) !important;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: none;
  border: 2px solid var(--navy-blue);
}

.nav-cta:hover {
  background: var(--navy-blue-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-base);
}

/* =================================================================
   4. Button System - Consistent Professional Styling
   ================================================================= */
.btn-primary,
.button-primary,
.button.button-primary {
  background: var(--navy-blue);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  box-shadow: var(--shadow-base);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover,
.button-primary:hover,
.button.button-primary:hover {
  background: var(--navy-blue-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-elevated);
}

.btn-secondary,
.button-secondary,
.button.button-secondary {
  background: var(--white);
  color: var(--navy-blue);
  border: 2px solid var(--navy-blue);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover,
.button-secondary:hover,
.button.button-secondary:hover {
  background: var(--navy-blue);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-base);
}

/* Large Buttons */
.button-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  min-height: 56px;
}

/* Gift Button Styling */
.button-gift {
  background: var(--white) !important;
  color: var(--sage-green) !important;
  border: 2px solid var(--sage-green) !important;
}

.button-gift:hover {
  background: var(--sage-green) !important;
  color: var(--white) !important;
}

/* =================================================================
   5. Hero Section - Professional Styling
   ================================================================= */
.hero-section,
.hero {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  /* Keep exact text: "Preserve Your Life Story Forever. No Writing Required" */
  font-family: 'Crimson Text', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.hero-image {
  border-radius: 1rem;
  box-shadow: var(--shadow-elevated);
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

/* Hero CTA Buttons */
.hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* =================================================================
   6. Gift Section - Professional Green with High Contrast
   ================================================================= */
.gift-section,
.gift-banner {
  background: var(--sage-green);
  padding: 3rem 2rem;
  color: var(--white);
}

.gift-banner h2,
.gift-section h2 {
  color: var(--white) !important;
  font-weight: 600;
}

.gift-banner p,
.gift-section p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.125rem;
}

.gift-features span {
  color: var(--white) !important;
  font-weight: 500;
  opacity: 1 !important;
}

.gift-section .button,
.gift-banner .gift-button {
  background: var(--white);
  color: var(--sage-green);
  border: 2px solid var(--white);
  font-weight: 600;
}

.gift-section .button:hover,
.gift-banner .gift-button:hover {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

/* =================================================================
   7. How It Works Section - Professional Styling
   ================================================================= */
.how-it-works,
.section {
  padding: 4rem 2rem;
}

.steps-grid,
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.step-number {
  background: var(--warm-gold);
  color: var(--white);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-base);
}

.step:hover .step-number {
  transform: scale(1.1);
  box-shadow: 0 0 0 6px var(--warm-gold-light);
}

.step-image {
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-base);
}

/* =================================================================
   8. Pricing Section - Professional Cards
   ================================================================= */
.pricing-section {
  padding: 4rem 2rem;
  background: var(--white);
}

.pricing-grid,
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  padding: 2rem;
  position: relative;
  transition: transform 0.2s ease;
  background: var(--white);
}

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

.pricing-card.featured {
  border-color: var(--warm-gold);
  transform: scale(1.05);
}

.pricing-card.featured::before {
  content: "Most Popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--warm-gold);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.pricing-card .button {
  width: 100%;
  margin-top: 1.5rem;
}

/* =================================================================
   9. Testimonials Section - Professional Cards
   ================================================================= */
.testimonials {
  padding: 4rem 2rem;
  background: #f8fafc;
}

.testimonial-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-base);
  transition: transform 0.2s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

.testimonial-card.featured {
  border: 2px solid var(--warm-gold);
}

.stars,
.testimonial-rating {
  color: var(--warm-gold);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99997;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Menu Fix - Hidden by default, shown when active */
@media (max-width: 768px) {
  .mobile-nav {
    display: block;
    position: fixed !important;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    z-index: 99999 !important; /* Very high z-index to ensure it's above everything */
    transition: all 0.3s ease-out;
  }

  .mobile-nav.active {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }
  
  /* Ensure nav links are clickable */
  .mobile-nav a {
    position: relative;
    z-index: 100000;
  }
}

/* Desktop - ensure menu is never shown */
@media (min-width: 769px) {
  .mobile-nav {
    display: none !important;
  }
}

/* =================================================================
   10. Mobile Responsiveness
   ================================================================= */
@media (max-width: 768px) {
  /* Fix header positioning */
  .landing-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99998; /* Just below mobile nav */
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  
  /* Add padding to body to account for fixed header */
  body {
    padding-top: 60px;
  }
  
  /* Navigation */
  .header-content {
    padding: 1rem;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .landing-nav {
    display: none;
  }
  
  /* Mobile menu button - ensure visibility */
  .mobile-menu-btn {
    display: flex !important;
    position: relative;
    width: 32px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
  }
  
  .mobile-menu-btn span {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--navy-blue);
    border-radius: 2px;
    transition: all 0.3s ease;
    left: 0;
  }
  
  .mobile-menu-btn span:first-child {
    top: 0;
  }
  
  .mobile-menu-btn span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
  }
  
  .mobile-menu-btn span:last-child {
    bottom: 0;
  }
  
  .mobile-menu-btn.active span:first-child {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }
  
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-btn.active span:last-child {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
  }
  
  /* Hero Section */
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-cta .button {
    width: 100%;
    max-width: 280px;
  }
  
  /* Features Grid */
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  /* Pricing Grid */
  .pricing-grid,
  .pricing-cards {
    grid-template-columns: 1fr;
  }
  
  .pricing-card.featured {
    transform: none;
  }
  
  /* Typography Scaling */
  .hero-headline {
    font-size: 2.5rem;
  }
  
  .section-headline {
    font-size: 2rem;
  }
  
  /* Button Sizing */
  .btn-primary,
  .btn-secondary {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  /* Touch Targets */
  .nav-links a {
    padding: 1rem;
    display: block;
  }
  
  
  .mobile-nav a {
    display: block;
    color: var(--charcoal);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
  }
  
  .mobile-nav a:hover {
    background: var(--light-gray);
  }
  
  /* Ensure header stays on top */
  .landing-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--white);
  }
}

/* Sample Biography Section - Mobile Layout */
@media (max-width: 768px) {
  .sample-preview .sample-book {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  
  .sample-preview .sample-cover {
    width: 200px;
    height: auto;
    margin: 0 auto;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-elevated);
  }
  
  .sample-preview .sample-content {
    width: 100%;
    padding: 0 1rem;
  }
  
  .sample-preview .sample-content h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.5rem;
    color: var(--navy-blue);
    margin-bottom: 1rem;
  }
  
  .sample-preview .sample-text {
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
  }
}

/* Footer Social Icons - Center on Mobile */
@media (max-width: 768px) {
  .footer-section {
    text-align: center;
  }
  
  .social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
  }
  
  .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--navy-blue-light);
    border-radius: 50%;
    transition: all 0.3s ease;
  }
  
  .social-link:hover {
    background: var(--navy-blue);
    transform: translateY(-2px);
  }
  
  .social-link svg {
    width: 24px;
    height: 24px;
    fill: var(--navy-blue);
  }
  
  .social-link:hover svg {
    fill: white;
  }
}

/* CTA Section - Fix contrast issues */
.cta-section {
  background: var(--navy-blue) !important;
  color: var(--white) !important;
  padding: 4rem 2rem;
  text-align: center;
}

.cta-section h2 {
  color: var(--white) !important;
  font-family: 'Crimson Text', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.25rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  opacity: 1 !important;
}

.cta-section .button {
  background: var(--white) !important;
  color: var(--navy-blue) !important;
  border: 2px solid var(--white) !important;
  font-weight: 600;
  padding: 1rem 2rem;
}

.cta-section .button:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* =================================================================
   11. Trust Indicators and Feature Items
   ================================================================= */
.trust-indicators {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.trust-indicators span::before {
  content: "✓ ";
  color: var(--sage-green);
  font-weight: 600;
  margin-right: 0.25rem;
}

.hero-feature-item {
  background: var(--navy-blue-light);
  color: var(--navy-blue);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  border: 1px solid var(--navy-blue);
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
}

/* Pricing Features List */
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
  padding-left: 1.5rem;
}

.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sage-green);
  font-weight: 600;
}

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

/* Gift Features */
.gift-features {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 1rem;
}

.gift-features span::before {
  content: "✓ ";
  font-weight: 600;
  margin-right: 0.25rem;
}

/* Gift Icon Styling */
.nav-gift svg,
.button svg,
.mobile-nav a svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.nav-gift:hover svg,
.button:hover svg,
.mobile-nav a:hover svg {
  transform: translateY(-1px);
}

/* Ensure gift icons are properly sized on mobile */
@media (max-width: 768px) {
  .button svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
  }
}

/* =================================================================
   12. Override Existing Rainbow Styles
   ================================================================= */
/* Remove all rainbow navigation colors */
.landing-nav a[href*="how"] { background: none !important; color: var(--charcoal) !important; }
.landing-nav a[href*="features"] { background: none !important; color: var(--charcoal) !important; }
.landing-nav a[href*="pricing"] { background: none !important; color: var(--charcoal) !important; }
.landing-nav a[href*="blog"] { background: none !important; color: var(--charcoal) !important; }

/* Override existing button backgrounds */
.button:not(.button-primary):not(.button-secondary):not(.button-gift) {
  background: var(--navy-blue) !important;
  color: var(--white) !important;
  border: none !important;
}

/* Clean up section colors */
.section-alt {
  background: #f8fafc;
}

/* Override bright green buttons */
.button[style*="#4CAF50"],
.button[style*="4CAF50"],
[style*="background: #4CAF50"],
[style*="background:#4CAF50"] {
  background: var(--sage-green) !important;
}

.button[style*="#45a049"],
[style*="background: #45a049"],
[style*="background:#45a049"] {
  background: var(--sage-green-dark) !important;
}

/* Fix any colored badges or accents */
.badge {
  background: var(--warm-gold);
  color: var(--white);
}

/* Ensure consistent shadow system */
.card,
.feature-card,
.testimonial-card,
.pricing-card {
  box-shadow: var(--shadow-base);
}

.card:hover,
.feature-card:hover,
.testimonial-card:hover,
.pricing-card:hover {
  box-shadow: var(--shadow-elevated);
}