/* CaresLog public page. A light healthcare-tech look: white and ice-blue grounds,
   clinical teal for data, the brand navy for type, the brand orange for calls to
   action and alerts, the C's three parts (day, evening, night) as the moving shapes.
   --cyan is for shapes and glows; text on white uses the darker --teal.
   Scroll scenes: each .scene is tall; its .stage stays pinned while welcome.js
   sets --p (0 to 1) on the scene and marks [data-at] items as they are reached.
   Only transform and opacity move, so it stays smooth on phones. */

@font-face { font-family: Figtree; src: url(/welcome/fonts/figtree-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Figtree; src: url(/welcome/fonts/figtree-500.woff2) format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: Figtree; src: url(/welcome/fonts/figtree-800.woff2) format('woff2'); font-weight: 700 900; font-display: swap; }

:root {
    --bg: #FFFFFF;
    --bg2: #FFFFFF;
    --tint: #F2F5FB;
    --ink: #161A45;
    --muted: #4B4F72;
    --line: rgba(48, 54, 138, 0.13);
    --cyan: #14C2A8;
    --teal: #0A7468;
    --indigo: #30368A;
    --day: #F5A524;
    --eve: #FF7A45;
    --night: #30368A;
    --cta: #C8461A;
    --cta-ink: #FFFFFF;
    --alert: #D9203A;
    --alert-ink: #B4233A;
    --shadow: 0 24px 60px -24px rgba(32, 36, 91, 0.28);
    --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.55 Figtree, system-ui, sans-serif; overflow-x: hidden; }
img, svg, video { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.04; }
h2 { font-size: clamp(28px, min(4.6vw, 8svh), 64px); color: var(--indigo); }
p { margin: 0; }
.mono { font-family: var(--mono); letter-spacing: 0.04em; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 14px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 28px; border-radius: 12px; background: var(--cta); color: var(--cta-ink); font-weight: 800; font-size: 18px; text-decoration: none; transition: transform .2s, box-shadow .2s; box-shadow: 0 0 0 0 rgba(200, 70, 26, 0.4); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(200, 70, 26, 0.55); }
.btn-ghost { background: #FFFFFF; color: var(--indigo); border: 1.5px solid rgba(48, 54, 138, 0.35); }
.btn-ghost:hover { box-shadow: none; border-color: var(--indigo); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 16px; border-radius: 10px; }
.btn-wide { width: 100%; }

/* Top bar */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 4vw, 48px); padding-top: max(12px, env(safe-area-inset-top)); background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-logo img { height: 28px; width: auto; }
.nav nav { display: flex; align-items: center; gap: 26px; font-size: 16px; font-weight: 500; }
.nav nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.nav nav a:not(.btn):hover { color: var(--ink); }
.nav .nav-signin { color: var(--ink) !important; font-weight: 700; }
@media (max-width: 760px) {
    .nav nav a:not(.btn):not(.nav-signin) { display: none; }
    .nav nav { gap: 14px; }
    .nav-logo img { height: 24px; }
}

/* Scenes */
.scene { position: relative; height: calc(var(--len, 250) * 1vh); --p: 0; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; align-items: center; padding: 88px clamp(20px, 5vw, 72px) 32px; }

/* One continuous ground for the whole page: soft glows behind everything drift and
   change colour with the scroll (--g, 0 to 1 over the page, set by welcome.js). */
body { background: #FFFFFF; }
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; --g: 0; }
.blob { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; opacity: .55; will-change: transform; }
.b1 { left: -25vmax; top: -20vmax; background: radial-gradient(closest-side, rgba(20, 194, 168, 0.32), transparent); transform: translate(calc(var(--g) * 30vw), calc(var(--g) * 60vh)); }
.b2 { right: -30vmax; top: 10vh; background: radial-gradient(closest-side, rgba(48, 54, 138, 0.22), transparent); transform: translate(calc(var(--g) * -20vw), calc(var(--g) * 30vh)) scale(calc(1 + var(--g) * 0.3)); }
.b3 { left: 10vw; bottom: -45vmax; background: radial-gradient(closest-side, rgba(255, 122, 69, 0.2), transparent); transform: translate(calc(var(--g) * 25vw), calc(var(--g) * -50vh)); }

/* Each scene glides in as it arrives and lifts away as the next one comes
   (--ein and --eout, 0 to 1, set by welcome.js), so the page reads as one piece. */
.stage { opacity: calc(var(--ein, 1) * (1 - var(--eout, 0))); transform: translateY(calc((1 - var(--ein, 1)) * 70px - var(--eout, 0) * 70px)) scale(calc(1 - var(--eout, 0) * 0.04)); }
/* A scene far from the screen rests: its looping animations pause. */
.scene.idle *, .scene.idle *::before, .scene.idle *::after { animation-play-state: paused !important; }

/* 1. Opening */
.s-intro[data-step="1"] .cmark .seg { filter: drop-shadow(0 10px 22px rgba(32, 36, 91, 0.25)); }
.s-intro { --k: clamp(0, calc(var(--p) * 2.4), 1); --out: clamp(0, calc((var(--p) - 0.72) * 3.6), 1); }
.s-intro .stage { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; }
.grid-bg { position: absolute; left: -20%; right: -20%; bottom: -30%; height: 75%; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; transform: perspective(700px) rotateX(62deg); transform-origin: 50% 0; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); animation: floor 2.6s linear infinite; pointer-events: none; will-change: transform; }
@keyframes floor { from { transform: perspective(700px) rotateX(62deg) translateY(-64px); } to { transform: perspective(700px) rotateX(62deg) translateY(0); } }
@keyframes gridflow { to { background-position: 0 64px; } }
.ecg { position: absolute; left: 0; right: 0; top: 50%; width: 100%; height: 160px; transform: translateY(-50%); opacity: .7; pointer-events: none; }
.ecg path { fill: none; stroke: var(--cyan); stroke-width: 2.5; stroke-dasharray: 0.16 0.84; stroke-dashoffset: 1; animation: ecg 3.2s linear infinite; filter: drop-shadow(0 0 4px rgba(20, 194, 168, 0.6)); vector-effect: non-scaling-stroke; }
@keyframes ecg { to { stroke-dashoffset: 0; } }
.intro-copy { position: relative; z-index: 2; max-width: 640px; }
.intro-copy h1 { font-size: clamp(34px, min(7.4vw, 11.5svh), 104px); margin-bottom: min(24px, 2.6svh); color: var(--indigo); }
.intro-copy .ln { display: block; opacity: 0; transform: translateY(26px); animation: rise .9s cubic-bezier(.2, .8, .2, 1) forwards; }
.intro-copy .l2 { animation-delay: .18s; }
.intro-copy .l3 { animation-delay: .36s; color: var(--teal); }
@keyframes rise { to { opacity: 1; transform: none; } }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 520px; margin-bottom: min(30px, 3.4svh); opacity: 0; animation: rise .9s .55s cubic-bezier(.2, .8, .2, 1) forwards; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; opacity: 0; animation: rise .9s .7s cubic-bezier(.2, .8, .2, 1) forwards; }
.intro-copy .eyebrow { opacity: 0; animation: rise .8s cubic-bezier(.2, .8, .2, 1) forwards; }
.intro-mark { position: relative; z-index: 1; width: min(46vw, 620px, calc(100svh - 160px)); aspect-ratio: 1; justify-self: center; transform: scale(calc(1 - var(--out) * 0.3)); }
.intro-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit { fill: none; stroke: var(--line); stroke-width: 2; }
.o1 { stroke-dasharray: 4 14; }
.o3 { stroke: rgba(20, 194, 168, 0.35); stroke-dasharray: 60 30 4 30; }
.orbits { animation: spin 40s linear infinite; transform-origin: 52.6% 50%; }
.orbits .o3 { animation: spin 18s linear infinite reverse; transform-box: view-box; transform-origin: 526px 500px; }
.sat { transform-box: view-box; transform-origin: 526px 500px; }
.sat circle { fill: var(--cyan); filter: drop-shadow(0 0 8px var(--cyan)); }
.s1 { animation: spin 7s linear infinite; }
.s2 { animation: spin 12s linear infinite reverse; }
.s2 circle { fill: var(--eve); filter: drop-shadow(0 0 8px var(--eve)); }
.s3 { animation: spin 9s linear infinite; }
.s3 circle { fill: var(--day); filter: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.seg { transform-box: view-box; transform-origin: 526px 500px; transition: filter .6s; }
.cmark .seg { transform: translate(calc((1 - var(--k)) * var(--dx)), calc((1 - var(--k)) * var(--dy))) rotate(calc((1 - var(--k)) * var(--rot))); }
.seg-day { fill: var(--day); --dx: 60px; --dy: -150px; --rot: 70deg; }
.seg-eve { fill: var(--eve); --dx: -170px; --dy: 10px; --rot: -55deg; }
.seg-night { fill: var(--night); --dx: 80px; --dy: 160px; --rot: 40deg; }
.cmark { animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.025); } }
.seg-day { color: var(--day); } .seg-eve { color: var(--eve); } .seg-night { color: var(--night); }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: calc(1 - var(--p) * 8); }
.scroll-hint span { width: 2px; height: 36px; background: linear-gradient(var(--cyan), transparent); animation: drip 1.6s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 860px) {
    .stage { padding-top: 72px; padding-bottom: 16px; }
    .s-intro .stage { grid-template-columns: 1fr; align-content: center; gap: 4px; }
    .intro-mark { width: min(58vw, 300px, 25svh); order: -1; }
    .intro-copy h1 { font-size: min(11.5vw, 7.2svh); }
    .intro-copy .eyebrow { margin-bottom: 8px; }
    .lede { font-size: 16px; line-height: 1.5; }
    .ctas { flex-wrap: nowrap; gap: 10px; }
    .ctas .btn { flex: 1 1 0; min-height: 48px; padding: 0 12px; font-size: 16px; }
    .scroll-hint { display: none; }
    .ecg { top: 24%; height: 110px; opacity: .5; }
}

/* Short windows (a laptop with a small height): tighter lists. */
@media (max-height: 760px) {
    .feed { gap: 6px; }
    .feed li { padding: 7px 14px; }
    .steps { gap: 10px; }
    .stage { padding-top: 80px; padding-bottom: 20px; }
}

/* 2. Dial */
.s-dial .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); }
.dial-wrap { position: relative; width: min(42vw, 560px, calc(100svh - 150px)); aspect-ratio: 1; justify-self: center; }
.dial { width: 100%; height: 100%; overflow: visible; }
.dial-track { fill: none; stroke: var(--line); stroke-width: 26; }
.dial-arc { fill: none; stroke-width: 26; stroke-dasharray: 7.7 16.3; transform: rotate(-90deg); transform-origin: 300px 300px; }
.arc-day { stroke: var(--day); stroke-dashoffset: -7.15; }
.arc-eve { stroke: var(--eve); stroke-dashoffset: -15.15; }
.arc-night { stroke: var(--night); stroke-dashoffset: -23.15; }
.ticks line { stroke: rgba(48, 54, 138, 0.25); stroke-width: 2; }
.ticks line.major { stroke: rgba(48, 54, 138, 0.6); stroke-width: 3; }
.needle { transform-box: view-box; transform-origin: 300px 300px; transform: rotate(calc((7 + var(--p) * 22) * 15deg)); }
.needle line { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.needle circle { fill: var(--cyan); filter: drop-shadow(0 0 10px var(--cyan)); }
.dial-readout { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; pointer-events: none; }
.dial-readout .mono { font-size: clamp(26px, 3.6vw, 46px); font-weight: 700; color: var(--indigo); }
.dial-shift { font-family: var(--mono); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }
.dial-copy h2 { margin-bottom: 16px; }
.dial-copy > p:not(.eyebrow) { color: var(--muted); max-width: 520px; margin-bottom: 24px; }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.feed li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--line); box-shadow: 0 6px 18px -10px rgba(32, 36, 91, 0.25); font-size: 16px; opacity: 0; transform: translateX(30px); transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.feed li.on { opacity: 1; transform: none; }
.feed .mono { color: var(--muted); font-size: 13px; min-width: 70px; }
.feed b { margin-left: auto; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.ok { background: rgba(20, 194, 168, 0.14); color: var(--teal); }
.warn { background: rgba(245, 165, 36, 0.18); color: #8A5300; }
.no { background: rgba(217, 32, 58, 0.1); color: var(--alert-ink); }
@media (max-width: 860px) {
    .s-dial .stage { grid-template-columns: 1fr; align-content: center; gap: 18px; }
    .dial-wrap { width: min(62vw, 300px, 36svh); }
    .feed li:not(.active) { display: none; }
    .dial-copy > p:not(.eyebrow) { display: none; }
    .feed li { padding: 8px 12px; font-size: 14px; }
}

/* 3, 6, 7. The app on film (the video follows the scroll) */
.film { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 96px); }
.s-flip .film .phone { order: 2; }
.phone { position: relative; justify-self: center; height: min(76svh, 760px); aspect-ratio: 390 / 844; border-radius: 46px; padding: 10px; background: #161A45; box-shadow: 0 0 0 1.5px rgba(48, 54, 138, 0.25), 0 50px 100px -30px rgba(32, 36, 91, 0.45); transform: perspective(1400px) rotateY(calc((0.5 - var(--p)) * 14deg)) rotateX(calc((var(--p) - 0.5) * 6deg)); }
.phone video { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 36px; background: #fff; }
.phone-glow { position: absolute; inset: -20%; z-index: -1; background: radial-gradient(closest-side, rgba(20, 194, 168, 0.2), transparent); animation: glow 4s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .5; transform: scale(.92); } }
.captions h2 { margin-bottom: 26px; }
.captions > p:not(.eyebrow):not(.fine) { color: var(--muted); max-width: 540px; margin-bottom: 22px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; opacity: .4; transition: opacity .45s, transform .45s; transform: translateX(-8px); }
.steps li.on { opacity: .62; transform: none; }
.steps li.active { opacity: 1; }
.steps b { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 16px; border: 1.5px solid var(--line); transition: background .4s, color .4s, box-shadow .4s, border-color .4s; }
.steps li.active b { background: var(--teal); color: #FFFFFF; border-color: var(--teal); box-shadow: 0 0 0 6px rgba(20, 194, 168, 0.18); }
.steps span { font-size: 18px; color: var(--muted); padding-top: 6px; }
.steps strong { color: var(--ink); }
.readers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.readers li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); font-weight: 600; opacity: .3; transition: opacity .5s, border-color .5s, background .5s; }
.readers li em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--muted); }
.readers li.on { opacity: 1; border-color: rgba(20, 194, 168, 0.5); background: rgba(20, 194, 168, 0.07); }
.readers li.on em { color: var(--teal); }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--indigo); background: rgba(48, 54, 138, 0.1); }
@media (max-width: 860px) {
    .film { grid-template-columns: 1fr; align-content: start; gap: 14px; }
    .s-flip .film .phone { order: 0; }
    .phone { height: clamp(210px, calc(100svh - 350px), 56svh); border-radius: 30px; padding: 6px; }
    .phone video { border-radius: 24px; }
    .captions h2 { font-size: 28px; margin-bottom: 12px; }
    .captions .eyebrow { margin-bottom: 6px; }
    .captions > p:not(.eyebrow) { display: none; }
    .steps { gap: 8px; }
    .steps li:not(.active) { display: none; }
    .steps span { font-size: 16px; padding-top: 2px; }
    .steps b { width: 32px; height: 32px; font-size: 14px; }
    .readers { gap: 6px; }
    .readers li { padding: 6px 10px; font-size: 14px; }
    .s-plan .readers, .s-plan .fine, .s-plan .captions > p:not(.eyebrow) { display: none; }
}

/* 3. How it works: a rough note types itself, one tap writes it up, must report drops in */
.s-write .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); }
.notecard { position: relative; overflow: hidden; justify-self: center; width: min(540px, 100%); padding: 22px 24px; border-radius: 24px; background: #FFFFFF; border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; transform: perspective(1400px) rotateY(calc((0.5 - var(--p)) * 8deg)); }
.nc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.nc-title { font-size: 20px; font-weight: 800; color: var(--indigo); }
.nc-head .mono { font-size: 12px; color: var(--muted); }
.nc-label { font-size: 11px; letter-spacing: .14em; color: var(--teal); margin-bottom: 4px; }
.nc-body { display: grid; min-height: 248px; }
.nc-rough, .nc-clean { grid-area: 1 / 1; transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.nc-typed { font-size: 21px; line-height: 1.5; color: var(--ink); }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.15em; background: var(--teal); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nc-clean { opacity: 0; transform: translateY(14px); display: flex; flex-direction: column; gap: 12px; }
.nc-row p:not(.nc-label) { font-size: 17px; line-height: 1.45; color: var(--ink); }
.nc-row, .nc-chips { opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .45s; }
.nc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nc-chips span { padding: 6px 12px; border-radius: 999px; background: rgba(48, 54, 138, 0.08); color: var(--indigo); font-size: 14px; font-weight: 600; }
.nc-foot { display: flex; justify-content: flex-end; }
.nc-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--indigo); color: var(--indigo); font-weight: 700; animation: invite 1.8s ease-out infinite; transition: background .3s, color .3s, border-color .3s; }
@keyframes invite { 0% { box-shadow: 0 0 0 0 rgba(48, 54, 138, 0.35); } 100% { box-shadow: 0 0 0 14px rgba(48, 54, 138, 0); } }
.nc-must { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(217, 32, 58, 0.07); border: 1px solid rgba(217, 32, 58, 0.25); opacity: 0; transform: translateY(-10px); transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.nc-must p { font-size: 15px; line-height: 1.45; color: #7A1424; }
.nc-must .tag-must { flex: none; font-size: 11px; padding: 5px 9px; }
.notecard::after { content: ''; position: absolute; left: 0; right: 0; top: -140px; height: 140px; background: linear-gradient(transparent, rgba(20, 194, 168, 0.22), transparent); pointer-events: none; }
/* Written up (steps 1 and 2) */
.s-write[data-step="1"] .notecard::after { animation: scan .9s ease-out; }
@keyframes scan { to { top: 100%; } }
.s-write[data-step="1"] .nc-rough, .s-write[data-step="2"] .nc-rough { opacity: 0; transform: translateY(-14px); }
.s-write[data-step="1"] .nc-clean, .s-write[data-step="2"] .nc-clean { opacity: 1; transform: none; }
.s-write[data-step="1"] .nc-row, .s-write[data-step="2"] .nc-row, .s-write[data-step="1"] .nc-chips, .s-write[data-step="2"] .nc-chips { opacity: 1; transform: none; }
.s-write .nc-row:nth-child(2) { transition-delay: .15s; } .s-write .nc-row:nth-child(3) { transition-delay: .3s; } .s-write .nc-chips { transition-delay: .45s; }
.s-write[data-step="1"] .nc-btn, .s-write[data-step="2"] .nc-btn { background: var(--teal); border-color: var(--teal); color: #FFFFFF; animation: none; }
.s-write[data-step="1"] .nc-btn::before, .s-write[data-step="2"] .nc-btn::before { content: '✓'; }
.s-write[data-step="2"] .nc-must { opacity: 1; transform: none; }
.s-write[data-step="2"] .nc-must .tag-must { animation: alarm 1.2s ease-in-out infinite; }
@media (max-width: 860px) {
    .s-write .stage { grid-template-columns: 1fr; align-content: center; gap: 14px; }
    .s-write .captions { order: -1; }
    .s-write .captions h2 { font-size: 28px; margin-bottom: 8px; }
    .s-write .captions .eyebrow { margin-bottom: 4px; }
    .notecard { padding: 14px 16px; gap: 10px; border-radius: 20px; transform: none; }
    .nc-head { padding-bottom: 8px; }
    .nc-title { font-size: 17px; }
    .nc-body { min-height: 214px; }
    .nc-typed { font-size: 17px; }
    .nc-clean { gap: 8px; }
    .nc-row p:not(.nc-label) { font-size: 14px; }
    .nc-chips span { font-size: 12px; padding: 4px 10px; }
    .nc-btn { min-height: 38px; padding: 0 16px; font-size: 14px; }
    .nc-must { padding: 8px 10px; }
    .nc-must p { font-size: 13px; }
}
@media (max-width: 860px) and (max-height: 700px) { .s-write .captions .eyebrow, .nc-chips { display: none; } .nc-body { min-height: 190px; } }

/* 4. Privacy */
.s-privacy .stage { grid-template-rows: auto auto auto; align-content: center; justify-items: center; gap: clamp(24px, 4vh, 48px); text-align: center; }
.flow { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(60px, 220px) auto; align-items: center; gap: 20px; width: min(1180px, 100%); }
.node { display: grid; place-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.node-phone span { padding: 8px 12px; border: 1px dashed var(--line); border-radius: 8px; }
.note-line { font-size: clamp(22px, 3vw, 40px); font-weight: 600; text-align: left; line-height: 1.35; }
.name { display: inline-block; padding: 0 6px; border-radius: 8px; transition: background .4s, color .4s, box-shadow .4s; }
[data-step="1"] .name, [data-step="2"] .name { background: rgba(255, 122, 69, 0.12); color: #A8401A; box-shadow: inset 0 0 0 1.5px var(--eve); font-family: var(--mono); font-size: .8em; }
[data-step="3"] .name { background: rgba(20, 194, 168, 0.12); color: var(--teal); }
.wire { width: 100%; height: 60px; overflow: visible; }
.wire path { fill: none; stroke: var(--line); stroke-width: 3; stroke-dasharray: 0.02 0.02; vector-effect: non-scaling-stroke; }
.packet { fill: var(--cyan); opacity: 0; filter: drop-shadow(0 0 10px var(--cyan)); }
[data-step="2"] .packet { opacity: 1; animation: packet 1.4s linear infinite; }
@keyframes packet { from { transform: translateX(0); } to { transform: translateX(400px); } }
.node-ai svg { width: 84px; height: 84px; animation: spin 14s linear infinite; }
.node-ai polygon { fill: none; stroke: var(--indigo); stroke-width: 4; }
[data-step="2"] .node-ai polygon { stroke: var(--cyan); filter: drop-shadow(0 0 10px var(--cyan)); }
.node-ai .node-c { position: absolute; width: 46px; height: 46px; animation: none; }
.node-ai { position: relative; }
.privacy-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; width: min(1180px, 100%); text-align: left; }
.privacy-steps li { padding: 16px; border-top: 2px solid var(--line); color: var(--muted); font-size: 16px; opacity: .55; transition: opacity .4s, border-color .4s, color .4s; }
.privacy-steps li .mono { display: block; color: var(--teal); font-size: 13px; margin-bottom: 6px; }
.privacy-steps li.active { opacity: 1; border-color: var(--teal); color: var(--ink); }
.privacy-steps li.on:not(.active) { opacity: .75; }
@media (max-width: 860px) {
    .flow { grid-template-columns: 1fr; justify-items: center; gap: 10px; }
    .note-line { text-align: center; }
    .wire { width: 60px; height: 70px; transform: rotate(90deg); }
    .node-phone { display: none; }
    .node-ai svg { width: 64px; height: 64px; }
    .privacy-steps { grid-template-columns: 1fr; gap: 0; }
    .privacy-steps li { display: none; padding: 10px 0; text-align: center; }
    .privacy-steps li.active { display: block; }
}

/* 5. Reporting deadlines: the ring drains, the report moves to signed */
.tag-must { display: inline-block; background: #D9203A; color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .08em; padding: 6px 12px; border-radius: 6px; transition: background .4s; }
@keyframes alarm { 50% { box-shadow: 0 0 18px rgba(217, 32, 58, 0.55); } }
.s-dhs .stage { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 96px); }
.dhs-copy h2 { margin-bottom: 18px; }
.dhs-copy > p:not(.eyebrow):not(.fine) { color: var(--muted); max-width: 520px; }
.deadline { position: relative; justify-self: center; width: min(560px, 100%); padding: 26px; border-radius: 26px; background: #FFFFFF; border: 1px solid var(--line); box-shadow: var(--shadow); }
.dl-top { display: flex; align-items: center; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dl-ring { position: relative; flex: none; width: clamp(140px, 26svh, 200px); aspect-ratio: 1; }
.dl-ring svg { width: 100%; height: 100%; overflow: visible; }
.dl-track { fill: none; stroke: rgba(48, 54, 138, 0.08); stroke-width: 14; }
.dl-left { fill: none; stroke: var(--eve); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 1 1; transform: rotate(-90deg); transform-origin: 100px 100px; transition: stroke .5s; filter: drop-shadow(0 4px 8px rgba(255, 122, 69, 0.35)); }
.dl-ticks line { stroke: rgba(48, 54, 138, 0.22); stroke-width: 1.5; }
.dl-ticks line.major { stroke: rgba(48, 54, 138, 0.5); stroke-width: 2.5; }
.dl-read, .dl-done-read { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: opacity .4s, transform .4s; }
.dl-count { font-size: clamp(15px, 2.5svh, 23px); font-weight: 700; color: var(--alert-ink); }
.dl-sub { font-size: 12px; color: var(--muted); }
.dl-done-read { opacity: 0; transform: scale(.7); color: var(--teal); font-weight: 800; font-size: 16px; }
.dl-check { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #FFFFFF; font-size: 24px; margin-bottom: 4px; }
.dl-what { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.dl-what p { font-size: 18px; line-height: 1.4; color: var(--ink); }
.dl-what .tag-must { animation: alarm 1.2s ease-in-out infinite; }
.dl-spare { font-size: 13px !important; letter-spacing: .12em; color: var(--teal) !important; background: rgba(20, 194, 168, 0.12); padding: 6px 10px; border-radius: 8px; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.dl-spare.on { opacity: 1; transform: none; }
.dl-steps { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.dl-steps::before { content: ''; position: absolute; left: 81px; top: 16px; bottom: 16px; width: 2px; background: rgba(48, 54, 138, 0.1); }
.dl-steps li { position: relative; display: grid; grid-template-columns: 62px 1fr; gap: 36px; align-items: center; padding: 8px 0; font-size: 16px; color: var(--muted); opacity: .45; transition: opacity .4s, color .4s; }
.dl-steps li::before { content: ''; position: absolute; left: 75px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #FFFFFF; border: 2px solid rgba(48, 54, 138, 0.25); transition: background .3s, border-color .3s, box-shadow .3s; }
.dl-steps li .mono { font-size: 12px; text-align: right; }
.dl-steps li.on { opacity: 1; color: var(--ink); }
.dl-steps li.on::before { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 0 4px rgba(20, 194, 168, 0.18); }
.dl-steps li:first-child.on::before { background: var(--alert); border-color: var(--alert); box-shadow: 0 0 0 4px rgba(217, 32, 58, 0.15); }
.dl-toast { position: absolute; right: -34px; top: -26px; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--indigo); color: #FFFFFF; box-shadow: 0 24px 50px -18px rgba(32, 36, 91, 0.6); opacity: 0; transform: translateX(30px) scale(.95); transition: opacity .45s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.dl-toast svg { flex: none; width: 26px; height: 26px; fill: none; stroke: #4FE3CB; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl-toast b { display: block; font-size: 15px; }
.dl-toast span { font-size: 13px; color: #C9CCEB; }
.dl-toast.on { opacity: 1; transform: none; }
.s-dhs:has(.dl-steps li:nth-child(4).on) .dl-toast { opacity: 0; transform: translateX(30px); }
.s-dhs:has(.dl-steps li:last-child.on) .dl-left { stroke: var(--teal); filter: drop-shadow(0 4px 8px rgba(20, 194, 168, 0.35)); }
.s-dhs:has(.dl-steps li:last-child.on) .dl-read { opacity: 0; transform: scale(.8); }
.s-dhs:has(.dl-steps li:last-child.on) .dl-done-read { opacity: 1; transform: none; }
.s-dhs:has(.dl-steps li:last-child.on) .tag-must { background: var(--teal); animation: none; }
@media (max-width: 860px) {
    .s-dhs .stage { grid-template-columns: 1fr; align-content: center; gap: 16px; }
    .dhs-copy h2 { font-size: 28px; margin-bottom: 0; }
    .dhs-copy > p:not(.eyebrow) { display: none; }
    .deadline { padding: 16px; border-radius: 20px; }
    .dl-top { gap: 16px; padding-bottom: 12px; }
    .dl-ring { width: clamp(112px, 19svh, 140px); }
    .dl-count { font-size: 14px; }
    .dl-done-read { font-size: 12px; }
    .dl-check { width: 34px; height: 34px; font-size: 18px; }
    .dl-what p { font-size: 15px; }
    .dl-steps { margin-top: 8px; }
    .dl-steps::before { left: 67px; }
    .dl-steps li { grid-template-columns: 52px 1fr; gap: 30px; padding: 5px 0; font-size: 14px; }
    .dl-steps li::before { left: 62px; width: 12px; height: 12px; margin-top: -6px; }
    .dl-steps li .mono { font-size: 11px; }
    .dl-toast { right: 8px; left: 8px; top: auto; bottom: -62px; padding: 10px 12px; }
}
@media (max-width: 860px) and (max-height: 620px) { .s-dhs .eyebrow, .s-offline .eyebrow, .captions .eyebrow { display: none; } .dl-steps li { padding: 3px 0; } }

/* 6. Care notes: the month's sheet fills in as you scroll */
.s-care .stage { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 80px); }
.care-copy h2 { margin-bottom: 18px; }
.care-copy > p:not(.eyebrow) { color: var(--muted); max-width: 500px; }
.sheet-wrap { position: relative; }
.sheet { display: grid; grid-template-columns: 92px repeat(14, minmax(0, 1fr)); gap: 5px; padding: 22px; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; transform: perspective(1400px) rotateY(calc((0.5 - var(--p)) * -8deg)); }
.sheet .day { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; padding-bottom: 4px; }
.sheet .task { font-weight: 600; color: var(--ink); display: flex; align-items: center; white-space: nowrap; font-size: 14px; transition: color .4s; }
.sheet .cell { aspect-ratio: 1; border-radius: 6px; background: rgba(48, 54, 138, 0.06); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: transparent; transition: background .3s, color .3s; }
.sheet .cell.on { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(.55); } 100% { transform: none; } }
.sheet .cell.done.on { background: rgba(20, 194, 168, 0.18); color: var(--teal); }
.sheet .cell.miss.on { background: var(--eve); color: #FFFFFF; box-shadow: 0 6px 14px -6px rgba(255, 122, 69, 0.8); }
.sheet-wrap:has(.pattern.on) .task.flag { color: #A8401A; }
.sheet-wrap:has(.pattern.on) .cell.flag { outline: 2px solid rgba(255, 122, 69, 0.45); outline-offset: 1px; }
.callout { position: relative; z-index: 1; margin: -34px -12px 0 auto; width: min(340px, 80%); padding: 16px 18px; border-radius: 16px; background: #FFFFFF; border: 1px solid rgba(255, 122, 69, 0.35); box-shadow: 0 24px 50px -20px rgba(168, 64, 26, 0.45); opacity: 0; transform: translateY(16px) scale(.96); transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.callout.on { opacity: 1; transform: none; }
.callout p { margin: 8px 0; font-size: 16px; line-height: 1.45; color: var(--ink); }
.callout .mono { font-size: 11px; color: var(--muted); }
.tag-no { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; font-weight: 700; color: #FFFFFF; background: var(--eve); padding: 4px 8px; border-radius: 5px; }
.pattern { margin-top: 14px; display: inline-flex; gap: 10px; align-items: center; line-height: 1.35; padding: 10px 16px; border-radius: 999px; background: rgba(255, 122, 69, 0.12); color: #A8401A; font-size: 16px; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.pattern::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--eve); animation: blip-o 1.6s ease-out infinite; }
@keyframes blip-o { 0% { box-shadow: 0 0 0 0 rgba(255, 122, 69, 0.6); } 100% { box-shadow: 0 0 0 10px rgba(255, 122, 69, 0); } }
.pattern.on { opacity: 1; transform: none; }
@media (max-width: 860px) {
    .s-care .stage { grid-template-columns: 1fr; align-content: center; gap: 16px; }
    .care-copy h2 { font-size: 28px; margin-bottom: 0; }
    .care-copy > p:not(.eyebrow) { display: none; }
    .sheet { grid-template-columns: 70px repeat(14, minmax(0, 1fr)); gap: 3px; padding: 12px; transform: none; }
    .sheet .task { font-size: 12px; }
    .sheet .day { font-size: 9px; }
    .sheet .cell { border-radius: 3px; font-size: 9px; }
    .callout { width: 100%; margin: 12px 0 0; padding: 12px 14px; }
    .callout p { font-size: 14px; margin: 6px 0; }
    .pattern { font-size: 14px; margin-top: 10px; }
}
@media (max-width: 860px) and (max-height: 700px) { .callout .mono { display: none; } }

/* 7. Care plans: the plan builds itself, then gets its stamp */
.s-plan .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); }
.plan-visual { position: relative; justify-self: center; width: min(440px, 100%); }
.plan-sheet { position: absolute; inset: 0; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--line); }
.ps1 { transform: rotate(calc(-6deg + var(--p) * 3deg)) translate(-14px, 10px); }
.ps2 { transform: rotate(calc(4deg - var(--p) * 2deg)) translate(12px, 6px); }
.plan-doc { position: relative; padding: 24px 26px 74px; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.pd-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pd-title { font-size: 24px; font-weight: 800; color: var(--indigo); }
.pd-head .mono { font-size: 11px; color: var(--muted); }
.pd-sec { padding: 12px 14px; border-radius: 12px; background: rgba(48, 54, 138, 0.04); transition: background .5s; }
.pd-sec b, .pd-sec li { transition: color .5s, background-color .5s; }
.pd-sec:not(.on) b, .pd-sec:not(.on) li { color: transparent !important; background-color: rgba(48, 54, 138, 0.09); border-radius: 4px; width: fit-content; }
.pd-sec:not(.on) li::marker { color: rgba(48, 54, 138, 0.15); }
.pd-sec:not(.on) li + li { margin-top: 4px; }
.pd-sec.on { animation: write-in .6s cubic-bezier(.2, .8, .2, 1); }
@keyframes write-in { from { transform: translateX(14px); } to { transform: none; } }
.pd-alert:not(.on) { background: rgba(48, 54, 138, 0.04); }
.pd-sec b { display: block; font-size: 15px; color: var(--indigo); margin-bottom: 4px; }
.pd-sec ul, .pd-sec ol { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.5; color: var(--ink); }
.pd-alert { background: rgba(217, 32, 58, 0.07); }
.pd-alert b { color: var(--alert-ink); }
.pd-alert li { font-weight: 600; color: #7A1424; }
.pd-stamp { position: absolute; right: 22px; bottom: 16px; font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: .1em; color: var(--teal); border: 3px solid var(--teal); border-radius: 10px; padding: 8px 12px; opacity: 0; transform: rotate(-12deg) scale(1.8); transition: opacity .25s, transform .45s cubic-bezier(.3, 1.6, .5, 1); background: rgba(255, 255, 255, 0.9); }
.pd-stamp.on { opacity: 1; transform: rotate(-8deg) scale(1); }
@media (max-width: 860px) {
    .s-plan .stage { grid-template-columns: 1fr; align-content: center; gap: 14px; }
    .s-plan .captions { order: -1; }
    .s-plan .captions h2 { font-size: 28px; margin-bottom: 8px; }
    .plan-visual { width: min(360px, 100%); }
    .plan-doc { padding: 14px 16px 56px; gap: 8px; }
    .pd-title { font-size: 20px; }
    .pd-sec { padding: 8px 10px; }
    .pd-sec b, .pd-sec ul, .pd-sec ol { font-size: 13px; }
    .pd-stamp { font-size: 12px; right: 12px; bottom: 12px; }
}
@media (max-width: 860px) and (max-height: 700px) { .pd-signs { display: none; } }
@media (max-width: 860px) and (max-height: 600px) { .plan-doc { gap: 6px; padding-bottom: 48px; } .pd-head { padding-bottom: 6px; } .pd-sec { padding: 6px 10px; } .s-plan .captions h2 { font-size: 24px; } }

/* 9. A sideways reel of cards, moved by the scroll */
.s-reel { --shift: 0px; }
.reel-stage { align-content: center; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; gap: clamp(20px, 4svh, 44px); }
.reel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.reel-head h2 { max-width: 760px; min-width: 0; flex: 1 1 auto; }
.reel-count { font-size: 15px; color: var(--muted); white-space: nowrap; }
.reel-count span { color: var(--indigo); font-size: 28px; font-weight: 700; }
.reel-track { display: flex; gap: clamp(16px, 2vw, 28px); width: max-content; transform: translateX(calc(clamp(0, (var(--p) - 0.06) / 0.86, 1) * var(--shift) * -1)); }
.tile { flex: none; width: min(420px, 78vw); height: min(54svh, 460px); padding: clamp(22px, 3svh, 34px); border-radius: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; background: #FFFFFF; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 30px 60px -32px rgba(32, 36, 91, 0.4); }
.tile-n { font-size: 14px; letter-spacing: .14em; color: var(--muted); }
.tile h3 { font-size: clamp(24px, 2.4vw, 32px); margin: 0 0 8px; letter-spacing: -0.01em; color: var(--indigo); }
.tile p { color: var(--muted); font-size: 17px; }
.t-teal { background: #DDF7F2; }
.t-orange { background: #FFE9DF; }
.t-navy { background: #161A45; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
.t-navy h3, .t-navy p { color: #FFFFFF; }
.t-navy p { color: #C9CCEB; }
.t-navy .tile-n { color: #9DA2D6; }
.t-navy .loop svg { stroke: #4FE3CB; }
.t-navy .lock rect, .t-navy .lock path { stroke: #FFFFFF; }
.tile .loop { height: clamp(90px, 16svh, 140px); }
.tile .loop svg { width: clamp(90px, 16svh, 140px); height: clamp(90px, 16svh, 140px); }
.tile .eq i { height: clamp(70px, 13svh, 110px); width: 11px; }
.tile .pdf { width: 130px; }
.tile .pdf span { width: 72px; height: 92px; }
.tile .pdf span:nth-child(2) { left: 22px; } .tile .pdf span:nth-child(3) { left: 44px; }
.tile .owner { width: 170px; gap: 10px; }
.tile .owner span { height: 16px; }
@media (max-width: 860px) {
    .reel-head h2 { font-size: 28px; }
    .reel-count span { font-size: 20px; }
    .tile { height: min(50svh, 400px); border-radius: 22px; }
    .tile p { font-size: 15px; }
}

/* 8. Offline */
.s-offline .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); }
.off-visual { position: relative; justify-self: center; width: min(360px, 80vw); height: min(64svh, 560px); display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.cloud { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cloud svg { width: 96px; height: 96px; fill: none; stroke: var(--indigo); stroke-width: 1.5; stroke-linejoin: round; transition: stroke .5s, filter .5s; }
.synced { font-size: 13px; color: var(--teal); opacity: 0; transition: opacity .5s; }
[data-step="3"] .cloud svg { stroke: var(--teal); filter: drop-shadow(0 6px 14px rgba(20, 194, 168, 0.45)); }
[data-step="3"] .synced { opacity: 1; }
.lane { position: relative; width: 2px; flex: 1; margin: 12px 0; background: repeating-linear-gradient(var(--line) 0 8px, transparent 8px 16px); }
.pk { position: absolute; left: -6px; width: 14px; height: 14px; border-radius: 3px; background: var(--cyan); opacity: 0; box-shadow: 0 0 12px var(--cyan); }
[data-step="3"] .pk { animation: up 1.1s cubic-bezier(.5, 0, .5, 1) infinite; }
[data-step="3"] .k2 { animation-delay: .35s; }
[data-step="3"] .k3 { animation-delay: .7s; }
@keyframes up { 0% { bottom: 0; opacity: 1; } 100% { bottom: 100%; opacity: 0; } }
.mini-phone { width: 190px; height: 250px; border-radius: 26px; border: 1.5px solid rgba(48, 54, 138, 0.3); background: #FFFFFF; box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 28px; }
.bars i { width: 7px; border-radius: 2px; background: var(--teal); transition: opacity .4s, background .4s; }
.bars i:nth-child(1) { height: 25%; } .bars i:nth-child(2) { height: 50%; } .bars i:nth-child(3) { height: 75%; } .bars i:nth-child(4) { height: 100%; }
[data-step="1"] .bars i, [data-step="2"] .bars i { background: var(--alert); opacity: .25; }
[data-step="1"] .bars i:first-child, [data-step="2"] .bars i:first-child { opacity: 1; }
.signal-off { font-size: 12px; color: var(--alert-ink); opacity: 0; transition: opacity .4s; }
[data-step="1"] .signal-off, [data-step="2"] .signal-off { opacity: 1; animation: alarm 1.2s ease-in-out infinite; }
.queue { display: flex; gap: 10px; margin-top: auto; }
.q { width: 34px; height: 34px; border-radius: 8px; background: var(--eve); opacity: 0; transform: translateY(-20px) scale(.6); transition: opacity .4s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.q2 { transition-delay: .15s; } .q3 { transition-delay: .3s; }
[data-step="2"] .q { opacity: 1; transform: none; }
[data-step="3"] .q { opacity: 0; transform: translateY(-120px) scale(.4); background: var(--cyan); }
.off-copy h2 { margin-bottom: 18px; }
.off-copy > p:not(.eyebrow) { color: var(--muted); max-width: 520px; }
@media (max-width: 860px) {
    .s-offline .stage { grid-template-columns: 1fr; align-content: center; gap: 18px; }
    .off-copy { order: -1; }
    .off-copy h2 { font-size: 30px; margin-bottom: 8px; }
    .off-visual { height: 46svh; }
    .mini-phone { width: 150px; height: 190px; }
}

/* 9. Tiles with small loops */
.faq, .final { padding: clamp(80px, 12vh, 140px) clamp(20px, 5vw, 72px); max-width: 1240px; margin: 0 auto; }
.loop { height: 84px; display: flex; align-items: center; }
.loop svg { width: 84px; height: 84px; fill: none; stroke: var(--teal); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.eq { gap: 6px; }
.eq i { width: 8px; height: 64px; border-radius: 4px; background: var(--cyan); transform-origin: center; animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.2s; } .eq i:nth-child(3) { animation-delay: -.5s; } .eq i:nth-child(4) { animation-delay: -.1s; }
.eq i:nth-child(5) { animation-delay: -.7s; } .eq i:nth-child(6) { animation-delay: -.3s; } .eq i:nth-child(7) { animation-delay: -.9s; }
@keyframes eq { 0%, 100% { transform: scaleY(.18); } 50% { transform: scaleY(1); } }
.clock .hh, .clock .mh { transform-box: view-box; transform-origin: 50px 50px; }
.clock .mh { animation: spin 3s linear infinite; stroke: var(--eve); }
.clock .hh { animation: spin 36s linear infinite; }
.lock .tm { stroke-dasharray: 1; stroke-dashoffset: 0; transform: rotate(-90deg); transform-origin: 50px 50px; animation: drain 6s linear infinite; }
.lock rect, .lock path { stroke: var(--indigo); stroke-width: 4; }
@keyframes drain { to { stroke-dashoffset: 1; } }
.pdf { position: relative; width: 84px; }
.pdf span { position: absolute; width: 52px; height: 66px; border-radius: 6px; border: 2.5px solid var(--cyan); background: var(--bg2); animation: deal 3s ease-in-out infinite; }
.pdf span:nth-child(1) { left: 0; animation-delay: 0s; }
.pdf span:nth-child(2) { left: 12px; animation-delay: -1s; }
.pdf span:nth-child(3) { left: 24px; animation-delay: -2s; border-color: var(--eve); }
@keyframes deal { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }
.owner { flex-direction: column; align-items: stretch; justify-content: center; gap: 7px; width: 120px; overflow: hidden; }
.owner span { height: 12px; border-radius: 4px; background: rgba(48, 54, 138, 0.22); animation: feed 2.4s ease-in-out infinite; }
.owner span:first-child { background: var(--cyan); }
.owner span:nth-child(2) { width: 80%; } .owner span:nth-child(3) { width: 90%; } .owner span:nth-child(4) { width: 60%; }
@keyframes feed { 0% { transform: translateY(19px); opacity: 0; } 20%, 80% { transform: none; opacity: 1; } 100% { opacity: 1; } }
.seal path { stroke-dasharray: 1; animation: draw 2.6s ease-in-out infinite; }
.seal circle { stroke: var(--indigo); stroke-width: 4; stroke-dasharray: .25 .08; animation: spin 10s linear infinite; transform-origin: 50px 50px; }
@keyframes draw { 0% { stroke-dashoffset: 1; } 40%, 100% { stroke-dashoffset: 0; } }

/* Reveal on arrival */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* 11. Questions */
.faq { max-width: 880px; }
.faq h2 { margin-bottom: 28px; }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 44px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); color: var(--teal); font-size: 26px; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin-top: 10px; max-width: 720px; }

/* 12. Last call */
.final { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.final-mark { width: 160px; height: 160px; }
.final-mark svg { width: 100%; height: 100%; overflow: visible; }
.final-mark .seg { animation: regroup 5s cubic-bezier(.6, 0, .2, 1) infinite; }
.final-mark .seg-day { --dx: 30px; --dy: -60px; --rot: 30deg; }
.final-mark .seg-eve { --dx: -70px; --dy: 0px; --rot: -30deg; }
.final-mark .seg-night { --dx: 30px; --dy: 60px; --rot: 25deg; }
@keyframes regroup { 0%, 30%, 100% { transform: none; } 55%, 70% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); } }
.story { font-size: clamp(20px, 2vw, 24px); max-width: 720px; color: var(--ink); }
.story span { display: block; margin-top: 10px; font-size: 16px; color: var(--muted); }
.final h2 { margin-top: 18px; }
.contact { color: var(--teal); font-size: 18px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 32px clamp(20px, 5vw, 72px) max(32px, env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 15px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--ink); }

/* People who prefer less motion: nothing loops or tilts; scenes still follow the scroll. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; }
    .intro-copy .ln, .lede, .ctas, .intro-copy .eyebrow { opacity: 1; transform: none; }
    .phone { transform: none; }
    .reveal { opacity: 1; transform: none; }
    .stage { transform: none; }
    .blob { transform: none !important; }
}
