/* Starline Studio: a night sky where every app is a star. */
:root {
  --night-0: #04041a;
  --night-1: #0a0928;
  --night-2: #13113a;
  --card: rgba(22, 20, 62, 0.62);
  --card-solid: #15133d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ink: #f5f3ff;
  --muted: rgba(235, 232, 255, 0.66);
  --faint: rgba(235, 232, 255, 0.42);
  --star: #ffd86b;
  --violet: #a78bfa;
  --pink: #f472b6;
  --indigo: #818cf8;
  --brand: linear-gradient(115deg, #818cf8, #e879f9 45%, #fbbf24);
  --radius: 22px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 80% -10%, #2a1b6b 0%, transparent 60%),
              radial-gradient(900px 600px at -10% 30%, #12245e 0%, transparent 60%),
              linear-gradient(180deg, var(--night-1), var(--night-0) 60%);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 17px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, .display { font-family: "Sora", "Inter", sans-serif; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.grad { background: var(--brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- Navigation ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(6, 6, 28, 0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 18px "Sora", sans-serif; }
.logo span { color: var(--faint); font-weight: 600; }
.logo svg { filter: drop-shadow(0 0 10px rgba(232, 121, 249, .55)); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.logo:hover svg { transform: rotate(45deg) scale(1.08); }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--line-strong); transition: transform .2s, background .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: #fff; color: #0b0a26; border-color: #fff; box-shadow: 0 10px 40px -10px rgba(255, 255, 255, .45); }
.btn-ghost { background: rgba(255, 255, 255, .04); color: var(--ink); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); }
.btn-play svg { width: 18px; height: 18px; }
.nav .btn { padding: 9px 16px; font-size: 14px; }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 132px 0 60px; min-height: min(92vh, 940px); display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .04); color: var(--muted); font-size: 13px; font-weight: 500; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--star); box-shadow: 0 0 12px var(--star); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); font-weight: 800; margin: 22px 0 20px; }
.hero p.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 33ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 26px; color: var(--faint); font-size: 14px; }

/* The constellation: each app is a star joined by lines. */
.sky-map { position: relative; aspect-ratio: 1 / 0.92; width: 100%; }
.sky-map svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sky-map .lines line { stroke: url(#lineGrad); stroke-width: .26; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s cubic-bezier(.6, 0, .2, 1) forwards; opacity: .75; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sky-map .lines .speck { fill: #fff; opacity: .85; animation: twinkle 3s ease-in-out infinite; }
.sky-map .lines .spark { fill: #fff; filter: drop-shadow(0 0 1.2px #fff) drop-shadow(0 0 3px #e879f9); }
.cstar { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: var(--s, 84px); height: var(--s, 84px); border-radius: 26%; text-decoration: none; outline: none; animation: float 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cstar img { width: 100%; height: 100%; border-radius: 26%; position: relative; z-index: 1; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14), 0 18px 40px -12px rgba(0, 0, 0, .6); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.cstar::before { content: ""; position: absolute; inset: -38%; border-radius: 50%; background: radial-gradient(circle, var(--c) 0%, transparent 62%); opacity: .45; transition: opacity .35s, transform .35s; }
.cstar:hover img, .cstar:focus-visible img { transform: scale(1.12) rotate(-4deg); }
.cstar:hover::before, .cstar:focus-visible::before { opacity: .9; transform: scale(1.15); }
.cstar .tip { position: absolute; left: 50%; top: calc(100% + 12px); transform: translate(-50%, -6px); opacity: 0; white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: rgba(10, 9, 40, .9); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; transition: opacity .25s, transform .25s; pointer-events: none; z-index: 2; }
.cstar .tip small { color: var(--faint); font-weight: 500; margin-left: 6px; }
.cstar:hover .tip, .cstar:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
.cstar .soon { position: absolute; top: -10px; right: -16px; z-index: 2; background: var(--star); color: #2a1a00; font: 700 10px/1 "Inter", sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; box-shadow: 0 0 18px rgba(255, 216, 107, .6); }
@keyframes float { 0%, 100% { margin-top: 0; } 50% { margin-top: -10px; } }

@media (max-width: 900px) {
  .hero { min-height: 0; padding-top: 112px; }
  .hero-grid { grid-template-columns: 1fr; }
  .sky-map { max-width: 520px; margin: 10px auto 0; }
  .cstar { --s: 66px !important; }
}

/* ---------- Sections ---------- */
section { padding: 90px 0; position: relative; }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head .kicker { color: var(--star); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.sec-head h2 { font-size: clamp(32px, 4.2vw, 48px); font-weight: 800; margin: 12px 0 14px; }
.sec-head p { color: var(--muted); }

/* Numbers strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: rgba(10, 9, 40, .78); padding: 26px 22px; }
.stat b { display: block; font: 800 clamp(28px, 3.4vw, 40px) "Sora", sans-serif; }
.stat span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* App cards */
.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.app-card { position: relative; border-radius: var(--radius); padding: 1px; background: linear-gradient(140deg, color-mix(in srgb, var(--c) 70%, transparent), rgba(255, 255, 255, .06) 40%, rgba(255, 255, 255, .04)); transform-style: preserve-3d; transition: transform .25s ease-out, box-shadow .3s; box-shadow: var(--shadow); }
.app-card.wide { grid-column: 1 / -1; }
.app-in { position: relative; height: 100%; border-radius: calc(var(--radius) - 1px); background: radial-gradient(500px 260px at 0% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), var(--card-solid); padding: 28px; display: grid; grid-template-columns: 1fr auto; gap: 18px; overflow: hidden; }
.app-card:hover { box-shadow: 0 40px 90px -30px color-mix(in srgb, var(--c) 55%, black); }
.app-top { display: flex; gap: 16px; align-items: center; }
.app-top img { width: 68px; height: 68px; border-radius: 22%; box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--c) 70%, black); }
.app-top h3 { font-size: 22px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--muted); }
.chip.hot { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: color-mix(in srgb, var(--c) 45%, transparent); color: #fff; }
.app-card p.tag { color: var(--muted); margin: 18px 0 22px; max-width: 42ch; }
.app-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.app-actions .btn { padding: 10px 16px; font-size: 14px; }
.fan { position: relative; width: 170px; height: 100%; min-height: 230px; }
.fan img { position: absolute; width: 104px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .12); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.fan img:nth-child(1) { left: 0; top: 30px; transform: rotate(-9deg); }
.fan img:nth-child(2) { left: 52px; top: 6px; z-index: 2; transform: rotate(2deg); }
.fan img:nth-child(3) { left: 66px; top: 52px; transform: rotate(11deg); }
.app-card:hover .fan img:nth-child(1) { transform: rotate(-14deg) translate(-8px, 4px); }
.app-card:hover .fan img:nth-child(3) { transform: rotate(16deg) translate(10px, 6px); }
.app-card.wide .app-in { grid-template-columns: 1fr 1.25fr; align-items: center; }
.feature-art { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.feature-art img { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; }
.ribbon { position: absolute; top: 18px; right: -40px; transform: rotate(35deg); background: var(--star); color: #2a1a00; font: 800 11px/1 "Inter", sans-serif; letter-spacing: .12em; text-transform: uppercase; padding: 8px 46px; box-shadow: 0 0 30px rgba(255, 216, 107, .5); z-index: 3; }
@media (max-width: 900px) {
  .apps { grid-template-columns: 1fr; }
  .app-card.wide .app-in { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .app-in { grid-template-columns: 1fr; padding: 22px; }
  .fan { display: none; }
  .ribbon { display: none; }
}

/* Principles */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--card); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pcard .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong); margin-bottom: 18px; font-size: 22px; }
.pcard h3 { font-size: 19px; margin-bottom: 8px; }
.pcard p { color: var(--muted); font-size: 15.5px; }
@media (max-width: 900px) { .cards3 { grid-template-columns: 1fr; } }

/* Parents */
.parents { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; border: 1px solid var(--line); border-radius: 28px; padding: 40px; background: radial-gradient(600px 300px at 100% 0%, rgba(244, 114, 182, .16), transparent 70%), radial-gradient(500px 300px at 0% 100%, rgba(129, 140, 248, .16), transparent 70%), var(--card); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { display: flex; gap: 12px; color: var(--muted); }
.ticks li::before { content: "★"; color: var(--star); flex: none; text-shadow: 0 0 12px rgba(255, 216, 107, .6); }
.ticks b { color: var(--ink); font-weight: 600; }
.kid-icons { display: flex; gap: 14px; margin-top: 22px; }
.kid-icons img { width: 58px; height: 58px; border-radius: 22%; }
@media (max-width: 900px) { .parents { grid-template-columns: 1fr; padding: 26px; } }

/* Contact */
.contact { text-align: center; padding: 70px 24px; border-radius: 32px; border: 1px solid var(--line); background: radial-gradient(700px 300px at 50% 0%, rgba(167, 139, 250, .22), transparent 70%), var(--card); }
.contact h2 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; margin-bottom: 14px; }
.contact p { color: var(--muted); margin-bottom: 26px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 34px 0 44px; margin-top: 40px; color: var(--faint); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--ink); }

/* ---------- App pages ---------- */
.app-hero { padding: 130px 0 40px; }
.app-hero-in { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; }
.app-hero .big-icon { width: 150px; height: 150px; border-radius: 26%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14), 0 30px 90px -20px var(--c); }
.app-hero h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 800; margin-bottom: 12px; }
.app-hero p.lead { color: var(--muted); font-size: 19px; max-width: 52ch; margin: 14px 0 24px; }
.crumb { display: inline-block; color: var(--faint); text-decoration: none; font-size: 14px; margin-bottom: 26px; }
.crumb:hover { color: var(--ink); }
.glow-bg { position: absolute; width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 40%, transparent), transparent 65%); top: -200px; right: -160px; z-index: -1; pointer-events: none; }
@media (max-width: 700px) { .app-hero-in { grid-template-columns: 1fr; } .app-hero .big-icon { width: 110px; height: 110px; } }

.shots { display: flex; gap: 18px; overflow-x: auto; padding: 10px 4px 26px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.shots img { flex: none; width: 230px; border-radius: 22px; border: 3px solid rgba(255, 255, 255, .12); box-shadow: var(--shadow); scroll-snap-align: start; transition: transform .3s; }
.shots img:hover { transform: translateY(-6px); }
.shots.wide { justify-content: center; }
.shots.wide img { width: min(780px, 100%); }
@media (max-width: 600px) { .shots img { width: 180px; } .shots.wide img { width: 100%; } }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { display: flex; gap: 16px; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.feature .em { font-size: 26px; line-height: 1; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }

.note { border-radius: 20px; padding: 26px 28px; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 10%, var(--card-solid)); }
.note h3 { font-size: 19px; margin-bottom: 10px; }
.note p, .note li { color: var(--muted); }
.note ul { margin: 10px 0 0; padding-left: 20px; }

.more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.more a { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-decoration: none; transition: transform .2s, border-color .2s; }
.more a:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.more img { width: 46px; height: 46px; border-radius: 22%; }
.more b { font-size: 14px; display: block; }
.more span { font-size: 12px; color: var(--faint); }
@media (max-width: 900px) { .more { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Legal pages ---------- */
.legal-hero { padding: 130px 0 30px; }
.legal-hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; margin: 18px 0 10px; }
.legal-hero p { color: var(--faint); }
.legal { max-width: 780px; border-radius: 26px; border: 1px solid var(--line); background: var(--card); padding: clamp(24px, 4vw, 48px); color: var(--muted); }
.legal > * + * { margin-top: 26px; }
.legal h2 { font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: #c4b5fd; }
.legal ul { padding-left: 22px; margin: 8px 0 0; }
.legal li + li { margin-top: 6px; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--rd, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- More motion ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* Scroll progress along the top */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; background: var(--brand); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px rgba(232, 121, 249, .7); pointer-events: none; }

/* Headline words rise in, and "light up" shimmers */
.words .w { display: inline-block; animation: rise .9s cubic-bezier(.2, .9, .2, 1) backwards; animation-delay: calc(.12s + var(--i) * .09s); }
@keyframes rise { from { opacity: 0; transform: translateY(40%) rotate(4deg); filter: blur(6px); } }
.shimmer { background-size: 220% 100%; animation: rise .9s cubic-bezier(.2, .9, .2, 1) backwards, shimmer 6s linear infinite; animation-delay: calc(.12s + var(--i) * .09s), 1.4s; }
@keyframes shimmer { to { background-position: -220% 0; } }
.hero .lead, .hero-cta, .hero-note, .eyebrow { animation: fadeUp .9s cubic-bezier(.2, .9, .2, 1) backwards; }
.hero .eyebrow { animation-delay: .05s; }
.hero .lead { animation-delay: .75s; }
.hero-cta { animation-delay: .9s; }
.hero-note { animation-delay: 1.05s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } }

/* Slow nebula clouds drifting behind the hero */
.hero { position: relative; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .45; pointer-events: none; }
.hero::before { width: 520px; height: 520px; right: 4%; top: 10%; background: radial-gradient(circle, #7c3aed, transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.hero::after { width: 420px; height: 420px; left: -6%; bottom: 0; background: radial-gradient(circle, #2563eb, transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-60px, 40px) scale(1.15); } }

/* Constellation stars pop in one by one, and ripple when pointed at */
.cstar img { animation: pop .8s cubic-bezier(.2, 1.5, .4, 1) backwards; animation-delay: calc(var(--pd, 0s) + .4s); }
.cstar .soon { animation: pop .8s cubic-bezier(.2, 1.5, .4, 1) backwards, bounce 2.6s ease-in-out infinite; animation-delay: 1.4s, 2.2s; }
@keyframes pop { from { opacity: 0; transform: scale(.2) rotate(-20deg); } }
@keyframes bounce { 50% { transform: translateY(-4px) rotate(-6deg); } }
.cstar::after { content: ""; position: absolute; inset: -6px; border-radius: 30%; border: 2px solid var(--c); opacity: 0; pointer-events: none; }
.cstar:hover::after, .cstar:focus-visible::after { animation: ripple 1.2s ease-out infinite; }
@keyframes ripple { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }
@keyframes twinkle { 50% { opacity: .2; } }

/* Sparkles that follow the pointer */
.trail { position: fixed; z-index: 70; width: 10px; height: 10px; margin: -5px 0 0 -5px; pointer-events: none; background: radial-gradient(circle, #fff 0 25%, transparent 30%), conic-gradient(from 45deg, transparent 0 20%, var(--tc) 20% 30%, transparent 30% 45%, var(--tc) 45% 55%, transparent 55% 70%, var(--tc) 70% 80%, transparent 80% 95%, var(--tc) 95%); border-radius: 50%; animation: trail .9s ease-out forwards; }
@keyframes trail { from { opacity: 1; transform: scale(1) rotate(0); } to { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.2) rotate(140deg); } }

/* Section kickers get a twinkling star */
.sec-head .kicker::before { content: "✦"; display: inline-block; margin-right: 8px; animation: twinkle 2.4s ease-in-out infinite; }

/* A light sweeps across app cards, and their screenshots bob gently */
.app-in::after { content: ""; position: absolute; top: -40%; bottom: -40%; left: -50%; width: 35%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .09), transparent); transform: rotate(12deg) translateX(-140%); transition: transform 1s cubic-bezier(.2, .8, .2, 1); pointer-events: none; z-index: 2; }
.app-card:hover .app-in::after { transform: rotate(12deg) translateX(520%); }
.fan img:nth-child(2) { animation: bob 5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: rotate(2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-8px); } }
.feature-art img { transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.app-card:hover .feature-art img { transform: scale(1.04); }
.ribbon { animation: glowPulse 2.8s ease-in-out infinite; }
@keyframes glowPulse { 50% { box-shadow: 0 0 46px rgba(255, 216, 107, .9); } }

/* Parents' icons wobble when pointed at */
.kid-icons img { transition: transform .4s cubic-bezier(.2, 1.6, .4, 1); }
.kid-icons img:hover { transform: rotate(-10deg) scale(1.15); }

/* The contact button breathes */
.contact .btn-primary { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 10px 60px -6px rgba(232, 121, 249, .55); } }

/* Buttons lean towards the pointer (set by site.js) */
.btn.magnet { transition: transform .15s ease-out, background .2s, box-shadow .2s; }

/* App pages: the big icon floats, with stars orbiting it */
.icon-wrap { position: relative; width: 150px; height: 150px; animation: float 7s ease-in-out infinite; }
.icon-wrap .big-icon { position: relative; z-index: 1; }
.orbit { position: absolute; inset: -26px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .16); animation: spin 14s linear infinite; }
.orbit.slow { inset: -46px; border-color: rgba(255, 255, 255, .08); animation-duration: 26s; animation-direction: reverse; }
.orbit i { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff, 0 0 24px var(--c); }
.orbit.slow i { width: 7px; height: 7px; background: var(--star); box-shadow: 0 0 12px var(--star); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .icon-wrap { width: 110px; height: 110px; } }

/* ---------- Round three: more life ---------- */

/* The last words of the headline take turns */
/* The rotator is also a headline word, so it needs the more specific selector to stay a grid. */
.words .rotator { display: inline-grid; perspective: 600px; }
.rotator > span { grid-area: 1 / 1; opacity: 0; transform: translateY(55%) rotateX(-70deg); transform-origin: 50% 100%; transition: opacity .55s, transform .65s cubic-bezier(.2, .9, .2, 1); white-space: nowrap; }
.rotator > span.on { opacity: 1; transform: none; }
.rotator > span.out { opacity: 0; transform: translateY(-45%) rotateX(70deg); }

/* Starline dividers: a thin line with a star racing along it */
.starline { position: relative; height: 1px; background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .45), rgba(251, 191, 36, .35), transparent); }
.starline i { position: absolute; top: -3px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff, 0 0 22px #e879f9; animation: slideStar 7s cubic-bezier(.6, 0, .4, 1) infinite; }
.starline i::after { content: ""; position: absolute; right: 5px; top: 2.5px; width: 90px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75)); }
@keyframes slideStar { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

/* A satellite drifts across the sky now and then, its light blinking */
.satellite { position: fixed; top: 15vh; left: -60px; z-index: -1; opacity: .9; pointer-events: none; animation: pass 30s linear infinite; animation-delay: 5s; }
.satellite .blink { animation: blink 1.1s steps(2, jump-none) infinite; }
@keyframes pass { 0% { transform: translate(0, 0) rotate(-10deg); } 42% { transform: translate(calc(100vw + 140px), -8vh) rotate(-10deg); } 42.01%, 100% { transform: translate(calc(100vw + 140px), -8vh) rotate(-10deg); opacity: 0; } }
@keyframes blink { 50% { opacity: .15; } }

/* A soft crescent moon in the corner of the constellation */
.moon-path { position: absolute; right: -1%; top: -7%; width: 62px; height: 62px; z-index: 3; animation: moonTrip 26s ease-in-out infinite; animation-delay: 6s; }
.hero-moon { width: 62px; height: 62px; border-radius: 50%; box-shadow: inset -15px -7px 0 0 #ffe9a8; filter: drop-shadow(0 0 16px rgba(255, 220, 140, .65)); cursor: pointer; animation: moonFloat 6s ease-in-out infinite, moonGlow 5s ease-in-out infinite; }
.hero-moon.fly { animation: moonZoom 1.5s cubic-bezier(.5, 0, .8, .4) forwards, moonGlow 5s ease-in-out infinite; }
.hero-moon.back { animation: moonReturn 1.6s cubic-bezier(.2, .9, .3, 1.2) both, moonGlow 5s ease-in-out infinite; }
@keyframes moonGlow { 50% { filter: drop-shadow(0 0 30px rgba(255, 220, 140, .95)); } }
@keyframes moonFloat { 0%, 100% { transform: rotate(-20deg) translateY(0); } 50% { transform: rotate(-8deg) translateY(-12px); } }
/* Now and then the moon flies up and away out of the sky, then rises back into place. */
@keyframes moonTrip {
  0%, 68% { transform: translate(0, 0) scale(1); opacity: 1; }
  76% { transform: translate(140px, -170px) scale(.55); opacity: 0; }
  77% { transform: translate(-60px, 260px) scale(.55); opacity: 0; }
  90% { transform: translate(-10px, 30px) scale(.95); opacity: 1; }
  100% { transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes moonZoom { to { transform: translate(220px, -260px) rotate(200deg) scale(.3); opacity: 0; } }
@keyframes moonReturn { from { transform: translate(0, 160px) rotate(-60deg) scale(.4); opacity: 0; } }

/* Pointing at an app star lights up its lines and dims the rest */
.sky-map .lines line { transition: opacity .35s, stroke-width .35s; }
.sky-map.focus .lines line { opacity: .16; }
.sky-map.focus .lines line.hi { opacity: 1; stroke-width: .6; }
.cstar img { transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s; }
.sky-map.focus .cstar:not(.hi) img { filter: saturate(.45) brightness(.65); }

/* Tap anywhere: a burst of little stars */
.trail.burst { width: 12px; height: 12px; margin: -6px 0 0 -6px; animation: burst .85s cubic-bezier(.1, .8, .3, 1) forwards; }
@keyframes burst { from { opacity: 1; transform: translate(0, 0) scale(1.15) rotate(0); } to { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.3) rotate(220deg); } }

/* Glowlings peek out of their card, and hop when you point at it */
.peek { position: absolute; left: 50%; bottom: -4px; display: flex; gap: 4px; z-index: 1; pointer-events: none; transform: translateX(-110%); }
.peek img { width: 58px; transform: translateY(115%); animation: peek 6.5s cubic-bezier(.3, 1.4, .5, 1) infinite; animation-delay: var(--pk); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
@keyframes peek { 0%, 55%, 100% { transform: translateY(115%); } 64% { transform: translateY(16%) rotate(-7deg); } 71% { transform: translateY(24%) rotate(5deg); } 80% { transform: translateY(16%) rotate(0); } 90% { transform: translateY(115%); } }
.app-card:hover .peek img { animation: hop .5s ease-in-out infinite alternate; animation-delay: calc(var(--pk) / 10); }
@keyframes hop { from { transform: translateY(22%); } to { transform: translateY(4%) rotate(-4deg); } }

/* The Glowlings bob in a row on their page */
.parade { display: flex; justify-content: center; gap: 26px; margin-top: 22px; flex-wrap: wrap; }
.parade img { width: 92px; animation: hopIn .9s cubic-bezier(.2, 1.5, .4, 1) backwards, bobble 2.4s ease-in-out infinite; animation-delay: var(--pk), calc(var(--pk) + 1s); filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .5)); }
@keyframes hopIn { from { opacity: 0; transform: translateY(40px) scale(.6); } }
@keyframes bobble { 50% { transform: translateY(-10px) rotate(-3deg); } }
@media (max-width: 600px) { .parade img { width: 64px; } }

/* App icons spin once when you point at a card */
.app-top img { transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.app-card:hover .app-top img { transform: rotate(360deg) scale(1.06); }

/* Feature emoji hop in */
.feature.in .em { display: inline-block; animation: hopIn .7s cubic-bezier(.2, 1.6, .4, 1) backwards; animation-delay: calc(var(--rd, 0s) + .25s); }

/* Back to the top, by rocket */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 55; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(14, 12, 48, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font-size: 22px; cursor: pointer; opacity: 0; transform: translateY(20px) scale(.8); transition: opacity .3s, transform .3s; pointer-events: none; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top span { display: inline-block; }
.to-top:hover span { animation: wiggle .5s ease-in-out infinite; }
.to-top.fly span { animation: flyUp .9s cubic-bezier(.5, 0, .8, .3) forwards; }
@keyframes wiggle { 50% { transform: translateY(-3px) rotate(-8deg); } }
@keyframes flyUp { to { transform: translateY(-110vh) rotate(-45deg); } }

/* ---------- Reduce motion ----------
   People who ask their device for less motion still get a gently living page: fades and twinkles stay,
   anything that travels, zooms or spins is stilled. This block must stay last so its keyframes win. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; }
  @keyframes rise { from { opacity: 0; } }
  @keyframes pop { from { opacity: 0; } }
  @keyframes fadeUp { from { opacity: 0; } }
  @keyframes float { 0%, 100% { margin-top: 0; } }
  @keyframes drift { to { transform: none; } }
  @keyframes bob { 0%, 100% { transform: rotate(2deg); } }
  @keyframes bounce { 50% { transform: none; } }
  @keyframes spin { to { transform: none; } }
  @keyframes ripple { from { opacity: .9; } to { opacity: 0; } }
  .sky-map .lines .spark, .trail { display: none; }
  .app-card, .btn { transform: none !important; }
  .app-in::after { display: none; }
  @keyframes slideStar { 0%, 100% { left: 50%; opacity: .9; } }
  @keyframes hopIn { from { opacity: 0; } }
  @keyframes bobble { 50% { transform: none; } }
  @keyframes peek { 0%, 100% { transform: translateY(20%); } }
  @keyframes hop { from, to { transform: translateY(20%); } }
  @keyframes flyUp { to { opacity: 0; } }
  .satellite, .trail.burst { display: none; }
  @keyframes moonFloat { 0%, 100% { transform: rotate(-20deg); } }
  @keyframes moonTrip { 0%, 100% { transform: none; opacity: 1; } }
  @keyframes moonZoom { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes moonReturn { from { opacity: 0; } }
  .rotator > span, .rotator > span.out { transform: none; }
}
