/* ============================================================
   main.css  —  shared across all pages
   Imported first by every stylesheet
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Nunito:wght@400;600;700;800;900&family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@400;500;600;700&display=swap');

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

/* ── Shared Design Tokens ──────────────────────────────────── */
:root {
  /* Core palette — cool blues & greens */
  --color-primary:       #1d6fb8;
  --color-primary-dark:  #155c9c;
  --color-primary-light: #4a9fd4;
  --color-secondary:     #2a9d6f;
  --color-secondary-dark:#1e7d56;
  --color-accent:        #f0a500;

  /* Neutrals */
  --color-bg:        #eef6fb;
  --color-surface:   #ffffff;
  --color-surface2:  #f0f7fc;
  --color-border:    #c5dff0;
  --color-border2:   #a8cfea;
  --color-ink:       #0f2a3d;
  --color-ink2:      #2c4a60;
  --color-muted:     #5a7d96;

  /* Semantic */
  --color-green:        #16a34a;
  --color-green-light:  #dcfce7;
  --color-green-border: #86efac;
  --color-red:          #dc2626;
  --color-red-light:    #fef2f2;
  --color-red-border:   #fca5a5;
  --color-yellow:       #d97706;
  --color-yellow-light: #fefce8;
  --color-yellow-border:#fde68a;

  /* Typography */
  --font-display: 'Baloo 2', cursive;
  --font-body:    'Nunito', sans-serif;
  --font-ui:      'DM Sans', sans-serif;
  --font-serif:   'DM Serif Display', serif;

  /* Spacing & Shape */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15,42,61,.08), 0 2px 8px rgba(15,42,61,.06);
  --shadow-md: 0 4px 16px rgba(15,42,61,.1),  0 8px 32px rgba(15,42,61,.07);
  --shadow-lg: 0 8px 32px rgba(15,42,61,.12), 0 24px 64px rgba(15,42,61,.1);
}

/* ── Base Body ─────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background:  var(--color-bg);
  color:       var(--color-ink);
  min-height:  100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Shared Utility Classes ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(29,111,184,.35);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 6px 20px rgba(29,111,184,.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(42,157,111,.35);
}
.btn-secondary:hover {
  background: var(--color-secondary-dark);
  box-shadow: 0 6px 20px rgba(42,157,111,.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-muted);
  border: 1.5px solid var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ── Shared Animations ─────────────────────────────────────── */
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes fadeInUp  {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes floatstar {
  0%, 100% { transform: translateY(0)     rotate(0deg);  }
  50%       { transform: translateY(-14px) rotate(12deg); }
}

.spin     { display: inline-block; animation: spin 1s linear infinite; }
.fade-in  { animation: fadeInUp .4s ease both; }
