/* ============================================================
   Music Master — Marketing site shared styles
   Aesthetic: clean white + pastel washes
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Base */
  --bg: #ffffff;
  --bg-soft: #fbfaf7;
  --ink: #1f1c33;
  --ink-soft: #4a4663;
  --muted: #807c97;
  --line: #ece8f3;
  --line-soft: #f3f0f9;

  /* Pastel washes per section / per game */
  --pastel-butter: #fff5dc;     /* Note Ninja */
  --pastel-sky:    #e3f0fb;     /* Interval Sensei */
  --pastel-mint:   #e6f4ec;     /* Scale Guru */
  --pastel-rose:   #fbe7f0;     /* Chord Wizard */
  --pastel-leaf:   #e3f3df;     /* Rhythm Sage */
  --pastel-peach:  #fce8e3;     /* Pitch Maestro */
  --pastel-lavender:#efe9fa;    /* Generic accent */

  /* Brand gradient (matches in-app) */
  --grad: linear-gradient(90deg, #f5a623 0%, #f47a7a 50%, #a78bfa 100%);
  --grad-soft: linear-gradient(135deg, #fff5dc 0%, #fbe7f0 50%, #efe9fa 100%);

  --orange:  #f5a623;
  --coral:   #f47a7a;
  --purple:  #a78bfa;
  --cyan:    #22d3ee;

  --shadow-sm: 0 1px 2px rgba(31,28,51,0.04), 0 2px 8px rgba(31,28,51,0.04);
  --shadow-md: 0 4px 12px rgba(31,28,51,0.06), 0 12px 28px rgba(31,28,51,0.06);
  --shadow-lg: 0 8px 24px rgba(31,28,51,0.08), 0 24px 56px rgba(31,28,51,0.10);

  --radius-sm: 12px;
  --radius:    20px;
  --radius-lg: 28px;

  --max: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--coral); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: 'Fredoka One', cursive; color: var(--ink); margin: 0 0 0.4em; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.muted { color: var(--muted); }

/* ============================================================
   Container + sections
   ============================================================ */
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

section { padding: 96px 0; position: relative; }
section.compact { padding: 64px 0; }

.section-eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}

.bg-soft     { background: var(--bg-soft); }
.bg-lavender { background: var(--pastel-lavender); }
.bg-peach    { background: var(--pastel-peach); }
.bg-mint     { background: var(--pastel-mint); }
.bg-leaf     { background: var(--pastel-leaf); }
.bg-butter   { background: var(--pastel-butter); }
.bg-sky      { background: var(--pastel-sky); }
.bg-rose     { background: var(--pastel-rose); }
.bg-grad-soft{ background: var(--grad-soft); }

/* Gradient headline span */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   Top nav (shared)
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { height: 56px; width: auto; }
.nav-brand-text {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  letter-spacing: 0.4px;
  line-height: 1;
}
@media (max-width: 700px) {
  .nav-brand img      { height: 44px; }
  .nav-brand-text     { font-size: 1.2rem; }
}
.nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-links a {
  padding: 10px 14px; border-radius: 999px;
  font-weight: 500; font-size: 0.95rem;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}
.nav-links a:hover { background: var(--line-soft); color: var(--ink); }
.nav-links a.active {
  background: var(--ink); color: #fff;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: 1rem;
  cursor: pointer; border: 0;
  transition: transform 0.12s ease, box-shadow 0.18s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 20px rgba(244,122,122,0.30);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(244,122,122,0.38); color:#fff; }
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-sm { padding: 10px 18px; font-size: 0.92rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 88px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 12% 18%, rgba(245,166,35,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 88% 22%, rgba(167,139,250,0.20) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 92%, rgba(244,122,122,0.13) 0%, transparent 60%);
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 { max-width: 22ch; }
.hero p.lead {
  font-size: 1.18rem; max-width: 56ch; color: var(--ink-soft);
  margin: 18px 0 32px;
}

/* Gameplay screenshot frame for module rows */
.module-screen {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #fff;
  border: 1px solid var(--line);
  aspect-ratio: 16/10;
  width: 100%;
}
.module-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Combined demo banner: testing strip on top, two cards below — one unit */
.demo-banner {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-top: 40px;
}
.demo-banner .testing-strip {
  border: 1.5px dashed var(--coral);
  border-radius: var(--radius);
  padding: 14px 20px;
  text-align: center;
  margin-bottom: 26px;
  font-size: 0.98rem;
  color: var(--ink);
}
.demo-banner .testing-strip strong { color: var(--coral); }

/* Two-card demo grid (now lives inside the banner) */
.demo-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.demo-pair .demo-card {
  padding: 28px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.demo-pair .demo-thumb { aspect-ratio: 16/9; }
.demo-pair .demo-card .tile-desc { white-space: normal; }
.demo-pair .demo-card .tile-name + .tile-desc { font-size: 0.92rem; }
/* Ensure the primary buttons in both cards align horizontally — pad the
   single-button card to match the double-button card. */
.demo-pair .demo-actions-stack {
  display: flex; flex-direction: column; gap: 10px; margin-top: auto;
}
.demo-pair .demo-actions-stack .spacer-btn { visibility: hidden; pointer-events: none; }

.logo-dark-card {
  display: inline-block;
  margin: 0 auto 32px;
}
.logo-dark-card img { display: block; }

/* Student-dashboard split layout for the home page game grid */
.grid-split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) auto minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  width: 100%;
}
.grid-col-label {
  font-size: 0.78rem; color: var(--muted); letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 700;
  margin-bottom: 18px; padding-left: 4px;
}
.grid-theory { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-aural  { display: grid; grid-template-columns: 1fr; gap: 22px; align-content: start; }
.grid-divider {
  width: 1px; position: relative; align-self: stretch; min-height: 100%;
  background: linear-gradient(180deg,
    transparent 0%, rgba(167,139,250,0.45) 15%,
    rgba(167,139,250,0.45) 85%, transparent 100%);
}
@media (max-width: 900px) {
  .grid-split { grid-template-columns: 1fr; gap: 18px; }
  .grid-divider {
    width: 100%; min-height: 1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167,139,250,0.45), transparent);
  }
  .grid-aural { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-theory, .grid-aural { grid-template-columns: 1fr; }
}

/* Category-based tile colours: all theory cream, all aural green */
.tile[data-category="theory"] .tile-cover { background: var(--pastel-butter); }
.tile[data-category="aural"]  .tile-cover { background: var(--pastel-leaf); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-logo {
  margin-bottom: 30px;
  width: 220px; max-width: 60vw;
}

/* ============================================================
   Game tiles grid
   ============================================================ */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; color: var(--ink); }

.tile-cover {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--pastel-lavender);
}
.tile-cover img { width: 86%; height: 86%; object-fit: contain; }

.tile.is-ninja  .tile-cover { background: var(--pastel-butter); }
.tile.is-sensei .tile-cover { background: var(--pastel-sky); }
.tile.is-guru   .tile-cover { background: var(--pastel-mint); }
.tile.is-wizard .tile-cover { background: var(--pastel-rose); }
.tile.is-sage   .tile-cover { background: var(--pastel-leaf); }
.tile.is-maestro .tile-cover { background: var(--pastel-peach); }

.tile-name { font-family: 'Fredoka One'; font-size: 1.3rem; }
.tile-desc { color: var(--ink-soft); font-size: 0.95rem; }
.tile-tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--coral);
  margin-bottom: 2px;
}

/* ============================================================
   Audience trio
   ============================================================ */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.audience-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.audience-card .icon-circle {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--pastel-lavender);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.audience-card h3 { margin-bottom: 6px; }

/* ============================================================
   Featured panel (about, callouts)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 36px; } }

.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  padding: 14px 0; border-bottom: 1px dashed var(--line);
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--ink-soft);
}
.feature-list li:last-child { border-bottom: 0; }
.feature-list .check {
  flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--grad); color: #fff;
  font-weight: 700; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.feature-list strong { color: var(--ink); }

/* ============================================================
   Game module rows (games.html)
   ============================================================ */
.module {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--line-soft);
}
.module:last-child { border-bottom: 0; }
.module.flip { direction: rtl; }
.module.flip > * { direction: ltr; }
@media (max-width: 820px) {
  .module, .module.flip { grid-template-columns: 1fr; gap: 28px; direction: ltr; }
}

.module-art {
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex; align-items: center; justify-content: center;
  min-height: 320px;
  position: relative;
}
.module-art img.character {
  max-height: 280px; width: auto;
  filter: drop-shadow(0 12px 28px rgba(31,28,51,0.18));
}
.module-art .gameplay-thumb {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-md);
  position: absolute;
  bottom: 18px; right: 18px;
  width: 44%;
  border: 1px solid var(--line);
}
.module-art .gameplay-thumb img { width: 100%; border-radius: 12px; }
.module-art .gameplay-thumb .label {
  font-size: 0.72rem; color: var(--muted);
  margin-top: 8px; text-align: center;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}

.module-tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  margin-bottom: 14px;
}
.tag-theory { background: var(--pastel-lavender); color: #6b4ed1; }
.tag-aural  { background: var(--pastel-peach); color: #c4533c; }

.mode-pill-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 18px;
  overflow-x: auto;
}
.mode-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.74rem;
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
  flex: none;
}
@media (max-width: 820px) {
  .mode-pill-row { flex-wrap: wrap; overflow-x: visible; }
}

/* Stacked-card cluster of 3 gameplay screenshots */
.screen-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  margin: 0 auto;
}
.screen-stack .stack-card {
  position: absolute;
  top: 0; left: 0;
  width: 78%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transition:
    transform 0.55s cubic-bezier(.34,1.2,.64,1),
    top      0.55s cubic-bezier(.34,1.2,.64,1),
    left     0.55s cubic-bezier(.34,1.2,.64,1),
    box-shadow 0.4s ease;
  cursor: pointer;
}
.screen-stack { cursor: pointer; }
.screen-stack .stack-card.is-flipping {
  transition:
    transform 0.6s cubic-bezier(.6,.02,.4,1),
    top      0.6s cubic-bezier(.6,.02,.4,1),
    left     0.6s cubic-bezier(.6,.02,.4,1),
    box-shadow 0.4s ease;
}
.screen-stack .stack-card img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.screen-stack .stack-card:nth-child(1) {
  top: 4%;
  left: 0%;
  transform: rotate(-5.5deg);
  z-index: 1;
}
.screen-stack .stack-card:nth-child(2) {
  top: 12%;
  left: 11%;
  transform: rotate(2.5deg);
  z-index: 2;
}
.screen-stack .stack-card:nth-child(3) {
  top: 20%;
  left: 22%;
  transform: rotate(-1.5deg);
  z-index: 3;
  box-shadow: var(--shadow-lg);
}
.screen-stack:hover .stack-card:nth-child(1) { transform: rotate(-7.5deg) translate(-4%, -2%); }
.screen-stack:hover .stack-card:nth-child(3) { transform: rotate(-0.5deg) translate(3%, 1%); }

/* Shuffle: cross-fade between two layered <img> tags inside each stack-card */
.stack-card .img-layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 1;
  transition: opacity 0.55s ease;
}
.stack-card .img-layer.fade-out { opacity: 0; }
.stack-card { overflow: hidden; }

/* Tiny "shuffling" pulse on the front card */
@keyframes stack-pulse {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50%      { box-shadow: 0 12px 32px rgba(244,122,122,0.30), 0 24px 56px rgba(31,28,51,0.10); }
}
.screen-stack[data-shuffling="true"] .stack-card:nth-child(3) {
  animation: stack-pulse 2.4s ease-in-out infinite;
}

/* ============================================================
   Demo page launchers
   ============================================================ */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.demo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex; flex-direction: column; gap: 16px;
  text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.18s ease;
}
.demo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--ink); }
.demo-card .demo-thumb {
  border-radius: var(--radius);
  aspect-ratio: 16/10; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--pastel-lavender);
}
.demo-card .demo-thumb img { width: 78%; height: 78%; object-fit: contain; }
.demo-card .demo-actions { display: flex; gap: 10px; margin-top: auto; }

/* ============================================================
   Contact form
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-row label {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.form-row input, .form-row textarea, .form-row select {
  font-family: inherit; font-size: 1rem;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--purple); background: #fff;
}
.form-row textarea { resize: vertical; min-height: 130px; }

.contact-info-card {
  background: var(--pastel-lavender);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-info-card h3 { margin-bottom: 8px; }
.contact-info-card .info-line {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px dashed rgba(31,28,51,0.15);
  color: var(--ink-soft);
}
.contact-info-card .info-line:first-of-type { border-top: 0; }
.contact-info-card .info-icon { font-size: 1.3rem; }

/* ============================================================
   FAQ accordion
   ============================================================ */
.faq-list { max-width: 780px; margin: 40px auto 0; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  padding: 22px 26px;
  font-weight: 600; font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: 'Fredoka One';
  font-size: 1.6rem;
  color: var(--coral);
  transition: transform 0.18s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body {
  padding: 0 26px 22px;
  color: var(--ink-soft);
}

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  background: var(--grad);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.92); max-width: 56ch; margin: 0 auto 24px; }
.cta-band .btn-primary { background: #fff; color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.cta-band .btn-primary:hover { color: var(--ink); }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 48px 0 36px;
  margin-top: 24px;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 28px;
  display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: space-between; align-items: center;
}
.footer .nav-brand img { height: 32px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 0.92rem; }
.footer-links a:hover { color: var(--ink); }
.footer-meta { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.05em; }
/* Higher specificity to override .nav-links a defaults (padding + font-size) */
.nav-links a.nav-social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  padding: 0; margin: 0 2px;
  border-radius: 50%;
  color: var(--ink-soft); background: transparent;
  flex: 0 0 auto;
  transition: all 0.2s ease;
}
.nav-links a.nav-social-icon:hover {
  color: #fff;
  background: var(--coral);
}
.nav-links a.nav-social-icon svg {
  display: block;
  width: 22px; height: 22px;
  flex-shrink: 0;
}

/* ============================================================
   Stat strip
   ============================================================ */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.stat .num {
  font-family: 'Fredoka One';
  font-size: 2.2rem;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .label { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

/* ============================================================
   Dashboard feature rows (demo.html)
   ============================================================ */
.dash-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
}
.dash-feature:last-child { margin-bottom: 0; }
.dash-feature.dash-feature-flip { direction: rtl; }
.dash-feature.dash-feature-flip > * { direction: ltr; }
/* Screen stack inside dash-feature: smaller than the games page stacks */
.dash-feature .screen-stack {
  width: 100%;
  aspect-ratio: 16 / 11;
}

/* Staggered tile stack for the Teacher Module card */
.tile-stack-wrap {
  position: relative;
  overflow: visible !important;
}
.tile-stack {
  position: relative;
  width: 88%;
  aspect-ratio: 16 / 10;
  margin: auto;
}
.tile-stack-card {
  position: absolute;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.tile-stack-card img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.tile-stack-card:nth-child(1) { top: 0; left: 0; z-index: 1; }
.tile-stack-card:nth-child(2) { top: 6px; left: 4px; z-index: 2; }
.tile-stack-card:nth-child(3) { top: 12px; left: 8px; z-index: 3; }
.tile-stack-card:nth-child(4) { top: 18px; left: 12px; z-index: 4; }
.tile-stack-card:nth-child(5) { top: 24px; left: 16px; z-index: 5; box-shadow: var(--shadow-md); }
.dash-feature-text h3 { margin-bottom: 10px; }
.dash-feature-text p { color: var(--ink-soft); font-size: 1.02rem; }
@media (max-width: 820px) {
  .dash-feature,
  .dash-feature.dash-feature-flip {
    grid-template-columns: 1fr;
    gap: 24px;
    direction: ltr;
  }
}

/* Mobile nav simplification */
@media (max-width: 700px) {
  .nav-links a { padding: 8px 10px; font-size: 0.88rem; }
  section { padding: 64px 0; }
  .hero { padding: 56px 0; }
}
