/* Milvio landing. Mobile first; the device mock-ups scale with container queries. */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --primary: #6750a4;
  --primary-deep: #4a3684;
  --lavender: #c9b5e0;
  --lilac: #ece4f8;
  --cream: #fcf9ec;
  --navy: #00105b;
  --muted: #535371;
  --peach: #ffd9c4;
  --peach-ink: #8a3a12;
  --sun: #ffe9a6;
  --sun-ink: #7a5200;
  --mint: #d4f0e2;
  --green: #17694f;
  --red: #c62f3a;
  --hair: #e4dfd2;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--navy); font-size: 17px; line-height: 1.5; overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
em { font-style: normal; background: linear-gradient(100deg, var(--primary) 10%, #b3579a 50%, var(--primary) 90%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 10px; }

/* Reading progress */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 30; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--lavender), var(--primary), #b3579a); transform-origin: left; transform: scaleX(0); }

/* Floating top bar with both ways in */
.top { position: fixed; z-index: 20; top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right));
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 7px 7px 16px; border-radius: 22px;
  background: rgba(86, 64, 148, .82); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 8px 30px rgba(0, 16, 91, .18); transition: box-shadow .3s, background .3s; animation: drop .8s var(--spring) both; }
.scrolled .top { background: rgba(74, 54, 132, .92); box-shadow: 0 10px 34px rgba(0, 16, 91, .28); }
.logo img { width: 96px; height: auto; }
.entries { display: flex; gap: 6px; }
.entry-link { display: flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 15px; background: #fff; color: var(--primary-deep);
  font-weight: 700; font-size: .92rem; line-height: 1.05; transition: transform .2s var(--spring), box-shadow .2s; }
.entry-link small { display: block; font-size: .66rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
/* Adulto is Familia inverted: deep purple with white text, edged so it stands out on the purple bar. */
.entry-link.alt { background: var(--primary-deep); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .85); }
.entry-link.alt small { color: rgba(255, 255, 255, .75); }
.entry-link .i { width: 1.35em; height: 1.35em; }
.entry-link:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.entry-link:active { transform: scale(.96); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 24px; border-radius: 999px;
  font-weight: 700; font-size: 1.02rem; border: 2px solid transparent; transition: transform .2s var(--spring), box-shadow .2s, background .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(103, 80, 164, .35); }
.btn.primary:hover { background: var(--primary-deep); transform: translateY(-2px); }
.btn.primary .i { transition: transform .25s var(--ease); }
.btn.primary:hover .i { transform: translateX(4px); }
.btn.ghost { background: rgba(255, 255, 255, .7); color: var(--primary-deep); border-color: rgba(103, 80, 164, .25); }
.btn.white { background: #fff; color: var(--primary-deep); }
.btn.outline { color: #fff; border-color: rgba(255, 255, 255, .6); }
.cta { display: grid; gap: 10px; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 20px 34px; isolation: isolate; }
.hero-photo { position: absolute; inset: 0 0 auto; height: 64svh; z-index: -1; overflow: hidden; border-radius: 0 0 36px 36px; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 0%; animation: kenburns 22s ease-in-out infinite alternate; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 16, 91, .28) 0%, rgba(0, 16, 91, 0) 30%, rgba(252, 249, 236, 0) 55%, var(--cream) 100%); }
/* The notifications cycle above the title, where a kicker would go. */
.toasts { position: relative; width: 100%; max-width: 320px; height: 66px; margin-bottom: 6px; }
.toast { position: absolute; inset: 0 auto auto 0; max-width: 300px; display: flex; align-items: center; gap: 11px; padding: 11px 14px 11px 11px; border-radius: 20px;
  background: rgba(255, 255, 255, .84); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 14px 34px rgba(0, 16, 91, .2);
  opacity: 0; animation: toast 12s var(--ease) infinite; animation-delay: calc(var(--i) * 3s + .6s); }
.toast p { font-size: .86rem; color: var(--muted); line-height: 1.3; }
.toast strong { display: block; color: var(--navy); font-size: .9rem; }
.dot { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; flex: none; }
.dot .i { width: 20px; height: 20px; }
.lilac { background: var(--lilac); color: var(--primary); }
.green { background: var(--mint); color: var(--green); }
.sun { background: var(--sun); color: var(--sun-ink); }
.navy { background: var(--navy); color: #fff; }
.peach { background: var(--peach); color: var(--peach-ink); }
.red { background: #fde0e2; color: var(--red); }
.hero-copy { position: relative; display: grid; gap: 22px; }
h1 { font-size: clamp(2.6rem, 11.5vw, 4.6rem); line-height: .98; letter-spacing: -.055em; font-weight: 760; animation: rise .9s var(--ease) .2s both; }
h1 em { display: block; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 34rem; animation: rise .9s var(--ease) .35s both; }
.hero .cta { animation: rise .9s var(--ease) .5s both; }
.have-account { justify-self: center; background: none; border: 0; padding: 6px 10px; color: var(--muted); font-size: .98rem; animation: rise .9s var(--ease) .6s both; }
.have-account strong { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.scroll-cue { display: none; }

/* Sections below the hero: one accent, navy ink, hairlines instead of colour. */
section { position: relative; }
.duo, .scene, .easy, .start, .who { padding: 72px 22px 8px; max-width: 1120px; margin: 0 auto; }
h2 { font-size: clamp(1.85rem, 7.2vw, 2.7rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 650; }
main > section:not(.hero) em, .sheet em { background: none; color: var(--primary); -webkit-text-fill-color: currentColor; animation: none; }
.sub, .scene-head p { margin-top: 12px; color: var(--muted); font-size: 1.02rem; max-width: 34rem; }
.badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hair); color: var(--navy); background: transparent; }
.badge .i { width: 21px; height: 21px; stroke-width: 1.6; }
.duo-grid { display: grid; gap: 0; margin-top: 30px; border-top: 1px solid var(--hair); }
.duo-card { padding: 24px 0; border-bottom: 1px solid var(--hair); }
.duo-card h3 { margin: 14px 0 6px; font-size: 1.18rem; font-weight: 650; letter-spacing: -.015em; }
.duo-card p { color: var(--muted); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.duo-grid .reveal:nth-child(2), .easy-grid .reveal:nth-child(2), .timeline .reveal:nth-child(2), .who-grid .reveal:nth-child(2) { transition-delay: .1s; }
.easy-grid .reveal:nth-child(3), .timeline .reveal:nth-child(3) { transition-delay: .2s; }
.easy-grid .reveal:nth-child(4) { transition-delay: .3s; }

/* Scenes */
.scene { display: grid; gap: 22px; }
.scene-head { display: grid; gap: 4px; }
.scene-head .badge { margin-bottom: 14px; }
.stage { position: relative; height: clamp(320px, 92vw, 470px); margin: 0 -4px; }
.tablet, .phone { position: absolute; container-type: inline-size; }
.tablet { top: 0; left: 0; width: 80%; aspect-ratio: 4 / 3; padding: 1.4%; border-radius: 4.2% / 5.6%; background: #f3f1ea;
  box-shadow: inset 0 0 0 1px #dcd8cc, 0 1px 1px rgba(0, 16, 91, .04), 0 30px 60px -24px rgba(0, 16, 91, .22); }
.phone { right: 0; bottom: 0; width: 40%; aspect-ratio: 9 / 19; padding: 2%; border-radius: 14% / 6.6%; background: #f3f1ea;
  box-shadow: inset 0 0 0 1px #dcd8cc, 0 1px 1px rgba(0, 16, 91, .04), 0 34px 64px -22px rgba(0, 16, 91, .28); }
.flip .tablet { left: auto; right: 0; }
.flip .phone { right: auto; left: 0; }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; background: #fdfcf8; box-shadow: inset 0 0 0 1px rgba(0, 16, 91, .06); }
.t-screen { border-radius: 3% / 4%; font-size: 3.3cqw; padding: 1.1em 1.2em; display: flex; flex-direction: column; gap: .8em; }
.p-screen { border-radius: 12% / 5.7%; font-size: 7.4cqw; padding: .6em .7em; display: flex; flex-direction: column; gap: .7em; }
.t-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .95em; }
.t-brand { display: flex; align-items: center; gap: .35em; color: var(--navy); font-weight: 750; letter-spacing: -.02em; font-size: 1.1em; }
.t-brand .i { fill: var(--primary); stroke: none; }
.t-time { color: var(--muted); font-weight: 500; }
.t-ghost { height: 2.6em; border-radius: .7em; background: #f0eee7; }
.t-ghost.short { width: 62%; }
.t-card { display: flex; gap: .8em; padding: 1em; border-radius: .9em; background: #fff; border: 1px solid #ebe8df; }
.t-card strong { font-size: 1em; font-weight: 650; }
.t-card p { font-size: 1.45em; line-height: 1.22; color: var(--navy); font-weight: 500; letter-spacing: -.02em; margin-top: .15em; }
.avatar { display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: 50%; flex: none; background: #ecebe6; color: var(--navy); font-weight: 700; }
.t-actions { display: flex; gap: .6em; margin-top: .7em; }
.t-btn { display: grid; place-items: center; min-width: 4.4em; padding: .55em 1em; border-radius: .7em; border: 1px solid #dcd8cc; color: var(--navy); font-weight: 650; font-size: 1.05em;
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.voice { display: flex; align-items: center; gap: .6em; align-self: flex-start; padding: .5em .9em; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; font-size: .92em;
  opacity: 0; transform: translateY(.5em); transition: .6s var(--ease); }
.wave { display: flex; align-items: center; gap: .18em; height: 1.1em; }
.wave i { width: .2em; height: 100%; border-radius: 1em; background: #fff; transform: scaleY(.3); }
.p-status { display: flex; justify-content: space-between; align-items: center; font-size: .66em; font-weight: 600; color: var(--navy); padding: .1em .4em 0; }
.notch { width: 28%; height: 1.05em; border-radius: 1em; background: #1d1c24; }
.p-title { font-size: 1.25em; font-weight: 600; letter-spacing: -.03em; }
.bubble { align-self: flex-end; max-width: 88%; padding: .6em .8em; border-radius: 1em 1em .3em 1em; background: var(--navy); color: #fff; font-size: .9em; line-height: 1.3;
  opacity: 0; transform: translateY(.8em); transform-origin: bottom right; transition: .6s var(--ease); }
.seen { display: flex; align-items: center; gap: .3em; margin-top: .4em; font-size: .8em; font-weight: 600; color: rgba(255, 255, 255, .8); max-height: 0; opacity: 0; overflow: hidden; transition: .5s var(--ease); }
.composer { margin-top: auto; display: flex; align-items: center; gap: .4em; padding: .45em .45em .45em .8em; border-radius: 999px; background: #fff; border: 1px solid #ebe8df; font-size: .78em; }
.typing { flex: 1; white-space: nowrap; overflow: hidden; color: var(--navy); clip-path: inset(0 100% 0 0); }
.send { display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: 50%; background: var(--navy); color: #fff; transition: transform .3s var(--ease); }
.send .i { width: 1em; height: 1em; }
.row, .status-card, .call-opt, .push { display: flex; align-items: center; gap: .6em; padding: .6em; border-radius: .8em; background: #fff; border: 1px solid #ebe8df; font-size: .82em; line-height: 1.25; }
.row strong, .status-card strong, .call-opt strong, .push strong { display: block; font-size: 1em; font-weight: 650; }
.row small, .status-card small, .call-opt small, .push small { display: block; color: var(--muted); font-size: .82em; }
.row > div, .status-card > div, .call-opt > div, .push > div { flex: 1; min-width: 0; }
.mini { display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 50%; flex: none; border: 1px solid #e3dfd4; color: var(--navy); }
.mini .i { width: 1.1em; height: 1.1em; }
.chip { flex: none; padding: .25em .6em; border-radius: 999px; border: 1px solid #dcd8cc; color: var(--muted); font-size: .75em; font-weight: 650; transition: background .4s, color .4s, border-color .4s; }
.after { display: none; }
.finger { position: absolute; z-index: 5; width: 2.6em; height: 2.6em; margin: -1.3em 0 0 -1.3em; border-radius: 50%; background: rgba(255, 255, 255, .25);
  border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(0, 16, 91, .25); opacity: 0; pointer-events: none; }
.p-screen .finger { width: 2.3em; height: 2.3em; margin: -1.15em 0 0 -1.15em; }
.tap-target { position: relative; }
.tap-target .finger { left: 50%; top: 50%; }

/* Alarm on the tablet */
.alarm { position: absolute; inset: 6% 30% 6% 5%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45em; padding: 1em; border-radius: 1.1em;
  background: #fff; box-shadow: 0 0 0 100vmax rgba(29, 28, 36, .16), 0 .6em 2em rgba(0, 16, 91, .12); text-align: center;
  opacity: 0; transform: scale(.94); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.flip .alarm { inset: 6% 5% 6% 30%; }
.alarm small { color: var(--muted); font-weight: 600; font-size: .88em; letter-spacing: .02em; }
.alarm strong { font-size: 1.8em; font-weight: 550; letter-spacing: -.03em; line-height: 1.05; }
.alarm .dose { color: var(--muted); }
.ring { position: relative; display: grid; place-items: center; width: 3em; height: 3em; border-radius: 50%; border: 1px solid #dcd8cc; color: var(--navy); }
.ring .i { width: 1.4em; height: 1.4em; }
.ring::before, .ring::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--navy); opacity: 0; }
.a-btn { width: 100%; padding: .6em; border-radius: .7em; font-weight: 550; font-size: 1.02em; border: 1px solid #dcd8cc; color: var(--navy); transition: transform .25s var(--ease), background .3s, color .3s; }
.a-btn.ok { background: var(--navy); border-color: var(--navy); color: #fff; }
.a-btn.red { background: #fff; color: var(--navy); border-color: var(--navy); }
.question { gap: .55em; }
.question strong { margin-bottom: .2em; }
.row strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .chip { font-size: .68em; }

/* Lock screen push */
.lock { background: #1d1c2e; color: #fff; }
.lock .p-status { color: #fff; }
.lock .notch { background: #000; }
.lock-clock { text-align: center; font-size: 3em; font-weight: 200; letter-spacing: -.04em; margin-top: .2em; }
.push { color: var(--navy); background: rgba(255, 255, 255, .95); border: 0; opacity: 0; transform: translateY(-140%); transition: .7s var(--ease); }
.calling { margin-top: auto; display: grid; justify-items: center; gap: .6em; font-weight: 600; font-size: .85em; opacity: 0; transform: translateY(.8em); transition: .6s var(--ease); }
.pulse { position: relative; display: grid; place-items: center; width: 3.2em; height: 3.2em; border-radius: 50%; background: #fff; color: var(--navy); }
.pulse .i { width: 1.4em; height: 1.4em; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid #fff; animation: ripple 1.6s ease-out infinite; }

/* Video call */
.dark { background: #1d1c2e; color: #fff; }
.incoming { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .8em; text-align: center; opacity: 0; transition: .5s var(--ease); }
.avatar.big { width: 5em; height: 5em; font-size: 1.3em; background: #2d2c40; color: #fff; }
.incoming strong { font-size: 1.4em; font-weight: 600; letter-spacing: -.02em; }
.countdown { position: relative; display: flex; align-items: center; gap: .5em; font-size: .92em; color: rgba(255, 255, 255, .7); }
.countdown svg { width: 2.1em; height: 2.1em; transform: rotate(-90deg); }
.countdown circle { fill: none; stroke: #fff; stroke-width: 2.5; stroke-dasharray: 107; stroke-dashoffset: 0; }
.video-on { position: absolute; inset: 0; display: grid; place-items: center; background: #2a2938; opacity: 0; transition: .7s var(--ease); }
/* Real faces in the call: the other person fills the screen, you appear small in a corner. */
.remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.self { position: absolute; right: 4%; bottom: 5%; width: 27%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .6em; box-shadow: 0 0 0 .12em #fff, 0 .4em 1em rgba(0, 0, 0, .25); }
.p-video .self { width: 34%; aspect-ratio: 3 / 4; }
.lucia { object-position: 49% 34%; }
.elena { object-position: 57% 28%; }
.avatar.photo { padding: 0; object-fit: cover; object-position: 49% 30%; }
.live { position: absolute; left: 4%; top: 6%; display: flex; align-items: center; gap: .4em; padding: .3em .7em; border-radius: 999px; background: rgba(0, 0, 0, .4); color: #fff; font-weight: 600; font-size: .82em; }
.live i { width: .5em; height: .5em; border-radius: 50%; background: #fff; animation: blink 1.4s steps(2) infinite; }
.p-video { position: relative; flex: 1; border-radius: .8em; overflow: hidden; opacity: 0; transition: .7s var(--ease); }
.p-video .live { font-size: .7em; }
.call-opt { transition: background .3s, border-color .3s; }

/* Peace of mind */
.status-card { opacity: 0; transform: translateY(.6em); transition: .6s var(--ease); }
.live-dot { position: relative; width: .7em; height: .7em; margin: 0 .3em; border-radius: 50%; background: var(--green); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -.3em; border-radius: 50%; border: 1px solid var(--green); animation: ripple 1.8s ease-out infinite; }
.batt { display: flex; align-items: center; gap: .25em; font-weight: 650; color: var(--navy); font-size: .9em; }
.snapshot { position: relative; flex: 1; min-height: 0; border-radius: .8em; overflow: hidden; opacity: 0; transition: .7s var(--ease); }
.snapshot img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 30%; filter: blur(8px) grayscale(.4); transform: scale(1.1); transition: filter 1.2s var(--ease) .3s, transform 1.2s var(--ease) .3s; }
.snapshot small { position: absolute; left: .6em; bottom: .5em; padding: .2em .6em; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; font-size: .7em; font-weight: 600; }
.notice-chip { display: flex; align-items: center; gap: .35em; padding: .3em .7em; border-radius: 999px; border: 1px solid #dcd8cc; color: var(--navy); font-size: .88em; opacity: 0; transition: .6s var(--ease); }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }

/* Captions under each scene */
.steps { list-style: none; margin: 0; padding: 0; display: grid; counter-reset: step; border-top: 1px solid var(--hair); }
.steps li { counter-increment: step; position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 2px; border-bottom: 1px solid var(--hair);
  color: #9a98a8; font-size: .96rem; line-height: 1.35; cursor: pointer; transition: color .5s; }
.steps li::before { content: counter(step, decimal-leading-zero); flex: none; width: 1.8em; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; color: #b3b1bf; transition: color .5s; }
.steps li.done, .steps li.on { color: var(--navy); }
.steps li.done::before { color: var(--muted); }
.steps li.on::before { color: var(--primary); }
.steps li.on::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--navy); transform-origin: left; animation: fill var(--pace, 2s) linear both; }

/* Scene timelines: s1…sN are added in order and stay until the scene starts over. */
[data-scene="mensajes"].s1 .typing { clip-path: inset(0 0 0 0); transition: clip-path 1.3s steps(26); }
[data-scene="mensajes"].s2 .typing { opacity: 0; transition: opacity .2s; }
[data-scene="mensajes"].s2 .bubble { opacity: 1; transform: none; }
[data-scene="mensajes"] .msg-in { opacity: 0; transform: translateY(-1em); transition: .8s var(--ease); }
[data-scene="mensajes"].s2 .msg-in { opacity: 1; transform: none; transition-delay: .35s; }
[data-scene="mensajes"].s3 .voice { opacity: 1; transform: none; }
[data-scene="mensajes"].s3 .wave i { animation: wave 1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .12s !important; } .wave i:nth-child(3) { animation-delay: .24s !important; }
.wave i:nth-child(4) { animation-delay: .36s !important; } .wave i:nth-child(5) { animation-delay: .48s !important; }
[data-scene="mensajes"].s4 .f-yes { animation: tap 1s var(--ease) both; }
[data-scene="mensajes"].s4 .t-btn.yes { background: var(--navy); border-color: var(--navy); color: #fff; transition-delay: .45s; }
[data-scene="mensajes"].s4 .seen { max-height: 2em; opacity: 1; transition-delay: .8s; }

[data-scene="medicamentos"] .new-routine, [data-scene="medicamentos"] .dose { opacity: 0; transform: translateY(.6em); transition: .6s var(--ease); }
[data-scene="medicamentos"].s1 .new-routine { opacity: 1; transform: none; }
[data-scene="medicamentos"].s1 .dose { opacity: 1; transform: none; transition-delay: .25s; }
[data-scene="medicamentos"].s2 .alarm { opacity: 1; transform: none; }
[data-scene="medicamentos"].s2 .ring::before { animation: ripple 1.6s ease-out infinite; }
[data-scene="medicamentos"].s2 .ring::after { animation: ripple 1.6s ease-out .8s infinite; }
[data-scene="medicamentos"].s3 .f-ok { animation: tap 1s var(--ease) both; }
[data-scene="medicamentos"].s3 .a-btn.ok { transform: scale(.97); transition-delay: .45s; }
[data-scene="medicamentos"].s3 .alarm { opacity: 0; transform: scale(.97); transition-delay: 1s; }
[data-scene="medicamentos"].s4 .dose .before { display: none; }
[data-scene="medicamentos"].s4 .dose .after { display: inline; }
[data-scene="medicamentos"].s4 .dose .chip { background: var(--navy); border-color: var(--navy); color: #fff; }

[data-scene="como-estas"].s1 .alarm { opacity: 1; transform: none; }
[data-scene="como-estas"].s2 .f-talk { animation: tap 1s var(--ease) both; }
[data-scene="como-estas"].s2 .a-btn.red { background: var(--navy); color: #fff; transition-delay: .45s; }
[data-scene="como-estas"].s3 .alarm { opacity: 0; transform: scale(.97); }
[data-scene="como-estas"].s3 .push { opacity: 1; transform: none; }
[data-scene="como-estas"].s4 .push { opacity: .4; }
[data-scene="como-estas"].s4 .calling { opacity: 1; transform: none; }

[data-scene="videollamada"] .call-opt { margin-top: .2em; }
[data-scene="videollamada"].s1 .f-call { animation: tap 1s var(--ease) both; }
[data-scene="videollamada"].s1 .call-opt { border-color: var(--navy); transition-delay: .45s; }
[data-scene="videollamada"].s2 .incoming { opacity: 1; }
[data-scene="videollamada"].s2 .countdown circle { stroke-dashoffset: 107; transition: stroke-dashoffset 2.2s linear; }
[data-scene="videollamada"].s3 .incoming { opacity: 0; }
[data-scene="videollamada"].s3 .video-on, [data-scene="videollamada"].s3 .p-video { opacity: 1; }

[data-scene="tranquilidad"].s1 .status-card { opacity: 1; transform: none; }
[data-scene="tranquilidad"] .call-opt { opacity: 0; transform: translateY(.6em); transition: .6s var(--ease) .2s; }
[data-scene="tranquilidad"].s1 .call-opt { opacity: 1; transform: none; }
[data-scene="tranquilidad"].s2 .f-look { animation: tap 1s var(--ease) both; }
[data-scene="tranquilidad"].s2 .call-opt { border-color: var(--navy); }
[data-scene="tranquilidad"].s2 .flash { animation: flash .6s ease-out .6s; }
[data-scene="tranquilidad"].s2 .snapshot { opacity: 1; transition-delay: .9s; }
[data-scene="tranquilidad"].s2 .snapshot img { filter: none; transform: none; transition-delay: 1.2s; }
[data-scene="tranquilidad"].s3 .notice-chip { opacity: 1; }
.flip .incoming, .flip .video-on { padding-left: 28%; }
.flip .video-on .live { left: auto; right: 4%; }
/* Tablet content stays in the part the phone does not cover. */
.scene:not(.flip) .t-card, .scene:not(.flip) .t-ghost { margin-right: 24%; }
.scene:not(.flip) .t-ghost.short { width: auto; margin-right: 44%; }

/* Built for them */
.easy-grid { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; border-top: 1px solid var(--hair); }
.easy-grid li { display: grid; gap: 6px; align-content: start; padding: 22px 0; border-bottom: 1px solid var(--hair); }
.easy-grid strong { font-size: 1.02rem; font-weight: 650; line-height: 1.25; margin-top: 8px; }
.easy-grid small { color: var(--muted); font-size: .92rem; line-height: 1.4; }

/* Three steps */
.timeline { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 26px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 1px; background: var(--hair); }
.timeline li { display: flex; gap: 18px; align-items: flex-start; }
.timeline b { position: relative; display: grid; place-items: center; width: 43px; height: 43px; flex: none; border-radius: 50%; border: 1px solid var(--navy); background: var(--cream); color: var(--navy); font-weight: 600; }
.timeline strong { display: block; font-size: 1.1rem; font-weight: 650; margin-top: 9px; }
.timeline small { color: var(--muted); font-size: .97rem; }

/* Who signs in */
.who-grid { display: grid; gap: 12px; margin-top: 28px; }
.who-card { position: relative; display: grid; gap: 4px; padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--hair); transition: border-color .3s, transform .3s var(--ease); }
.who-card .badge { margin-bottom: 10px; }
.who-card strong { font-size: 1.3rem; font-weight: 650; letter-spacing: -.02em; }
.who-card small { color: var(--muted); font-size: .97rem; }
.who-card .go { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--navy); font-weight: 650; }
.who-card .go .i { transition: transform .3s var(--ease); }
.who-card:hover { border-color: var(--navy); }
.who-card:hover .go .i { transform: translateX(4px); }
.who-card:active { transform: scale(.99); }

/* Closing band */
.final { margin: 80px 14px 0; padding: 52px 26px; border-radius: 28px; text-align: center; color: #fff; background: var(--navy); }
.final h2 { color: #fff; }
.final p { margin: 12px auto 26px; max-width: 30rem; color: rgba(255, 255, 255, .72); }
.final .cta { max-width: 360px; margin: 0 auto; }
.final .btn.white { color: var(--navy); }
.final-heart { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); }
.final-heart .i { width: 22px; height: 22px; fill: #fff; stroke: none; }
.foot { display: grid; justify-items: center; gap: 14px; margin-top: 40px; padding: 34px 20px calc(30px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hair); color: var(--muted); text-align: center; }
.foot img { filter: brightness(0) saturate(100%) invert(10%) sepia(65%) saturate(4000%) hue-rotate(228deg) brightness(70%); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-weight: 600; }
.foot nav a { color: var(--navy); }
.disclaimer { margin: 6px 0 0; max-width: 40rem; font-size: .82rem; line-height: 1.55; color: var(--muted); }
.disclaimer strong { color: var(--navy); font-weight: 650; }

/* Sheet: the two ways in */
.sheet { width: 100%; max-width: 480px; margin: auto auto 0; padding: 12px 18px calc(22px + env(safe-area-inset-bottom)); border: 0; border-radius: 26px 26px 0 0;
  background: var(--cream); color: var(--navy); box-shadow: 0 -20px 60px rgba(0, 16, 91, .2); }
.sheet[open] { display: grid; gap: 12px; animation: sheet-up .5s var(--ease); }
.sheet::backdrop { background: rgba(0, 16, 91, .4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .3s ease; }
.sheet-grip { justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: #d9d5c8; }
.sheet h2 { font-size: 1.6rem; margin: 4px 0 2px; }
.sheet .who-card { padding: 18px; }
.sheet-foot { text-align: center; color: var(--muted); }
.sheet-foot a { color: var(--navy); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 1px solid var(--hair); border-radius: 50%; background: transparent; color: var(--navy); font-size: 1.4rem; line-height: 1; }

/* Small phones */
@media (max-width: 370px) {
  .top { padding-left: 12px; }
  .logo img { width: 80px; }
  .entry-link { padding: 6px 9px 6px 8px; font-size: .86rem; }
  .entry-link .i { display: none; }
}

/* Tablets and computers */
@media (min-width: 760px) {
  .top { left: 50%; right: auto; width: min(1080px, calc(100% - 40px)); transform: translateX(-50%); animation: none; padding-left: 22px; }
  .logo img { width: 112px; }
  .entry-link { padding: 8px 16px 8px 12px; font-size: 1rem; }
  .hero { padding: 0 40px 60px; justify-content: center; }
  .hero-photo { height: 100%; left: 34%; border-radius: 0 0 48px 0; }
  .hero-photo img { object-position: 70% 40%; }
  .hero-shade { background: linear-gradient(90deg, var(--cream) 0%, rgba(252, 249, 236, .85) 12%, rgba(252, 249, 236, 0) 34%), linear-gradient(180deg, rgba(0, 16, 91, .2), transparent 25%); }
  .hero-copy { max-width: 560px; margin-left: max(0px, calc((100% - 1080px) / 2)); gap: 28px; }
  .hero .cta { margin-top: 6px; }
  .hero .cta { grid-auto-flow: column; justify-content: start; }
  .have-account { justify-self: start; padding-left: 0; }
  .scroll-cue { display: block; position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; border-radius: 14px; border: 2px solid rgba(0, 16, 91, .35); transform: translateX(-50%); }
  .scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--primary); animation: cue 1.6s ease-in-out infinite; }
  .duo, .scene, .easy, .start, .who { padding: 120px 40px 10px; }
  .duo-grid, .who-grid { grid-template-columns: 1fr 1fr; }
  .duo-grid { column-gap: 72px; border-top: 0; }
  .duo-card { padding: 28px 0 32px; border-top: 1px solid var(--hair); border-bottom: 0; }
  .duo-card p { max-width: 30rem; }
  .scene { grid-template-columns: 1fr 1.25fr; grid-template-areas: "head stage" "steps stage"; align-items: start; column-gap: 56px; }
  .scene.flip { grid-template-columns: 1.25fr 1fr; grid-template-areas: "stage head" "stage steps"; }
  .scene-head { grid-area: head; align-self: end; }
  .stage { grid-area: stage; height: 500px; }
  .steps { grid-area: steps; }
  .easy-grid { grid-template-columns: repeat(4, 1fr); column-gap: 28px; }
  .timeline { grid-template-columns: repeat(3, 1fr); padding: 0; }
  .timeline::before { left: 22px; right: 22px; top: 21px; bottom: auto; width: auto; height: 1px; }
  .timeline li { flex-direction: column; }
  .final { max-width: 1080px; margin: 120px auto 0; padding: 80px 40px; }
  .final .cta { grid-auto-flow: column; justify-content: center; max-width: none; }
  .sheet { margin: auto; border-radius: 30px; padding-bottom: 24px; }
  .sheet-grip { display: none; }
}

@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-30px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1.5%, 1%); } }
@keyframes toast {
  0% { opacity: 0; transform: translateY(-18px) scale(.94); }
  4%, 21% { opacity: 1; transform: none; }
  25%, 100% { opacity: 0; transform: translateY(14px) scale(.97); }
}
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
@keyframes breathe { 0%, 100% { transform: scale(.92); opacity: .8; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes tap {
  0% { opacity: 0; transform: translate(60%, 70%) scale(1.1); }
  35% { opacity: 1; transform: none; }
  50% { transform: scale(.78); }
  65% { transform: scale(1); box-shadow: 0 0 0 .9em rgba(255, 255, 255, 0), 0 .4em 1.2em rgba(0, 16, 91, .35); }
  100% { opacity: 0; transform: scale(1.05); }
}
@keyframes ripple { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(2); } }
@keyframes wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes buzz { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4%); } 75% { transform: translateX(4%); } }
@keyframes glow { from { box-shadow: 0 0 0 .4em rgba(103, 80, 164, .35); } }
@keyframes glow-green { from { box-shadow: 0 0 0 .4em rgba(23, 105, 79, .3); } }
@keyframes halo { from { box-shadow: 0 0 0 0 rgba(201, 181, 224, .55); } to { box-shadow: 0 0 0 1.4em rgba(201, 181, 224, 0); } }
@keyframes flash { 0% { opacity: .9; } 100% { opacity: 0; } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .toast { position: relative; opacity: 1; animation: none !important; }
  .toast:not(:first-child) { display: none; }
  .finger { display: none; }
}
/* The phone covers the tablet's left side: frame Lucía a little to the right. */
.flip .video-on .remote.lucia { object-position: 30% 34%; }
/* Photos scene: a photo message from the phone, opened full screen on the tablet, answered with audio. */
.t-photo-wrap { display: block; width: 11em; margin-top: .6em; }
.t-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: .7em; object-fit: cover; object-position: 40% 55%; }
.flip .t-card { margin-left: 26%; }
.photo-full { position: absolute; inset: 0; background: #111; opacity: 0; transform: scale(.96); transition: .6s var(--ease); pointer-events: none; }
.photo-full img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 55%; }
[data-scene="fotos"] .voice { position: absolute; right: 5%; bottom: 7%; }
.photo-bubble { display: grid; gap: .45em; padding: .35em .35em .6em; }
.photo-bubble img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; object-position: 40% 55%; border-radius: .75em .75em .3em .3em; }
.bubble.in { align-self: flex-start; display: flex; align-items: center; gap: .45em; border-radius: 1em 1em 1em .3em; background: #fff; color: var(--navy); border: 1px solid #ebe8df; }
.bubble.in .i { width: 1em; height: 1em; flex: none; }
.bubble.in .wave i { background: var(--navy); }
.bubble.in small { color: var(--muted); font-size: .8em; white-space: nowrap; }
.pick { display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: 50%; border: 1px solid #dcd8cc; color: var(--navy); flex: none; }
.pick .i { width: 1em; height: 1em; }
[data-scene="fotos"] .typing { clip-path: none; color: var(--muted); }
[data-scene="fotos"].s1 .f-pick { animation: tap 1s var(--ease) both; }
[data-scene="fotos"].s1 .photo-bubble { opacity: 1; transform: none; transition-delay: .6s; }
[data-scene="fotos"] .msg-in { opacity: 0; transform: translateY(-1em); transition: .8s var(--ease); }
[data-scene="fotos"].s2 .msg-in { opacity: 1; transform: none; transition-delay: .3s; }
[data-scene="fotos"].s3 .f-zoom { animation: tap 1s var(--ease) both; }
[data-scene="fotos"].s3 .photo-full { opacity: 1; transform: none; transition-delay: .5s; }
[data-scene="fotos"].s4 .voice { opacity: 1; transform: none; }
[data-scene="fotos"].s4 .wave i { animation: wave 1s ease-in-out infinite; }
[data-scene="fotos"].s4 .voice-reply { opacity: 1; transform: none; transition-delay: 1s; }
/* "Pensada para quien no usa tecnología" sits on a full-width white band, so it reads apart from the steps below. */
.easy { margin-top: 64px; padding-bottom: 64px; background: #fff; box-shadow: 0 0 0 100vmax #fff; clip-path: inset(0 -100vmax); }
.easy-grid { border-top-color: #ece8de; }
.easy-grid li { border-bottom-color: #ece8de; }
.easy .badge { background: var(--cream); border-color: transparent; }

/* Parallax on desktop: the tablet sits further back, the phone closer, the heading in between. Set by landing.js. */
@media (min-width: 1024px) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .scene .tablet { translate: 0 calc(var(--shift, 0) * 50px); }
  .scene .phone { translate: 0 calc(var(--shift, 0) * -70px); }
  .scene-head { translate: 0 calc(var(--shift, 0) * 28px); }
  .hero-photo img { translate: 0 calc(var(--shift, 0) * 30vh); }
  .hero-copy { translate: 0 calc(var(--shift, 0) * 14vh); }
  /* The block on screen keeps the focus: the one leaving fades out. */
  .duo, .scene, .easy, .start, .who { opacity: calc(1 - max(var(--shift, 0), -1 * var(--shift, 0)) * 1.6); }
}

/* Desktop: one block at a time. Each fills the screen, centred, and the scroll settles on it. */
@media (min-width: 1024px) and (pointer: fine) {
  html { scroll-snap-type: y mandatory; }
  .hero, .duo, .scene, .easy, .start, .who { min-height: 100vh; box-sizing: border-box; padding-top: 110px; padding-bottom: 50px; scroll-snap-align: start; scroll-snap-stop: always; }
  .duo, .easy, .start, .who { display: flex; flex-direction: column; justify-content: center; }
  .scene { align-content: center; grid-template-rows: auto auto; }
  .easy { margin-top: 0; }
  .final { margin-top: 60px; }
  .foot { scroll-snap-align: end; }
}

/* Floating shortcut to the demo, bottom right, while the page is being read. */
.demo-fab { position: fixed; z-index: 30; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px));
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 20px 9px 9px; border-radius: 999px; background: var(--primary); color: #fff;
  font-weight: 700; font-size: .98rem; box-shadow: 0 12px 30px rgba(74, 54, 132, .35), 0 2px 6px rgba(0, 16, 91, .15);
  opacity: 0; transform: translateY(16px) scale(.96); pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease), box-shadow .2s; }
.demo-fab.show { opacity: 1; transform: none; pointer-events: auto; }
.demo-fab:hover { box-shadow: 0 16px 36px rgba(74, 54, 132, .45), 0 2px 6px rgba(0, 16, 91, .15); }
.demo-fab:active { transform: scale(.97); }
.demo-fab-icon { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--primary); }
.demo-fab-icon .i { width: 15px; height: 15px; fill: currentColor; stroke: none; margin-left: 2px; }
.demo-fab-icon::after { content: ""; position: absolute; width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); animation: fab-pulse 2.4s ease-out infinite; }
@keyframes fab-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 70%, 100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }
@media (min-width: 760px) { .demo-fab { right: 28px; bottom: 28px; padding-right: 24px; font-size: 1.02rem; } }
