/* Mochi Color website. Tokens from DESIGN.md and the v2 marketing palette. */
@font-face { font-family: "Fredoka"; src: url("/fonts/Fredoka.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --cream: #FFF8EE;
  --surface: #FFFFFF;
  --ink: #30293F;
  --ink2: #5C5470;
  --purple: #7654BA;
  --purple-deep: #5F41A3;
  --lavender: #E4DAF6;
  --mint: #D6EEE2;
  --rose: #F8D8E4;
  --peach: #FFE4CE;
  --butter: #FAECBA;
  --sky: #D6E6F8;
  --pink: #F59BB3;
  --mintdot: #A1DEBC;
  --yellowdot: #FADD74;
  --bezel: #2B2738;
  --radius: 24px;
  --gutter: 16px;
  --max: 1080px;
  --head: "Fredoka", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6; font-weight: 500;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); overflow-wrap: anywhere; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--purple-deep); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; overflow-wrap: break-word; }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--ink2); font-weight: 600; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(255,248,238,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(48,41,63,.06); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; gap: 14px; font-weight: 700; font-size: .95rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 599px) { .nav a:not(:last-child) { display: none; } }
.nav a { color: var(--ink2); text-decoration: none; }
.nav a:hover { color: var(--purple); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 24px; border-radius: 999px; font-family: var(--body); font-weight: 800; font-size: 1.05rem; text-decoration: none; border: 0; cursor: pointer; }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 8px 24px rgba(118,84,186,.28); }
.btn-primary:hover { background: var(--purple-deep); color: #fff; }
.btn-soft { background: var(--surface); color: var(--purple); border: 2px solid var(--lavender); }
.btn-soft:hover { border-color: var(--purple); color: var(--purple-deep); }
.btn svg { width: 22px; height: 22px; flex: none; }
/* App Store badge: Apple artwork unchanged, one per page, clear space >= 1/4 of its height */
.store-badge { display: inline-flex; align-items: center; border-radius: 9px; }
.store-badge img { display: block; height: 54px; width: auto; }
.store-badge:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--surface); color: var(--purple); font-weight: 800; font-size: .85rem; letter-spacing: .01em; }

/* Sections */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-tint-lavender { background: linear-gradient(180deg, var(--lavender), var(--cream)); }
.section-tint-peach { background: linear-gradient(180deg, var(--peach), var(--cream)); }
.section-tint-butter { background: linear-gradient(180deg, var(--butter), var(--cream)); }
.section-tint-mint { background: linear-gradient(180deg, var(--mint), var(--cream)); }
.section-tint-sky { background: linear-gradient(180deg, var(--sky), var(--cream)); }
.section-tint-rose { background: linear-gradient(180deg, var(--rose), var(--cream)); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.two > * { min-width: 0; }
@media (min-width: 820px) { .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } .two.flip > :first-child { order: 2; } }

/* Hero */
.hero { padding: clamp(40px, 7vw, 90px) 0 0; background: radial-gradient(1200px 600px at 20% -10%, var(--lavender), transparent 60%), radial-gradient(900px 500px at 100% 20%, var(--rose), transparent 60%), var(--cream); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero .wrap > * { min-width: 0; }
@media (min-width: 820px) { .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.hero-copy { text-align: center; }
@media (min-width: 820px) { .hero-copy { text-align: left; } }
.hero-copy h1 span { color: var(--purple); display: block; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: center; margin: 24px 0 12px; }
@media (min-width: 820px) { .hero-cta { justify-content: flex-start; } }
.hero-note { color: var(--ink2); font-size: .95rem; font-weight: 600; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; }
@media (min-width: 820px) { .hero-badges { justify-content: flex-start; } }

/* Phone frame */
.phone { position: relative; width: min(320px, 78vw); margin: 0 auto; aspect-ratio: 886 / 1920; background: var(--bezel); border-radius: 48px; padding: 12px; box-shadow: 0 30px 60px rgba(48,41,63,.22), inset 0 0 0 2px rgba(255,255,255,.08); }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 84px; height: 24px; transform: translateX(-50%); background: var(--bezel); border-radius: 999px; z-index: 2; }
.phone-screen { width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: var(--cream); }
.phone-screen video, .phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.float { position: absolute; border-radius: 50%; }
.float-1 { width: 54px; height: 54px; background: var(--pink); top: 6%; left: -22px; }
.float-2 { width: 36px; height: 36px; background: var(--yellowdot); top: 36%; right: -18px; }
.float-3 { width: 28px; height: 28px; background: var(--mintdot); bottom: 14%; left: -14px; }

/* Shots */
.shot { border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(48,41,63,.16); background: var(--surface); }
.shot img { width: 100%; }
.shot-sm { width: min(360px, 100%); margin: 0 auto; }

/* Photo flow */
.photo-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.photo-flow > * { min-width: 0; }
.photo-flow figure { margin: 0; background: var(--surface); padding: 10px 10px 12px; border-radius: 18px; box-shadow: 0 12px 30px rgba(48,41,63,.12); }
.photo-flow img { border-radius: 10px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.photo-flow figcaption { text-align: center; font-weight: 800; color: var(--purple); font-size: .9rem; margin-top: 8px; }
.photo-flow .arrow { font-size: 2rem; color: var(--purple); font-weight: 900; }

/* Sprites grid */
.groups { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.groups > * { min-width: 0; }
@media (min-width: 720px) { .groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.group { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: 0 12px 30px rgba(48,41,63,.08); }
.group h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.group .count { margin-left: auto; font-family: var(--body); font-size: .85rem; color: var(--ink2); font-weight: 700; }
.sprites { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sprites > * { min-width: 0; }
.sprites figure { margin: 0; }
.sprites img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #FBF7F2; border-radius: 14px; padding: 6px; }
.sprites figcaption { font-size: .78rem; text-align: center; color: var(--ink2); font-weight: 700; margin-top: 4px; }

/* Levels */
.levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.levels > * { min-width: 0; }
.levels figure { margin: 0; text-align: center; }
.levels img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--surface); border-radius: 16px; padding: 6px; box-shadow: 0 10px 24px rgba(48,41,63,.08); }
.levels figcaption { margin-top: 8px; font-weight: 800; color: var(--purple); }
.levels figcaption small { display: block; color: var(--ink2); font-weight: 600; font-size: .78rem; }

/* Feature cards */
.cards { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.cards > * { min-width: 0; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: 0 12px 30px rgba(48,41,63,.08); }
.card .dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px; font-size: 1.4rem; }
.card p { margin: 0; color: var(--ink2); }

/* Lifestyle */
.lifestyle { border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(48,41,63,.16); }
.lifestyle img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

/* Pricing */
.price-box { background: var(--surface); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: 0 16px 40px rgba(48,41,63,.1); }
.price-box ul { padding-left: 1.2em; margin: 0 0 1em; }
.price-box li { margin-bottom: .4em; }

/* FAQ */
details { background: var(--surface); border-radius: 18px; padding: 14px 20px; margin-bottom: 12px; box-shadow: 0 8px 22px rgba(48,41,63,.06); }
summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--head); font-size: 1.5rem; color: var(--purple); }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 4px; color: var(--ink2); }

/* Footer */
.site-foot { padding: 40px 0 48px; border-top: 1px solid rgba(48,41,63,.08); color: var(--ink2); font-size: .92rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-foot a { color: var(--ink2); }

/* Document pages */
.doc { padding: clamp(32px, 6vw, 72px) 0 80px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.5rem; margin-top: 2.2em; }
.doc h3 { font-size: 1.15rem; margin-top: 1.6em; }
.doc .meta { color: var(--ink2); font-weight: 600; margin-bottom: 2em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: .45em; }
.doc .box { background: var(--surface); border-radius: 18px; padding: 18px 22px; box-shadow: 0 8px 22px rgba(48,41,63,.06); margin: 1.2em 0; }
.doc .box p:last-child { margin-bottom: 0; }
.doc kbd, .doc .ui { font-family: var(--body); font-weight: 800; color: var(--purple); background: var(--lavender); border-radius: 6px; padding: 1px 7px; font-size: .92em; }
.placeholder { background: var(--butter); color: var(--ink); padding: 1px 7px; border-radius: 6px; font-weight: 800; }
.toc { background: var(--surface); border-radius: 18px; padding: 16px 22px; box-shadow: 0 8px 22px rgba(48,41,63,.06); margin-bottom: 2em; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 1; }
@media (min-width: 640px) { .toc ol { columns: 2; } }
.toc li { margin-bottom: .3em; }
.toc a { text-decoration: none; font-weight: 700; }

/* 404 */
.center { text-align: center; padding: 80px 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
