/* ==========================================================================
   El Mongez — playful learning for kids & parents
   Sticker-toy aesthetic: cream paper, candy colors, chunky ink outlines,
   solid offset shadows, wobbly shapes.
   ========================================================================== */

:root {
  /* Palette */
  --paper: #fff6e9;
  --paper-deep: #ffedd3;
  --ink: #33305e;
  --ink-soft: #5c5890;
  --coral: #ff6b6b;
  --coral-deep: #e84f4f;
  --sunshine: #ffc93c;
  --sunshine-deep: #f5b303;
  --teal: #2ec4b6;
  --teal-deep: #17a99b;
  --grape: #9b5de5;
  --grape-deep: #7f3fd0;
  --sky: #4cc9f0;
  --sky-deep: #22aed8;
  --white: #fffdf8;

  /* Type */
  --font-display: "Fredoka", "Baloo 2", sans-serif;
  --font-body: "Nunito", sans-serif;

  /* Shape */
  --line: 3px solid var(--ink);
  --radius: 24px;
  --radius-lg: 36px;
  --shadow-pop: 6px 6px 0 var(--ink);
  --shadow-pop-sm: 4px 4px 0 var(--ink);

  --container: 1120px;
}

/* Base ------------------------------------------------------------------- */

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(var(--paper-deep) 2.5px, transparent 2.5px);
  background-size: 34px 34px;
  overflow-x: hidden;
}

::selection { background: var(--sunshine); color: var(--ink); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

a { color: inherit; }

img, svg { max-width: 100%; }

/* Squiggle underline utility */
.squiggle {
  position: relative;
  white-space: nowrap;
}
.squiggle::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.08em;
  height: 0.3em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 8 Q 12 2 25 8 T 50 8 T 75 8 T 100 8' fill='none' stroke='%23ffc93c' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: auto 100%;
}

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.75em 1.6em;
  border: var(--line);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  background: var(--white);
  box-shadow: var(--shadow-pop-sm);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease;
  user-select: none;
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.btn-primary { background: var(--coral); color: var(--white); }
.btn-sun     { background: var(--sunshine); color: var(--ink); }
.btn-teal    { background: var(--teal); color: var(--white); }
.btn-grape   { background: var(--grape); color: var(--white); }

/* Header ------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 12px;
  z-index: 60;
  padding-inline: 16px;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-pop-sm);
  padding: 10px 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-logo img { width: 42px; height: 42px; }
.site-logo .wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}
.site-logo .wordmark em {
  font-style: normal;
  color: var(--coral);
}

.site-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 3px solid transparent;
  transition: background 0.15s ease, transform 0.15s ease;
  display: inline-block;
}
.site-nav a:hover { background: var(--sunshine); transform: rotate(-2deg) scale(1.05); }
.site-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--white);
}

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: var(--line);
  border-radius: 50%;
  background: var(--sunshine);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-pop-sm);
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 20px; height: 3px;
  border-radius: 3px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateX(-50%) translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateX(-50%) translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; flex-shrink: 0; }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    z-index: 70;
  }
  .site-nav.open { display: block; }
  .site-nav ul {
    flex-direction: column;
    background: var(--white);
    border: var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-pop);
    padding: 12px;
  }
  .site-nav a { display: block; text-align: center; }
}

/* Hero ---------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 90px 0 120px;
  text-align: center;
  overflow: visible;
}

.hero .eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  padding: 6px 18px;
  box-shadow: var(--shadow-pop-sm);
  transform: rotate(-2deg);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700;
  max-width: 16ch;
  margin-inline: auto;
  margin-bottom: 24px;
}

/* Per-letter bounce (letters wrapped by JS) */
.hero h1 .wrd { display: inline-block; white-space: nowrap; }
.hero h1 .ltr {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.34, 1.8, 0.64, 1), color 0.2s ease;
  cursor: default;
}
.hero h1 .ltr:hover {
  transform: translateY(-0.18em) rotate(6deg) scale(1.15);
  color: var(--coral);
}
.hero h1 .word-fun { color: var(--coral); }
.hero h1 .word-smart { color: var(--teal); }

.hero .lead {
  font-size: 1.25rem;
  max-width: 54ch;
  margin: 0 auto 36px;
  color: var(--ink-soft);
  font-weight: 600;
}

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Floating hero shapes */
.hero-shape {
  position: absolute;
  z-index: -1;
  animation: floaty 6s ease-in-out infinite;
}
.hero-shape svg { display: block; }
.hero-shape:nth-child(2n)  { animation-duration: 7.5s; animation-delay: -2s; }
.hero-shape:nth-child(3n)  { animation-duration: 9s;  animation-delay: -4s; }
@media (max-width: 760px) { .hero-shape { display: none; } }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-22px) rotate(5deg); }
}

/* Section scaffolding -------------------------------------------------------- */

.section { padding: 84px 0; position: relative; }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 52px;
}
.section-header h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  margin-bottom: 14px;
}
.section-header p { color: var(--ink-soft); font-weight: 600; font-size: 1.15rem; }

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 4px 14px;
  border: var(--line);
  border-radius: 999px;
  margin-bottom: 16px;
  transform: rotate(2deg);
  box-shadow: var(--shadow-pop-sm);
}
.tag-coral { background: var(--coral); color: var(--white); }
.tag-sun   { background: var(--sunshine); }
.tag-teal  { background: var(--teal); color: var(--white); }
.tag-grape { background: var(--grape); color: var(--white); }
.tag-sky   { background: var(--sky); color: var(--ink); }

/* Cards ----------------------------------------------------------------------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 34px 30px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  position: relative;
}
.card:hover { transform: translate(-3px, -5px) rotate(-0.5deg); box-shadow: 10px 12px 0 var(--ink); }
.card:nth-child(2n):hover { transform: translate(-3px, -5px) rotate(0.7deg); }

.card h3 { font-size: 1.45rem; margin: 18px 0 10px; }
.card p { color: var(--ink-soft); font-weight: 600; }

.card .doodle,
.parent-note .doodle {
  width: 76px; height: 76px;
  display: grid;
  place-items: center;
  border: var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-pop-sm);
  font-size: 2rem;
}
.doodle-coral { background: var(--coral); }
.doodle-sun   { background: var(--sunshine); }
.doodle-teal  { background: var(--teal); }
.doodle-grape { background: var(--grape); }
.doodle-sky   { background: var(--sky); }

.card .sticker {
  position: absolute;
  top: -16px; right: 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--sunshine);
  border: var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  transform: rotate(6deg);
  box-shadow: 2px 2px 0 var(--ink);
}

/* Playground (mini game) ----------------------------------------------------------- */

.playground {
  position: relative;
  border: var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  height: 380px;
  cursor: crosshair;
}
.playground-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #cdefff 0%, #eafaff 60%, #fff6e9 100%);
}
.playground-hud {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 5;
  display: flex;
  gap: 10px;
  align-items: center;
}
.playground-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  padding: 4px 18px;
  box-shadow: var(--shadow-pop-sm);
}
.playground-msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 4;
  pointer-events: none;
}
.playground-msg .bubble-cta {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  padding: 14px 26px;
  box-shadow: var(--shadow-pop-sm);
  animation: floaty 3s ease-in-out infinite;
  text-align: center;
}

.pop-star {
  position: absolute;
  width: 54px; height: 54px;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.1s ease;
  filter: drop-shadow(2px 3px 0 rgba(51, 48, 94, 0.25));
}
.pop-star:hover { transform: scale(1.15) rotate(10deg); }
.pop-star.popped { animation: pop-out 0.35s ease forwards; pointer-events: none; }

@keyframes pop-out {
  0%   { transform: scale(1); opacity: 1; }
  40%  { transform: scale(1.5) rotate(20deg); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}

/* Confetti + star particles --------------------------------------------------------- */

.particle {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  font-size: 1.3rem;
  will-change: transform, opacity;
}

/* Critters (walking characters) ------------------------------------------------------ */

#critter-layer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 110px;
  z-index: 50;
  pointer-events: none;
  overflow: visible;
}

.critter {
  position: absolute;
  bottom: 4px;
  width: 74px;
  height: 84px;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
}
.critter svg { width: 100%; height: 100%; overflow: visible; }
.critter .flip { transition: transform 0.2s ease; transform-origin: 50% 50%; }
.critter.face-left .flip { transform: scaleX(-1); }

.critter .bod { transform-origin: 50% 90%; }
.critter.walking .bod { animation: waddle 0.5s ease-in-out infinite; }
@keyframes waddle {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%      { transform: rotate(3deg) translateY(-3px); }
}

.critter .leg { transform-origin: 50% 0%; transform-box: fill-box; }
.critter.walking .leg-l { animation: step 0.5s ease-in-out infinite; }
.critter.walking .leg-r { animation: step 0.5s ease-in-out infinite; animation-delay: 0.25s; }
@keyframes step {
  0%, 100% { transform: rotate(20deg); }
  50%      { transform: rotate(-20deg); }
}

.critter .inner { display: block; height: 100%; }
.critter.jumping .inner { animation: critter-jump 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes critter-jump {
  0%   { transform: translateY(0) scale(1, 1); }
  15%  { transform: translateY(0) scale(1.15, 0.8); }
  50%  { transform: translateY(-56px) scale(0.92, 1.1); }
  85%  { transform: translateY(0) scale(1.1, 0.86); }
  100% { transform: translateY(0) scale(1, 1); }
}

.critter .speech {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) scale(0);
  transform-origin: bottom center;
  background: var(--white);
  border: var(--line);
  border-radius: 14px;
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 4px 12px;
  white-space: nowrap;
  transition: transform 0.2s cubic-bezier(0.34, 1.8, 0.64, 1);
}
.critter .speech.show { transform: translateX(-50%) scale(1); }

/* Big hero mascots ---------------------------------------------------------------------- */

.mascot-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.mascot-row .mascot {
  width: clamp(84px, 12vw, 130px);
  animation: bob 3s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.mascot-row .mascot:hover { transform: scale(1.12) rotate(-4deg); }
.mascot-row .mascot:nth-child(2) { animation-delay: -0.6s; }
.mascot-row .mascot:nth-child(3) { animation-delay: -1.2s; }
.mascot-row .mascot:nth-child(4) { animation-delay: -1.8s; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* For-parents strip ---------------------------------------------------------------------- */

.parent-note {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 34px 38px;
}
.parent-note .doodle { flex-shrink: 0; }
.parent-note h3 { font-size: 1.4rem; margin-bottom: 8px; }
.parent-note p { color: var(--ink-soft); font-weight: 600; }
@media (max-width: 700px) { .parent-note { flex-direction: column; text-align: center; } }

/* CTA band --------------------------------------------------------------------------------- */

.cta-band {
  padding: 40px 0 120px;
  text-align: center;
}
.cta-card {
  position: relative;
  background: var(--sunshine);
  border: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 64px 32px;
  overflow: hidden;
}
.cta-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
.cta-card p { font-weight: 700; color: var(--ink); margin-bottom: 28px; font-size: 1.15rem; }
.cta-card .corner-doodle {
  position: absolute;
  font-size: 3rem;
  animation: floaty 5s ease-in-out infinite;
}

/* Footer -------------------------------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 140px; /* room for the critters to walk */
  border-top: var(--line);
  position: relative;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-brand { max-width: 320px; }
.footer-brand .site-logo .wordmark { color: var(--paper); }
.footer-brand p { margin-top: 14px; color: rgba(255, 246, 233, 0.75); font-weight: 600; }
.footer-links { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-links h4 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: var(--sunshine);
}
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a {
  text-decoration: none;
  font-weight: 600;
  color: rgba(255, 246, 233, 0.85);
}
.footer-links a:hover { color: var(--sunshine); }
.footer-bottom {
  border-top: 2px dashed rgba(255, 246, 233, 0.25);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 600;
  color: rgba(255, 246, 233, 0.6);
  font-size: 0.95rem;
}

/* Page hero (inner pages) ------------------------------------------------------------------------ */

.page-hero {
  text-align: center;
  padding: 72px 0 40px;
}
.page-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: 16px; }
.page-hero .lead { font-size: 1.2rem; color: var(--ink-soft); font-weight: 600; max-width: 56ch; margin-inline: auto; }

/* Program cards (programs page) */
.program { scroll-margin-top: 120px; }
.program-list { display: grid; gap: 28px; }
.program .age-pill {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--paper);
  border: var(--line);
  border-radius: 999px;
  padding: 3px 14px;
  display: inline-block;
  margin-bottom: 8px;
}
.program ul { margin: 14px 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-weight: 600; }
.program li { margin-bottom: 6px; padding-left: 1.6em; position: relative; }
.program li::before { content: "⭐"; position: absolute; left: 0; font-size: 0.85em; }

/* About page */
.big-quote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  text-align: center;
  max-width: 26ch;
  margin: 0 auto;
  line-height: 1.4;
}
.big-quote em { font-style: normal; color: var(--coral); }

/* Contact page */
.contact-card {
  text-align: center;
  padding: 54px 32px;
}
.contact-card .mail-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  color: var(--coral-deep);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.contact-emoji { font-size: 3.4rem; display: block; margin-bottom: 12px; }

/* Scroll reveal ------------------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px) rotate(0.5deg);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.reveal.revealed { opacity: 1; transform: none; }

/* 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; }
  #critter-layer { display: none; }
  .reveal { opacity: 1; transform: none; }
}

/* Company / legal details ------------------------------------------------------------------------ */
.footer-company {
  margin-top: 14px;
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(255, 246, 233, 0.45);
}

.footer-company a {
  color: inherit;
  text-decoration: underline;
}

.footer-company a:hover {
  color: rgba(255, 246, 233, 0.8);
}

.company-block {
  display: block;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 2px dashed rgba(51, 48, 94, 0.15);
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.company-block strong {
  display: block;
  color: var(--ink);
}

.company-block a {
  color: inherit;
  text-decoration: underline;
}

/* Programs — blurred placeholder while the tracks are being built -------------------------------- */
.program-preview {
  position: relative;
  margin-top: 14px;
}

/* Empty bars, not fake text — nothing readable if the blur is unsupported,
   and hidden from assistive tech entirely. */
.program-skeleton {
  margin: 0;
  padding: 0;
  list-style: none;
  filter: blur(4px);
  opacity: 0.5;
  user-select: none;
  pointer-events: none;
}

.program-skeleton li {
  margin-bottom: 10px;
  padding-left: 1.6em;
  position: relative;
}

.program-skeleton li::before {
  content: "⭐";
  position: absolute;
  left: 0;
  font-size: 0.85em;
}

.program-skeleton span {
  display: block;
  height: 0.85em;
  border-radius: 999px;
  background: var(--ink-soft);
  opacity: 0.45;
}

.program-soon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--ink);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .program-skeleton { filter: blur(4px); }
}
