/* EconoClub USA - Main CSS File */

/* ========================================
   DESIGN SYSTEM — CSS CUSTOM PROPERTIES
   ======================================== */
:root {
  /* Primary Navy Scale */
  --primary-800: #0f2557;
  --primary-700: #162d6b;
  --primary-600: #1e3a8a;
  --primary-500: #2851b0;
  --primary-400: #4776d0;
  --primary-100: #e8edfb;

  /* Accent Amber */
  --accent-500: #f5a623;
  --accent-600: #d4901e;
  --accent-100: #fef5e4;

  /* Semantic */
  --success-500: #16a34a;

  /* Text */
  --text-900: #111827;
  --text-700: #374151;
  --text-500: #6b7280;

  /* Surface */
  --surface-50: #f9fafb;
  --surface-100: #f3f4f6;
  --surface-200: #e5e7eb;

  /* Backward-Compatible Aliases */
  --primary-blue: var(--primary-600);
  --secondary-blue: var(--primary-400);
  --accent-yellow: var(--accent-500);
  --success-green: var(--success-500);
  --text-dark: var(--text-900);
  --text-light: var(--text-500);
  --white: #ffffff;
  --light-gray: var(--surface-50);

  /* Bootstrap Overrides */
  --bs-primary: var(--primary-600);
  --bs-secondary: var(--primary-400);
  --bs-warning: var(--accent-500);
  --bs-success: var(--success-500);
  --bs-light: var(--surface-50);

  /* Spacing Scale (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --section-py: var(--space-16);
  --section-py-lg: var(--space-24);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.06), 0 4px 6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.08), 0 8px 10px rgba(0,0,0,0.04);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --heading-display: clamp(2.25rem, 3vw + 1rem, 3.5rem);
  --heading-1: clamp(2rem, 2vw + 1rem, 3rem);
  --heading-2: clamp(1.75rem, 1.5vw + 1rem, 2.25rem);
  --heading-3: clamp(1.5rem, 1vw + 1rem, 1.75rem);
  --heading-4: clamp(1.25rem, 0.75vw + 1rem, 1.5rem);

  /* Animation Tokens */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* ========================================
   BASE STYLES
   ======================================== */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-700);
  background-color: var(--white);
  margin: 0;
  padding: 0;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: inherit;
}

/* Default heading color on light backgrounds */
body, .bg-light, .bg-white {
  color: var(--text-700);
}

body h1, body h2, body h3, body h4, body h5, body h6 {
  color: var(--text-900);
}

/* Headings inside colored sections inherit parent color */
.text-white h1, .text-white h2, .text-white h3,
.text-white h4, .text-white h5, .text-white h6,
.hero-section h1, .hero-section h2, .hero-section h3,
.hero-section h4, .hero-section h5, .hero-section h6,
.cta-section h1, .cta-section h2, .cta-section h3,
.cta-section h4, .cta-section h5, .cta-section h6,
.bg-primary h1, .bg-primary h2, .bg-primary h3,
.bg-primary h4, .bg-primary h5, .bg-primary h6 {
  color: inherit;
}

h1 { font-size: var(--heading-1); font-weight: 700; }
h2 { font-size: var(--heading-2); }
h3 { font-size: var(--heading-3); }
h4 { font-size: var(--heading-4); }

p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-500);
}

.display-4 {
  font-size: var(--heading-display);
}

/* ========================================
   SECTION STYLES
   ======================================== */
.section-title {
  font-size: var(--heading-2);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-header--accent {
  position: relative;
  padding-top: var(--space-8);
}

.section-header--accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent-500);
  border-radius: 2px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  font-family: var(--font-primary);
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  transition: all var(--duration-normal) var(--ease-default);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
}

.btn-primary:hover {
  background-color: var(--primary-500);
  border-color: var(--primary-500);
}

.btn-warning {
  background-color: var(--accent-500);
  border-color: var(--accent-500);
  color: var(--text-900);
  font-weight: 600;
}

.btn-warning:hover {
  background-color: var(--accent-600);
  border-color: var(--accent-600);
  color: var(--text-900);
}

/* ========================================
   CARDS
   ======================================== */
.card {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-default),
              box-shadow var(--duration-normal) var(--ease-default);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   STEP CARDS
   ======================================== */
.step-card {
  padding: var(--space-8) var(--space-4);
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto var(--space-4) auto;
}

/* Step indicators with connecting lines */
.step-indicator {
  position: relative;
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.step-indicator::after {
  content: '';
  position: absolute;
  top: 60px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--surface-200);
  z-index: 0;
}

.step-indicator:last-child::after {
  display: none;
}

.step-indicator .step-number {
  position: relative;
  z-index: 1;
}

/* ========================================
   HERO SECTION BASE
   ======================================== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  min-height: 500px;
  padding: var(--section-py-lg) 0;
  position: relative;
  overflow: hidden;
}

.hero-section--centered {
  min-height: auto;
  padding: var(--section-py) 0;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-cta .btn {
  font-size: 1.1rem;
  padding: 15px 30px;
}

/* Wave divider at hero bottom */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 1;
}

.hero-section--centered::after {
  display: none;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  padding: var(--section-py) 0;
}

/* ========================================
   STAT NUMBER
   ======================================== */
.stat-number {
  font-size: var(--heading-1);
  font-weight: 700;
  color: var(--primary-600);
  margin-bottom: var(--space-2);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll reveal */
section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero section should always be visible */
.hero-section {
  opacity: 1;
  transform: none;
}

/* Landing page sections handle their own visibility */
.lp-b2c section {
  opacity: 1;
  transform: none;
}

/* Navbar scroll effect */
.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .hero-section {
    padding: var(--space-16) 0;
    text-align: center;
  }

  .hero-cta .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }

  .step-card {
    margin-bottom: var(--space-8);
  }

  .step-indicator::after {
    display: none;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: var(--space-12) 0;
  }

  .section-title {
    font-size: var(--heading-3);
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  section {
    opacity: 1;
    transform: none;
  }
}
