/* ============================================
   VARIABLES
   ============================================ */
:root {
  /* Colors - Pastel Playful Palette */
  --color-primary: #A7C7E7;        /* Pastel Blue - Trust & Calm */
  --color-primary-dark: #8BB8E0;
  --color-secondary: #FFE8B8;      /* Warm Yellow - Joy & Warmth */
  --color-secondary-dark: #FFD68A;
  --color-accent: #FFB5A7;         /* Soft Coral - Playful Energy */
  --color-accent-dark: #FF9A8B;
  --color-success: #C7F0DB;        /* Mint Green - Growth & Learning */
  --color-success-dark: #A3E6C7;
  --color-warning: #FFE8B8;
  --color-danger: #FFB5A7;
  
  /* Neutral Grays - Warm Undertones */
  --color-white: #FFFCF8;          /* Warm White */
  --color-gray-100: #F9F6F2;
  --color-gray-200: #F0EBE5;
  --color-gray-300: #E2DCD4;
  --color-gray-400: #C4BDB4;
  --color-gray-500: #9C948C;
  --color-gray-600: #7A736C;
  --color-gray-700: #5C564F;
  --color-gray-800: #3D3934;
  --color-gray-900: #292624;
  
  --color-background: var(--color-white);
  --color-text: var(--color-gray-800);
  --color-text-muted: var(--color-gray-600);
  
  /* Typography - Clean & Approachable */
  --font-family-base: system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', 'Arial', sans-serif;
  --font-family-heading: var(--font-family-base);
  
  /* Fluid Type Scale */
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.25vw, 1rem);
  --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --font-size-md: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --font-size-lg: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-size-xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --font-size-2xl: clamp(2rem, 1.6rem + 2vw, 2.5rem);
  --font-size-3xl: clamp(2.5rem, 2rem + 2.5vw, 3rem);
  
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;
  
  /* Spacing Scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.5rem;     /* 24px */
  --space-6: 2rem;       /* 32px */
  --space-7: 3rem;       /* 48px */
  --space-8: 4rem;       /* 64px */
  --space-9: 5rem;       /* 80px */
  --space-10: 6rem;      /* 96px */
  
  /* Radius - Soft & Rounded */
  --radius-sm: 0.5rem;   /* 8px */
  --radius-md: 0.75rem;  /* 12px */
  --radius-lg: 1rem;     /* 16px */
  --radius-xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
  
  /* Shadows - Soft & Diffuse */
  --shadow-sm: 0 1px 2px 0 rgba(41, 38, 36, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(41, 38, 36, 0.08), 0 2px 4px -2px rgba(41, 38, 36, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(41, 38, 36, 0.08), 0 4px 6px -4px rgba(41, 38, 36, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(41, 38, 36, 0.08), 0 8px 10px -6px rgba(41, 38, 36, 0.06);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Focus */
  --focus-ring-width: 3px;
  --focus-ring-color: rgba(167, 199, 231, 0.6);
  --focus-ring-offset: 2px;
}

/* ============================================
   RESET & NORMALIZE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  min-height: 100vh;
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul,
ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Reduced Motion */
@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;
  }
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  background-color: var(--color-background);
  color: var(--color-text);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-gray-900);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-md); }
h6 { font-size: var(--font-size-base); }

h1, h2, h3, h4, h5, h6, p {
  margin-bottom: var(--space-4);
}

p {
  color: var(--color-text);
}

/* Links */
a {
  color: var(--color-primary-dark);
  transition: color var(--transition-fast);
}

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

a:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

/* ============================================
   UTILITIES
   ============================================ */
/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

@media (max-width: 640px) {
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* Screen Reader Only */
.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;
}

/* Flex Helpers */
.flex {
  display: flex;
}

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

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

/* Grid Helpers */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

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

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

/* ============================================
   COMPONENTS
   ============================================ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 var(--focus-ring-width) var(--focus-ring-color);
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-gray-800)!important;
  border-color: var(--color-primary);
}

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

.btn--secondary {
  background-color: var(--color-secondary);
  color: var(--color-gray-800);
  border-color: var(--color-secondary);
}

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

.btn--outline {
  background-color: transparent;
  border-color: var(--color-gray-300);
  color: var(--color-gray-700);
}

.btn--outline:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  background-color: var(--color-gray-100);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Inputs */
.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--color-gray-800);
  background-color: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input::placeholder {
  color: var(--color-gray-400);
}

.input:hover {
  border-color: var(--color-gray-300);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--focus-ring-color);
}

.input:disabled {
  background-color: var(--color-gray-100);
  color: var(--color-gray-500);
  cursor: not-allowed;
}

/* Card */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid var(--color-gray-100);
}

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

@media (prefers-reduced-motion: reduce) {
  .card:hover {
    transform: none;
  }
}