/* ============================================
   PREMIUM CLINICAL PEARL DESIGN SYSTEM
   Applies globally across the Epiqora Platform
   ============================================ */

:root {
  /* Pristine Clinical Palette */
  --color-bg-base: #F8FAFC;       
  --color-surface: #FFFFFF;       
  --color-bg-secondary: #F1F5F9;
  --color-bg-tertiary: #E2E8F0;
  
  /* Typography Colors */
  --color-text-primary: #1E293B;  
  --color-text-secondary: #64748B;
  --color-text-tertiary: #94A3B8;
  
  /* Brand Accents & Tech Colors */
  --color-brand-cyan: #06B6D4;    
  --color-brand-cyan-glow: rgba(6, 182, 212, 0.4);
  --color-brand-blue: #3B82F6;    
  --color-brand-blue-dark: #1D4ED8;
  
  /* Core Mappings for Global App Support */
  --color-primary: #1E293B; 
  --color-primary-light: #3B82F6; 
  --color-primary-dark: #0F172A;
  --color-primary-glow: rgba(59, 130, 246, 0.2);
  
  /* Luxury Gold */
  --color-accent: #D4AF37;   
  --color-accent-light: #FDE68A;
  --color-accent-dark: #B48E25;
  --color-accent-gold: #D4AF37;   
  --color-accent-gold-dark: #B48E25;
  
  /* Semantic Status Colors */
  --color-success: #10B981;
  --color-success-light: #D1FAE5;
  --color-error: #EF4444;
  --color-error-light: #FEE2E2;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-info: #0EA5E9;
  --color-info-light: #E0F2FE;

  /* Borders & Depth */
  --color-border: #E2E8F0;
  --color-border-soft: rgba(30, 41, 59, 0.08);
  --color-border-hard: #CBD5E1;
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-float: 0 20px 40px -10px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);

  /* Fonts */
  --font-display: 'Playfair Display', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-cursive: 'Caveat', cursive;
  --font-mono: 'Space Mono', monospace;

  /* Metrics & Scales */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;
  
  --transition-fast: 150ms ease;
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Z-Index Layers */
  --z-header: 100;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-toast: 1100;
}

/* ============================================
   GLOBAL RESETS & TYPOGRAPHY
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background-color: var(--color-bg-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

.bg-ambient {
  position: fixed; 
  inset: 0; 
  z-index: -1;
  background: 
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
    var(--color-bg-base);
}

/* Global Typography Classes */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--color-brand-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-brand-blue-dark);
}

.text-cursive-gold {
  font-family: var(--font-cursive);
  background: linear-gradient(135deg, var(--color-accent-gold), var(--color-accent-gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Highly Specific Tagline Styling */
.brand-tagline {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: 0.3px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.tagline-accent {
  font-family: var(--font-cursive);
  font-size: 1.4em;
  background: linear-gradient(135deg, var(--color-accent-gold), var(--color-accent-gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-left: 0;
  display: block;
}

/* ============================================
   GLOBAL BUTTONS
   ============================================ */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--color-text-primary);
  color: var(--color-surface);
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.cta-button:hover {
  background: #0F172A;
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}

.cta-button.btn-large {
  padding: 20px 48px;
  font-size: 1.2rem;
}

.cta-button i {
  transition: transform var(--transition-fast);
}

.cta-button:hover i {
  transform: translateX(4px);
}

.button-primary {
  padding: 12px 24px;
  background: var(--color-text-primary);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--color-primary-dark);
}

.button-primary:disabled {
  background: var(--color-border);
  color: var(--color-text-tertiary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button-secondary {
  padding: 12px 24px;
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  border: 2px solid var(--color-border-hard);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button-secondary:hover {
  border-color: var(--color-text-primary);
  background-color: var(--color-bg-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   HEADER & MOBILE NAVIGATION
   ============================================ */
/* --- Base Header (Transparent at the top) --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-header, 1000);
  background: transparent;
  border: 1px solid transparent;
  padding: 24px 0;
  transition: all 1.5s cubic-bezier(0.2, 0.7, 0.2, 0.8);
}

/* --- Scrolled State (Floating Glass Pill) --- */
.header.scrolled {
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 60px);
  max-width: 1200px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(30, 41, 59, 0.08);
  border-radius: 60px;
  padding: 14px 36px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Prevent container padding from squishing the pill */
.header.scrolled .container {
  padding: 0;
  width: 100%;
}

/* --- Your Existing Styles --- */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text-primary);
  z-index: 102; /* Stay above mobile menu */
}

.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--color-surface), #F1F5F9);
  color: var(--color-brand-blue);
  border: 1px solid var(--color-border-soft);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; box-shadow: var(--shadow-soft);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
}

/* Desktop Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Mobile: Hide nav by default */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .nav.is-open {
    display: flex;
  }
}

.nav-link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  position: relative;
  padding: 4px 0;
  text-decoration: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--color-brand-blue);
  transition: width var(--transition-smooth);
}

.nav-link:hover {
  color: var(--color-text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile Nav Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 1002;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: var(--color-bg-secondary);
}

/* Animated Hamburger Icon */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  position: relative;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  transform-origin: center;
}

/* Hamburger to X animation */
.mobile-menu-toggle.is-active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Overlay */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.mobile-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}
/* ============================================
   LANDING: HERO SECTION
   ============================================ */
.hero {
  padding: 140px 0 80px;
  position: relative;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-right: 0;
}

.hero-title {
  font-size: 3.8rem;
  line-height: 1.1;
  color: var(--color-text-primary);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 480px;
  line-height: 1.7;
}

.hero-features {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.check-circle {
  width: 24px; height: 24px;
  background: var(--color-success-light);
  color: var(--color-success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
}

/* Hero Visual (HUD Scanner styling matching Upload page) */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-left: 0;
}

.hero-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4/5;
  background: #0F172A;
  border-radius: var(--radius-lg);
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-float);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

.face-illustration {
  font-size: 180px;
  color: rgba(255,255,255,0.05);
}

.tech-grid {
  position: absolute; inset: 10%;
  background-image: 
    linear-gradient(rgba(6, 182, 212, 0.2) 1px, transparent 1px), 
    linear-gradient(90deg, rgba(6, 182, 212, 0.2) 1px, transparent 1px);
  background-size: 30px 30px;
}

.hud-brackets, .hud-brackets-inner {
  position: absolute; inset: 10%; pointer-events: none;
}

.hud-brackets::before, .hud-brackets::after,
.hud-brackets-inner::before, .hud-brackets-inner::after {
  content: ''; position: absolute; width: 50px; height: 50px;
  border-color: var(--color-brand-cyan); border-style: solid;
}
.hud-brackets::before { top: 0; left: 0; border-width: 4px 0 0 4px; }
.hud-brackets::after { bottom: 0; right: 0; border-width: 0 4px 4px 0; }
.hud-brackets-inner::before { top: 0; right: 0; border-width: 4px 4px 0 0; }
.hud-brackets-inner::after { bottom: 0; left: 0; border-width: 0 0 4px 4px; }

.hero-laser {
  position: absolute; left: 10%; right: 10%; height: 3px;
  background: var(--color-brand-cyan);
  box-shadow: 0 0 20px var(--color-brand-cyan);
  animation: sweep 3s linear infinite;
}
.hero-laser::after {
  content: ''; position: absolute; bottom: 100%; left: 0; right: 0; height: 150px;
  background: linear-gradient(to top, rgba(6, 182, 212, 0.4), transparent);
}

@keyframes sweep { 0% { top: 10%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 90%; opacity: 0; } }

.floating-badge {
  position: absolute;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  font-size: 0.95rem; font-weight: 600;
  color: var(--color-text-primary);
  animation: float 4s ease-in-out infinite;
  z-index: 10;
}
.floating-badge i { color: var(--color-brand-blue); }

.badge-1 { top: 15%; left: -5%; animation-delay: 0s; }
.badge-2 { top: 45%; right: -5%; animation-delay: 1.5s; }
.badge-3 { bottom: 20%; left: -5%; animation-delay: 3s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* ============================================
   LANDING: FEATURES SECTION
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features {
  padding: 100px 0;
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--color-bg-base);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  text-align: center;
  transition: var(--transition-smooth);
}

.feature-card:hover {
  background: var(--color-surface);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: var(--color-brand-blue);
}

.feature-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  background: var(--color-surface);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-brand-blue);
  font-size: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon {
  background: var(--color-brand-blue);
  color: var(--color-surface);
  transform: scale(1.1);
}

.feature-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.feature-description {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ============================================
   LANDING: HOW IT WORKS
   ============================================ */
.how-it-works {
  padding: 100px 0;
  background: var(--color-bg-base);
}

.steps {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step-number {
  width: 32px; height: 32px;
  background: var(--color-brand-blue);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  margin: 0 auto 16px;
  box-shadow: 0 4px 10px rgba(59,130,246,0.3);
}

.step-icon {
  font-size: 2.5rem;
  color: var(--color-text-primary);
  margin-bottom: 16px;
}

.step-title {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.step-description {
  font-size: 0.95rem;
}

.step-connector {
  display: flex;
  align-items: center;
  height: 100px;
  color: var(--color-text-tertiary);
  font-size: 1.5rem;
}

/* ============================================
   LANDING: TRUST & COMMITMENT SECTION
   ============================================ */
.trust-section {
  padding: 100px 0;
  background: white;
}

.trust-content {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.trust-text {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.trust-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.trust-card {
  padding: 40px 32px;
  background: var(--color-bg-base);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  text-align: center;
  transition: var(--transition-smooth);
}

.trust-card:hover {
  border-color: var(--color-brand-cyan);
  box-shadow: var(--shadow-card);
  transform: translateY(-5px);
}

.trust-icon {
  font-size: 2.8rem;
  color: var(--color-brand-blue);
  margin-bottom: 24px;
}

.trust-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.trust-description {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.trust-disclaimer {
  text-align: center;
  max-width: 900px;
  margin: 24px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.trust-disclaimer p {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
  margin: 0;
}

/* ============================================
   LANDING: CTA SECTION
   ============================================ */
.cta-section {
  padding: 100px 0;
  background: var(--color-bg-base);
}

.cta-card {
  background: var(--color-text-primary);
  border-radius: var(--radius-xl);
  padding: 80px 40px;
  text-align: center;
  color: white;
  box-shadow: var(--shadow-float);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.1), transparent 70%);
  pointer-events: none;
}

.cta-title {
  color: white;
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.cta-subtitle {
  color: rgba(255,255,255,0.8);
  font-size: 1.2rem;
  margin-bottom: 40px;
}

.cta-section .cta-button {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.cta-section .cta-button:hover {
  background: var(--color-brand-cyan);
  color: white;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-surface);
  padding: 80px 0 24px;
  border-top: 1px solid var(--color-border-hard);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}

.footer-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700; color: var(--color-text-primary);
  margin-bottom: 12px;
}

.footer-tagline {
  font-family: var(--font-cursive);
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--color-accent-gold), var(--color-accent-gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.footer-description {
  color: var(--color-text-secondary);
  max-width: 300px;
}

.footer-title {
  font-size: 1.1rem; margin-bottom: 24px;
}

.footer-links {
  list-style: none;
  display: flex; flex-direction: column; gap: 12px;
}

.footer-links a {
  color: var(--color-text-secondary);
  font-weight: 500;
}
.footer-links a:hover {
  color: var(--color-brand-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--color-border-soft);
  color: var(--color-text-tertiary);
  font-size: 0.9rem;
}

/* ============================================
   ANIMATION UTILITIES
   ============================================ */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   CORE APPLICATION STYLES (Modals, Reports, Chat)
   Preserved perfectly for app functionality
   ============================================ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn var(--transition-base);
}

.modal.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-2xl);
  animation: slideUp var(--transition-base);
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: var(--color-bg-tertiary);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  background-color: var(--color-error-light);
  color: var(--color-error);
  transform: rotate(90deg);
}

/* Base App Containers */
.analysis-container, 
.report-container, 
.questions-container { 
  padding: 48px 32px; 
}

/* Progress and Status UI */
.analysis-progress {
  display: flex; justify-content: center; align-items: center;
  margin-bottom: 48px; position: relative; gap: 16px;
}

.progress-step {
  display: flex; flex-direction: column; align-items: center;
  position: relative; opacity: 0.3; transition: all var(--transition-base);
}

.progress-step.active { opacity: 1; }

.progress-icon {
  width: 60px; height: 60px;
  background: var(--color-surface); color: var(--color-text-tertiary);
  border: 2px solid var(--color-border-hard);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 12px; transition: all var(--transition-base);
}

.progress-step.active .progress-icon {
  background: var(--color-brand-blue); color: white; 
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  animation: pulse 1.5s ease-in-out infinite;
}

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

.progress-text {
  font-size: 0.85rem; font-weight: 600; text-align: center;
}

.progress-line {
  position: absolute; top: 30px; left: 100%; width: 100px;
  height: 3px; background-color: var(--color-border);
}

.progress-step:last-child .progress-line { display: none; }

.progress-step.active .progress-line {
  background: linear-gradient(90deg, var(--color-brand-blue) 0%, var(--color-border) 100%);
}

/* Loading & Results States */
.analysis-loading, .questions-loading, .report-loading {
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 24px;
}

.analysis-results, .questions-display, .report-content {
  display: none;
}

.analysis-results.active, .questions-display.active, .report-content.active {
  display: block;
}

/* Score Cards */
.overall-score-card, .report-score-card {
  background: linear-gradient(135deg, var(--color-text-primary) 0%, #0F172A 100%);
  border-radius: var(--radius-xl); padding: 40px; color: white;
  margin-bottom: 40px; display: flex; align-items: center; gap: 32px;
  box-shadow: var(--shadow-xl); position: relative; overflow: hidden;
}

.score-number { color: var(--color-surface); font-family: var(--font-display); font-size: 4.5rem; font-weight: 800; line-height: 1;}
.score-ring-fill { stroke: var(--color-brand-cyan); }
.score-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; opacity: 0.9; }

/* Content Cards */
.result-card, .question-card, .routine-step {
  background: var(--color-bg-base);
  border: 1px solid var(--color-border-hard);
  border-radius: var(--radius-lg);
  padding: 24px; margin-bottom: 24px;
}

.routine-step { border-left: 4px solid var(--color-brand-blue); transition: transform 0.3s ease;}
.routine-step:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }

/* Chat Module Styles */
.chat-modal-content {
  max-width: 750px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
}

.chat-container { display: flex; flex-direction: column; height: 100%; }

.chat-header {
  padding: 24px 32px; background: var(--color-text-primary); color: white;
  display: flex; align-items: center; gap: 16px;
}

.chat-messages {
  flex: 1; overflow-y: auto; padding: 24px 32px;
  display: flex; flex-direction: column; gap: 16px;
  background-color: var(--color-bg-base);
}

.chat-message {
  display: flex; gap: 12px; max-width: 85%;
  animation: slideIn var(--transition-base);
}

.user-message { align-self: flex-end; flex-direction: row-reverse; }
.assistant-message { align-self: flex-start; }

.user-message .message-content {
  background: var(--color-brand-blue); color: white; border: none;
}
.assistant-message .message-content {
  background: white; border: 1px solid var(--color-border-hard);
}

.message-content {
  padding: 16px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}

.chat-input-area {
  padding: 20px 32px; border-top: 1px solid var(--color-border);
  background-color: white; display: flex; gap: 12px;
}

.chat-input {
  flex: 1; padding: 16px; border: 2px solid var(--color-border);
  border-radius: var(--radius-lg); font-size: 1rem; font-family: var(--font-body);
}

.chat-send-button {
  width: 50px; height: 50px; background: var(--color-text-primary);
  color: white; border: none; border-radius: var(--radius-lg);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.chat-send-button:hover:not(:disabled) { background: var(--color-brand-blue); }

/* Custom Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--color-border-hard); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-tertiary); }

/* ============================================
   RESPONSIVE LAYOUTS
   ============================================ */

@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .hero { min-height: auto; padding: 140px 0 80px; }
  .hero .container { grid-template-columns: 1fr; text-align: center; gap: 50px; }
  .hero-content { align-items: center; padding-right: 0; }
  .hero-features { justify-content: center; }
  .hero-visual { order: -1; margin-bottom: 20px; justify-content: center; padding-left: 0; }
  .hero-card { max-width: 360px; }
  .hero-title { font-size: 3.2rem; }
  .trust-content { align-items: center; }
  
  /* Features - 2 columns on tablet */
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .header { padding: 16px 0; }
  .header.scrolled { 
    width: calc(100% - 32px); 
    padding: 12px 20px;
    border-radius: 40px;
  }
  
  /* Mobile Menu Toggle */
  .mobile-menu-toggle { 
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
  }
  
  .mobile-menu-toggle:hover {
    background: var(--color-bg-secondary);
  }
  
  /* Mobile Nav Menu - Full Screen Overlay */
  .nav.is-open {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    gap: 48px;
    z-index: 1001;
  }
  
  .nav.is-open .nav-link { 
    font-size: 2rem; 
    font-weight: 600;
    color: var(--color-text-primary);
  }
  
  .nav.is-open .nav-link::after { display: none; }
  
  /* Feature Grid */
  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .feature-card { padding: 24px 16px; }
  .feature-icon { width: 48px; height: 48px; font-size: 1.2rem; margin-bottom: 12px; }
  .feature-title { font-size: 1.05rem; }
  .feature-description { font-size: 0.85rem; }
  
  .brand-tagline { font-size: 1.5rem; }
  .hero-title { font-size: 2.8rem; }
  .hero-subtitle { font-size: 1rem; }
  .section-title { font-size: 2rem; }
  
  .steps { flex-direction: column; align-items: center; gap: 32px; }
  .step-connector { transform: rotate(90deg); height: 32px; }
  
  .footer-content { grid-template-columns: 1fr; text-align: center; gap: 40px;}
  .footer-logo { justify-content: center; }
  .footer-description { margin: 0 auto; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero { padding: 120px 0 50px; min-height: auto; }
  .brand-tagline { font-size: 1.3rem; }
  .hero-title { font-size: 2.2rem; }
  .hero-card { max-width: 280px; aspect-ratio: 4/5; }
  .floating-badge { padding: 8px 14px; font-size: 0.8rem; }
  .hero-subtitle { font-size: 0.95rem; }
  
  .cta-title { font-size: 2rem; }
  .cta-card { padding: 40px 20px; }
  
  .section-title { font-size: 1.8rem; }
  
  /* Single column on small phones */
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 24px 20px; }
}
