/* Global Styles - Meadow Math */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

/* ========== BASE STYLES ========== */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-neutral-800);
  /* Warm creamy meadow background with playful multi-colored dots */
  background-color: #FFF9E6;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%2300C9C9' fill-opacity='0.12' fill-rule='evenodd'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 34c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm70 45c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-55 25c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm45-80c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM15 75c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm90-30c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM50 8c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm55 85c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z' fill='%23FF69B4' fill-opacity='0.08' fill-rule='evenodd'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='140' height='140' viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M65 20c3.314 0 6-2.686 6-6s-2.686-6-6-6-6 2.686-6 6 2.686 6 6 6zm35 95c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zM20 70c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm100-20c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM45 130c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4z' fill='%23FFD700' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
  overflow-x: hidden;
  min-height: 100vh;
}

/* Soft gradient overlay for depth - warm meadow feel */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 0% 0%, rgba(0, 201, 201, 0.05) 0%, transparent 40%),
    radial-gradient(ellipse at 100% 0%, rgba(255, 215, 0, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 100% 100%, rgba(255, 105, 180, 0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 0% 100%, rgba(127, 255, 0, 0.03) 0%, transparent 40%);
  z-index: -1;
  pointer-events: none;
}

/* ========== TYPOGRAPHY ========== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-secondary);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-neutral-900);
}

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

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

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

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

h5 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

h6 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

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

/* ========== CARD STYLES ========== */

.card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 3px solid rgba(255, 255, 255, 0.8);
}

.card:hover {
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.1), 0 16px 35px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px) scale(1.01);
}

/* ========== LINK STYLES ========== */

a {
  color: var(--color-primary);
  transition: color var(--duration-normal) var(--ease-out);
}

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

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Mobile First Approach */

/* Tablet: 768px and up */
@media (min-width: 768px) {
  h1 { font-size: var(--text-6xl); }
  h2 { font-size: var(--text-5xl); }
  h3 { font-size: var(--text-4xl); }
}

/* ========== ACCESSIBILITY ========== */

/* Keyboard Focus Styles */
*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ========== SELECTION ========== */

::selection {
  background: var(--color-accent-yellow);
  color: var(--color-neutral-900);
}

::-moz-selection {
  background: var(--color-accent-yellow);
  color: var(--color-neutral-900);
}
