/* Home page (modern kids-site layout). Base tokens live in styles.css. */
body.home { background: #fffaf2; }

/* ---------- top bar with icon navigation ---------- */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem; padding: .45rem 1rem;
  background: rgba(255,250,242,.92); backdrop-filter: blur(10px); box-shadow: 0 2px 14px rgba(61,26,110,.08); }
.topbar .brand { flex: none; }
.iconnav { display: flex; gap: .35rem; margin: 0 auto; }
.iconnav a { display: flex; flex-direction: column; align-items: center; gap: .1rem; text-decoration: none; color: var(--purple-dark);
  font-weight: 700; font-size: .82rem; padding: .3rem .55rem; border-radius: 16px; transition: background .15s, transform .15s; }
.iconnav a .ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.45rem;
  background: var(--tile); box-shadow: inset 0 -4px 0 rgba(0,0,0,.08); }
.iconnav a:hover { background: #fff; transform: translateY(-2px); }
.grownups { flex: none; font-weight: 700; font-size: .85rem; color: var(--purple); text-decoration: none; border: 2px solid #e3d4fb;
  border-radius: 999px; padding: .35em .9em; background: #fff; }

/* mobile: icons become an app-style bottom tab bar */
@media (max-width: 860px) {
  .iconnav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; justify-content: space-around; background: rgba(255,255,255,.97);
    box-shadow: 0 -4px 18px rgba(61,26,110,.12); padding: .35rem .2rem calc(.35rem + env(safe-area-inset-bottom)); z-index: 60; }
  .iconnav a { padding: .1rem .2rem; font-size: .7rem; }
  .iconnav a .ic { width: 38px; height: 38px; font-size: 1.25rem; }
  body.home { padding-bottom: 76px; }
  .topbar { justify-content: space-between; }
  .ppk-mute { bottom: 86px !important; }
}

/* ---------- hero ---------- */
.hero2 { position: relative; overflow: hidden; background: linear-gradient(180deg, #bfe6ff 0%, #e8f6ff 45%, #fffaf2 100%); padding: 2.2rem 1rem 0; }
.hero2 .cloud { position: absolute; background: #fff; border-radius: 999px; opacity: .9; filter: drop-shadow(0 6px 10px rgba(80,140,200,.15)); animation: drift linear infinite; }
.hero2 .cloud::before, .hero2 .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.hero2 .cloud::before { width: 55%; height: 140%; left: 12%; top: -60%; }
.hero2 .cloud::after { width: 40%; height: 110%; right: 14%; top: -40%; }
@keyframes drift { from { transform: translateX(-20vw); } to { transform: translateX(120vw); } }
.hero-grid { position: relative; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: center; }
.hero-copy h1 { font-size: clamp(2.3rem, 5.2vw, 4.2rem); line-height: 1.02; }
.hero-copy h1 span { display: block; }
.hero-copy p { font-size: 1.2rem; font-weight: 500; margin: 1rem 0 1.4rem; max-width: 520px; }
.hero-art { position: relative; }
.hero-art img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
  border: 8px solid #fff; box-shadow: 0 20px 50px rgba(61,26,110,.25); animation: blob 9s ease-in-out infinite; }
@keyframes blob { 50% { border-radius: 56% 44% 58% 42% / 44% 56% 44% 56%; } }
.hero-art .bubble-say { position: absolute; left: -6%; bottom: 12%; background: #fff; border-radius: 22px; padding: .6rem 1rem; font-weight: 700;
  color: var(--purple-dark); box-shadow: 0 8px 20px rgba(61,26,110,.18); max-width: 220px; }
.hero-art .bubble-say::after { content: ""; position: absolute; right: -10px; top: 40%; border: 10px solid transparent; border-left-color: #fff; }
.portals { position: relative; max-width: 1180px; margin: 1.8rem auto 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; padding-bottom: 3.2rem; }
.portal { text-decoration: none; text-align: center; color: var(--purple-dark); font-weight: 700; font-size: 1.05rem; }
.portal .orb { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 50%; font-size: clamp(2.2rem, 5vw, 3.2rem);
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.75), transparent 38%), var(--orb); border: 5px solid #fff;
  box-shadow: 0 8px 0 rgba(61,26,110,.18), 0 14px 26px rgba(61,26,110,.18); margin-bottom: .45rem; transition: transform .2s; }
.portal:hover .orb { transform: translateY(-6px) rotate(-4deg) scale(1.04); }
.wave { display: block; width: 100%; height: 60px; margin-top: -1px; }

/* ---------- section headers + scrolling rows ---------- */
.band { padding: 3.2rem 0; }
.band.tint { background: #f3eaff; }
.band.sun { background: #fff4d6; }
.band.mint { background: #e2f7ef; }
.band-in { max-width: 1180px; margin: 0 auto; padding: 0 1rem; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.row-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); display: flex; align-items: center; gap: .6rem; }
.row-head h2 .host { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; object-position: center 18%; border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(61,26,110,.15); background: rgb(214,199,192); }
.see-all { flex: none; font-weight: 700; text-decoration: none; color: #fff; background: var(--purple); padding: .45em 1.1em; border-radius: 999px;
  box-shadow: 0 4px 0 var(--purple-dark); }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 1.1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .4rem .2rem 1.2rem; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; }
@media (max-width: 860px) { .scroller { grid-auto-columns: 72%; } }

.tile { background: #fff; border-radius: 26px; overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column;
  box-shadow: 0 10px 24px rgba(61,26,110,.1); transition: transform .2s; border: 0; font: inherit; text-align: left; cursor: pointer; padding: 0; }
.tile:hover { transform: translateY(-6px); }
.tile .pic { position: relative; aspect-ratio: 4/3; background: var(--bg, #efe4ff); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; }
.tile .pic img.char { object-fit: contain; object-position: center bottom; }
.tile .pic .badge { position: absolute; left: .7rem; top: .7rem; background: #fff; color: var(--purple-dark); font-weight: 700; font-size: .75rem;
  padding: .2em .7em; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.tile .pic .yt { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%; background: rgba(255,0,0,.92); color: #fff;
  border: 4px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; padding-left: 5px; }
.tile .t { padding: .8rem 1rem 1.1rem; }
.tile h3 { color: var(--purple); font-size: 1.15rem; line-height: 1.2; }
.tile p { font-size: .92rem; line-height: 1.4; margin-top: .25rem; }

/* ---------- friends ---------- */
.friends2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.pal { background: #fff; border-radius: 30px; padding: .8rem .8rem 1.1rem; text-align: center; box-shadow: 0 10px 24px rgba(61,26,110,.1);
  border: 0; font: inherit; color: var(--text); cursor: pointer; transition: transform .2s; position: relative; }
.pal:hover { transform: translateY(-6px) rotate(-1.5deg); }
.pal .por { aspect-ratio: 1; border-radius: 24px; background: rgb(214,199,192); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.pal .por img { height: 100%; width: 100%; object-fit: cover; object-position: center 14%; }
.pal .por img.full { object-fit: contain; object-position: center bottom; }
.pal h3 { font-size: 1.4rem; margin-top: .55rem; color: var(--c); }
.pal p { font-size: .92rem; line-height: 1.4; }
.pal .say { display: inline-block; margin-top: .5rem; background: var(--c); color: #fff; font-weight: 700; font-size: .85rem; border-radius: 999px; padding: .25em .9em; }
.pal.talking { animation: ppk-wig .45s ease-in-out 3; }
@media (max-width: 860px) { .friends2 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- dance-along ---------- */
.dance2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.dance2 .pic { border-radius: 30px; overflow: hidden; box-shadow: 0 14px 34px rgba(61,26,110,.2); position: relative; }
.dance2 .pic img { width: 100%; display: block; }
.dance2 .pic.grooving img { animation: groove 1s ease-in-out infinite; }
@keyframes groove { 25% { transform: rotate(-1.2deg) scale(1.02); } 75% { transform: rotate(1.2deg) scale(1.02); } }
.moves { list-style: none; display: flex; flex-direction: column; gap: .55rem; margin: 1rem 0 1.3rem; }
.moves li { display: flex; align-items: center; gap: .8rem; background: #fff; border-radius: 18px; padding: .6rem .9rem; font-weight: 700; font-size: 1.15rem;
  box-shadow: 0 5px 14px rgba(61,26,110,.08); transition: transform .2s, background .2s; }
.moves li .n { width: 38px; height: 38px; border-radius: 50%; background: #ffe3f1; color: #d63c8a; display: flex; align-items: center; justify-content: center; flex: none; }
.moves li.now { background: var(--yellow); transform: scale(1.04) translateX(6px); }
.moves li.now .n { background: #fff; }
@media (max-width: 860px) { .dance2 { grid-template-columns: 1fr; } }

/* ---------- learn band ---------- */
.explore { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.explore a { text-decoration: none; border-radius: 26px; padding: 1.3rem 1.1rem; color: #fff; font-weight: 700; font-size: 1.15rem; min-height: 150px;
  display: flex; flex-direction: column; justify-content: space-between; background: var(--g); box-shadow: 0 10px 24px rgba(61,26,110,.15); transition: transform .2s; }
.explore a:hover { transform: translateY(-5px) rotate(-1deg); }
.explore a .e { font-size: 2.6rem; }
.explore a small { display: block; font-weight: 500; font-size: .9rem; opacity: .95; margin-top: .3rem; }
@media (max-width: 860px) { .explore { grid-template-columns: 1fr 1fr; } }

/* ---------- grown-ups ---------- */
.grown { background: #2a1150; color: #f3eaff; padding: 3.2rem 0; }
.grown h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.3rem); margin-bottom: .4rem; }
.grown .lead2 { opacity: .85; margin-bottom: 1.4rem; max-width: 640px; }
.gcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gcards .gc { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 1.1rem; }
.gcards h3 { color: #ffd84a; font-size: 1.05rem; margin-bottom: .3rem; }
.gcards p { font-size: .92rem; line-height: 1.5; }
.support { margin-top: 1.6rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; background: linear-gradient(120deg, #6a2fc0, #b04bc9);
  border-radius: 24px; padding: 1.3rem 1.5rem; }
.support div { flex: 1; min-width: 240px; }
.support h3 { color: #fff; font-size: 1.3rem; }
.support p { font-size: .95rem; opacity: .95; }
.support .soon { background: #ffd84a; color: #2a1150; font-weight: 700; border-radius: 999px; padding: .55em 1.3em; }
@media (max-width: 860px) { .gcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .gcards { grid-template-columns: 1fr; } }

/* ---------- book preview modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(30,10,60,.7); display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal.open { display: flex; }
.book-open { background: #fff; border-radius: 28px; width: min(920px, 100%); max-height: 92vh; overflow: auto; display: grid; grid-template-columns: 1fr 1fr;
  box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.book-open .bimg { aspect-ratio: 1; background: #f3eaff; }
.book-open .bimg img { width: 100%; height: 100%; object-fit: cover; animation: turn .45s ease-out; }
@keyframes turn { from { transform: perspective(900px) rotateY(-25deg); opacity: .3; } }
.book-open .btext { padding: 1.4rem 1.5rem; display: flex; flex-direction: column; }
.book-open h3 { color: var(--purple); font-size: 1.4rem; }
.book-open .words { flex: 1; display: flex; align-items: center; font-size: 1.25rem; font-weight: 600; line-height: 1.55; white-space: pre-line; padding: 1rem 0; }
.book-open .nav2 { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.book-open .nav2 button { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: .55em 1.1em; cursor: pointer; background: var(--purple); color: #fff; }
.book-open .nav2 .x { background: #efe4ff; color: var(--purple-dark); }
.book-open .dots { display: flex; gap: .3rem; }
.book-open .dots i { width: 10px; height: 10px; border-radius: 50%; background: #e3d4fb; }
.book-open .dots i.on { background: var(--purple); }
@media (max-width: 700px) { .book-open { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .hero2 .cloud, .hero-art img, .dance2 .pic.grooving img, .book-open .bimg img { animation: none; }
}

/* ---------- fixes: sizes and crops ---------- */
.portals { max-width: 980px; }
.portal .orb { max-width: 132px; margin-left: auto; margin-right: auto; }
img.who-wobbles, .pal .por img.full { object-fit: cover !important; object-position: center 82% !important; }
img.who-harper, img.who-kaevin { object-fit: cover !important; object-position: center 12% !important; }
img.who-sunny { object-fit: cover !important; object-position: center 35% !important; }
.row-head h2 .host.wob { object-position: center 85%; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.2rem; text-align: center; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-copy .cta { justify-content: center; }
  .hero-art { max-width: 340px; margin: 0 auto; }
  .hero-art .bubble-say { left: 0; bottom: -4%; }
  .portals { grid-template-columns: repeat(3, 1fr); gap: .8rem 1rem; padding-bottom: 2.4rem; }
  .portal .orb { max-width: 96px; }
  .row-head h2 .host { width: 44px; height: 44px; }
  .see-all { font-size: .85rem; }
}
@media (max-width: 860px) {
  /* a backdrop-filter on the header would trap the fixed bottom tab bar inside it */
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fffaf2; }
}
