/**
 * Canadian Association of Family Health Support (CAFHS)
 * Main Design System Tokens & Base Styles
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Color Palette */
  --primary-deep: #0D3B3A;      /* Deep Canadian Pine */
  --primary: #008080;           /* Vital Teal / Health */
  --primary-light: #E6F5F5;     /* Soft Mint / Teal Tint */
  --primary-hover: #006666;
  
  --secondary: #E06D53;         /* Warm Coral / Maternal & Family Care */
  --secondary-light: #FDF2F0;
  --secondary-hover: #C85940;

  --accent-gold: #D9822B;       /* Maple Amber */
  --accent-gold-light: #FEF7EE;

  --crisis-red: #D9383A;        /* Canadian Red / 988 Alert */
  --crisis-red-light: #FDF2F2;

  --success-green: #2E7D32;
  --success-light: #E8F5E9;

  --warning-amber: #E65100;
  --warning-light: #FFF3E0;

  /* Neutral Spectrum */
  --bg-main: #F8FAF9;
  --bg-card: #FFFFFF;
  --bg-card-alt: #F2F6F5;
  --text-main: #1A252C;
  --text-muted: #536471;
  --text-subtle: #7A8B97;
  --border-color: #E2E8F0;
  --border-focus: #008080;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(13, 59, 58, 0.04);
  --shadow-md: 0 6px 20px rgba(13, 59, 58, 0.08);
  --shadow-lg: 0 14px 36px rgba(13, 59, 58, 0.12);
  --shadow-float: 0 20px 48px rgba(0, 0, 0, 0.18);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-deep);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }
h4 { font-size: 1.2rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

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

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

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

/* Common Layout Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5.5rem 0;
  position: relative;
}

.section-alt {
  background-color: #EEF4F3;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.85rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 128, 128, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 128, 128, 0.35);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(224, 109, 83, 0.25);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(224, 109, 83, 0.35);
}

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

.btn-outline:hover {
  background-color: var(--primary-light);
  color: var(--primary-deep);
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #FFFFFF;
}

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

.btn-sm {
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
}

.btn-lg {
  font-size: 1.05rem;
  padding: 0.95rem 1.8rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Accessibility Skip Link */
.skip-to-content {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--primary-deep);
  color: #FFFFFF;
  padding: 10px 18px;
  z-index: 9999;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
  font-weight: 600;
}

.skip-to-content:focus {
  top: 20px;
}
