/* =========================================================
   COLOR MAGIC LAB — stylesheet
   Design tokens
   Background : #FFFDF7 (bright clean white)
   Ink        : #1B1533 (deep plum-ink, for premium contrast)
   Fiery Red  : #E8321C -> #FF6B4A
   Ocean Blue : #0057D9 -> #29C7F5
   Royal Purp : #6C1FD9 -> #B14CFF
   Sunshine Y : #FFC700 -> #FFE873
   Grass Grn  : #17A34A -> #6EE787
   Tangerine  : #FF7A00 -> #FFB347
   Bubblegum  : #FF3D9A -> #FF8FC7
   Display font : "Baloo 2"   Body font : "Nunito"
   ========================================================= */

:root {
  --bg: #FFFDF7;
  --bg-soft: #FFF7EC;
  --ink: #1B1533;
  --ink-soft: #574A78;
  --ink-faint: #8B7FAA;
  --line: rgba(27, 21, 51, 0.09);

  --red: #E8321C;   --red-2: #FF6B4A;
  --blue: #0057D9;  --blue-2: #29C7F5;
  --purple: #6C1FD9;--purple-2: #B14CFF;
  --yellow: #FFC700;--yellow-2: #FFE873;
  --green: #17A34A; --green-2: #6EE787;
  --orange: #FF7A00;--orange-2: #FFB347;
  --pink: #FF3D9A;  --pink-2: #FF8FC7;
  --white-c: #FFFFFF; --white-c2: #F1F1F6;
  --black-c: #1C1C1E; --black-c2: #3A3A40;
  --brown: #8B5E3C;  --brown-2: #C9A17A;
  --gray: #9CA3AF;   --gray-2: #E7E7EE;
  --lightblue: #6FCBFA; --lightblue-2: #C6EEFF;
  --lavender: #B79CF2; --lavender-2: #E8DBFF;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 18px 40px -18px rgba(27, 21, 51, 0.28);
  --shadow-card: 0 10px 26px -12px rgba(27, 21, 51, 0.22);
  --shadow-press: 0 4px 12px -6px rgba(27, 21, 51, 0.25);

  --font-display: "Baloo 2", ui-rounded, "Segoe UI", sans-serif;
  --font-body: "Nunito", ui-sans-serif, system-ui, sans-serif;

  --header-h: 76px;
}

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

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 14px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; color: var(--ink); }
p { margin: 0 0 1em; color: var(--ink-soft); }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; font-size: 1rem; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--purple);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  z-index: 2000;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--purple);
  font-size: 0.95rem;
  margin: 0 0 10px;
}
.eyebrow-center { text-align: center; }

.section-sub {
  max-width: 620px;
  font-size: 1.08rem;
  margin-left: auto;
  margin-right: auto;
}

section { padding: 88px 0; position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  min-height: 52px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-2) 70%);
  box-shadow: var(--shadow-press);
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 10px 22px -8px rgba(108, 31, 217, 0.55); transform: translateY(-2px); }

.btn-ghost {
  color: var(--purple);
  background: #fff;
  border: 2px solid var(--purple);
}
.btn-ghost:hover { background: var(--purple); color: #fff; transform: translateY(-2px); }

.btn-icon { font-size: 0.85em; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 253, 247, 0.86);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark .drop-a { fill: var(--purple); }
.brand-mark .drop-shine { fill: rgba(255,255,255,0.4); }
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.32rem;
  color: var(--ink);
}
.brand-word em { font-style: normal; color: var(--purple); }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding: 8px 2px;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red), var(--purple), var(--blue));
  transform: scaleX(0);
  transition: transform 0.22s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 22px; height: 3px;
  background: var(--ink);
  border-radius: 3px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: 74px;
  padding-bottom: 0;
  overflow: hidden;
  background:
    radial-gradient(680px 460px at 88% -8%, rgba(41, 199, 245, 0.16), transparent 60%),
    radial-gradient(620px 420px at 4% 6%, rgba(255, 107, 74, 0.16), transparent 60%),
    var(--bg);
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 90px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-copy .eyebrow { font-size: 1.05rem; }
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  background: linear-gradient(100deg, var(--red) 0%, var(--purple) 45%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.32em;
}
.hero-sub { font-size: 1.22rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }

.hero-visual { display: flex; align-items: center; justify-content: center; }
.mix-stage {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 0.95;
}
.blob {
  position: absolute;
  border-radius: 46% 54% 60% 40% / 55% 45% 55% 45%;
  background: linear-gradient(150deg, var(--blob-color) 0%, var(--blob-color-2) 100%);
  box-shadow: inset -10px -14px 28px rgba(0,0,0,0.16), inset 8px 10px 16px rgba(255,255,255,0.35), 0 18px 34px -16px rgba(27,21,51,0.4);
}
.blob::after {
  content: "";
  position: absolute;
  top: 14%; left: 20%;
  width: 30%; height: 22%;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  filter: blur(2px);
}
.blob-left {
  width: 40%; height: 40%;
  top: 14%; left: 4%;
  animation: driftLeft 5.5s ease-in-out infinite;
}
.blob-right {
  width: 40%; height: 40%;
  top: 14%; right: 4%;
  animation: driftRight 5.5s ease-in-out infinite;
}
.blob-result {
  width: 52%; height: 52%;
  bottom: 2%; left: 24%;
  animation: pulseResult 5.5s ease-in-out infinite;
}
@keyframes driftLeft {
  0%, 100% { transform: translate(0,0) scale(1); }
  45% { transform: translate(18%, 10%) scale(0.9); }
  55% { transform: translate(18%, 10%) scale(0.9); opacity: 0.15; }
  60% { opacity: 0; }
  95% { opacity: 0; }
}
@keyframes driftRight {
  0%, 100% { transform: translate(0,0) scale(1); }
  45% { transform: translate(-18%, 10%) scale(0.9); }
  55% { transform: translate(-18%, 10%) scale(0.9); opacity: 0.15; }
  60% { opacity: 0; }
  95% { opacity: 0; }
}
@keyframes pulseResult {
  0%, 55% { transform: scale(0.4); opacity: 0; }
  65% { transform: scale(1.08); opacity: 1; }
  75% { transform: scale(1); opacity: 1; }
  96% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.4); opacity: 0; }
}
.mix-label {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}
.mix-label-left { top: 2%; left: 0%; }
.mix-label-right { top: 2%; right: 0%; }
.mix-label-result {
  bottom: 8%; left: 50%; transform: translateX(-50%);
  animation: labelFade 5.5s ease-in-out infinite;
}
@keyframes labelFade {
  0%, 58% { opacity: 0; }
  70%, 96% { opacity: 1; }
  100% { opacity: 0; }
}
.mix-plus { position: absolute; top: 20%; left: 46%; font-family: var(--font-display); font-size: 1.6rem; color: var(--ink-faint); }
.mix-arrow {
  position: absolute; top: 42%; left: 46%;
  font-family: var(--font-display); font-size: 1.6rem; color: var(--ink-faint);
  animation: labelFade 5.5s ease-in-out infinite;
}
.sparkle {
  position: absolute;
  width: 10px; height: 10px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  animation: sparklePop 5.5s ease-in-out infinite;
}
.s1 { top: 6%; left: 55%; animation-delay: 0.1s; }
.s2 { top: 12%; left: 68%; animation-delay: 0.3s; }
.s3 { top: 0%; left: 44%; animation-delay: 0.5s; }
@keyframes sparklePop {
  0%, 58% { opacity: 0; transform: scale(0) rotate(0deg); }
  68% { opacity: 1; transform: scale(1.3) rotate(90deg); }
  80% { opacity: 0.9; transform: scale(1) rotate(140deg); }
  96% { opacity: 0; transform: scale(0.6) rotate(180deg); }
}

.hero-wave { display: block; width: 100%; height: 70px; }
.hero-wave path { fill: #fff; }

/* ============================================================
   GUESS TEASER
   ============================================================ */
.guess-teaser { background: #fff; text-align: center; padding-top: 20px; }
.guess-teaser h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.guess-teaser .section-sub { margin: 0 auto 40px; }

.guess-card {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 44px 30px;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: var(--shadow-soft);
}
.guess-blobs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.guess-pair, .guess-result { display: block; }
.guess-ball, .guess-result-blob {
  width: 108px; height: 108px;
  border-radius: 46% 54% 60% 40% / 55% 45% 55% 45%;
  background: linear-gradient(150deg, var(--c1, var(--gray)) 0%, var(--c2, var(--gray-2)) 100%);
  box-shadow: inset -8px -10px 20px rgba(0,0,0,0.15), inset 6px 8px 12px rgba(255,255,255,0.3), var(--shadow-card);
  margin: 0 auto 10px;
  position: relative;
}
.guess-plus, .guess-equal { font-family: var(--font-display); font-size: 1.8rem; color: var(--ink-faint); }
.guess-blob-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  /* Dedicated label area below the ball — never overlaps the colored blob. */
  margin-top: 2px;
}
.guess-result-blob {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--gray), var(--gray-2));
  transition: background 0.5s ease;
}
.guess-result-blob.revealed { background: linear-gradient(150deg, var(--purple), var(--purple-2)); }
.question-mark { font-family: var(--font-display); font-size: 2.4rem; color: #fff; opacity: 0.85; }
.guess-result-blob.revealed .question-mark { display: none; }

/* ============================================================
   COLOR LAB / MIXER
   ============================================================ */
.lab { background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%); text-align: center; }
.lab h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.lab .section-sub { margin: 0 auto 46px; }

.mixer {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  text-align: left;
}
.picker-title { font-size: 1.05rem; margin-bottom: 14px; text-align: center; }
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.swatch {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px -3px rgba(27,21,51,0.35), inset 4px 4px 8px rgba(255,255,255,0.4);
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.swatch:hover { transform: translateY(-3px) scale(1.05); }
.swatch.selected { box-shadow: 0 0 0 4px var(--purple), 0 4px 10px -3px rgba(27,21,51,0.35); transform: translateY(-3px) scale(1.08); }
.swatch .swatch-check { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.3rem; opacity: 0; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.swatch.selected .swatch-check { opacity: 1; }

.mixer-stage { text-align: center; }
.mixer-blob-wrap { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.mixer-blob {
  width: 84px; height: 84px;
  border-radius: 46% 54% 60% 40% / 55% 45% 55% 45%;
  background: var(--gray-2);
  box-shadow: inset -6px -8px 16px rgba(0,0,0,0.12), inset 5px 6px 10px rgba(255,255,255,0.3);
  transition: background 0.4s ease;
}
.mixer-plus { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink-faint); }
.mixer-btn { margin-bottom: 10px; }
.mixer-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.mixer-btn.mixing { animation: btnPulse 0.5s ease infinite; }
@keyframes btnPulse { 0%,100%{transform:scale(1);} 50%{transform:scale(0.96);} }

.mixer-result { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 150px; justify-content: center; }
.mixer-result-blob {
  width: 120px; height: 120px;
  border-radius: 46% 54% 60% 40% / 55% 45% 55% 45%;
  background: var(--gray-2);
  box-shadow: inset -10px -12px 22px rgba(0,0,0,0.14), inset 8px 10px 16px rgba(255,255,255,0.35), var(--shadow-card);
  transition: background 0.5s ease, transform 0.4s ease;
  transform: scale(0.9);
}
.mixer-result-blob.pop { transform: scale(1.06); }
.mixer-result-blob.spin { animation: mixerSpin 1.1s ease-in-out; }
@keyframes mixerSpin {
  0% { transform: scale(0.9) rotate(0deg); filter: blur(0); }
  40% { transform: scale(1.1) rotate(180deg); filter: blur(2px); }
  70% { transform: scale(0.96) rotate(320deg); filter: blur(0); }
  100% { transform: scale(1) rotate(360deg); }
}
.mixer-result-text { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); max-width: 320px; }

@media (min-width: 760px) {
  .mixer { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ============================================================
   VIDEOS
   ============================================================ */
.videos { background: #fff; text-align: center; }
.videos h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.videos .section-sub { margin: 0 auto 32px; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  text-align: left;
}
@media (min-width: 640px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
}
@media (min-width: 1024px) {
  .video-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}
/* Exactly one Short: keep it a normal card width, centered — never
   stretched across the whole section. */
.video-grid.video-grid--single {
  grid-template-columns: minmax(180px, 260px);
  justify-content: center;
}

.video-card {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.video-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.video-card:hover .video-thumb-img { transform: scale(1.05); }

/* The Shorts wrapper — always a true 9:16 portrait box, on every
   screen size, matching an actual YouTube Short. Also referred to
   as a "short-video-wrapper": any playable Short or its thumbnail
   fills this box edge-to-edge, never a landscape player. */
.video-thumb {
  aspect-ratio: 9 / 16;
  width: 100%;
  position: relative;
  background: linear-gradient(150deg, var(--lavender), var(--lavender-2));
  overflow: hidden;
}
.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  cursor: pointer;
  transition: transform 0.35s ease;
}
.video-embed-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.play-badge {
  position: absolute;
  bottom: 12px; right: 12px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  color: var(--purple);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.play-badge-btn {
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}
.play-badge-btn:hover { transform: scale(1.08); background: #fff; }

.video-info {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.video-combo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-result { color: var(--ink-faint); font-size: 0.8rem; margin-bottom: 12px; }
.video-card .btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.88rem;
  min-height: 44px;
  margin-top: auto;
}

/* --- Loading / empty / error state for the YouTube feed --- */
.video-feed-state {
  grid-column: 1 / -1;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.video-feed-state p { margin: 0 auto 18px; max-width: 40ch; color: var(--ink-soft); }
.video-feed-state .btn { display: inline-flex; width: auto; }
.video-feed-state.video-feed-error { background: var(--lavender-2); }
.video-feed-spinner {
  display: inline-block;
  width: 34px; height: 34px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid var(--lavender-2);
  border-top-color: var(--purple);
  animation: videoSpin 0.85s linear infinite;
}
@keyframes videoSpin { to { transform: rotate(360deg); } }


/* ============================================================
   LEARN COLORS
   ============================================================ */
.learn { background: var(--bg-soft); text-align: center; }
.learn h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.group-title { margin-top: 50px; font-size: 1.4rem; }
.group-sub { max-width: 520px; margin: 0 auto 26px; }

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  text-align: left;
}
.color-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 22px 18px;
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: transform 0.2s ease;
}
.color-card:hover { transform: translateY(-5px); }
.color-swatch {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  border-radius: 46% 54% 60% 40% / 55% 45% 55% 45%;
  background: linear-gradient(150deg, var(--cc1), var(--cc2));
  box-shadow: inset -8px -10px 18px rgba(0,0,0,0.15), inset 6px 8px 12px rgba(255,255,255,0.35);
}
.color-card h4 { font-size: 1.08rem; margin-bottom: 6px; }
.color-card p { font-size: 0.92rem; margin: 0; }

/* ============================================================
   GAMES
   ============================================================ */
.games { background: #fff; text-align: center; }
.games h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.games .section-sub { margin: 0 auto 46px; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
  margin-bottom: 60px;
  text-align: left;
}
.game-card {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  box-shadow: var(--shadow-card);
  text-align: center;
  position: relative;
  transition: transform 0.2s ease;
}
.game-card:hover { transform: translateY(-5px); }
.game-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 46% 54% 60% 40% / 55% 45% 55% 45%;
  background: linear-gradient(150deg, var(--gc1), var(--gc2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: inset -6px -8px 14px rgba(0,0,0,0.15);
}
.game-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.game-card p { font-size: 0.92rem; }
.game-tag {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--lavender-2);
  color: var(--purple);
}

.game-play {
  background: linear-gradient(160deg, var(--bg-soft), #fff);
  border-radius: var(--radius-lg);
  padding: 42px 30px;
  box-shadow: var(--shadow-soft);
  max-width: 760px;
  margin: 0 auto;
}
.game-play h3 { font-size: 1.5rem; }
.game-play-sub { max-width: 460px; margin: 0 auto 26px; }

.guess-game-prompt { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.gg-blob { width: 72px; height: 72px; border-radius: 46% 54% 60% 40% / 55% 45% 55% 45%; box-shadow: inset -6px -8px 14px rgba(0,0,0,0.15), inset 5px 6px 10px rgba(255,255,255,0.3); }
.gg-op { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink-faint); }

.guess-game-options { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 18px; }
.gg-option {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px 10px 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  min-height: 48px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.gg-option:hover { transform: translateY(-2px); border-color: var(--purple); }
.gg-swatch { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset -3px -3px 6px rgba(0,0,0,0.2); }
.gg-option.correct { background: var(--green-2); border-color: var(--green); }
.gg-option.incorrect { background: #FFE1DA; border-color: var(--red); }
.gg-option[disabled] { cursor: default; }

.guess-game-feedback { font-family: var(--font-display); font-weight: 700; min-height: 1.6em; }
.guess-game-score { display: flex; justify-content: center; gap: 26px; font-family: var(--font-display); margin-bottom: 18px; }
.guess-game-score strong { color: var(--purple); }

/* ============================================================
   FOR PARENTS
   ============================================================ */
.parents { background: var(--bg-soft); text-align: center; }
.parents h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.parents-lead { max-width: 680px; margin: 0 auto 46px; font-size: 1.1rem; }

.parents-subhead {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 14px;
  text-align: center;
}

/* --- How Parents Can Use Color Magic Lab (step guide) --- */
.parents-guide {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  margin: 0 auto 50px;
  max-width: 920px;
  box-shadow: var(--shadow-soft);
}
.parents-guide-intro {
  max-width: 640px;
  margin: 0 auto 34px;
  text-align: center;
}

.flow-list {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 26px 20px;
  text-align: center;
}
.flow-step { display: flex; flex-direction: column; align-items: center; }
.flow-badge {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--fc1, var(--purple)), var(--fc2, var(--purple-2)));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
  flex-shrink: 0;
}
.flow-step h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; color: var(--ink); }
.flow-step p { font-size: 0.9rem; margin: 0; max-width: 30ch; }

.parents-encourage {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.96rem;
  color: var(--ink);
  background: var(--lavender-2);
  padding: 16px 22px;
  border-radius: var(--radius-sm);
}

@media (min-width: 880px) {
  .flow-list { grid-template-columns: repeat(5, 1fr); }
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  text-align: left;
  margin-bottom: 40px;
}
.skill-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
}
.skill-icon { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.skill-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.skill-card p { font-size: 0.92rem; margin: 0; }

/* --- Try This With Your Child --- */
.try-box {
  background: linear-gradient(160deg, var(--lavender-2), #fff);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  max-width: 780px;
  margin: 44px auto 40px;
  box-shadow: var(--shadow-soft);
}
.try-heading { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 18px; text-align: center; }
.try-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.try-chip {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.parents-note { max-width: 680px; margin: 0 auto; font-size: 0.88rem; color: var(--ink-faint); }

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: #fff; overflow: hidden; }
.about-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.about-visual { position: relative; height: 260px; }
.about-blob { position: absolute; border-radius: 46% 54% 60% 40% / 55% 45% 55% 45%; box-shadow: inset -10px -12px 22px rgba(0,0,0,0.14), inset 8px 10px 16px rgba(255,255,255,0.3); }
.blob-a { width: 180px; height: 180px; left: 6%; top: 4%; background: linear-gradient(150deg, var(--yellow), var(--yellow-2)); animation: floatSlow 7s ease-in-out infinite; }
.blob-b { width: 150px; height: 150px; right: 10%; top: 24%; background: linear-gradient(150deg, var(--pink), var(--pink-2)); animation: floatSlow 8s ease-in-out infinite 1s; }
.blob-c { width: 120px; height: 120px; left: 32%; bottom: 0%; background: linear-gradient(150deg, var(--green), var(--green-2)); animation: floatSlow 6.5s ease-in-out infinite 0.5s; }
@keyframes floatSlow { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(4deg); } }
.about-copy p { font-size: 1.05rem; }
.about-copy em { font-style: normal; color: var(--purple); font-weight: 700; }

@media (min-width: 860px) {
  .about-inner { grid-template-columns: 0.9fr 1.1fr; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--bg-soft); text-align: center; }
.contact h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.contact .section-sub { margin: 0 auto 40px; }

.contact-form {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.form-row { margin-bottom: 20px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.form-row input, .form-row textarea {
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  resize: vertical;
  transition: border-color 0.18s ease;
  background: var(--bg);
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--purple); outline: none; }
.form-row.invalid input, .form-row.invalid textarea { border-color: var(--red); }
.form-error { color: var(--red); font-size: 0.85rem; min-height: 1.2em; }

/* Honeypot spam-trap field — hidden from sighted users and screen
   readers, but still present in the DOM for bots that auto-fill
   every input. Not display:none, since some bots skip those. */
.form-row-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-form .btn { width: 100%; margin-top: 6px; }
.contact-form .btn[disabled] { opacity: 0.7; cursor: not-allowed; }
.contact-form .btn.is-sending { animation: btnPulse 0.9s ease-in-out infinite; }
.form-status { text-align: center; font-family: var(--font-display); font-weight: 700; margin-top: 16px; min-height: 1.4em; color: var(--green); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: #fff; padding: 60px 0 26px; }
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr;
  text-align: center;
}
.footer-word { color: #fff; }
.footer-word em { color: var(--pink-2); }
.footer-tagline { color: rgba(255,255,255,0.65); margin-top: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 24px; }
.footer-nav a { font-family: var(--font-display); font-weight: 600; color: rgba(255,255,255,0.82); font-size: 0.95rem; }
.footer-nav a:hover { color: var(--pink-2); }
.footer-social { display: flex; justify-content: center; gap: 14px; }
.social-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.social-btn svg { width: 20px; height: 20px; }
.social-btn:hover { background: var(--purple); border-color: var(--purple); transform: translateY(-3px); }
.footer-legal { text-align: center; color: rgba(255,255,255,0.5); font-size: 0.85rem; margin: 36px 0 0; }

@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1fr auto 1fr; text-align: left; align-items: center; }
  .footer-social { justify-content: flex-end; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 380px; margin: 0 auto; }

  /* ---------------------------------------------------------
     Hero color bubbles — stacked/mobile arrangement.
     The desktop version above (>980px) is untouched. Below
     980px the "merge and cross-fade" choreography (blobs
     drifting into each other) is replaced with a clear, static
     equation layout — each bubble keeps its own gentle float,
     but they no longer share screen space, so labels and
     bubbles can never overlap.
     --------------------------------------------------------- */
  .mix-stage {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "bleft   plus   bright"
      "lleft   .      lright"
      "arrow   arrow  arrow"
      "bresult bresult bresult"
      "lresult lresult lresult";
    align-items: center;
    justify-items: center;
    row-gap: 10px;
    column-gap: 8px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    aspect-ratio: auto;
    padding: 10px 4px 4px;
  }

  .mix-stage .blob {
    position: relative;
    width: clamp(64px, 20vw, 84px);
    height: clamp(64px, 20vw, 84px);
    animation: bubbleFloat 4.2s ease-in-out infinite;
  }
  .mix-stage .blob::after { top: 16%; left: 20%; }

  .blob-left  { grid-area: bleft;  animation-delay: 0s; }
  .blob-right { grid-area: bright; animation-delay: 0.5s; }
  .blob-result {
    grid-area: bresult;
    width: clamp(84px, 26vw, 108px);
    height: clamp(84px, 26vw, 108px);
    animation-delay: 0.25s;
  }

  .mix-stage .mix-label {
    position: static;
    opacity: 1;
    animation: none;
    font-size: 0.82rem;
    padding: 5px 10px;
    white-space: nowrap;
    transform: none;
  }
  .mix-label-left   { grid-area: lleft; }
  .mix-label-right  { grid-area: lright; }
  .mix-label-result { grid-area: lresult; }

  .mix-stage .mix-plus {
    grid-area: plus;
    position: static;
  }
  .mix-stage .mix-arrow {
    grid-area: arrow;
    position: static;
    opacity: 1;
    animation: none;
    transform: rotate(90deg);
  }

  /* Decorative sparkles are tuned for the wide desktop layout;
     hidden at this size to keep the compact equation readable. */
  .mix-stage .sparkle { display: none; }
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 26px 30px;
    gap: 6px;
    box-shadow: var(--shadow-soft);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  .main-nav.open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav a { width: 100%; padding: 12px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
}

@media (max-width: 600px) {
  section { padding: 64px 0; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .mixer { padding: 26px 20px; }
  .contact-form { padding: 28px 22px; }
  .guess-card { padding: 32px 18px; }
  .parents-guide { padding: 28px 20px; }
  .try-box { padding: 26px 20px; margin-top: 34px; }
}

@media (min-width: 1400px) {
  .section-inner { max-width: 1320px; }
}
