/* Screenshot gallery: one consistent frame, independent of the app image. */
.top-screens { padding: 72px 0 60px; background: #f5f8fc; scroll-margin-top: 96px; }
.top-screens-inner { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.top-screens .section-heading { margin: 0 auto 32px; text-align: center; }
.top-screens .section-heading h2 { font-size: clamp(24px, 2.3vw, 32px); line-height: 1.6; }
.top-screens .section-heading > p:not(.eyebrow) { margin: 12px auto 0; }
.top-screen-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 6px; }
.top-screen-card { margin: 0; min-width: 0; }
.top-screen-surface { display: block; position: relative; aspect-ratio: 390 / 844; border: 5px solid #dce6f1; border-radius: 27px; background: white; overflow: hidden; }
.top-screen-surface > img { display: block; width: 100%; height: auto; max-width: none; }
.top-screen-card figcaption { padding: 20px 2px 0; }
.top-screen-card h3 { font-size: 17px; line-height: 1.6; }
.top-screen-card p { margin: 8px 0 0; font-size: 14px; line-height: 1.8; }
.top-screens-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; }
.top-screens-bottom p { margin: 0; font-size: 12px; color: #647188; }
.top-screens-bottom a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.top-screen-surface:focus-visible, .top-screen-gallery:focus-visible { outline: 3px solid #235be4; outline-offset: 4px; }
@media(max-width:1000px) {
 .top-screens-inner { width: calc(100% - 48px); }
 .top-screen-gallery { display: flex; overflow-x: auto; gap: 24px; padding: 6px 6px 20px; scroll-snap-type: x proximity; }
 .top-screen-card { flex: 0 0 225px; scroll-snap-align: start; }
}
@media(max-width:600px) {
 .top-screens { padding: 44px 0 36px; }
 .top-screens-inner { width: calc(100% - 32px); }
 .top-screens .section-heading { text-align: left; margin-bottom: 24px; }
 .top-screens .section-heading h2 { font-size: 24px; }
 .top-screens .section-heading > p:not(.eyebrow) { font-size: 14px; }
 .top-screen-gallery { gap: 18px; }
 .top-screen-card { flex-basis: 225px; }
 .top-screens-bottom { margin-top: 16px; }
}
@media(prefers-reduced-motion:reduce) {
 .top-screen-gallery { scroll-behavior: auto; }
}
/* Strip captured system status bars, leaving equal app toolbars at the top. */
.top-screen-surface > .top-screen-with-status { margin-top: -15.4229%; }
.top-screen-controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.top-screen-controls[hidden] { display: none; }
.top-screen-controls button { min-height: 48px; padding: 12px 10px; border: 1px solid #c9d8ea; border-radius: 8px; background: white; color: #12315b; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .25s, color .25s, transform .25s; }
.top-screen-controls button[aria-pressed="true"] { background: #123a70; color: white; border-color: #123a70; }
.top-screen-controls button:hover { transform: translateY(-3px); }
.top-screen-card { --screen-order: 0; }
.top-screen-card:nth-child(2) { --screen-order: 1; }
.top-screen-card:nth-child(3) { --screen-order: 2; }
.top-screen-card:nth-child(4) { --screen-order: 3; }
html.motion-ready .top-screen-card.motion-reveal { transition-delay: calc(var(--screen-order) * 140ms); }
.top-screen-surface { transition: transform .55s cubic-bezier(.2,.7,.2,1), border-color .35s, box-shadow .35s; }
html.motion-ready .top-screen-card:not(.is-visible) .top-screen-surface { transform: translateY(28px) scale(.94) rotate(1.5deg); }
.top-screen-card.is-selected .top-screen-surface { border-color: #86b1e5; box-shadow: 0 14px 34px rgb(24 65 120 / 12%); transform: translateY(-6px); }
.top-screen-surface:hover { transform: translateY(-10px); }
@supports(animation-timeline:view()) {
 .top-screen-surface > img { animation: screen-drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
}
@keyframes screen-drift { from { transform: translateY(3px); } to { transform: translateY(-3px); } }
/* Keep the original chapter transitions, with a smaller photograph and shorter chapters. */
.motion-test .habit-story { width: min(1180px, calc(100% - 64px)); margin-inline: auto; grid-template-columns: .95fr 1.05fr; gap: 44px; padding-block: 44px; }
.motion-test .story-stage { top: max(105px, calc((100svh - 460px) / 2)); height: min(460px, 62svh); min-height: 340px; border-radius: 20px; }
.motion-test .story-chapter { min-height: 66svh; padding: 42px 24px; }
.motion-test .story-chapter h2 { font-size: clamp(28px, 2.8vw, 40px); margin-bottom: 22px; }
.motion-test .story-overlay { font-size: clamp(26px, 2.6vw, 38px); }
@media(max-width:760px) {
 .top-screen-controls { grid-template-columns: repeat(2, 1fr); gap: 8px; }
 .top-screen-controls button { font-size: 12px; }
 .motion-test .habit-story { width: calc(100% - 32px); padding-block: 24px; display: block; }
 .motion-test .story-stage { top: 86px; height: 26svh; min-height: 180px; max-height: 230px; border-radius: 14px; }
 .motion-test .story-overlay { font-size: 23px; }
 .motion-test .story-chapter { min-height: 58svh; padding: 30px 12px 44px; }
 .motion-test .story-chapter h2 { font-size: 28px; }
}
@media(prefers-reduced-motion:reduce) {
 .top-screen-surface, .top-screen-controls button { transition: none; }
 .top-screen-surface > img { animation: none; }
 .top-screen-surface:hover, .top-screen-card.is-selected .top-screen-surface, .top-screen-controls button:hover { transform: none; }
 html.motion-ready .top-screen-card:not(.is-visible) .top-screen-surface { transform: none; }
}
.motion-test .story-finale { padding-block: 64px; }
.motion-test .story-finale h2 { font-size: clamp(28px, 3.3vw, 46px); margin: 16px 0 28px; }
.story-install-links { justify-content: center; gap: 20px; }
.story-install-links .story-store-link { width: 180px; min-width: 180px; height: 54px; background: transparent; border: 0; padding: 0; }
@media(max-width:760px) {
 .motion-test .story-finale { padding-block: 44px; }
 .story-install-links { gap: 12px; }
 .story-install-links .story-store-link { width: 150px; min-width: 150px; height: 48px; }
}
@media(max-width:360px) {
 .story-install-links .story-store-link { width: 135px; min-width: 135px; }
}
/* The habit process is a compact reading aid rather than a large band. */
.motion-test .motion-statement { width: min(1180px, calc(100% - 64px)); margin: 0 auto 24px; padding: 28px 0; background: white; color: #12315b; border-block: 1px solid #e1eaf5; }
.motion-test .motion-statement > p { color: #3267b1; margin-bottom: 20px; font-size: 14px; }
.habit-process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0; margin: 0; list-style: none; }
.habit-process li { display: flex; align-items: flex-start; gap: 14px; }
.habit-process li + li { border-left: 1px solid #e1eaf5; padding-left: 24px; }
.habit-process b { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #e8f1fc; color: #3267b1; font-size: 16px; }
.motion-test .motion-statement .habit-process div { display: block; }
.habit-process h2 { font-size: 20px; line-height: 1.5; margin: 0 0 6px; }
.motion-test .motion-statement .habit-process p { margin: 0; font-size: 13px; color: #52627a; line-height: 1.8; font-weight: 400; }
.motion-test .story-finale { display: flex; align-items: center; justify-content: center; gap: 36px; padding: 22px 32px; }
.motion-test .story-finale > p { display: none; }
.motion-test .story-finale h2 { font-size: clamp(20px, 2.2vw, 28px); margin: 0; line-height: 1.6; }
.motion-test .story-finale h2 br { display: none; }
.story-install-links { flex: 0 0 auto; }
@media(max-width:760px) {
 .motion-test .motion-statement { width: calc(100% - 32px); padding-block: 22px; }
 .habit-process { grid-template-columns: 1fr; gap: 16px; }
 .habit-process li + li { border: 0; padding-left: 0; }
 .motion-test .story-finale { flex-direction: column; gap: 16px; padding: 22px 16px; }
 .motion-test .story-finale h2 { font-size: 20px; }
}
/* A staggered page-turn arrival: each screenshot opens into its stable reading position. */
html.motion-ready .top-screen-card.motion-reveal { transform: translateY(46px) rotateY(-12deg); transform-origin: left center; transition: opacity .65s ease, transform .9s cubic-bezier(.16,.8,.25,1); transition-delay: calc(var(--screen-order) * 190ms); }
html.motion-ready .top-screen-card.motion-reveal.is-visible { transform: none; }
.top-screen-gallery { perspective: 1400px; }
@media(prefers-reduced-motion:reduce) {
 html.motion-ready .top-screen-card.motion-reveal { transform: none; transition: none; opacity: 1; }
}
.top-screen-appbar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; background: #08233a; color: white; }
.top-screen-appbar img { width: 24px; height: 24px; border-radius: 50%; object-fit: contain; flex: 0 0 auto; }
.top-screen-appbar b { font-size: 14px; font-weight: 600; }
.top-screen-surface > .top-screen-content { margin-top: 0; }
.top-screens { padding-top: 48px; padding-bottom: 40px; }
.top-screens .section-heading { margin-bottom: 24px; }
.top-screen-controls { margin-bottom: 18px; }
/* Keep the original screen content, replace only the captured toolbars with one uniform app bar. */
.top-screen-surface > .screen-crop-selection { margin-top: -14.2494%; }
.top-screen-surface > .screen-crop-meal { margin-top: -14.359%; }
.top-screen-surface > .screen-crop-status { margin-top: -29.3532%; }
.top-screen-appbar { position: relative; z-index: 1; }

/* TOP typography uses the existing shared scale in every section. */
.top-page.motion-test .section-heading h2,
.top-page.motion-test .story-chapter h2,
.top-page.motion-test .faq-list h2 { font-size: var(--text-section); line-height: 1.5; }
.top-page.motion-test .scene-copy h3,
.top-page.motion-test .scene-copy p,
.top-page.motion-test .point-card h3,
.top-page.motion-test .top-screen-card h3,
.top-page.motion-test .habit-process h2,
.top-page.motion-test .faq-list summary { font-size: var(--text-heading); line-height: 1.65; }
.top-page.motion-test .hero-lead,
.top-page.motion-test .story-chapter > p:not(.story-time),
.top-page.motion-test .point-card p,
.top-page.motion-test .section-heading > p:not(.eyebrow),
.top-page.motion-test .top-screen-card p,
.top-page.motion-test .faq-list details p { font-size: var(--text-body); line-height: 1.8; }
.top-page.motion-test .hero-kicker,
.top-page.motion-test .story-time,
.top-page.motion-test .eyebrow,
.top-page.motion-test .motion-statement > p,
.top-page.motion-test .habit-process p,
.top-page.motion-test .top-screen-controls button,
.top-page.motion-test .top-screens-bottom p,
.top-page.motion-test .top-screens-bottom a,
.top-page.motion-test .hero-visual figcaption { font-size: var(--text-small); line-height: 1.8; }
.top-page.motion-test .story-overlay { font-size: var(--text-section); line-height: 1.5; }
.top-page.motion-test .story-finale h2 { font-size: var(--text-section); line-height: 1.5; }

/* Use-case chapters stay separate and fully clickable at every scroll position. */
.top-page.motion-test .scene-grid { display: grid; gap: 32px; padding-bottom: 0; }
.top-page.motion-test .scene-section .section-heading { margin-bottom: 32px; }
.top-page.motion-test .scene-card,
.top-page.motion-test .scene-card:nth-child(n) {
 position: relative; top: auto; min-height: 0; margin: 0; padding: 32px;
 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr auto;
 gap: 20px 40px; box-shadow: none; border-radius: 20px;
}
.top-page.motion-test .scene-photo { height: 300px; animation: none; clip-path: none; transform: none; }
.top-page.motion-test .scene-number { top: 16px; left: 24px; font-size: 80px; }
.top-page.motion-test .scene-card b { min-height: 48px; display: inline-flex; align-items: center; }
.top-page.motion-test .scene-card:focus-visible { outline: 3px solid #235be4; outline-offset: 4px; }
.top-page.motion-test .scene-card:hover { box-shadow: 0 8px 24px rgb(16 40 77 / 8%); }
@media(max-width:760px) {
 .top-page.motion-test .scene-grid { gap: 24px; }
 .top-page.motion-test .scene-card:nth-child(n) { padding: 24px; grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 16px; }
 .top-page.motion-test .scene-photo { height: 200px; }
 .top-page.motion-test .scene-card b { width: 100%; justify-content: center; }
}

/* Shorter path from a recognisable problem to the app itself. */
.top-page.motion-test .story-chapter { min-height: 50svh; padding-block: 32px; }
/* Match the app MessageBubble: left AI avatar, right user avatar and 14px radius. */
.ai-conversation { max-width: 520px; margin: 24px 0; padding: 22px; border: 1px solid #dce6f1; border-radius: 16px; background: #fff; scroll-margin-top: 110px; }
.top-page .ai-conversation p { margin: 0; font-size: var(--text-body); line-height: 1.7; }
.top-page .ai-conversation .conversation-label { font-size: var(--text-small); color: #52627a; margin-bottom: 18px; }
.conversation-message { display: flex; align-items: flex-start; gap: 10px; margin-block: 16px; }
.conversation-message-user { justify-content: flex-end; padding-left: 18px; }
.conversation-message-ai { padding-right: 18px; }
.conversation-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; object-fit: cover; }
.conversation-message-user .conversation-avatar { object-position: 45% 28%; }
.conversation-bubble { min-width: 0; padding: 14px 16px; border-radius: 14px; color: #172839; background: #f5f5f5; }
.conversation-message-user .conversation-bubble { background: #eaf8ff; }
.top-page .ai-conversation .conversation-sender { margin-bottom: 6px; font-size: var(--text-small); font-weight: 700; color: #12315b; }
.top-page .ai-conversation .conversation-note { margin-top: 18px; font-size: var(--text-small); color: #52627a; }
.top-page .hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.top-page .hero-cta .web-app-button { flex-basis: 100%; justify-content: flex-start; min-width: 0; height: 44px; background: transparent; color: #235be4; padding: 0; font-size: var(--text-small); }
.top-page .hero-cta .web-app-button img { width: 18px; height: 18px; }
.top-business-contact { width: min(1180px, calc(100% - 64px)); margin: 0 auto 48px; padding: 24px 32px; display: flex; gap: 24px; align-items: center; justify-content: space-between; border: 1px solid #dce6f1; border-radius: 12px; background: #f5f8fc; }
.top-business-contact h2 { font-size: var(--text-heading); margin: 0 0 8px; }
.top-business-contact p { font-size: var(--text-small); margin: 0; }
.top-business-contact a { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 20px; border: 1px solid #b8cbe2; border-radius: 6px; font-size: var(--text-small); color: #12315b; white-space: nowrap; background: #fff; }
/* Rewards are a supporting benefit, not another long story. */
.top-page.motion-test .points-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.top-page.motion-test .points-section .section-heading { margin-bottom: 28px; }
.top-page.motion-test .point-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 0; padding: 24px; gap: 12px; border-radius: 16px; }
.top-page.motion-test .point-card .scene-icon { width: 28px; height: 28px; margin: 0; }
.top-page.motion-test .point-card .point-visual { height: 120px; order: 1; animation: none; transform: none; transition: none; }
.top-page.motion-test .point-card b { order: 2; margin-top: auto; min-height: 48px; display: inline-flex; align-items: center; }
.top-page.motion-test .point-card::before { display: none; }
@media(max-width:760px) {
 .top-page.motion-test .story-chapter { min-height: 46svh; padding: 28px 12px; }
 .top-page .hero-cta .store-link { width: calc((100% - 12px) / 2); min-width: 0; }
 .top-business-contact { width: calc(100% - 32px); padding: 24px; flex-direction: column; align-items: stretch; }
 .top-page.motion-test .points-grid { grid-template-columns: 1fr; gap: 16px; }
 .top-page.motion-test .point-card .point-visual { height: 100px; }
}

/* Restore a readable scale without flattening the hierarchy into small text. */
.top-page { --text-section: 36px; --text-heading: 24px; --text-body: 18px; --text-small: 16px; --text-caption: 16px; }
.top-page.motion-test .scene-copy p { font-size: 28px; line-height: 1.65; }
.top-page.motion-test .story-chapter h2 { font-size: 36px; }
.top-page .top-business-contact h2 { font-size: var(--text-heading); }
.top-page .top-business-contact p, .top-page .top-business-contact a { font-size: var(--text-small); }
@media(max-width:760px) {
 .top-page { --text-section: 28px; --text-heading: 22px; --text-body: 18px; --text-small: 16px; --text-caption: 16px; }
 .top-page.motion-test .story-chapter h2 { font-size: 28px; }
 .top-page.motion-test .scene-copy p { font-size: 22px; }
 .ai-conversation { padding: 16px 12px; }
 .conversation-message-user { padding-left: 0; }
 .conversation-message-ai { padding-right: 0; }
 .conversation-message { gap: 8px; }
 .conversation-avatar { width: 40px; height: 40px; flex-basis: 40px; }
 .conversation-bubble { padding: 12px; }
}

@media(max-width:760px) {
 .top-screen-gallery { display:grid; grid-template-columns:1fr; overflow:visible; padding:10px 0 0; }
 .top-screen-gallery.is-interactive .top-screen-card[hidden] { display:none; }
 .top-screen-card { width:min(100%,290px); margin-inline:auto; }
 .top-screen-card figcaption { padding:20px 0 4px; }
 .top-screen-controls button { font-size:16px; min-height:60px; line-height:1.5; padding:10px 8px; border-radius:12px; }
 .top-screen-card.is-selected { animation:mobile-screen-entry .3s ease-out; }
 html.motion-ready .top-screen-card.motion-reveal { opacity:1; transform:none; transition-delay:0s; }
 html.motion-ready .top-screen-card:not(.is-visible) .top-screen-surface { transform:none; }
}
@keyframes mobile-screen-entry { from { opacity:.3; transform:translateY(10px); } to { opacity:1; transform:none; } }
@media(prefers-reduced-motion:reduce) { .top-screen-card.is-selected { animation:none; } }
