/* Modern Web Design - Financial Counseling Design System */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&display=swap');

:root {
  /* Colors */
  --color-primary: #1A2B3C;
  --color-secondary: #F1F5F9;
  --color-accent: #D4A017;
  --color-text: #1a1a1a;
  --color-text-light: #374151; /* Darker than 4b5563 for better contrast safety (7.1:1 on white) */
  --color-bg: #ffffff;
  --color-bg-alt: #f3f4f6;
  
  /* Typography */
  --font-family: 'Playfair Display', serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  
  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for sticky header */
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: var(--line-height-base);
  margin: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

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

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

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Components */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

.section-dark {
  background-color: var(--color-primary);
  color: #ffffff;
}

.section-dark h1, 
.section-dark h2, 
.section-dark h3 {
  color: #ffffff;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

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

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

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

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

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-weight: 700;
  text-align: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-base);
  border: 2px solid transparent;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #2a3b4c;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

.btn-accent:hover {
  background-color: #c49015;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Cards */
.card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  border: 1px solid #e5e7eb;
}

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

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--color-primary);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.2);
}

/* Navigation */
.header {
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--space-sm) 0;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-menu {
  display: none;
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
  }
}

.nav-link {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.25rem; /* Increased hit area */
}

.nav-link.active {
  color: var(--color-accent);
}

/* Mobile Menu */
.hamburger {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
}

.hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-primary);
  margin: 5px 0;
  transition: var(--transition-base);
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

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

.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: 0;
  background: #ffffff;
  overflow: hidden;
  transition: var(--transition-base);
  z-index: 999;
  box-shadow: var(--shadow-md);
}

.mobile-menu.active {
  height: calc(100vh - 70px);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-2xl) 0;
  gap: var(--space-xl);
  list-style: none;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .hero-split {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-content {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-image-container {
  height: 400px;
}

@media (min-width: 1024px) {
  .hero-image-container {
    height: 100%;
  }
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-headline {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

@media (min-width: 1024px) {
  .hero-headline {
    font-size: 4.5rem;
  }
}

.hero-subheadline {
  font-size: 1.25rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
  max-width: 600px;
}

/* Stats Section */
.stats-strip {
  background-color: var(--color-primary);
  color: #ffffff;
  padding: var(--space-xl) 0;
}

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

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Footer */
.footer {
  background-color: var(--color-primary);
  color: #ffffff;
  padding: var(--space-2xl) 0;
}

.footer-grid {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 2fr;
  }
}

.footer-heading {
  color: var(--color-accent);
  font-size: 1.25rem;
  margin-bottom: var(--space-lg);
}

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

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-link {
  color: #d1d5db; /* gray-300 has 7.5:1 contrast on #1A2B3C */
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.875rem;
  color: #d1d5db; /* Improved from #9ca3af */
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.cookie-consent.show {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .cookie-consent {
    flex-direction: row;
    justify-content: space-between;
    padding: var(--space-md) var(--space-2xl);
  }
}

/* Blueprint Aesthetic */
.blueprint-line {
  height: 1px;
  background: rgba(26, 43, 60, 0.1);
  width: 100%;
  margin: var(--space-lg) 0;
}

.asymmetric-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 1024px) {
  .asymmetric-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}

.layered-card {
  position: relative;
  z-index: 1;
}

.layered-card::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 100%;
  height: 100%;
  border: 1px solid var(--color-accent);
  z-index: -1;
  transition: var(--transition-base);
}

.layered-card:hover::before {
  top: 0;
  left: 0;
}

/* Price Badges */
.price-badge {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 0.25rem 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
}

/* Glassmorphism */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.font-serif { font-family: var(--font-family); }
.uppercase { text-transform: uppercase; }
.letter-spacing { letter-spacing: 0.1em; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
