/* Coolstory home page illustrations: the hero demo, How it works, the feed and app phones, the
   AI builder, the face bubble and the example stories. Loaded after css/site.css, whose tokens
   these read; js/home.js drives them. */

/* ============================================================
   ILLUSTRATIONS — phone mock, steps, section illustrations
   ============================================================ */
.text-pink { color: var(--c-pink); }

/* Founder illustration (inline SVG, cloned into smaller slots by js/home.js) */
.founder { display: block; width: 100%; height: 100%; }
.founder__head  { transform-origin: 120px 330px; animation: founderBob 2.4s ease-in-out infinite; }
.founder__eyes  { transform-box: fill-box; transform-origin: center; animation: founderBlink 4s infinite; }
.founder__mouth { animation: founderTalk 0.9s ease-in-out infinite; }
.founder__hand  { transform-origin: 200px 430px; transform: translateY(160px); }
.founder--face  { transform: scale(2); transform-origin: 50% 48%; }
/* Outside the recording scenes she wears other clothes in other rooms (the copies read these variables) */
.maya--mint  { --maya-room: #d9f5e8; --maya-hoodie: #f59e0b; --maya-hoodie-dark: #d98a06; }
.maya--sky   { --maya-room: #dcecef; --maya-hoodie: #f772d0; --maya-hoodie-dark: #de5bb8; }
.maya--peach { --maya-room: #ffe7d6; --maya-hoodie: #14b8a6; --maya-hoodie-dark: #0f978a; }
/* Set by the script while a copy of her is scrolled out of view */
.founder.is-offscreen * { animation-play-state: paused !important; }

@keyframes founderBob {
  0%, 100% { transform: rotate(-3deg); }
  25% { transform: translateY(-3px) rotate(0.5deg); }
  50% { transform: rotate(3deg); }
  75% { transform: translateY(-3px) rotate(0.5deg); }
}
@keyframes founderBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
/* Talking drops the lower lip to show the teeth behind it */
@keyframes founderTalk {
  0%, 100% { transform: none; }
  20% { transform: translateY(4px); }
  40% { transform: translateY(1.5px); }
  60% { transform: translateY(3.5px); }
  80% { transform: translateY(0.5px); }
}
@keyframes founderWave {
  0%   { transform: translateY(160px) rotate(0); }
  15%  { transform: translateY(0) rotate(0); }
  25%  { transform: translateY(0) rotate(-14deg); }
  37%  { transform: translateY(0) rotate(10deg); }
  49%  { transform: translateY(0) rotate(-14deg); }
  61%  { transform: translateY(0) rotate(10deg); }
  72%  { transform: translateY(0) rotate(0); }
  100% { transform: translateY(160px) rotate(0); }
}

/* Hero demo: one phone looping through four scenes, driven by data-scene */
.demo {
  --demo-ease: cubic-bezier(0.65, 0, 0.25, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 280px;
}
.phone-mock {
  width: 100%;
  aspect-ratio: 9 / 18;
  padding: 10px;
  border-radius: 44px;
  background: var(--c-dark);
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
}
.demo__screen {
  position: relative;
  height: 100%;
  border-radius: 34px;
  clip-path: inset(0 round 34px);
  overflow: hidden;
  background: #f7f7fb;
  color: var(--c-dark);
  text-align: left;
}

/* Someone's app, underneath everything */
.demo__app { position: absolute; inset: 0; padding: 18px 16px; }
.demo__app-bar { display: flex; align-items: center; gap: 8px; height: 24px; font-family: var(--font-display); font-size: 15px; }
.demo__app-bar > .material-symbols-rounded { margin-left: auto; font-size: 20px; color: var(--c-text-muted); }
.demo__app-logo { width: 24px; height: 24px; border-radius: 8px; background: var(--c-green); display: grid; place-items: center; }
.demo__app-logo .material-symbols-rounded { font-size: 16px; color: var(--c-white); }
.demo__stories { display: flex; gap: 10px; margin-top: 12px; overflow: hidden; }
.demo__story { flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.demo__story-ring,
.demo__story-dot { width: 56px; height: 56px; border-radius: 50%; }
.demo__story-ring { box-shadow: inset 0 0 0 2.5px var(--c-pink); opacity: 0; transform: scale(0.7); }
.demo__story-dot  { background: #e7e9ef; box-shadow: inset 0 0 0 2.5px #d9dce3; }
.demo__story-name { font-size: 11px; font-weight: 600; line-height: 15px; opacity: 0; }
.demo__story-line { width: 34px; height: 7px; margin: 4px 0; border-radius: 4px; background: #e7e9ef; }
.demo__app-title { margin: 16px 0 10px; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.demo__habit {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; padding: 12px;
  border-radius: 14px;
  background: var(--c-white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  font-size: 13px; font-weight: 500;
}
.demo__check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--c-border); flex-shrink: 0; }
.demo__check.is-done { background: var(--c-green); border-color: var(--c-green); }
.demo__streak {
  margin-top: 12px; padding: 14px;
  border-radius: 16px;
  background: var(--card-orange);
  font-size: 13px; font-weight: 600;
}
.demo__streak strong { display: block; font-family: var(--font-display); font-size: 22px; }
.demo__tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-around;
  padding: 12px 0 16px;
  background: var(--c-white);
  border-top: 1px solid #eceef2;
  color: #b4b9c4;
}
.demo__tabbar .material-symbols-rounded { font-size: 22px; }
.demo__tabbar .is-on { color: var(--c-dark); }

/* The founder's video: full screen while recording/watching, a story bubble in between */
.demo__cam {
  position: absolute; z-index: 2;
  top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #f3e1f7;
  transition: top 0.7s var(--demo-ease), left 0.7s var(--demo-ease), width 0.7s var(--demo-ease), height 0.7s var(--demo-ease), border-radius 0.7s var(--demo-ease);
}
.demo__cam .founder { transform-origin: 50% 48%; transition: transform 0.7s var(--demo-ease); }
[data-scene="2"] .demo__cam { top: 59px; left: 21px; width: 46px; height: 46px; border-radius: 50%; transition-delay: 0.15s; }
[data-scene="2"] .demo__cam .founder { transform: scale(2); transition-delay: 0.15s; }
[data-scene="3"] .demo__cam,
[data-scene="3"] .demo__cam .founder { transition-delay: 0.8s; }
[data-scene="1"] .demo__cam .founder__hand { animation: founderWave 2.2s 0.1s both; }

[data-scene="2"] .demo__story-ring,
[data-scene="3"] .demo__story-ring { opacity: 1; transform: none; transition: opacity 0.3s 0.7s, transform 0.4s 0.7s cubic-bezier(0.3, 1.6, 0.6, 1); }
[data-scene="2"] .demo__story-ring { animation: demoRingPulse 1s 1.1s 2; }
[data-scene="2"] .demo__story-name,
[data-scene="3"] .demo__story-name { opacity: 1; transition: opacity 0.3s 0.8s; }

/* Recording UI */
.demo__rec { position: absolute; inset: 0; z-index: 3; opacity: 0; transition: opacity 0.25s; }
[data-scene="1"] .demo__rec { opacity: 1; }
.demo__timer {
  position: absolute; top: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(40,40,40,0.55);
  color: var(--c-white);
  font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.demo__timer i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-red); animation: demoRecBlink 1s steps(1) infinite; }
.demo__shutter {
  position: absolute; bottom: 22px; left: 50%;
  width: 58px; height: 58px; margin-left: -29px;
  border-radius: 50%;
  border: 4px solid var(--c-white);
  display: grid; place-items: center;
}
.demo__shutter i { width: 44px; height: 44px; border-radius: 30%; background: var(--c-red); transform: scale(0.5); }
[data-scene="1"] .demo__shutter i { animation: recMorph 0.4s 0.3s both; }

/* Burned-in subtitles of the founder's video */
.demo__subs {
  position: absolute; z-index: 3;
  left: 22px; right: 22px; bottom: 96px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(40,40,40,0.55);
  color: var(--c-white);
  font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.35;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.demo__subs span { display: inline-block; }
[data-scene="1"] .demo__subs { opacity: 1; transition-delay: 0.35s; }
[data-scene="3"] .demo__subs { opacity: 1; transition-delay: 1.2s; }
[data-scene="1"] .demo__subs span { animation: demoWordIn 0.25s both; }
[data-scene="1"] .demo__subs span:nth-child(1) { animation-delay: 0.4s; }
[data-scene="1"] .demo__subs span:nth-child(2) { animation-delay: 0.8s; }
[data-scene="1"] .demo__subs span:nth-child(3) { animation-delay: 1.1s; }
[data-scene="1"] .demo__subs span:nth-child(4) { animation-delay: 1.5s; }
[data-scene="1"] .demo__subs span:nth-child(5) { animation-delay: 1.8s; }
[data-scene="1"] .demo__subs span:nth-child(6) { animation-delay: 2.1s; }
[data-scene="1"] .demo__subs span:nth-child(7) { animation-delay: 2.4s; }
[data-scene="1"] .demo__subs span:nth-child(8) { animation-delay: 2.8s; }

/* Tap on the story bubble */
.demo__tap {
  position: absolute; z-index: 7;
  top: 64px; left: 26px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(40,40,40,0.25);
  border: 2px solid rgba(255,255,255,0.9);
  opacity: 0;
}
[data-scene="3"] .demo__tap { animation: demoTap 0.9s 0.15s both; }

/* Story viewer chrome */
.demo__viewer { position: absolute; inset: 0; z-index: 4; opacity: 0; transition: opacity 0.3s; }
[data-scene="3"] .demo__viewer { opacity: 1; transition-delay: 1.2s; }
[data-scene="4"] .demo__viewer { opacity: 1; }
.demo__bars { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; }
.demo__bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(40,40,40,0.15); overflow: hidden; }
.demo__bars .is-done { background: rgba(40,40,40,0.7); }
.demo__bars i { display: block; width: 0; height: 100%; background: rgba(40,40,40,0.7); }
[data-scene="3"] .demo__bars i,
[data-scene="4"] .demo__bars i { animation: demoBarFill 7s 1.2s linear both; }
.demo__author { position: absolute; top: 24px; left: 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.demo__author strong { font-weight: 600; }
.demo__author > span:last-child { color: rgba(40,40,40,0.6); font-size: 12px; }
.demo__avatar-wrap { position: relative; width: 30px; height: 30px; }
.demo__avatar { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 2px solid var(--c-white); background: #f3e1f7; }
.demo__badge {
  position: absolute; top: -5px; right: -7px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px;
  background: var(--c-pink);
  color: var(--c-white);
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  transform: scale(0);
}
[data-scene="4"] .demo__avatar-wrap { animation: demoBump 0.4s 3s; }
[data-scene="4"] .demo__badge { animation: demoPop 0.4s 3.1s both; }
.demo__reply {
  position: absolute; left: 12px; right: 12px; bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255,255,255,0.9);
  background: rgba(40,40,40,0.25);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}
.demo__reply.is-typing { color: var(--c-white); }
.demo__reply .material-symbols-rounded { font-size: 18px; }
[data-scene="4"] .demo__reply { animation: demoReplyLift 2.6s both; }
[data-scene="4"] .demo__reply .material-symbols-rounded { animation: demoSend 0.4s 1.95s both; }

/* Keyboard (keys are added by the script) */
.demo__keyboard {
  position: absolute; z-index: 5;
  left: 0; right: 0; bottom: 0; height: 172px;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 4px;
  background: #d6d9df;
  transform: translateY(100%);
}
[data-scene="4"] .demo__keyboard { animation: demoKeyboard 2.6s both; }
.demo__kb-row { display: flex; justify-content: center; gap: 4px; }
.demo__kb-row span {
  flex: 0 0 calc((100% - 36px) / 10);
  height: 30px;
  border-radius: 5px;
  background: var(--c-white);
  box-shadow: 0 1px 0 rgba(0,0,0,0.25);
  display: grid; place-items: center;
  font-size: 12px;
}
.demo__kb-row span.is-pressed { background: #b8bec9; }
.demo__kb-row .is-space { flex-basis: 60%; color: var(--c-text-muted); }

/* Reply flying back to the founder */
.demo__sent {
  position: absolute; z-index: 6;
  right: 14px; top: 55%;
  padding: 8px 12px;
  border-radius: 16px 16px 4px 16px;
  background: var(--c-blue);
  color: var(--c-white);
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  opacity: 0;
}
[data-scene="4"] .demo__sent { animation: demoSentFly 1s 2.2s both; }

/* Progress segments and caption under the phone */
.demo__steps { display: flex; gap: 6px; width: 100%; }
.demo__step { flex: 1; padding: 8px 0; }
.demo__step i { position: relative; display: block; height: 4px; border-radius: 4px; background: rgba(40,40,40,0.15); overflow: hidden; }
.demo__step i::after { content: ''; position: absolute; inset: 0; width: 0; border-radius: inherit; background: var(--c-dark); }
.demo__step.is-done i::after { width: 100%; }
.demo__step.is-active i::after { animation: demoStepFill var(--dur, 4s) linear forwards; }
.demo__step:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 2px; border-radius: 4px; }
.demo__caption { min-height: 28px; font-family: var(--font-display); font-size: 20px; font-weight: 600; text-align: center; }
.demo__caption.is-in { animation: demoWordIn 0.35s both; }

/* Keep the whole demo, caption included, above the fold on shorter laptop screens */
@media (min-width: 810px) and (max-height: 860px) { .hero:has([data-demo]) { padding: 32px 0; } }
@media (min-width: 810px) and (max-height: 774px) { .demo { zoom: 0.9; } }
@media (min-width: 810px) and (max-height: 711px) { .demo { zoom: 0.8; } }
@media (min-width: 810px) and (max-height: 648px) { .demo { zoom: 0.7; } }

@keyframes recMorph       { from { transform: scale(1); border-radius: 50%; } to { transform: scale(0.5); border-radius: 30%; } }
@keyframes demoRecBlink   { 50% { opacity: 0; } }
@keyframes demoWordIn     { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes demoRingPulse  { from { box-shadow: inset 0 0 0 2.5px var(--c-pink), 0 0 0 0 rgba(247,114,208,0.6); } to { box-shadow: inset 0 0 0 2.5px var(--c-pink), 0 0 0 12px rgba(247,114,208,0); } }
@keyframes demoTap {
  0%   { opacity: 0; transform: scale(1.4); }
  25%  { opacity: 1; transform: scale(1); }
  40%  { transform: scale(0.8); }
  55%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.6); }
}
@keyframes demoBarFill    { to { width: 100%; } }
@keyframes demoKeyboard   { 0% { transform: translateY(100%); } 12%, 85% { transform: none; } 100% { transform: translateY(100%); } }
@keyframes demoReplyLift  { 0% { transform: none; } 12%, 85% { transform: translateY(-164px); } 100% { transform: none; } }
@keyframes demoSend       { 50% { transform: scale(1.4); color: var(--c-blue-light); } 100% { transform: none; } }
@keyframes demoSentFly {
  0%   { opacity: 0; transform: translateY(10px) scale(0.9); }
  15%  { opacity: 1; transform: none; }
  40%  { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translate(-154px, -274px) scale(0.15); }
}
@keyframes demoBump       { 50% { transform: scale(1.25); } }
@keyframes demoPop        { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes demoStepFill   { to { width: 100%; } }

/* How it works: each card plays its step once when scrolled into view.
   Base styles are the final frame; .is-ready (added by the script) sets the first frame. */
.step-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step-card__visual {
  height: 220px;
  border-radius: var(--radius-card);
  background: var(--c-white);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}
.step-card__num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-blue);
  color: var(--c-white);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.step-card p { font-size: 16px; line-height: 1.6; color: var(--c-body); }
.step-card.is-playing .step-card__num { animation: demoBump 0.45s var(--start, 0s); }

.mini-phone {
  position: relative;
  width: 140px;
  height: 190px;
  border: 6px solid var(--c-dark);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

/* 1 — recording */
.mini-phone--record { padding: 0; background: #f3e1f7; }
.mini-phone__cam { position: absolute; inset: 0; }
.mini-phone__timer {
  position: absolute; top: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(40,40,40,0.55);
  color: var(--c-white);
  font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mini-phone__timer i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-red); }
.mini-phone__rec {
  position: absolute; bottom: 12px; left: 50%;
  width: 40px; height: 40px; margin-left: -20px;
  border-radius: 50%;
  border: 3px solid var(--c-white);
  display: grid; place-items: center;
}
.mini-phone__rec i { width: 30px; height: 30px; border-radius: 30%; background: var(--c-red); transform: scale(0.5); }
.how-steps.is-ready .mini-phone__rec i { transform: none; border-radius: 50%; }
.step-card.is-playing .mini-phone__rec i { animation: recMorph 0.4s calc(var(--start, 0s) + 0.3s) both; }
.step-card.is-playing .mini-phone__rec { animation: miniRecPulse 1.2s calc(var(--start, 0s) + 0.7s) 2; }
.step-card.is-playing .mini-phone--record .founder__hand { animation: founderWave 2s calc(var(--start, 0s) + 0.1s) both; }

/* 2 — the story in the app */
.mini-phone--app { background: var(--c-white); }
.mini-phone__bubbles { display: flex; gap: 8px; margin: 0 -12px 0 0; padding: 3px 0 3px 3px; overflow: hidden; }
.mini-phone__bubbles > span {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-grey);
  border: 2px solid var(--c-border);
}
.mini-phone__bubbles > .mini-phone__founder { border-color: var(--c-white); background: #f3e1f7; box-shadow: 0 0 0 2px var(--c-pink); }
.mini-phone__founder > span { display: block; width: 100%; height: 100%; }
.mini-phone__name { width: 48px; margin: -4px 0 6px; font-size: 10px; font-weight: 700; text-align: center; }
.how-steps.is-ready .mini-phone__founder,
.how-steps.is-ready .mini-phone__name { transform: scale(0); }
.step-card.is-playing .mini-phone__name { animation: demoPop 0.4s calc(var(--start, 0s) + 0.45s) both; }
.step-card.is-playing .mini-phone__founder {
  animation: demoPop 0.5s calc(var(--start, 0s) + 0.2s) both,
             miniRingPulse 1s calc(var(--start, 0s) + 0.8s) 2;
}
.mini-phone__line { height: 10px; border-radius: 5px; background: var(--c-grey); }
.mini-phone__line--short { width: 60%; }

/* 3 — a viewer replies */
.mini-phone--reply { padding: 0; background: #f3e1f7; }
.mini-phone__input {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 6px 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.8);
  background: rgba(40,40,40,0.35);
  color: var(--c-white);
  font-size: 11px; font-weight: 600;
}
.mini-phone__input .material-symbols-rounded { font-size: 16px; }
.mini-phone__sent {
  position: absolute; right: 10px; bottom: 46px;
  padding: 5px 10px;
  border-radius: 14px 14px 4px 14px;
  background: var(--c-blue);
  color: var(--c-white);
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.how-steps.is-ready .mini-phone__sent { opacity: 0; }
.step-card.is-playing .mini-phone__sent { animation: miniSent 0.4s calc(var(--start, 0s) + 0.9s) both; }
.step-card.is-playing .mini-phone__input .material-symbols-rounded { animation: demoBump 0.4s calc(var(--start, 0s) + 0.7s); }

@keyframes miniRecPulse  { from { box-shadow: 0 0 0 0 rgba(244,63,94,0.5); } to { box-shadow: 0 0 0 10px rgba(244,63,94,0); } }
@keyframes miniRingPulse { from { box-shadow: 0 0 0 2px var(--c-pink), 0 0 0 2px rgba(247,114,208,0.6); } to { box-shadow: 0 0 0 2px var(--c-pink), 0 0 0 12px rgba(247,114,208,0); } }
@keyframes miniSent      { from { opacity: 0; transform: translateY(12px) scale(0.8); } to { opacity: 1; transform: none; } }

/* Sections below play once when scrolled into view ([data-play] gets .is-playing).
   Base styles are the final frame; .is-ready sets the first frame. */

/* Illustration sections take at least a screen on desktop, so one shows at a time */
@media (min-width: 810px) {
  .section--screen { min-height: 100vh; display: flex; align-items: center; }
}

/* Followers vs users: the post does well in the feed while nothing happens in the app,
   until a story shows up there too */
.scene {
  display: flex;
  justify-content: center;
  gap: 48px;
}
.scene__col { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.scene-phone {
  position: relative;
  width: 280px; height: 520px;
  border: 10px solid var(--c-dark);
  border-radius: 44px;
  background: var(--c-white);
  box-shadow: 0 24px 80px rgba(0,0,0,0.14);
  overflow: hidden;
}
.scene__label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
}
.scene__label .material-symbols-rounded { font-size: 22px; }
.scene__label--followers { color: var(--c-blue); }
.scene__label--users     { color: var(--c-pink); }

/* The feed */
.feed { padding: 22px 16px; font-size: 13px; line-height: 1.4; }
.feed__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.feed__post { display: flex; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid #eceef2; }
.feed__avatar { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: #f3e1f7; }
.feed__name { color: var(--c-text-muted); font-size: 12px; }
.feed__name b { margin-right: 4px; color: var(--c-dark); }
.feed__text { margin: 4px 0 10px; font-size: 14px; }
.feed__actions { display: flex; gap: 18px; color: var(--c-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.feed__actions > span { display: inline-flex; align-items: center; gap: 4px; }
.feed__actions .material-symbols-rounded { font-size: 16px; }
.feed__likes { color: var(--c-pink); }
.feed__likes .material-symbols-rounded { font-variation-settings: 'FILL' 1; }
.feed__reply { display: flex; gap: 10px; padding: 12px 0 12px 20px; border-bottom: 1px solid #eceef2; }
.feed__emoji { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--c-grey); font-size: 16px; }
.scene-phone.is-ready .feed__post,
.scene-phone.is-ready .feed__reply { opacity: 0; }
.scene-phone.is-playing .feed__post { animation: miniSent 0.4s 0.2s both; }
.scene-phone.is-playing .feed__reply { animation: miniSent 0.4s 1.1s both; }
.scene-phone.is-playing .feed__reply:nth-of-type(4) { animation-delay: 1.7s; }
.scene-phone.is-playing .feed__reply:nth-of-type(5) { animation-delay: 2.3s; }
.scene-phone.is-playing .feed__likes .material-symbols-rounded { animation: demoBump 0.4s 0.6s 3; }

/* The app, on a user's phone */
.scene-app { position: relative; height: 100%; padding: 22px 16px; background: #f7f7fb; }
.scene-app .builder__card { background: var(--c-white); }
.scene-app__stories { display: flex; gap: 10px; padding: 4px 0 0 4px; margin-bottom: 8px; }
.scene-app__stories > span { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: #e7e9ef; }
.scene-app__slot { position: relative; }
.scene-app__story {
  position: absolute; inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #f3e1f7;
  border: 2px solid var(--c-white);
  box-shadow: 0 0 0 2px var(--c-pink);
}
.scene-app__story > span { display: block; width: 100%; height: 100%; }
.tumbleweed { position: absolute; left: 0; bottom: 70px; width: 46px; height: 46px; opacity: 0; }
.scene-app__reply {
  position: absolute; right: 14px; bottom: 18px; left: 40px;
  padding: 10px 12px;
  border-radius: 16px 16px 4px 16px;
  background: var(--c-blue);
  color: var(--c-white);
  font-size: 13px; font-weight: 600; line-height: 1.35;
}
.scene-phone.is-ready .scene-app__story { transform: scale(0); }
.scene-phone.is-ready .scene-app__reply { opacity: 0; }
.scene-phone.is-playing .tumbleweed { animation: tumbleweed 2.8s 0.6s linear both; }
.scene-phone.is-playing .scene-app__story { animation: demoPop 0.45s 3.8s both, miniRingPulse 1s 4.3s 2; }
.scene-phone.is-playing .scene-app__reply { animation: miniSent 0.4s 4.7s both; }
@keyframes tumbleweed {
  0%   { opacity: 1; transform: translate(-60px, 0) rotate(0); }
  20%  { transform: translate(10px, -14px) rotate(160deg); }
  40%  { transform: translate(80px, 0) rotate(320deg); }
  60%  { transform: translate(150px, -10px) rotate(480deg); }
  80%  { transform: translate(215px, 0) rotate(640deg); }
  99%  { opacity: 1; }
  100% { opacity: 0; transform: translate(290px, 0) rotate(800deg); }
}

/* Your AI installs it: an AI builder with the chat on the left and the app preview on the right */
.builder {
  max-width: 920px;
  margin: 0 auto;
  border-radius: 24px;
  background: var(--c-white);
  box-shadow: 0 24px 80px rgba(0,0,0,0.12);
  overflow: hidden;
}
.builder__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid #eceef2;
  background: var(--c-grey);
}
.builder__bar i { width: 10px; height: 10px; border-radius: 50%; background: #d9dce3; }
.builder__body { display: grid; grid-template-columns: 1fr 1fr; min-height: 420px; }
.builder__chat {
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px;
  border-right: 1px solid #eceef2;
}
.builder__msg { padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.45; }
.builder__msg--you {
  align-self: flex-end;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  max-width: 92%;
  border-bottom-right-radius: 6px;
  background: var(--c-grey);
}
.builder__msg--you [data-typewrite] { min-height: 1.45em; }
.builder__code {
  align-self: stretch;
  max-height: 150px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1e1e2e;
  color: #cdd6f4;
  font-family: var(--font-mono);
  font-size: 11.5px; line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 65%, transparent);
          mask-image: linear-gradient(#000 65%, transparent);
}
.builder__code .tok-tag    { color: #f38ba8; }
.builder__code .tok-attr   { color: #89b4fa; }
.builder__code .tok-string { color: #a6e3a1; }
.builder__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--c-blue);
  color: var(--c-white);
  font-size: 12px; font-weight: 600;
}
.builder__chip .material-symbols-rounded { font-size: 15px; }
.builder__reply { display: grid; justify-items: start; }
.builder__reply > * { grid-area: 1 / 1; }
.builder__msg--ai {
  display: flex; align-items: center; gap: 8px;
  border-bottom-left-radius: 6px;
  background: var(--card-green);
  font-weight: 600;
}
.builder__msg--ai .material-symbols-rounded { color: #10b981; font-variation-settings: 'FILL' 1; }
.builder__typing { display: flex; gap: 5px; padding: 14px 16px; border-radius: 18px; background: var(--c-grey); opacity: 0; }
.builder__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-text-muted); animation: aiDot 1s infinite; }
.builder__typing i:nth-child(2) { animation-delay: 0.15s; }
.builder__typing i:nth-child(3) { animation-delay: 0.3s; }
.builder__preview { display: grid; place-items: center; padding: 28px; background: #f3f5f9; }
.builder__app {
  width: 100%; max-width: 380px;
  padding: 18px;
  border-radius: 18px;
  background: var(--c-white);
  box-shadow: var(--shadow-card);
  font-size: 14px;
}
.builder__app-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.builder__logo { width: 24px; height: 24px; border-radius: 7px; background: #e7e9ef; }
.builder__avatar { width: 24px; height: 24px; margin-left: auto; border-radius: 50%; background: #e7e9ef; }
.builder__line { display: block; height: 10px; border-radius: 5px; background: #e7e9ef; }
.builder__card { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 14px; border-radius: 12px; background: var(--c-grey); }
.builder__stories { display: flex; gap: 10px; height: 60px; padding: 4px 0 0 4px; overflow: hidden; }
.builder__stories > span { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: #e7e9ef; }
.builder__stories > .builder__story { overflow: hidden; background: #f3e1f7; border: 2px solid var(--c-white); box-shadow: 0 0 0 2px var(--c-pink); }
.builder__story > span { display: block; width: 100%; height: 100%; }
.builder.is-ready .builder__msg { opacity: 0; }
.builder.is-ready .builder__stories { height: 0; padding-top: 0; }
.builder.is-ready .builder__stories > span { transform: scale(0); }
.builder.is-playing .builder__msg--you { animation: miniSent 0.4s 0.2s both; }
.builder.is-playing .builder__typing { animation: aiTyping 1.2s 2.5s both; }
.builder.is-playing .builder__msg--ai { animation: miniSent 0.4s 3.7s both; }
.builder.is-playing .builder__stories { animation: builderRow 0.5s 4s both; }
.builder.is-playing .builder__stories > span { animation: demoPop 0.4s 4.3s both; }
.builder.is-playing .builder__stories > span:nth-child(2) { animation-delay: 4.4s; }
.builder.is-playing .builder__stories > span:nth-child(3) { animation-delay: 4.5s; }
.builder.is-playing .builder__stories > span:nth-child(4) { animation-delay: 4.6s; }
.builder.is-playing .builder__stories > .builder__story { animation: demoPop 0.4s 4.3s both, miniRingPulse 1s 4.8s 2; }
@keyframes aiDot      { 50% { opacity: 0.3; transform: translateY(-3px); } }
@keyframes aiTyping   { 0% { opacity: 0; } 10%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes builderRow { from { height: 0; padding-top: 0; } to { height: 60px; padding-top: 4px; } }

/* Your face */
.face {
  position: relative;
  width: 220px; height: 220px;
  margin: 0 auto;
}
.face__bubble {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 8px solid var(--c-white);
  overflow: hidden;
  background: var(--maya-room, #f3e1f7);
  box-shadow: 0 0 0 5px var(--c-pink), var(--shadow-card);
}
.face__bubble > span { display: block; width: 100%; height: 100%; }
.face__react {
  position: absolute;
  font-size: 40px;
  opacity: 0;
}
.face__react:nth-of-type(2) { left: -70px; top: 30px; }
.face__react:nth-of-type(3) { right: -70px; top: 10px; }
.face__react:nth-of-type(4) { left: -40px; bottom: -10px; }
.face__react:nth-of-type(5) { right: -50px; bottom: 20px; }
.face.is-playing .face__bubble { animation: miniRingPulse 1.2s 0.2s 2; }
.face.is-playing .face__react { animation: faceReact 2.4s both; }
.face.is-playing .face__react:nth-of-type(3) { animation-delay: 0.4s; }
.face.is-playing .face__react:nth-of-type(4) { animation-delay: 0.8s; }
.face.is-playing .face__react:nth-of-type(5) { animation-delay: 1.2s; }
@keyframes faceReact {
  0%   { opacity: 0; transform: translateY(30px) scale(0.4); }
  25%  { opacity: 1; transform: none; }
  100% { opacity: 1; transform: none; }
}

/* What founders post: a row of story frames, each a different kind of post */
.examples {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.example {
  position: relative;
  aspect-ratio: 9 / 16;
  padding: 14px;
  border-radius: 24px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  isolation: isolate;
}
.example > * { position: relative; }
.example__bars { height: 3px; border-radius: 2px; background: rgba(40,40,40,0.15); }
.example__bars span { display: block; width: 40%; height: 100%; border-radius: 2px; background: var(--c-dark); }
.example__author { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.example__avatar { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: #f3e1f7; }
.example__text {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 19px; line-height: 1.25; font-weight: 600;
  letter-spacing: -0.3px;
}

/* A screen recording of the app in dark mode */
.example--screen { background: #1c1d26; color: var(--c-white); }
.example--screen .example__bars { background: rgba(255,255,255,0.25); }
.example--screen .example__bars span { background: var(--c-white); }
.example .example__screen {
  position: absolute; left: 14px; right: 14px; top: 72px;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: #2a2c38;
}
.example__ui-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.example__ui-row span { height: 8px; width: 70%; border-radius: 4px; background: rgba(255,255,255,0.18); }
.example__toggle { position: relative; width: 30px; height: 18px; border-radius: 9px; background: var(--c-blue); }
.example__toggle::after { content: ''; position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--c-white); }

/* A video of the founder talking, with subtitles */
.example--video { background: #f3e1f7; }
.example .example__cam { position: absolute; inset: 0; z-index: -1; }
.example--video .example__author { color: var(--c-white); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.example--video .example__bars { background: rgba(255,255,255,0.5); }
.example--video .example__bars span { background: var(--c-white); }
.example__subs {
  margin-top: auto;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(20,20,20,0.6);
  color: var(--c-white);
  font-size: 14px; font-weight: 600; line-height: 1.35;
  text-align: center;
}

/* A screenshot of an uptime chart */
.example--chart { background: var(--card-orange); }
.example__chart {
  display: flex; align-items: flex-end; gap: 6px;
  height: 90px;
  margin-top: 24px;
  padding: 12px;
  border-radius: 14px;
  background: var(--c-white);
}
.example__chart span { flex: 1; height: var(--h); border-radius: 3px; background: var(--c-green); }
.example__chart span.is-down { background: var(--c-red); }

/* A poll over the video */
.example__poll {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
}
.example__poll p { margin-bottom: 2px; font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.25; }
.example__poll span {
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--c-grey);
  border: 1px solid #eceef2;
  font-size: 13px; font-weight: 600;
}

/* A photo of sticky notes */
.example--board { background: #efe4d3; }
.example__notes { position: relative; height: 140px; margin-top: 16px; }
.example__notes span {
  position: absolute;
  width: 84px; height: 72px;
  padding: 8px;
  font-size: 12px; font-weight: 600; line-height: 1.2;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.example__notes .is-yellow { left: 0;   top: 0;    background: #fde68a; transform: rotate(-6deg); }
.example__notes .is-pink   { right: 0;  top: 12px; background: #fbcfe8; transform: rotate(5deg); }
.example__notes .is-blue   { left: 24%; top: 64px; background: #cfe5e9; transform: rotate(-2deg); }



/* ============================================================
   REDESIGN TOUCHES ON THE ILLUSTRATIONS
   ============================================================ */
.phone-mock, .scene-phone { box-shadow: 0 30px 60px -20px rgba(23,20,15,0.25); }
.scene-phone { border-color: var(--ink); }
.builder { border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(23,20,15,0.25); }
.builder__bar { background: var(--paper); border-bottom-color: var(--line); }
.builder__chat { border-right-color: var(--line); }
.builder__preview { background: var(--paper-2); }
.builder__code { background: var(--ink); }
.scene__label { font-size: 20px; }
.scene__label--followers { color: var(--ink); }
.example { box-shadow: none; border: 1px solid rgba(23,20,15,0.08); }
.face__bubble { box-shadow: 0 0 0 5px var(--accent), 0 30px 60px -20px rgba(23,20,15,0.3); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 810px) and (max-width: 1279px) {
  .examples { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 809px) {
  .scene { flex-direction: column; align-items: center; gap: 40px; }
  .scene__label { font-size: 18px; }
  .builder__body { grid-template-columns: 1fr; min-height: 0; }
  .builder__chat { border-right: none; border-bottom: 1px solid var(--line); padding: 18px; }
  .builder__msg { font-size: 14px; }
  .builder__preview { padding: 18px; }
  .face { width: 160px; height: 160px; }
  .face__react { font-size: 30px; }
  .face__react:nth-of-type(2) { left: -50px; }
  .face__react:nth-of-type(3) { right: -50px; }
  .face__react:nth-of-type(4) { left: -30px; }
  .face__react:nth-of-type(5) { right: -36px; }
  .examples { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 8px 20px 16px; }
  .example { flex: 0 0 200px; scroll-snap-align: center; }
  .step-card { align-items: center; text-align: center; }
  .step-card__visual { align-self: stretch; }
}
