@font-face { font-family: "Fredoka"; src: url("fonts/fredoka-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("fonts/fredoka-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("fonts/fredoka-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* One theme on purpose: the whole site is a bedtime sky. The orange comes from the Mirikids logo and is the only colour on buttons;
   the five storybook colours appear only on letters and icons. Radius: 28px cards, 20px inner blocks, full pills for buttons. */
:root {
  color-scheme: dark;
  --night: #14123a; --night-2: #1b1850; --card: #231f5e; --card-2: #2c2770; --line: rgb(255 255 255 / .1);
  --ink: #fffaf5; --ink-2: #cfcaf0; --ink-3: #9a94c8;
  --orange: #ff6a1a; --orange-2: #ff3d2e;
  --sun: #ffc845; --mint: #5fe3b5; --pink: #ff8fc7; --sky: #7cc8ff; --lilac: #b9a2ff;
  --r: 28px; --r-m: 20px;
  --spring: cubic-bezier(.34, 1.56, .64, 1); --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; background: linear-gradient(180deg, #100e30 0%, var(--night) 30%, #1a1650 70%, #241a4f 100%); color: var(--ink); font: 400 17px/1.65 "Nunito", ui-rounded, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: "Fredoka", "Nunito", sans-serif; font-weight: 600; letter-spacing: -0.01em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--card); padding: 8px 14px; border-radius: 12px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 12px; }
::selection { background: var(--orange); color: #fff; }
section { position: relative; z-index: 1; }

/* twinkling sky behind everything */
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* nav */
.nav { position: sticky; top: 12px; z-index: 20; margin: 12px auto 0; width: min(1180px, calc(100% - 24px)); height: 62px; display: flex; align-items: center; gap: 28px; padding: 0 10px 0 14px; border-radius: 999px; background: rgb(27 24 80 / .72); border: 1px solid var(--line); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.25rem "Fredoka", sans-serif; }
.brand img { border-radius: 10px; }
.nav nav { display: flex; gap: 22px; font-weight: 600; font-size: 15px; }
.nav nav a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.soon-pill { margin-left: auto; font: 600 14px "Fredoka", sans-serif; padding: 8px 16px; border-radius: 999px; background: linear-gradient(120deg, var(--orange), var(--orange-2)); color: #fff; white-space: nowrap; }
@media (max-width: 820px) { .nav nav { display: none; } }

/* buttons: pill, squishy */
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.ctas.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 26px; border-radius: 999px; font: 600 17px "Fredoka", sans-serif; text-decoration: none; white-space: nowrap; transition: transform .35s var(--spring), box-shadow .35s var(--ease), background .25s; }
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:active { transform: translateY(1px) scale(.96); }
.btn.primary { background: linear-gradient(120deg, var(--orange), var(--orange-2)); color: #fff; box-shadow: 0 10px 0 -2px #b8331a, 0 18px 30px -10px rgb(255 80 30 / .6); }
.btn.primary:active { box-shadow: 0 4px 0 -2px #b8331a; }
.btn.soft { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.soft:hover { background: var(--card-2); }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; width: min(1180px, calc(100% - 48px)); margin: 0 auto; min-height: min(calc(100dvh - 74px), 820px); padding: 40px 0 72px; }
.hello { height: 1.6em; overflow: hidden; font: 600 1.15rem "Fredoka", sans-serif; color: var(--sun); margin-bottom: 14px; position: relative; }
.hello span { display: block; height: 1.6em; }
h1 { font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.6rem); line-height: 1.04; max-width: 13ch; }
.squiggle { position: relative; white-space: nowrap; color: var(--orange); }
.squiggle::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.18em; height: .32em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2 12 Q 20 2 38 12 T 74 12 T 110 12 T 146 12 T 182 12 T 198 10' fill='none' stroke='%23ffc845' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%; clip-path: inset(0 100% 0 0); }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 44ch; margin: 22px 0 34px; }
.hero-art { position: relative; aspect-ratio: 1 / 1; }
.moon-glow { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgb(255 200 69 / .35), transparent 72%); filter: blur(10px); }
.art-card { position: absolute; inset: 9% 11% 11% 9%; margin: 0; border-radius: 36px; overflow: hidden; border: 6px solid #fff; box-shadow: 0 30px 70px -20px rgb(0 0 0 / .7); rotate: -3deg; }
.art-card img { width: 100%; height: 100%; object-fit: cover; }
.mini { position: absolute; width: 30%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 24px; border: 5px solid #fff; box-shadow: 0 20px 40px -14px rgb(0 0 0 / .7); }
.mini-a { right: 0; bottom: 4%; rotate: 7deg; }
.mini-b { left: -2%; top: 2%; rotate: -9deg; width: 25%; }
.letters span { position: absolute; left: var(--x); top: var(--y); font: 700 clamp(1.6rem, 1rem + 2vw, 2.6rem) "Fredoka", sans-serif; color: var(--c); text-shadow: 0 0 18px color-mix(in oklab, var(--c) 60%, transparent); }
.crane { width: 64px; height: 64px; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .35)); }
.hero-crane { position: absolute; left: 0; top: 0; width: 56px; height: 56px; opacity: 0; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 28px; } .hero-art { max-width: 520px; margin: 0 auto; width: 100%; } }

/* try it: the open book */
.try { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 96px 0; display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.try-copy p { color: var(--ink-2); margin: 16px 0 26px; max-width: 40ch; }
.lang-chips { display: inline-flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.lang-chips button { border: 0; background: none; color: var(--ink-2); font: 600 16px "Fredoka", "Nunito", sans-serif; padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: background .25s, color .25s, transform .3s var(--spring); }
.lang-chips button[aria-checked="true"] { background: var(--sun); color: #2a2050; }
.lang-chips button:active { transform: scale(.94); }
.book { display: grid; grid-template-columns: 1fr 1fr; perspective: 1600px; filter: drop-shadow(0 30px 50px rgb(0 0 0 / .55)); }
.page { background: #fff9f2; color: #2a2050; min-height: 360px; position: relative; }
.page.left { border-radius: var(--r) 6px 6px var(--r); overflow: hidden; }
.page.left img { width: 100%; height: 100%; object-fit: cover; }
.page.right { border-radius: 6px var(--r) var(--r) 6px; padding: 34px 30px 46px; display: flex; flex-direction: column; gap: 16px; transform-origin: left center; background: linear-gradient(90deg, #efe6dc 0%, #fff9f2 9%); }
.story-en { font: 600 1.45rem/1.45 "Fredoka", sans-serif; }
.story-tr { font-size: 1.05rem; color: #6b5f8f; }
.word { position: relative; cursor: pointer; border: 0; padding: 0 2px; margin: 0 -2px; font: inherit; color: inherit; background: linear-gradient(transparent 62%, rgb(255 200 69 / .55) 62%); border-radius: 4px; transition: background .25s, transform .3s var(--spring); }
.word:hover, .word.on { background: linear-gradient(transparent 0%, rgb(255 200 69 / .8) 0%); transform: translateY(-2px) rotate(-1.5deg); }
.bubble { margin-top: auto; min-height: 76px; border-radius: var(--r-m); background: #2a2050; color: #fff; padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; }
.bubble .hint { color: #cfcaf0; font-weight: 600; }
.bubble .w2 { font: 700 1.5rem "Fredoka", "Nunito", sans-serif; color: var(--sun); line-height: 1.2; }
.bubble .say { font-size: .95rem; color: #cfcaf0; }
.bubble.pop { animation: pop .45s var(--spring); }
.page-num { position: absolute; bottom: 14px; right: 22px; font: 600 13px "Fredoka", sans-serif; color: #a89cc8; }
@media (max-width: 900px) { .try { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .book { grid-template-columns: 1fr; } .page.left { border-radius: var(--r) var(--r) 6px 6px; aspect-ratio: 16 / 10; min-height: 0; } .page.right { border-radius: 6px 6px var(--r) var(--r); background: #fff9f2; } }

/* how it works: winding path, crane follows scroll */
.how { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 96px 0 72px; }
.path-wrap { position: relative; margin-top: 40px; min-height: 620px; }
.path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#trail { fill: none; stroke: rgb(255 255 255 / .16); stroke-width: 4; stroke-dasharray: 2 14; stroke-linecap: round; }
#trail-done { fill: none; stroke: var(--sun); stroke-width: 5; stroke-linecap: round; }
.path-crane { position: absolute; left: 0; top: 0; width: 60px; height: 60px; z-index: 2; will-change: transform; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; height: 620px; }
.step { position: absolute; width: min(340px, 42%); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 26px 28px; box-shadow: 0 24px 50px -24px rgb(0 0 0 / .6); }
.step h3 { margin: 14px 0 8px; }
.step p { color: var(--ink-2); font-size: 16px; }
.step-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: color-mix(in oklab, var(--c) 22%, transparent); color: var(--c); }
.s1 { left: 2%; top: 150px; rotate: -2deg; }
.s2 { right: 0; top: 30px; rotate: 2deg; }
.s3 { left: 30%; top: 400px; rotate: -1deg; }
@media (max-width: 860px) {
  .path, .path-crane { display: none; }
  .path-wrap, .steps { min-height: 0; height: auto; }
  .steps { display: grid; gap: 18px; }
  .step { position: static; width: auto; rotate: 0deg; }
}

/* stories shelf */
.stories { padding: 80px 0 96px; }
.stories h2 { width: min(1180px, calc(100% - 48px)); margin: 0 auto 44px; }
.shelf { overflow: hidden; padding: 30px 0 40px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.shelf-track { display: flex; gap: 34px; width: max-content; padding: 0 24px; }
.cover { margin: 0; width: 240px; flex: none; rotate: var(--r); transition: rotate .5s var(--spring), transform .5s var(--spring); }
.cover img { width: 240px; height: 300px; object-fit: cover; border-radius: 22px 22px 22px 22px; border: 5px solid #fff; box-shadow: 0 22px 40px -16px rgb(0 0 0 / .7); }
.cover figcaption { margin-top: 14px; font: 600 1.05rem "Fredoka", sans-serif; text-align: center; }
.cover:hover { rotate: 0deg; transform: translateY(-10px) scale(1.05); }

/* for parents */
.parents { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 96px 0; display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.parents-art { position: relative; }
.parents-art img { border-radius: 40px; border: 6px solid #fff; rotate: 2deg; box-shadow: 0 30px 60px -24px rgb(0 0 0 / .7); }
.stack { position: absolute; left: -18px; bottom: -22px; display: grid; gap: 6px; }
.stack i { display: block; height: 18px; border-radius: 6px; transform-origin: left; }
.stack i:nth-child(1) { width: 110px; background: var(--mint); } .stack i:nth-child(2) { width: 130px; background: var(--sky); margin-left: 8px; }
.stack i:nth-child(3) { width: 100px; background: var(--pink); margin-left: -4px; } .stack i:nth-child(4) { width: 140px; background: var(--sun); }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 32px; margin: 8px 0 0; }
.perks dt { font: 600 1.15rem "Fredoka", sans-serif; margin-bottom: 6px; }
.perks dd { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 900px) { .parents { grid-template-columns: 1fr; } .parents-art { max-width: 460px; } }
@media (max-width: 560px) { .perks { grid-template-columns: 1fr; } }

/* coming soon */
.soon { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0 112px; }
.soon-card { position: relative; text-align: center; padding: 72px 28px 64px; border-radius: 44px; background: radial-gradient(120% 90% at 50% 0%, #3a2f8a 0%, var(--card) 55%, #1c1856 100%); border: 1px solid var(--line); overflow: hidden; }
.soon-card h2 { max-width: 16ch; margin: 0 auto; }
.soon-card p { color: var(--ink-2); max-width: 46ch; margin: 18px auto 32px; font-size: 1.1rem; }
.soon-crane { width: 92px; height: 92px; margin: 0 auto 18px; display: block; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; padding: 10px 18px; border-radius: 14px; border: 1px solid rgb(255 255 255 / .25); color: var(--ink); text-align: left; }
.store-badge svg { width: 26px; height: 26px; }
.store-badge span { display: grid; font: 600 18px/1.1 "Fredoka", sans-serif; }
.store-badge small { font: 600 11px "Nunito", sans-serif; color: var(--ink-3); }
.burst { position: absolute; font: 700 1.4rem "Fredoka", sans-serif; pointer-events: none; z-index: 5; }

/* footer */
.foot { position: relative; z-index: 1; width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 30px 0 44px; border-top: 1px solid var(--line); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: space-between; color: var(--ink-3); font-size: 15px; }
.foot .brand { font-size: 1.05rem; color: var(--ink); }
.foot-links { display: flex; gap: 18px; }
.foot-links a { text-decoration: none; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- motion (all of it switched off for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .hello span { animation: hello 7.5s var(--ease) infinite; }
  .squiggle::after { animation: draw 1.1s .6s var(--ease) forwards; }
  .letters span { animation: bob 5s var(--d) ease-in-out infinite; }
  .art-card { animation: float 7s ease-in-out infinite; }
  .mini-a { animation: float 6s 1s ease-in-out infinite; }
  .mini-b { animation: float 8s .4s ease-in-out infinite; }
  .hero-crane { animation: fly 9s 1.2s linear infinite; offset-path: path("M -40 380 C 120 300, 200 120, 360 160 S 560 60, 640 -40"); offset-rotate: auto; }
  .soon-crane { animation: flap 1.6s ease-in-out infinite; transform-origin: 50% 60%; }
  .hero-copy > * { opacity: 0; transform: translateY(18px); animation: rise .8s var(--ease) forwards; }
  .hero-copy > :nth-child(2) { animation-delay: .1s; } .hero-copy > :nth-child(3) { animation-delay: .25s; } .hero-copy > :nth-child(4) { animation-delay: .4s; }
  .pop-in { opacity: 0; transform: translateY(30px) scale(.92); transition: opacity .7s var(--ease), transform .8s var(--spring); }
  .pop-in.in { opacity: 1; transform: none; }
  .s2.pop-in { transition-delay: .12s; } .s3.pop-in { transition-delay: .24s; }
  .book .page.right { transform: rotateY(-100deg); transition: transform 1.2s var(--ease); }
  .book.open .page.right { transform: rotateY(0deg); }
  .shelf-track { animation: drift 46s linear infinite; }
  .shelf:hover .shelf-track { animation-play-state: paused; }
  .stack i { transform: scaleX(0); transition: transform .7s var(--spring); }
  .parents-art.in .stack i { transform: scaleX(1); }
  .parents-art.in .stack i:nth-child(2) { transition-delay: .12s; } .parents-art.in .stack i:nth-child(3) { transition-delay: .24s; } .parents-art.in .stack i:nth-child(4) { transition-delay: .36s; }
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .squiggle::after { clip-path: none; }
  .hello span:not(:first-child) { display: none; }
  .hero-crane { display: none; }
}
@keyframes hello { 0%, 26% { transform: translateY(0); } 33%, 59% { transform: translateY(-100%); } 66%, 92% { transform: translateY(-200%); } 100% { transform: translateY(0); } }
@keyframes draw { to { clip-path: inset(0 0 0 0); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(8deg); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes fly { 0% { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 70% { opacity: 1; } 78%, 100% { offset-distance: 100%; opacity: 0; } }
@keyframes flap { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-8px) scaleY(.82); } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes drift { to { transform: translateX(-50%); } }
@keyframes burst { 0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(1.1) rotate(var(--rot)); opacity: 0; } }
