/* =====================================================================
   OSCAR-Junior — layout.css
   Generic foundation shared by every page: design tokens, fonts, reset,
   layout helpers, and reusable components (brand, buttons, atmosphere).
   Page-specific styles live in base.css.
   Theme: playful neuroscience lab for kids — light blue / teal / cyan.
   ===================================================================== */

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

/* ---- Design tokens ---- */
:root {
  /* Core palette */
  --blue-100: #e0f5fe;
  --blue-200: #bae6fd;
  --blue-300: #7dd3fc;
  --blue-400: #38bdf8;
  --blue-500: #0ea5e9;

  --cyan-300: #67e8f9;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;

  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;

  /* A single warm pop, used sparingly for primary CTAs */
  --sun: #ffd166;
  --sun-deep: #ffb627;

  /* Ink / text */
  --ink: #0a3b44;
  --ink-soft: #3e6b73;
  --ink-faint: #7ca1a7;

  /* Surfaces */
  --bg: #effbfd;
  --surface: #ffffff;
  --surface-tint: #f3fcfe;

  /* Effects */
  --ring: rgba(13, 148, 136, 0.18);
  --shadow-sm: 0 2px 8px rgba(10, 59, 68, 0.08);
  --shadow-md: 0 12px 30px -10px rgba(10, 59, 68, 0.22);
  --shadow-lg: 0 30px 60px -20px rgba(13, 148, 136, 0.35);

  /* Radii */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;

  /* Typography */
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  --maxw: 1180px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-weight: 600;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---- Brand mark ---- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
}
.brand__mark {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--cyan-400), var(--teal-500));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px -6px rgba(13, 148, 136, 0.6);
}
.brand__mark svg {
  width: 26px;
  height: 26px;
}
.brand__name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand__name span {
  color: var(--teal-600);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--primary {
  background: linear-gradient(135deg, var(--sun), var(--sun-deep));
  color: #5a3a00;
  box-shadow: 0 12px 24px -8px rgba(255, 182, 39, 0.7);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -8px rgba(255, 182, 39, 0.85);
}

.btn--teal {
  background: linear-gradient(135deg, var(--cyan-400), var(--teal-600));
  color: #fff;
  box-shadow: 0 12px 24px -8px rgba(13, 148, 136, 0.6);
}
.btn--teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -8px rgba(13, 148, 136, 0.75);
}

.btn--ghost {
  background: var(--surface);
  color: var(--teal-700);
  box-shadow: inset 0 0 0 2px var(--blue-200);
}
.btn--ghost:hover {
  box-shadow: inset 0 0 0 2px var(--teal-400);
  transform: translateY(-2px);
}

/* ---- Decorative floating blobs (shared atmosphere) ---- */
.bg-atmos {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.55;
}
.blob--1 {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -120px;
  background: radial-gradient(circle at 30% 30%, var(--cyan-300), transparent 70%);
}
.blob--2 {
  width: 360px;
  height: 360px;
  bottom: -120px;
  left: -100px;
  background: radial-gradient(circle at 30% 30%, var(--teal-400), transparent 70%);
}
.blob--3 {
  width: 280px;
  height: 280px;
  top: 40%;
  left: 60%;
  background: radial-gradient(circle at 30% 30%, var(--blue-300), transparent 70%);
  opacity: 0.4;
}

/* Floating neuron specks + mascot idle motion */
@keyframes drift {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-22px) translateX(10px);
  }
}

/* Mascot image — shared across pages; size is set per-context in base.css */
.mascot {
  width: 100%;
  height: auto;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto;
  }
}
