/* ===================================================================
   FANATIC CODERS - LUXURY PROPOSAL STYLESHEET
   Earth-shattering design system for professional proposals
   =================================================================== */

/* 1. CSS VARIABLES & DESIGN TOKENS */
:root {
  /* Primary Brand Colors */
  --primary-color: #1a365d;
  --primary-light: #2c5282;
  --primary-dark: #0f2745;
  --secondary-color: #d4af37;
  --secondary-light: #f0d875;
  --secondary-dark: #b8941f;

  /* Accent Colors */
  --accent-gold: #d4af37;
  --accent-blue: #4a90e2;
  --accent-green: #48bb78;
  --accent-orange: #ed8936;
  --accent-red: #f56565;

  /* Neutral Palette */
  --white: #ffffff;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --gray-900: #171923;
  --black: #000000;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-luxury: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #d4af37 100%);
  --gradient-gold: linear-gradient(135deg, #f0d875 0%, #d4af37 50%, #b8941f 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Poppins', 'Inter', sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  --text-6xl: 3.75rem;   /* 60px */

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;

  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-fixed: 1200;
  --z-modal: 1300;
  --z-popover: 1400;
  --z-tooltip: 1500;
}

/* 2. CSS RESET & BASE STYLES */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--gray-800);
  background-color: var(--gray-100);
  overflow-x: hidden;
}

/* 3. TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--primary-color);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  margin-bottom: var(--space-2xl);
}

h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--space-md);
  color: var(--gray-700);
}

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

a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

strong, b {
  font-weight: var(--font-semibold);
  color: var(--gray-900);
}

em, i {
  font-style: italic;
}

ul, ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

li {
  margin-bottom: var(--space-sm);
  color: var(--gray-700);
}

blockquote {
  border-left: 4px solid var(--accent-gold);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  font-style: italic;
  color: var(--gray-600);
}

code {
  font-family: var(--font-mono);
  background-color: var(--gray-100);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

/* 4. LAYOUT COMPONENTS */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-sm {
  padding: var(--space-2xl) 0;
}

.section-lg {
  padding: var(--space-4xl) 0;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

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

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

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* 5. UI COMPONENTS */

/* Logo */
.logo {
  height: 48px;
  width: auto;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--gradient-luxury);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  text-decoration: none;
}

.btn-secondary {
  background: var(--gradient-gold);
  color: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

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

.card-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--gray-200);
}

.card-body {
  margin-bottom: var(--space-lg);
}

.card-footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 2px solid var(--gray-200);
}

/* Badge */
.badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  background: var(--gray-200);
  color: var(--gray-700);
}

.badge-success {
  background: var(--accent-green);
  color: var(--white);
}

.badge-warning {
  background: var(--accent-orange);
  color: var(--white);
}

.badge-error {
  background: var(--accent-red);
  color: var(--white);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

thead {
  background: var(--gradient-luxury);
  color: var(--white);
}

th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--gray-200);
}

tbody tr:hover {
  background-color: var(--gray-50);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* 6. SECTION-SPECIFIC STYLES */

/* Proposal Section Base */
.proposal-section {
  min-height: 100vh;
  position: relative;
  padding: var(--space-xl) 0;
}

/* Section Content - Page Container */
.section-content {
  max-width: 1300px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gray-200);
  padding: var(--space-3xl) var(--space-xl);
}

/* Header */
.section-header {
  position: sticky;
  top: 0;
  background: var(--white);
  backdrop-filter: blur(10px);
  padding: var(--space-lg) 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  z-index: var(--z-sticky);
  border-bottom: 1px solid var(--gray-300);
  margin-bottom: var(--space-xl);
}

.section-nav {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.section-nav a {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--gray-600);
  transition: color var(--transition-fast);
}

.section-nav a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--gradient-luxury);
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect fill="rgba(255,255,255,0.03)" width="50" height="50"/></svg>');
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: var(--z-base);
  max-width: 900px;
  padding: var(--space-3xl);
}

.hero h1 {
  color: var(--white);
  font-size: var(--text-6xl);
  margin-bottom: var(--space-xl);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
  font-size: var(--text-2xl);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-2xl);
  font-weight: var(--font-light);
}

/* Section Title */
.section-title {
  position: relative;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
}

/* Content Block */
.content-block {
  margin-bottom: var(--space-3xl);
}

.content-block h3 {
  color: var(--accent-gold);
  margin-bottom: var(--space-lg);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin: var(--space-3xl) 0;
}

.feature-card {
  background: var(--white);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  border-top: 4px solid var(--accent-gold);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: var(--text-3xl);
}

.feature-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--primary-color);
  margin-bottom: var(--space-md);
}

.feature-description {
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
}

/* Timeline */
.timeline {
  position: relative;
  padding: var(--space-xl) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-luxury);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-3xl);
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-content {
  flex: 1;
  padding: var(--space-xl);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin: 0 var(--space-2xl);
}

.timeline-marker {
  width: 20px;
  height: 20px;
  background: var(--accent-gold);
  border: 4px solid var(--white);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 4px var(--primary-color);
  z-index: var(--z-base);
}

/* Pricing Tables */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin: var(--space-3xl) 0;
}

.pricing-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-gold);
}

.pricing-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-2xl);
}

.pricing-card.featured {
  transform: scale(1.05);
  border: 2px solid var(--accent-gold);
}

.pricing-header {
  margin-bottom: var(--space-xl);
}

.pricing-title {
  font-size: var(--text-2xl);
  color: var(--primary-color);
  margin-bottom: var(--space-sm);
}

.pricing-price {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  color: var(--accent-gold);
  margin-bottom: var(--space-sm);
}

.pricing-period {
  color: var(--gray-500);
  font-size: var(--text-sm);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: var(--space-xl) 0;
  text-align: left;
}

.pricing-features li {
  padding: var(--space-sm) 0;
  color: var(--gray-700);
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent-green);
  font-weight: var(--font-bold);
  margin-right: var(--space-sm);
}

/* Footer */
.section-footer {
  background: transparent;
  color: var(--gray-600);
  padding: var(--space-2xl) 0 var(--space-xl) 0;
  margin-top: var(--space-4xl);
  text-align: center;
  border-top: 2px solid var(--gray-300);
}

.section-footer p {
  color: var(--gray-600);
  margin: 0;
}

.page-number {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-top: var(--space-sm);
}

/* 7. UTILITY CLASSES */

/* Spacing */
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.pt-lg { padding-top: var(--space-lg); }
.pb-lg { padding-bottom: var(--space-lg); }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Colors */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-gold { color: var(--accent-gold); }
.text-gray { color: var(--gray-600); }
.text-muted { color: var(--gray-500); }
.text-white { color: var(--white); }

/* Background Colors */
.bg-white { background-color: var(--white); }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-100 { background-color: var(--gray-100); }
.bg-primary { background: var(--gradient-luxury); }
.bg-gold { background: var(--gradient-gold); }

/* 8. ANIMATIONS & TRANSITIONS */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-slide-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-right {
  animation: slideInRight 0.6s ease-out;
}

.animate-scale {
  animation: scaleIn 0.6s ease-out;
}

/* 9. RESPONSIVE DESIGN - MOBILE FIRST */
@media (max-width: 640px) {
  :root {
    --text-5xl: 2.25rem;
    --text-6xl: 2.5rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .section-content {
    border-radius: 0;
    padding: var(--space-lg) var(--space-md);
    margin: 0 var(--space-xs);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    flex-direction: column !important;
    align-items: flex-start;
    padding-left: var(--space-2xl);
  }

  .timeline-content {
    margin: var(--space-md) 0;
  }

  .timeline-marker {
    position: absolute;
    left: 11px;
  }

  .section-nav {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .section-content {
    margin: 0 var(--space-md);
    padding: var(--space-2xl) var(--space-lg);
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 10. PRINT STYLES */
@media print {
  body {
    background-color: var(--white);
  }

  .section-header,
  .section-nav,
  .btn {
    display: none;
  }

  .proposal-section {
    page-break-after: always;
    padding: 0;
  }

  .section-content {
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    max-width: 100%;
  }

  .card {
    break-inside: avoid;
  }
}
