:root {
  --charlie: #1e55e6;
  --charlie-deep: #12389f;
  --ear: #ff5c9d;
  --mint: #d6f7e0;
  --sun: #ffd95a;
  --ink: #12254a;
  --muted: #56658a;
  --paper: #ffffff;
  --cloud: #f2f6ff;
  --line: #e3eaf8;
  --good: #1f9d3a;
  --good-bg: #e2f7e3;
  --bad: #c9352b;
  --bad-bg: #ffe3df;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, sans-serif;
  --shadow: 0 7px 25px rgba(18, 37, 74, .08);
  --cy: 58%;            /* where the cat's centre sits on the stage during the story */
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-weight: 600; overflow-x: hidden; }
img { display: block; }
a { color: inherit; }

/* ---------- hero + story ---------- */
.story { height: calc(100svh + 440vh); position: relative; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; transition: --tint .6s; }
@property --tint { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, 0); }
.stage[data-step="2"] { --tint: rgba(255, 92, 80, .13); }
.stage[data-step="3"] { --tint: rgba(30, 85, 230, .10); }
.stage[data-step="4"] { --tint: rgba(60, 203, 82, .14); }
.glow {
  position: absolute; left: 50%; top: var(--cy); width: 900px; height: 900px; translate: -50% -50%;
  background: radial-gradient(closest-side, var(--tint), transparent); opacity: .9; pointer-events: none;
}

/* the hill the cat sits on. The image has a white sky, so multiply lets the page show through it. */
.ground {
  --gw: max(100vw, 1200px, 170svh); --crest: 62px;   /* wide enough to reach the bottom of the stage */
  position: absolute; left: 0; right: 0; bottom: -240px; top: calc(var(--cy) + var(--crest) - var(--gw) * .315);
  background: url(assets/media/ground.jpg) top center / var(--gw) auto no-repeat,
    linear-gradient(transparent calc(var(--gw) * .5), #1c7632 calc(var(--gw) * .56));
  mix-blend-mode: multiply; pointer-events: none; will-change: transform;
}
/* the same hill as a short loop, laid exactly over the still so the grass sways */
.ground video { position: absolute; top: 0; left: 50%; width: var(--gw); translate: -50% 0; display: block; }

.hero { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 24px; will-change: transform, opacity; }
.hero h1 { display: flex; align-items: center; gap: 19px; font: 700 32px/1.2 var(--body); color: var(--ink); white-space: nowrap; }
.hero .slot { width: 75px; height: 81px; flex: none; }
.hero p { font-weight: 400; font-size: 20px; line-height: 1.5; letter-spacing: -.2px; color: #000; max-width: 367px; margin-top: 19px; text-wrap: balance; }
.badge { display: inline-block; border-radius: 9px; transition: scale .15s; }
.badge:hover { scale: 1.04; }
.badge img { height: 49px; width: auto; }
.hero .badge { margin-top: 40px; }

/* coming-soon mode (class set in index.html): only the hero, no scrolling, no App Store button */
.soon-pill { display: none; margin-top: 40px; height: 49px; padding: 0 28px; align-items: center; border-radius: 99px; background: var(--ink); color: #fff; font: 600 19px/1 var(--display); letter-spacing: .2px; }
.soon, .soon body { height: 100svh; overflow: hidden; overscroll-behavior: none; }
.soon .story { height: 100svh; }
.soon .hero .badge, .soon .props, .soon .bubble, .soon body > :not(.story):not(script) { display: none; }
.soon .soon-pill { display: inline-flex; }

.cat { position: absolute; left: 50%; top: var(--cy); width: 330px; height: 330px; translate: -50% -50%; pointer-events: none; will-change: transform; }
.cat .still { position: absolute; left: 50%; top: 50%; width: 209px; height: 209px; translate: -51% -44%; transition: opacity .25s; }
.cat video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .28s; }
.cat video.on { opacity: 1; }
.cat.live .still { opacity: 0; }

/* speech bubble with a pointer aimed at the cat */
.bubble {
  position: absolute; left: 50%; bottom: calc(100% - var(--cy) + 135px); translate: -50% 0;
  background: var(--paper); border-radius: 36px; padding: 15px 16px 12px;
  filter: drop-shadow(0 7px 12.5px rgba(18, 37, 74, .08));
  transform-origin: 50% 100%; opacity: 0; pointer-events: none; will-change: transform, opacity;
}
.bubble::after { content: ""; position: absolute; left: calc(50% - 12px); bottom: -8px; width: 24px; height: 24px; background: var(--paper); border-radius: 5px; rotate: 45deg; }
.bubble p { position: relative; z-index: 1; width: 287px; text-align: center; font-weight: 700; font-size: 23.86px; line-height: 35.8px; text-wrap: balance; transition: opacity .16s; }
.bubble.swap p { opacity: 0; }


/* props: positioned and animated by story.js */
.props { position: absolute; inset: 0; pointer-events: none; }
.prop { position: absolute; opacity: 0; visibility: hidden; will-change: transform, opacity; }
.app { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: #000; }
.app img { width: 18px; height: 18px; filter: invert(1); }
.app.insta { background: linear-gradient(45deg, #f9ce34, #ee2a7b 50%, #6228d7); }
.app.yt { background: #ff0033; }

.card { width: 264px; background: var(--paper); border-radius: 28px; padding: 18px; box-shadow: 0 10px 34px rgba(18, 37, 74, .12); }
.eyebrow { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.eyebrow img { width: 22px; height: 22px; }
.card .title { font-family: var(--display); font-weight: 500; font-size: 22px; margin: 8px 0 10px; }
.card .big { font-family: var(--display); font-weight: 600; font-size: 44px; line-height: 1; margin-top: 10px; font-variant-numeric: tabular-nums; }
.delta { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 800; }
.delta.bad { color: var(--bad); background: var(--bad-bg); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin: 14px 0 6px; }
.bars i { flex: 1; height: var(--h); border-radius: 6px; background: var(--line); }
.usage .bars i { height: 0; transition: height .25s ease-in; }
.usage.grow .bars i { height: var(--h); transition: height .8s cubic-bezier(.2, .9, .3, 1.15); }
.usage.grow .bars i:nth-child(1) { transition-delay: .25s; } .usage.grow .bars i:nth-child(2) { transition-delay: .34s; }
.usage.grow .bars i:nth-child(3) { transition-delay: .43s; } .usage.grow .bars i:nth-child(4) { transition-delay: .52s; }
.usage.grow .bars i:nth-child(5) { transition-delay: .61s; } .usage.grow .bars i:nth-child(6) { transition-delay: .70s; }
.usage.grow .bars i:nth-child(7) { transition-delay: .85s; transition-duration: 1s; }
.usage .bars .today { background: #ef5a4e; }
.usage .delta { opacity: 0; transition: opacity .3s; }
.usage.grow .delta { opacity: 1; transition-delay: 1.5s; }
.card .row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 15px; }
.card .row b { font-weight: 800; flex: 1; }
.card .row em { font-style: normal; color: var(--muted); font-weight: 700; }
.card .row .lock { width: 24px; height: 24px; }
.chips { display: flex; gap: 6px; margin-top: 10px; }
.chips span { padding: 6px 12px; border-radius: 99px; background: var(--cloud); font-size: 13px; font-weight: 800; color: var(--charlie-deep); }

.notif { width: 286px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 22px; background: rgba(255, 255, 255, .96); box-shadow: 0 8px 28px rgba(18, 37, 74, .14); font-size: 14px; }
.notif div { flex: 1; min-width: 0; }
.notif b { font-weight: 800; display: block; }
.notif p { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif time { align-self: flex-start; font-size: 12px; color: var(--muted); }

.pill { display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 10px; border-radius: 99px; background: var(--paper); box-shadow: var(--shadow); font-size: 15px; white-space: nowrap; }
.pill img { width: 28px; height: 28px; }
.pill b { font-weight: 800; }
.pill.good { background: var(--good-bg); color: #14602a; box-shadow: none; }

.focus .ring { position: relative; width: 190px; height: 190px; margin: 12px auto 4px; }
.focus svg { width: 100%; height: 100%; rotate: -90deg; }
.focus circle { fill: none; stroke: var(--cloud); stroke-width: 10; }
.focus .arc { stroke: var(--charlie); stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 110; }
.focus .ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.focus .ring b { font-family: var(--display); font-weight: 600; font-size: 40px; font-variant-numeric: tabular-nums; }
.focus .ring span { font-size: 13px; color: var(--muted); font-weight: 700; }

/* phone mocks: drawn at real iPhone points (390 × 844) and scaled down by story.js */
.phone { width: 414px; height: 868px; padding: 12px; border-radius: 64px; background: #0b1220; box-shadow: 0 30px 70px rgba(18, 37, 74, .28), inset 0 0 0 2px #2a3550; }
.phone .screen { position: relative; width: 390px; height: 844px; border-radius: 52px; overflow: hidden; background: var(--cloud); }
.phone .island { position: absolute; left: 50%; top: 24px; width: 122px; height: 36px; margin-left: -61px; border-radius: 20px; background: #000; }
.phone .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.fl { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; background: #f3d9b8; }
.fl-top { position: absolute; left: 16px; right: 16px; top: 66px; z-index: 6; background: rgba(255, 255, 255, .94); border-radius: 22px; padding: 14px 16px; box-shadow: 0 8px 24px rgba(90, 50, 20, .18); pointer-events: none; }
.fl-app { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.fl-app .app { width: 22px; height: 22px; border-radius: 7px; } .fl-app .app img { width: 12px; height: 12px; }
.fl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.fl-row b { font-family: var(--display); font-weight: 500; font-size: 21px; line-height: 1.15; }
.fl-count { display: flex; gap: 6px; flex: none; }
.fl-count i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #cfd8ea; transition: background .2s, border-color .2s, transform .25s cubic-bezier(.3, 1.8, .5, 1); }
.fl-count i.on { background: var(--good); border-color: var(--good); transform: scale(1.15); }
.fl-shadow { position: absolute; left: 105px; top: 658px; width: 180px; height: 30px; border-radius: 50%; background: rgba(90, 40, 30, .28); filter: blur(7px); pointer-events: none; }
.fl-cat { position: absolute; left: 75px; top: 460px; width: 240px; height: 240px; pointer-events: none; z-index: 2; }
.fl-cat video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .25s; }
.fl-cat video.on { opacity: 1; }
.fl-say { position: absolute; left: 24px; right: 24px; bottom: 394px; z-index: 5; display: flex; justify-content: center; pointer-events: none; opacity: 0; transition: opacity .2s; }
.fl-say.on { opacity: 1; }
.fl-say p { position: relative; max-width: 300px; text-align: center; line-height: 1.3; padding: 10px 16px; border-radius: 20px; background: #fff; font-weight: 800; font-size: 17px; box-shadow: 0 6px 18px rgba(90, 50, 20, .2); }
.fl-say p::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 13px; height: 13px; margin-left: -6.5px; background: #fff; transform: rotate(45deg); border-radius: 2px; }
.fl-quit { position: absolute; left: 50%; bottom: 40px; z-index: 6; translate: -50% 0; padding: 12px 22px; border-radius: 22px; background: rgba(255, 255, 255, .92); font-weight: 800; font-size: 15px; box-shadow: 0 4px 14px rgba(90, 50, 20, .18); pointer-events: none; }
/* a fly: the outer box is moved and turned by the loop; the wings beat in CSS */
.fly { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; z-index: 4; pointer-events: none; will-change: transform; }
.fly b { position: absolute; left: 14px; top: 16px; width: 17px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 70% 35%, #5a6170, #1d2029 70%); box-shadow: 0 6px 6px -3px rgba(40, 20, 0, .35); }
.fly b::after { content: ""; position: absolute; right: -4px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: #7a1f1f; }
.fly i { position: absolute; left: 13px; top: 6px; width: 12px; height: 15px; border-radius: 60% 60% 50% 50%; background: rgba(235, 245, 255, .78); box-shadow: inset 0 0 0 1px rgba(120, 140, 170, .5); transform-origin: 60% 100%; animation: wing .09s linear infinite alternate; }
.fly i + i { left: 20px; animation-delay: -.045s; }
.fly.rest i { animation: none; transform: rotate(-38deg) scaleY(.9); }
.fly.rest i + i { transform: rotate(18deg) scaleY(.9); }
@keyframes wing { from { transform: rotate(-50deg) scaleX(.5); } to { transform: rotate(35deg) scaleX(1); } }
.fly.caught { animation: caught .32s ease-in forwards; }
@keyframes caught { to { opacity: 0; scale: .2; } }
.tapfx { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%; border: 3px solid #fff; z-index: 5; pointer-events: none; animation: tapring .4s ease-out forwards; }
.tapfx.hit { border-color: var(--good); background: rgba(60, 203, 82, .25); }
@keyframes tapring { from { scale: .3; opacity: 1; } to { scale: 1.3; opacity: 0; } }

.run { color: #fff; }
.run-top { position: absolute; left: 24px; right: 24px; top: 104px; z-index: 2; display: grid; justify-items: center; gap: 6px; text-align: center; text-shadow: 0 2px 14px rgba(8, 30, 70, .45); }
.run-top span { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.run-top b { font-family: var(--display); font-weight: 500; font-size: 76px; line-height: 1; font-variant-numeric: tabular-nums; }
.run-top p { font-size: 18px; font-weight: 700; }
.run-foot { position: absolute; left: 20px; right: 20px; bottom: 44px; z-index: 2; display: grid; justify-items: center; gap: 10px; text-align: center; }
.run-foot div { padding: 14px 34px; border-radius: 99px; background: rgba(255, 255, 255, .22); border: 1.5px solid rgba(255, 255, 255, .5); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-weight: 800; font-size: 17px; }
.run-foot small { font-size: 13px; opacity: .85; }

/* ---------- three cards ---------- */
section.more, section.cta, section.faq { padding: 96px 24px; max-width: 1160px; margin: 0 auto; }
h2 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.1; letter-spacing: -.01em; text-align: center; text-wrap: balance; }
.lede { text-align: center; color: var(--muted); font-size: 19px; margin-top: 12px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.trio article { background: var(--cloud); border-radius: 36px; padding: 20px 20px 28px; }
.trio h3 { font-family: var(--display); font-weight: 500; font-size: 23px; margin: 20px 6px 6px; }
.trio p { color: var(--muted); font-size: 16px; line-height: 1.45; margin: 0 6px; }
.art { height: 240px; border-radius: 24px; background: var(--paper); padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 10px; overflow: hidden; }
.rule { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; background: var(--cloud); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .2s; }
.rule:hover { background: #e9f0ff; }
.rule img { width: 34px; height: 34px; transition: filter .25s, opacity .25s; }
.rule div { flex: 1; min-width: 0; transition: opacity .25s; }
.rule b { display: block; font-weight: 800; font-size: 15px; }
.rule span { font-size: 13px; color: var(--muted); }
.rule input { position: absolute; opacity: 0; width: 0; height: 0; }
.tog { width: 44px; height: 26px; border-radius: 13px; background: #cdd6e8; position: relative; flex: none; transition: background .22s; }
.tog::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: translate .22s cubic-bezier(.3, 1.4, .5, 1); }
.rule input:checked + .tog { background: #3ccb52; }
.rule input:checked + .tog::after { translate: 18px 0; }
.rule input:focus-visible + .tog { outline: 3px solid var(--charlie); outline-offset: 2px; }
.rule:has(input:not(:checked)) div { opacity: .5; }
.rule:has(input:not(:checked)) img { filter: grayscale(1); opacity: .6; }
.art.streak { align-items: center; background: linear-gradient(#fff6d6, #ffe9a3); gap: 0; padding: 6px 16px 14px; }
.ninja { width: 168px; height: 168px; margin: -14px 0 -18px; flex: none; }
.ninja video { width: 100%; height: 100%; }
.tally { display: flex; align-items: baseline; gap: 6px; color: #8a4b00; }
.tally b { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1; }
.tally span { font-weight: 800; font-size: 15px; }
.days { display: flex; gap: 6px; margin-top: 8px; }
.days i { width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.days i.on { background: #ff9d2e; }
.art.diary { justify-content: flex-end; }
.stat span { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.stat b { display: block; font-family: var(--display); font-weight: 600; font-size: 36px; line-height: 1.1; }
.stat em { font-style: normal; font-size: 13px; font-weight: 800; color: var(--good); }
.diary .bars { height: 86px; margin: 4px 0 0; }
.diary .bars .today { background: #3ccb52; }

/* ---------- download ---------- */
section.cta { padding-top: 0; }
.panel { position: relative; background: var(--charlie); color: #fff; border-radius: 50px; min-height: 393px; padding: 72px 64px 64px 402px; overflow: hidden; background-image: radial-gradient(circle at 30% 55%, #4b78f5, transparent 60%); }
/* the big cat leaning in from the bottom-left corner */
.hero-cat { position: absolute; left: 118px; top: 286px; width: 424px; height: 424px; max-width: none; translate: -50% -50%; rotate: 44.41deg; pointer-events: none; }
.panel h2 { text-align: left; }
.panel p { font-size: 19px; margin-top: 12px; opacity: .9; max-width: 30ch; }
.get { display: flex; align-items: center; gap: 22px; margin-top: 28px; }
.qr { width: 124px; height: 124px; padding: 10px; background: #fff; border-radius: 20px; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr:empty { display: none; }
.get .badge img { height: 54px; }
.hint { display: block; font-size: 14px; opacity: .8; margin-top: 10px; max-width: 24ch; }

/* ---------- FAQ ---------- */
section.faq { max-width: 760px; padding-top: 0; }
.faq h2 { margin-bottom: 28px; }
details { border-bottom: 2px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 4px; font-weight: 800; font-size: 19px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 8px; top: 50%; translate: 0 -50%; font-family: var(--display); font-size: 28px; color: var(--charlie); transition: rotate .2s; }
details[open] summary::after { rotate: 45deg; }
details p { padding: 0 44px 22px 4px; color: var(--muted); font-size: 17px; line-height: 1.5; }

/* ---------- footer ---------- */
footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; max-width: 1160px; margin: 0 auto; padding: 28px 24px 48px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 22px; }
.brand img { width: 40px; height: 40px; }
footer nav { display: flex; gap: 24px; font-weight: 700; color: var(--muted); }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--ink); }
.social { display: flex; gap: 10px; }
.social a { width: 40px; height: 40px; border-radius: 50%; background: var(--cloud); display: grid; place-items: center; }
.social img { width: 18px; height: 18px; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  :root { --cy: 40%; }
  .ground { --gw: max(100vw, 245svh); --crest: 54px; }
  .hero h1 { font-size: 28px; gap: 14px; }
  .hero p { font-size: 18px; }
  .cat { width: 290px; height: 290px; }
  .cat .still { width: 184px; height: 184px; }
  .bubble { bottom: calc(100% - var(--cy) + 118px); padding: 12px 12px 10px; border-radius: 28px; }
  .bubble p { width: 236px; font-size: 19px; line-height: 27px; }
  section.more, section.cta, section.faq { padding: 64px 16px; }
  section.cta, section.faq { padding-top: 0; }
  .trio { grid-template-columns: 1fr; }
  .panel { padding: 36px 24px 250px; border-radius: 36px; text-align: center; min-height: 0; }
  .panel h2 { text-align: center; }
  .panel p { margin-inline: auto; }
  .hero-cat { left: 96px; top: calc(100% - 96px); width: 330px; height: 330px; }
  .get { justify-content: center; }
  /* phones: one card per beat, tucked over the cat's feet */
  .props { z-index: 2; }
  .notif, .prop.phone { display: none; }
  .get { flex-direction: column; }
  .qr, .hint { display: none; }
  footer { flex-direction: column; }
}
