/* =========================================================
   Zippy Play — global stylesheet
   ========================================================= */
:root {
  --ink: #1B1340;
  --ink-soft: #4A4370;
  --cream: #FFF8EC;
  --paper: #FFFFFF;
  --sun: #FFD23F;
  --coral: #FF5E5B;
  --mint: #00C2A8;
  --sky: #4CC9F0;
  --grape: #7B5CFF;
  --line: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --radius: 22px;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0 0 .5em; letter-spacing: .3px; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.small { font-size: .9rem; }
.eyebrow {
  display: inline-block; font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; margin-bottom: 18px;
}
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: .06em; height: .38em; background: var(--sun); z-index: -1; border-radius: 6px; transform: rotate(-1.5deg); }
.hl-coral::after { background: var(--coral); opacity: .55; }
.hl-mint::after { background: var(--mint); opacity: .5; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 1.15rem; letter-spacing: .4px; text-decoration: none;
  color: var(--ink); background: var(--sun);
  border: var(--line); border-radius: 16px; padding: 12px 24px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-white { background: var(--paper); }
.btn-sm { font-size: 1rem; padding: 7px 16px; border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 248, 236, .92); backdrop-filter: blur(8px); border-bottom: var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.7rem; letter-spacing: .3px; }
.brand em { font-style: normal; color: var(--coral); }
.brand-light { color: #fff; }
.brand-light em { color: var(--sun); }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 10px; }
.site-nav a:not(.btn):hover { background: var(--paper); }
.site-nav a[aria-current="page"]:not(.btn) { background: var(--ink); color: var(--sun); }
.site-nav .btn { margin-left: 8px; }
.nav-toggle { display: none; width: 48px; height: 44px; border: var(--line); border-radius: 12px; background: var(--sun); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; padding: 10px 10px; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 3px; background: var(--ink); border-radius: 3px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--cream); border-bottom: var(--line); padding: 14px 20px 22px;
    display: none;
  }
  .nav-open .site-nav { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 14px; font-size: 1.1rem; }
  .site-nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.bg-sun { background: var(--sun); border-top: var(--line); border-bottom: var(--line); }
.bg-ink { background: var(--ink); color: #fff; }
.bg-ink .lead { color: #CFC9F2; }
.bg-paper { background: var(--paper); border-top: var(--line); border-bottom: var(--line); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 96px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero p.lead { max-width: 540px; margin-bottom: 30px; }
.hero h1 .hl::after { height: .32em; }
.hero-note { margin-top: 22px; font-weight: 700; color: var(--ink-soft); font-size: .95rem; display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span::before { content: "●"; color: var(--mint); margin-right: 6px; }

.blob { position: absolute; border: var(--line); z-index: -1; }
.blob-1 { width: 120px; height: 120px; border-radius: 50%; background: var(--sky); top: 60px; right: 46%; }
.blob-2 { width: 70px; height: 70px; border-radius: 18px; background: var(--grape); bottom: 60px; left: 3%; transform: rotate(18deg); }
.blob-3 { width: 54px; height: 54px; border-radius: 50%; background: var(--coral); top: 40%; right: 2%; }

/* Phone mockup with mini game */
.phone-stage { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: 300px; max-width: 82vw; aspect-ratio: 9 / 18.5;
  background: var(--ink); border-radius: 44px; padding: 14px; box-shadow: 12px 12px 0 var(--coral);
  transform: rotate(3deg);
}
.phone::before { content: ""; position: absolute; top: 24px; left: 50%; width: 70px; height: 18px; margin-left: -35px; background: var(--ink); border-radius: 12px; z-index: 2; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 32px; overflow: hidden; background: #8BE3FF; }
.phone-screen canvas { width: 100%; height: 100%; cursor: pointer; touch-action: manipulation; }
.game-hud { position: absolute; top: 52px; left: 0; right: 0; text-align: center; font-family: var(--display); color: #fff; font-size: 2.6rem; text-shadow: 3px 3px 0 var(--ink); pointer-events: none; }
.game-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px; font-weight: 800; font-size: .85rem; white-space: nowrap; pointer-events: none; animation: bob 1.4s ease-in-out infinite; }
.sticker {
  position: absolute; font-family: var(--display); font-size: 1.05rem; background: var(--sun); border: var(--line);
  border-radius: 14px; padding: 8px 14px; box-shadow: var(--shadow-sm); z-index: 3;
}
.sticker-1 { top: 8%; left: 2%; transform: rotate(-8deg); }
.sticker-2 { bottom: 14%; right: 0; transform: rotate(6deg); background: var(--mint); color: var(--ink); }
@keyframes bob { 50% { transform: translate(-50%, -5px); } }

@media (max-width: 900px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .blob-1 { right: 8%; top: 20px; width: 70px; height: 70px; }
  .sticker-1 { left: 0; }
}

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); color: var(--sun); border-top: var(--line); border-bottom: var(--line); overflow: hidden; padding: 16px 0; }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: scroll 32s linear infinite; font-family: var(--display); font-size: 1.6rem; }
.marquee-track span { display: inline-flex; align-items: center; gap: 40px; white-space: nowrap; }
.marquee-track span::after { content: "★"; color: var(--coral); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px; transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-soft); }
.icon {
  width: 60px; height: 60px; border: var(--line); border-radius: 18px; display: grid; place-items: center;
  margin-bottom: 20px; background: var(--sun);
}
.icon svg { width: 30px; height: 30px; }
.i-coral { background: var(--coral); } .i-mint { background: var(--mint); } .i-sky { background: var(--sky); } .i-grape { background: var(--grape); }
.card.tint-sun { background: #FFF1B8; } .card.tint-mint { background: #C9F5EC; } .card.tint-coral { background: #FFD9D8; } .card.tint-sky { background: #D4F2FC; }

/* Genre tiles */
.genre { text-align: left; }
.genre .tag { display: inline-block; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; margin-bottom: 14px; background: #fff; }

/* Split section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.checklist { list-style: none; padding: 0; margin: 0 0 28px; }
.checklist li { position: relative; padding-left: 40px; margin-bottom: 14px; font-weight: 600; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 8px; background: var(--mint); display: grid; place-items: center; font-weight: 800; font-size: .9rem; line-height: 1; }

/* Loop diagram (core loop) */
.loop { position: relative; aspect-ratio: 1; width: 100%; max-width: 440px; margin: 0 auto; }
.loop-ring { position: absolute; inset: 14%; border: 4px dashed var(--ink); border-radius: 50%; animation: spin 40s linear infinite; }
.loop-core { position: absolute; inset: 34%; background: var(--coral); border: var(--line); border-radius: 50%; display: grid; place-items: center; text-align: center; color: #fff; font-family: var(--display); font-size: 1.5rem; line-height: 1.1; box-shadow: var(--shadow); }
.loop-node { position: absolute; width: 34%; padding: 10px 8px; text-align: center; background: var(--paper); border: var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); font-family: var(--display); font-size: 1.15rem; line-height: 1.1; }
.loop-node small { display: block; font-family: var(--body); font-size: .78rem; font-weight: 700; color: var(--ink-soft); margin-top: 4px; }
.n1 { top: 0; left: 33%; background: var(--sun); }
.n2 { top: 40%; right: 0; background: var(--sky); }
.n3 { bottom: 0; left: 33%; background: var(--mint); }
.n4 { top: 40%; left: 0; background: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 22px; }
.step { display: grid; grid-template-columns: 76px 1fr; gap: 22px; align-items: start; background: var(--paper); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--display); font-size: 2rem; width: 76px; height: 76px; display: grid; place-items: center; border: var(--line); border-radius: 20px; background: var(--sun); }
.step:nth-child(4n+2)::before { background: var(--sky); }
.step:nth-child(4n+3)::before { background: var(--mint); }
.step:nth-child(4n+4)::before { background: var(--coral); color: #fff; }
.step h3 { margin-bottom: .3em; }
.step p { color: var(--ink-soft); margin: 0; }
.step .meta { display: inline-block; margin-top: 10px; font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 560px) { .step { grid-template-columns: 1fr; } .step::before { width: 60px; height: 60px; font-size: 1.6rem; } }

/* Numbers / principles row */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); border: var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
.pillar { padding: 28px 24px; border-right: var(--line); }
.pillar:last-child { border-right: 0; }
.pillar strong { display: block; font-family: var(--display); font-size: 2.4rem; font-weight: 400; line-height: 1; margin-bottom: 8px; color: var(--coral); }
.pillar span { font-weight: 700; color: var(--ink-soft); }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr 1fr; } .pillar:nth-child(2) { border-right: 0; } .pillar:nth-child(-n+2) { border-bottom: var(--line); } }
@media (max-width: 480px) { .pillars { grid-template-columns: 1fr; } .pillar { border-right: 0; border-bottom: var(--line); } .pillar:last-child { border-bottom: 0; } }

/* CTA band */
.cta { padding: 80px 0; }
.cta-box { background: var(--coral); color: #fff; border: var(--line); border-radius: 32px; box-shadow: 10px 10px 0 var(--ink); padding: 56px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.cta-box h2 { margin-bottom: .25em; text-shadow: 3px 3px 0 var(--ink); }
.cta-box p { margin: 0; font-size: 1.15rem; font-weight: 600; }
.cta-box::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: var(--line); background: var(--sun); opacity: .9; z-index: 0; }
.cta-box > * { position: relative; z-index: 1; }
@media (max-width: 760px) { .cta-box { grid-template-columns: 1fr; padding: 36px 26px; } }

/* Page hero (inner pages) */
.page-hero { padding: 72px 0 64px; border-bottom: var(--line); background: var(--sun); position: relative; overflow: hidden; }
.page-hero h1 { max-width: 860px; }
.page-hero .lead { max-width: 680px; color: var(--ink); margin: 0; }
.page-hero::after { content: ""; position: absolute; right: 6%; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; border: var(--line); background: var(--coral); }
.page-hero::before { content: ""; position: absolute; right: 22%; top: 30px; width: 48px; height: 48px; border-radius: 14px; border: var(--line); background: var(--sky); transform: rotate(16deg); }
@media (max-width: 760px) { .page-hero::after { width: 110px; height: 110px; right: -30px; bottom: -40px; } .page-hero::before { display: none; } }
.page-hero.legal { background: var(--paper); }
.page-hero.legal::after { background: var(--mint); }

/* Prose (legal pages) */
.prose-layout { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 100px; background: var(--paper); border: var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-sm); }
.toc h4 { font-size: 1.1rem; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; font-size: .92rem; }
.toc li { margin-bottom: 6px; }
.toc a { text-decoration: none; font-weight: 600; }
.toc a:hover { color: var(--coral); }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.8rem; margin-top: 2em; scroll-margin-top: 100px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.25rem; margin-top: 1.4em; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .95rem; background: var(--paper); border: var(--line); }
.prose th, .prose td { border: 2px solid var(--ink); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--sun); }
.table-scroll { overflow-x: auto; }
.callout { background: #C9F5EC; border: var(--line); border-radius: 16px; padding: 18px 22px; margin: 0 0 1.4em; }
@media (max-width: 900px) { .prose-layout { grid-template-columns: 1fr; } .toc { position: static; } }

/* Forms */
.contact-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-card { background: var(--paper); border: var(--line); border-radius: 26px; box-shadow: var(--shadow); padding: 36px; }
@media (max-width: 560px) { .form-card { padding: 24px 20px; } }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 800; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--cream);
  border: var(--line); border-radius: 14px; padding: 12px 14px;
}
input:focus, select:focus, textarea:focus { outline: none; background: #fff; box-shadow: 4px 4px 0 var(--grape); }
textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { border: var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 22px; font-weight: 700; }
.alert-ok { background: #C9F5EC; }
.alert-err { background: #FFD9D8; }
.info-stack { display: grid; gap: 20px; }
.info-stack .card { padding: 24px; }
.info-stack h3 { font-size: 1.2rem; margin-bottom: 4px; }
.info-stack a { font-weight: 800; color: var(--ink); }

/* FAQ */
.faq { display: grid; gap: 14px; max-width: 860px; margin: 0 auto; }
.faq details { background: var(--paper); border: var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 60px 20px 24px; font-family: var(--display); font-size: 1.2rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 2px solid var(--ink); border-radius: 10px; background: var(--sun); display: grid; place-items: center; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; background: var(--coral); color: #fff; }
.faq details p { padding: 0 24px 22px; margin: 0; color: var(--ink-soft); }

/* Jobs */
.job { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.job-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-block; font-weight: 800; font-size: .8rem; border: 2px solid currentColor; border-radius: 999px; padding: 3px 12px; }
@media (max-width: 640px) { .job { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--ink); color: #DCD7F7; padding: 72px 0 28px; border-top: var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 40px; }
.footer-grid h4 { color: var(--sun); font-size: 1.15rem; margin-bottom: 14px; }
.footer-grid a:not(.brand) { display: block; text-decoration: none; margin-bottom: 8px; font-weight: 600; }
.footer-grid a:not(.brand):hover { color: var(--sun); }
.footer-brand p { margin: 14px 0; max-width: 340px; }
.footer-mail { color: #fff !important; font-weight: 800 !important; }
.store-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.store-chips .chip { color: var(--sun); }
.footer-bottom { margin-top: 56px; padding-top: 22px; border-top: 2px solid rgba(255,255,255,.15); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.footer-bottom p { margin: 0; font-size: .9rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* 404 */
.notfound { text-align: center; padding: 120px 0; }
.notfound .big { font-family: var(--display); font-size: clamp(7rem, 22vw, 13rem); line-height: 1; color: var(--coral); text-shadow: 8px 8px 0 var(--ink); margin-bottom: 10px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Grid children must be allowed to shrink (wide tables / long links) */
.prose-layout > *, .split > *, .contact-grid > * { min-width: 0; }
.prose td a { overflow-wrap: anywhere; }

.page-hero .hl::after { background: #fff; }
@media (max-width: 900px) {
  .blob-3 { display: none; }
  .phone { width: 250px; }
}
