/* mimbo.app — one sun ribbon threads the page; each section is a scene on the
   same strip and the phones are the screens it passes behind. Brand palette
   and type are the app's own (AGENTS.md): teal, sun, ink, paper; Fredoka +
   Nunito, self-hosted so the site makes no third-party requests. */

@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: swap; src: url('fonts/Fredoka-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url('fonts/Fredoka-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('fonts/Nunito-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('fonts/Nunito-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('fonts/Nunito-ExtraBold.ttf') format('truetype'); }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: swap; src: url('fonts/Nunito-Black.ttf') format('truetype'); }

:root {
  --teal: #1D9A8E;
  --teal-bright: #27B3A4;
  --teal-deep: #136B63;
  --teal-night: #0D4A44;
  --sun: #FFC53D;
  --sun-soft: #FFE7A3;
  --ink: #1B2430;
  --ink-soft: #4A5463;
  --paper: #F7F4EE;
  --paper-deep: #ECE6DA;
  --line: rgba(27, 36, 48, .12);
  --display: 'Fredoka', 'Avenir Next Rounded', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Nunito', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.012em; line-height: 1.02; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(3rem, 7.4vw, 6.6rem); }
h2 { font-size: clamp(2.3rem, 4.6vw, 4rem); }
h3 { font-size: 1.45rem; line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(1.12rem, 1.6vw, 1.3rem); line-height: 1.55; max-width: 34em; }
.slate { display: inline-flex; align-items: center; gap: .7rem; font: 900 .78rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.slate::before { content: ''; width: 1.15rem; height: .85rem; border-radius: .18rem; background: currentColor;
  -webkit-mask: linear-gradient(#000 0 0) 0 100%/100% 62% no-repeat, repeating-linear-gradient(115deg, #000 0 .22rem, transparent .22rem .44rem) 0 0/100% 32% no-repeat;
          mask: linear-gradient(#000 0 0) 0 100%/100% 62% no-repeat, repeating-linear-gradient(115deg, #000 0 .22rem, transparent .22rem .44rem) 0 0/100% 32% no-repeat; }
.accent { color: var(--teal); }
.on-dark .slate, .on-dark .accent { color: var(--sun); }

/* ---------- Layout */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); position: relative; z-index: 2; }
main { position: relative; }
section { position: relative; padding-block: clamp(96px, 12vw, 168px); }
.scene { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.scene.flip > .scene-copy { order: 2; }
.scene-copy { display: grid; gap: 22px; min-width: 0; }
.scene-copy .lede { color: var(--ink-soft); }
.on-dark .scene-copy .lede { color: #C6D0DB; }
@media (max-width: 860px) {
  .scene { grid-template-columns: minmax(0, 1fr); }
  .scene.flip > .scene-copy { order: 0; }
}

/* Paper grain over coloured bands, so flat colour reads as printed stock. */
.grain::after { content: ''; position: absolute; inset: 0; background: url('grain.png'); opacity: .07; mix-blend-mode: multiply; pointer-events: none; z-index: 0; }
.teal { background: var(--teal); color: var(--paper); }
.teal .lede { color: #DDF2EE; }
.ink { background: var(--ink); color: var(--paper); }
.paper-deep { background: var(--paper-deep); }

/* ---------- The ribbon */
.ribbon { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 1; overflow: visible; }

/* ---------- Header */
.site-head { position: fixed; inset: 0 0 auto; z-index: 20; padding-top: env(safe-area-inset-top, 0px); transition: background-color .3s, box-shadow .3s; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.7rem/1 var(--display); color: var(--paper); letter-spacing: -.01em; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.site-head nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-weight: 800; font-size: .98rem; }
.site-head nav a { text-decoration: none; color: var(--paper); opacity: .92; }
.site-head nav a:hover { opacity: 1; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.site-head.solid { background: rgba(247, 244, 238, .92); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--line); }
.site-head.solid .brand, .site-head.solid nav a { color: var(--ink); }
.site-head.solid .brand img { box-shadow: none; }
.nav-cta { padding: 10px 18px; border-radius: 99px; background: var(--sun); color: var(--ink) !important; opacity: 1 !important; box-shadow: 0 4px 0 #D9A01F; }
.nav-cta:hover { text-decoration: none !important; transform: translateY(1px); box-shadow: 0 3px 0 #D9A01F; }
@media (max-width: 760px) { .site-head nav a:not(.nav-cta) { display: none; } }

/* ---------- Hero */
.hero { padding-top: calc(72px + clamp(40px, 7vw, 96px)); padding-bottom: clamp(96px, 11vw, 150px); overflow: clip; }
.hero .scene { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
@media (max-width: 860px) { .hero .scene { grid-template-columns: minmax(0, 1fr); } }
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--sun); }
.hero .slate { color: var(--sun); }
/* The two store buttons always share one line; on small phones they shrink
   together rather than wrapping under each other. */
.stores { display: flex; flex-wrap: nowrap; gap: 12px; margin-top: 8px; }
.store { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 12px; padding: 12px 20px 12px 14px; border-radius: 16px; background: var(--ink); color: var(--paper); text-decoration: none; min-width: 0; }
.store svg { width: 28px; height: 28px; flex: none; }
.store span { min-width: 0; white-space: nowrap; }
@media (max-width: 440px) {
  .stores { gap: 8px; }
  .store { flex: 1 1 0; gap: 8px; padding: 10px 12px 10px 10px; border-radius: 14px; }
  .store svg { width: 22px; height: 22px; }
  .store small { font-size: .56rem; letter-spacing: .06em; }
  .store b { font-size: clamp(.9rem, 4.2vw, 1.05rem); }
}
.store small { display: block; font: 800 .7rem/1.1 var(--body); letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.store b { display: block; font: 600 1.18rem/1.15 var(--display); }
.store[aria-disabled="true"] { cursor: default; }
.ghost-link { font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.hero-note { font-size: .95rem; opacity: .85; }

/* ---------- Phones (the same frame as the store screenshots) */
.stage { position: relative; display: grid; place-items: center; min-width: 0; }
.phone { position: relative; width: min(300px, 74vw); padding: 11px; border-radius: 50px; background: linear-gradient(150deg, #4A5262 0%, #1E232C 24%, #11151B 62%, #333A47 100%);
  box-shadow: 0 0 0 2px rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.14), 0 40px 80px -30px rgba(16,24,32,.55), 0 14px 30px -12px rgba(16,24,32,.3); z-index: 2; }
.phone .screen { position: relative; aspect-ratio: 1320 / 2868; overflow: hidden; border-radius: 40px; background: #000; }
.phone .screen > img, .phone .screen > video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone .island { position: absolute; top: 1.6%; left: 50%; width: 28%; height: 3.6%; transform: translateX(-50%); border-radius: 99px; background: #05070A; z-index: 3; }
.phone.video .screen { aspect-ratio: 9 / 19.5; }
.phone.video .screen > video { object-position: center; }
.phone::before, .phone::after { content: ''; position: absolute; width: 4px; border-radius: 3px; background: #2A303B; }
.phone::before { left: -4px; top: 22%; height: 9%; }
.phone::after { right: -4px; top: 30%; height: 14%; }
.on-dark .phone, .teal .phone { box-shadow: 0 0 0 2px rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.16), 0 40px 90px -30px rgba(0,0,0,.6); }

.sound { position: absolute; right: 18px; bottom: 22px; z-index: 4; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: 99px; background: rgba(15,20,26,.72); color: #fff; font: 800 .85rem/1 var(--body); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sound svg { width: 18px; height: 18px; }

.bubble { position: absolute; z-index: 4; max-width: 250px; padding: 16px 20px; border-radius: 26px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); font: 600 1.08rem/1.25 var(--display); box-shadow: 0 8px 0 -2px rgba(0,0,0,.18); }
.bubble small { display: block; margin-bottom: 4px; font: 900 .68rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.bubble::after { content: ''; position: absolute; width: 22px; height: 22px; background: var(--paper); border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.hero .bubble { left: -14%; top: 14%; transform: rotate(-3deg); }
.hero .bubble::after { right: 26px; bottom: -13px; transform: rotate(45deg); }
.caption { margin-top: 18px; font-size: .9rem; font-weight: 700; text-align: center; opacity: .85; }

/* Characters stepping out of the screens: Rive when it loads, the drawing until then. */
.cast { position: absolute; z-index: 3; pointer-events: none; filter: drop-shadow(0 16px 14px rgba(16,24,32,.28)); }
.cast canvas, .cast img { width: 100%; height: 100%; }
.cast canvas { position: absolute; inset: 0; }
.cast.live img { visibility: hidden; }
.hero .loopy { width: 210px; height: 210px; right: -12%; bottom: -6%; pointer-events: auto; cursor: pointer; }
@media (max-width: 860px) { .hero .bubble { left: -2%; top: -4%; } .hero .loopy { right: -3%; bottom: auto; top: 46%; width: 150px; height: 150px; } }

/* ---------- Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); margin-top: clamp(48px, 6vw, 80px); }
.step { display: grid; gap: 16px; align-content: start; min-width: 0; }
.step .phone { width: min(250px, 70vw); margin: 0 auto 18px; }
.step .num { font: 600 3.4rem/1 var(--display); color: var(--teal); }
.step p { color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); gap: 72px; } }
.head { display: grid; gap: 18px; max-width: 760px; }

/* ---------- Builder */
.builder { position: relative; display: grid; gap: 18px; justify-items: center; min-width: 0; }
.builder .canvas-box { position: relative; width: min(380px, 80vw); aspect-ratio: 1; border-radius: 40px; background: radial-gradient(70% 70% at 50% 45%, #FFF6D8 0%, #F8E7B5 70%, #F3DDA0 100%); box-shadow: inset 0 0 0 3px rgba(27,36,48,.08); z-index: 2; }
.builder .canvas-box img, .builder .canvas-box canvas { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.builder .canvas-box.live img { visibility: hidden; }
.species, .swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; position: relative; z-index: 2; }
.species button { padding: 9px 16px; border-radius: 99px; border: 2px solid var(--line); background: #fff; font: 800 .95rem/1 var(--body); color: var(--ink); cursor: pointer; }
.species button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 4px 0 var(--teal-deep); }
.swatches button { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); cursor: pointer; padding: 0; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); transform: scale(1.08); }
.try { font: 900 .74rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Studio ranks */
.ranks { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; counter-reset: rank; }
.ranks li { counter-increment: rank; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 8px; border-radius: 99px; background: #fff; border: 2px solid var(--line); font-weight: 800; font-size: .92rem; }
.ranks li::before { content: counter(rank); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--paper-deep); font: 900 .75rem/1 var(--body); }
.ranks li.here { background: var(--sun); border-color: #E3A92A; }
.ranks li.here::before { background: var(--ink); color: var(--sun); }
.studio-stage .loopy { width: 170px; height: 170px; left: -6%; bottom: 4%; }

/* ---------- Grown-ups */
.promises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 32px; margin-top: 10px; }
.promise { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; align-items: start; }
.promise svg { grid-row: span 2; width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: rgba(255, 197, 61, .14); color: var(--sun); }
.promise h3 { font-size: 1.18rem; color: var(--paper); }
.promise p { color: #C6D0DB; font-size: .98rem; }
@media (max-width: 560px) { .promises { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: clamp(40px, 5vw, 64px); align-items: stretch; }
.plan { position: relative; display: grid; grid-template-rows: auto auto 1fr; gap: 14px; padding: 30px 28px 32px; border-radius: 30px; background: #fff; border: 2px solid var(--line); min-width: 0; }
.plan.featured { background: var(--teal); color: var(--paper); border-color: var(--teal-deep); box-shadow: 0 10px 0 var(--teal-deep); }
.plan .price { font: 600 2.6rem/1 var(--display); }
.plan .price small { font: 800 .95rem var(--body); opacity: .8; }
.plan .yearly { font-size: .92rem; font-weight: 700; opacity: .8; }
.plan ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.plan li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-weight: 700; }
.plan li::before { content: ''; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231B2430' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.ribbon-tag { position: absolute; top: -14px; right: 22px; padding: 6px 14px; border-radius: 99px; background: var(--sun); color: var(--ink); font: 900 .72rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; box-shadow: 0 3px 0 #D9A01F; }
.fine { margin-top: 26px; font-size: .92rem; color: var(--ink-soft); max-width: 60em; }
@media (max-width: 920px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; } }

/* ---------- FAQ */
.faq { display: grid; gap: 12px; margin-top: 36px; max-width: 860px; }
.faq .qa { border-radius: 22px; background: #fff; border: 2px solid var(--line); padding: 4px 22px; }
/* A plain button, not <summary>: iOS gives a summary a haptic tick and a grey tap flash. */
.faq .q { appearance: none; width: 100%; margin: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; touch-action: manipulation; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font: 600 1.18rem/1.3 var(--display); }
.faq .q::after { content: '+'; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--paper-deep); font: 600 1.3rem/1 var(--display); }
.faq .q[aria-expanded="true"]::after { content: '–'; background: var(--sun); }
.faq .a p { padding: 0 0 18px; color: var(--ink-soft); }

/* ---------- Final call */
.finale { text-align: center; overflow: clip; }
.finale .wrap { display: grid; justify-items: center; gap: 22px; }
.finale .stores { justify-content: center; }
.finale .loopy { position: relative; width: 220px; height: 220px; filter: drop-shadow(0 16px 14px rgba(0,0,0,.3)); }
.finale .loopy img, .finale .loopy canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.finale .loopy.live img { visibility: hidden; }
.contact { font-weight: 800; }

/* ---------- Footer */
.site-foot { padding: 44px 0 calc(44px + env(safe-area-inset-bottom, 0px)); background: var(--teal-night); color: #CFE7E3; font-size: .95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 800; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

/* ---------- Document pages (privacy, terms, support) */
.doc-hero { padding-top: calc(72px + 64px); padding-bottom: 64px; }
.doc { padding-block: 64px 120px; }
.doc .wrap { max-width: calc(780px + 2 * var(--gutter)); }
.doc h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 48px 0 14px; }
.doc h3 { font-size: 1.2rem; margin: 28px 0 8px; }
.doc p, .doc li { color: #2C3644; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; display: grid; gap: 8px; }
.doc .updated { font-weight: 800; opacity: .8; }
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll { overflow-x: auto; margin-top: 12px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
