/* HEARTS teaser proposals · shared scaffolding and three variants scoped by body class.
   The logo pulse itself comes only from /public-pulse.css. Everything here is entrance
   choreography, beat-synced decoration (driven by shared.js) and the waitlist dialog. */

/* Tokens mirror /style.css so the variants stay intact if global styles change. */
html[data-theme=light] body:is(.hx,.hx-index){--bg:#f4f5f7;--surface:#fff;--soft:#e9ebef;--ink:#10131a;--muted:#5b6270;--line:#d9dce3;--red:#e3173e;--accent-ink:#c41436;--on-red:#fff;--pale:#fde8ec}
html[data-theme=dark] body:is(.hx,.hx-index){--bg:#0c0e13;--surface:#171a22;--soft:#20242e;--ink:#f4f6fa;--muted:#a3abba;--line:#2e3440;--red:#ff4d6d;--accent-ink:#ff4d6d;--on-red:#1a0509;--pale:#3a1420}

body.hx{margin:0;min-height:100vh;min-height:100svh;background:var(--bg);color:var(--ink);font-family:"Noto Sans",system-ui,sans-serif;font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;overflow-x:clip;-webkit-tap-highlight-color:transparent}
:where(.hx) *,:where(.hx) *::before,:where(.hx) *::after{box-sizing:border-box}
:where(.hx) :is(h1,h2,p){margin:0}
:where(.hx) :is(h1,h2){font-family:Figtree,"Noto Sans",sans-serif;font-weight:900}
:where(.hx) button{font:inherit;color:inherit;cursor:pointer}
html:has(dialog[open]){overflow:hidden}

/* Original wordmark as a mask; same declaration as the global .brand-contour, kept as a safety net. */
.hx .brand-contour{display:block;background-color:currentColor;-webkit-mask:url(/assets/brand/wordmark.svg) center/contain no-repeat;mask:url(/assets/brand/wordmark.svg) center/contain no-repeat}

.hx-stage{position:relative;isolation:isolate;min-height:100vh;min-height:100svh;padding:max(24px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}

/* Pause nonessential loops; entrances still finish so essential text/actions cannot remain hidden. */
html[data-hold=true] .pulse-logo .brand-contour{animation-play-state:paused!important}
html[data-offscreen=true] .pulse-logo .brand-contour{animation-play-state:paused!important}

/* The single public action */
.hx-cta{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:56px;padding:0 26px 0 30px;border:0;border-radius:16px;background:var(--red);color:var(--on-red);font-family:Figtree,"Noto Sans",sans-serif;font-weight:900;font-size:17px;line-height:1;white-space:nowrap;touch-action:manipulation;transition:background-color .15s,color .15s,transform .15s}
.hx-cta svg{width:20px;height:20px;flex:none;transition:transform .2s cubic-bezier(.2,.7,.2,1)}
.hx-cta:hover{background:var(--accent-ink)}
html[data-theme=dark] .hx-cta:hover{background:#ff6d87}
.hx-cta:hover svg{transform:translateX(3px)}
.hx-cta:active{transform:scale(.98)}
.hx-cta:focus-visible{outline:3px solid var(--red);outline-offset:4px}

@keyframes hx-rise{from{opacity:0;transform:translateY(14px)}}

/* ---------- Waitlist dialog · HEARTS MVP hierarchy and tactile choice blocks ---------- */
.wl-dialog{box-sizing:border-box;padding:0;border:0;border-radius:28px;background:var(--bg);color:var(--ink);width:min(480px,calc(100vw - max(16px,env(safe-area-inset-left)) - max(16px,env(safe-area-inset-right))));max-width:none;max-height:calc(100dvh - max(16px,env(safe-area-inset-top)) - max(16px,env(safe-area-inset-bottom)));overflow:hidden;box-shadow:0 24px 70px -16px rgb(8 10 16 / .38)}
.wl-dialog[open]{display:flex;flex-direction:column}
/* Dark dialog uses the raised surface; one fine boundary replaces the light-mode shadow. */
html[data-theme=dark] .wl-dialog{--bg:var(--surface);border:1px solid var(--line);box-shadow:none}
.wl-dialog::backdrop{background:rgb(20 8 12 / .5)}
.wl-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 28px max(24px,env(safe-area-inset-bottom));scroll-padding-top:76px;scrollbar-color:var(--muted) var(--bg);scrollbar-width:thin}
.wl-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 -28px;padding:16px 20px 10px 28px;background:var(--bg)}
.wl-head .wl-brand{width:50px;height:40px;color:var(--red);flex:none}
.wl-close{flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--soft);color:var(--ink);transition:background-color .16s,transform .16s}
.wl-close svg{width:22px;height:22px}
.wl-close:hover{background:var(--line)}
.wl-close:active{transform:scale(.93)}
.wl-close:focus-visible{outline:3px solid var(--red);outline-offset:3px}
.wl-dialog .wl-title{margin:8px 0 8px;font:900 clamp(38px,10.7vw,48px)/.98 Figtree,sans-serif;letter-spacing:-.035em;text-wrap:balance;overflow-wrap:anywhere}
.wl-title span{color:var(--red)}
.wl-title:focus{outline:none}
.wl-dialog .draft-notice{margin:0 0 24px!important;font-size:12px;line-height:1.5;color:var(--muted)}
.wl-dialog .waitlist-content{width:100%;max-width:none;text-align:left}
.wl-dialog #waitlist-form{margin-top:0}
.wl-dialog :is(.waitlist-field label,.waitlist-device legend){font-size:17px;font-weight:900;line-height:1.2;margin-bottom:10px}
.wl-dialog .waitlist-field input{min-height:60px;padding:16px 18px;border:2px solid transparent;border-radius:16px;background:var(--soft);font-family:"Noto Sans",sans-serif;font-size:1rem;line-height:1.5}
.wl-dialog .waitlist-field input:focus-visible{border-color:var(--red);outline:0;box-shadow:0 0 0 3px color-mix(in srgb,var(--red) 15%,transparent)}
.wl-dialog .waitlist-field input[aria-invalid=true]{border-color:var(--accent-ink)}
.wl-dialog .waitlist-device{margin:24px 0 20px}
.wl-dialog .device-options{--choice-line:#858b96;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;isolation:isolate}
html[data-theme=dark] .wl-dialog .device-options{--choice-line:#697386}
.wl-dialog .device-options label{position:relative;min-width:0}
.wl-dialog .device-options input{inset:0;width:100%;height:100%;opacity:0;margin:0;z-index:1}
.wl-dialog .device-options span{position:relative;display:flex;align-items:center;justify-content:center;gap:0;min-height:52px;padding:12px 16px;border:1px solid var(--choice-line);border-radius:0;background:var(--soft);color:var(--ink);font-family:Figtree,sans-serif;font-weight:800;font-size:18px;line-height:1.2;transition:background-color .16s,color .16s,border-color .16s}
.wl-dialog .device-options label:first-child span{border-radius:12px 0 0 12px}
.wl-dialog .device-options label:last-child span{margin-left:-1px;border-radius:0 12px 12px 0}
.wl-dialog .device-options svg{display:none}
.wl-dialog .device-options input:checked+span{z-index:1;background:var(--ink);border-color:var(--ink);color:var(--bg)}
.wl-dialog .device-options label:has(input:focus-visible){z-index:2}
.wl-dialog .device-options label:has(input:focus-visible) span{outline:3px solid var(--red);outline-offset:3px}
.wl-dialog .waitlist-consent{min-height:44px;align-items:flex-start;gap:12px;padding:4px 0;font-size:14px;line-height:1.5}
.wl-dialog .waitlist-consent input{width:22px;height:22px;margin-top:1px;accent-color:var(--accent-ink)}
.wl-dialog .waitlist-submit{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:56px;margin-top:24px;padding:15px 20px;border:0;border-radius:12px;background:var(--red);color:var(--on-red);font-family:Figtree,sans-serif;font-weight:900;font-size:18px;line-height:1.15;white-space:normal;text-align:center;overflow-wrap:anywhere;transition:transform .16s cubic-bezier(.2,.8,.25,1),background-color .16s}
.wl-dialog .waitlist-submit svg{width:20px;height:20px}
.wl-dialog .waitlist-submit:active:not(:disabled){transform:scale(.98)}
.wl-dialog .waitlist-submit:focus-visible{outline:3px solid var(--red);outline-offset:4px}
.wl-dialog .waitlist-purpose{margin-top:12px;font-size:13px;line-height:1.5}
.wl-dialog .waitlist-privacy-link{margin-top:8px;font-size:13px;line-height:1.5;color:var(--muted)}
.wl-dialog .waitlist-privacy-link a{display:inline-flex;align-items:center;min-height:44px;text-underline-offset:3px}
.wl-dialog .field-error{font-size:14px}
.wl-dialog .waitlist-status{padding:12px 14px;border-radius:12px;background:var(--pale);font-size:14px}
.wl-dialog .waitlist-status:empty{display:none}
/* Compact success-state styling: Claude Opus5.5 high, existing HEARTS tokens. */
.wl-dialog[data-state=success] [hidden],
.wl-dialog[data-state=success] #signup-view,
.wl-dialog[data-state=success] .waitlist-content :is(p,div,span):empty{display:none!important}

.wl-dialog[data-state=success] .waitlist-content{padding-top:4px}

.wl-dialog[data-state=success] .confirmation{display:flex;flex-direction:column;align-items:flex-start;color:var(--ink)}
.wl-dialog[data-state=success] .confirmation>*{margin:0}
.wl-dialog[data-state=success] .confirmation p{max-width:36ch}

.wl-dialog[data-state=success] #confirmation-title{font:900 clamp(32px,8vw,40px)/1.02 Figtree,system-ui,sans-serif;letter-spacing:-.025em;color:var(--ink);text-wrap:balance;scroll-margin-top:76px}
.wl-dialog[data-state=success] #confirmation-title:focus:not(:focus-visible){outline:none}

.wl-dialog[data-state=success] #confirmation-copy{margin-top:10px;font:400 17px/1.45 "Noto Sans",system-ui,sans-serif;color:var(--ink)}

.wl-dialog[data-state=success] #confirmation-newsletter{margin-top:6px;font:400 15px/1.45 "Noto Sans",system-ui,sans-serif;color:var(--muted)}

.wl-dialog[data-state=success] .confirmation-hint{margin-top:16px;padding:10px 14px;border-radius:14px;font:500 15px/1.4 "Noto Sans",system-ui,sans-serif;color:var(--ink);background:color-mix(in srgb,var(--red) 10%,transparent);box-shadow:none}

.wl-dialog[data-state=success] .waitlist-retry{margin-top:22px;min-height:44px;padding:0 20px;border-radius:999px;font:800 15px/1 Figtree,system-ui,sans-serif;letter-spacing:-.005em;color:var(--ink);background:transparent;text-decoration:none;border:2px solid color-mix(in srgb,var(--ink) 18%,transparent);cursor:pointer;transition:background-color .15s,border-color .15s}
.wl-dialog[data-state=success] #waitlist-mail-retry{color:var(--on-red);background:var(--red);border-color:var(--red)}
.wl-dialog[data-state=success] #waitlist-mail-retry:not([hidden])+#waitlist-retry{margin-top:10px}

.wl-dialog[data-state=success] .waitlist-retry:focus-visible,
.wl-dialog[data-state=success] .waitlist-privacy-link a:focus-visible{outline:3px solid var(--red);outline-offset:3px}

.wl-dialog[data-state=success] .draft-result-note{margin-top:20px;font:400 13px/1.4 "Noto Sans",system-ui,sans-serif;color:var(--muted)}

.wl-dialog[data-state=success] .waitlist-privacy-link{margin:2px 0 0;font:400 13px/1 "Noto Sans",system-ui,sans-serif}
.wl-dialog[data-state=success] .waitlist-privacy-link a{display:inline-flex;align-items:center;min-height:44px;border-radius:4px;color:var(--muted);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}

@media (hover:hover) and (pointer:fine){
.wl-dialog[data-state=success] #waitlist-retry:hover{border-color:var(--ink);background:color-mix(in srgb,var(--ink) 5%,transparent)}
.wl-dialog[data-state=success] #waitlist-mail-retry:hover{background:color-mix(in srgb,var(--red) 88%,var(--ink));border-color:color-mix(in srgb,var(--red) 88%,var(--ink))}
.wl-dialog[data-state=success] .waitlist-privacy-link a:hover{color:var(--ink)}
}

@media (max-width:359px){
.wl-dialog[data-state=success] #confirmation-title{font-size:30px}
.wl-dialog[data-state=success] #confirmation-copy{font-size:16px}
.wl-dialog[data-state=success] .waitlist-retry{margin-top:18px}
.wl-dialog[data-state=success] .draft-result-note{margin-top:16px}
}

@media (prefers-reduced-motion:reduce){
.wl-dialog[data-state=success] *{transition:none!important}
}
@media (hover:hover) and (pointer:fine){.wl-dialog .device-options label:hover span{border-color:var(--ink)}}
@media (max-width:360px){.wl-scroll{padding-inline:20px}.wl-head{margin-inline:-20px;padding-inline:20px 12px}.wl-dialog .device-options span{min-height:52px;padding:12px 14px;font-size:18px}.wl-dialog .waitlist-submit{font-size:18px;padding-inline:18px}}
@media (max-height:480px){.wl-head{padding-block:10px 6px}.wl-dialog .wl-title{font-size:34px}.wl-dialog .draft-notice{margin-bottom:18px!important}}
@media (prefers-reduced-motion:no-preference){.wl-dialog[open]{animation:wl-in .24s cubic-bezier(.16,1,.3,1)}.wl-dialog[open]::backdrop{animation:wl-fade .18s ease-out}}
@media (prefers-reduced-motion:reduce){.wl-dialog *{animation:none!important;transition:none!important}}
@keyframes wl-in{from{opacity:.4;transform:translateY(22px) scale(.98)}}
@keyframes wl-fade{from{opacity:0}}

/* ---------- 01 · PULS — mark, Coming Soon, action in one quick sequence ---------- */
.v-puls .hx-stage{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.p-mark{position:relative;margin:0;width:min(71vw,400px,max(96px,calc((100svh - 240px) * 1.1347)));animation:p-in .3s cubic-bezier(.2,.75,.25,1) both}
.v-puls .pulse-logo{position:relative;display:flex;width:100%;border-radius:20px}
.p-mark .p-logo-vector{display:block;mask:none;-webkit-mask:none;background:none;overflow:visible}
.p-title{margin:26px 0 0;font:900 clamp(26px,4.6vw,36px)/1.08 Figtree,sans-serif;letter-spacing:-.025em;animation:hx-rise .28s .38s cubic-bezier(.2,.75,.25,1) both}
.p-cta{width:100%;max-width:296px;min-height:52px;font-size:16px;margin:20px 0 0;animation:hx-rise .28s .68s cubic-bezier(.2,.75,.25,1) both}
@media (max-height:480px){.p-title{margin-top:18px}.p-cta{margin-top:16px}}
@keyframes p-in{from{opacity:.25;transform:translateY(6px)}}


@media(prefers-reduced-motion:reduce){.hx-stage *{animation:none!important;transition:none!important}}

/* Accepted optional beta control, matching platform buttons. */
.beta-invitation{margin:24px 0 22px;--beta-edge:#b9bdc6;--beta-selected:#c41436;--beta-fill:#fde8ec}
html[data-theme=dark] .beta-invitation{--beta-edge:#697386;--beta-selected:#ff6d87;--beta-fill:#3a1420}
.beta-invitation button,.beta-invitation input{touch-action:manipulation}
.beta-invitation .beta-select{width:100%;min-height:56px;padding:16px 18px;border:1px solid var(--beta-edge);border-radius:16px;background:var(--bg);color:var(--ink);font-family:Figtree,sans-serif;font-weight:900;cursor:pointer;transition:background-color .16s,border-color .16s,color .16s}
.beta-invitation .beta-select:hover{border-color:var(--beta-selected)}
.beta-line{margin:0 0 10px!important;font:800 18px/1.3 Figtree,sans-serif;color:var(--ink)}
.beta-invitation .beta-bold-button{display:flex;align-items:center;justify-content:center;min-height:52px;padding:12px 16px;border-radius:12px;background:var(--soft);border-color:#858b96;color:var(--ink);font-size:18px;font-weight:800;line-height:1.2}
html[data-theme=dark] .beta-invitation .beta-bold-button{border-color:#697386}
.beta-invitation .beta-bold-button:hover{border-color:var(--ink)}
.beta-invitation .beta-bold-button[aria-pressed=true]{background:#10131a;border-color:#10131a;color:#fff}
html[data-theme=dark] .beta-invitation .beta-bold-button[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:var(--bg)}
@media(prefers-reduced-motion:reduce){.beta-invitation *{transition:none!important}}
.beta-select:focus-visible{outline:3px solid var(--red);outline-offset:3px}
.wl-dialog .wl-title{margin-bottom:24px}
.wl-dialog[data-state=success] .confirmation-hint[data-tone=notice]{padding:0;background:transparent;color:var(--muted);font-weight:400}

/* Approved soft intro, 4 November 2026. */
/* HEARTS coming soon · first-visit entrance, shared by both variants.
   Extends public-waitlist.css / public-pulse.css. One authored moment on one clock:
   two continuous ECG sweeps, the original mark arrives once the trace has drained,
   a double heartbeat on the trace's own rhythm, then the label sequence
   (label-sequence.css). Full timeline: CHOREOGRAPHY.md. */

/* Relative asset paths for the standalone preview (production CSS uses root paths). */
.hx .wl-brand{-webkit-mask:url(/assets/brand/wordmark.svg) center/contain no-repeat;mask:url(/assets/brand/wordmark.svg) center/contain no-repeat}

/* Browser surfaces in the palette */
html{scrollbar-color:var(--muted) var(--bg)}
.hx ::selection{background:var(--red);color:var(--on-red)}
.hx input{caret-color:var(--red)}

/* ---------- The clock ----------
   One sweep = three stylized beats = one heartbeat cycle. Every phase below is
   derived from it, so the logo's lub lands on the R-peak grid the trace set up,
   and both variants share every moment after their arrival. */
.hx{
  --t0:150ms;                                         /* first sweep starts on a calm, empty frame */
  --sweep:1500ms;                                     /* one pass across the strip */
  --beat:calc(var(--sweep) / 3);                      /* R to R: 500ms */
  --r-peak:calc(var(--beat) * .375);                  /* R sits at x=60 of each 160-unit beat */
  --sweeps-end:calc(var(--t0) + 2 * var(--sweep));    /* 3150ms: second head leaves the right edge */
  /* 4247.5ms: hx-beat peaks at 6%, so the first lub falls on the R-peak two beats after the sweeps. */
  --hb-start:calc(var(--sweeps-end) + 2 * var(--beat) + var(--r-peak) - var(--sweep) * .06);
  /* 5747.5ms: EKG-App starts with the first impulse of heartbeat cycle 2. */
  --label-start:calc(var(--hb-start) + var(--sweep));
}

/* ---------- Composition ---------- */
.hx-stage{overflow:clip}
.logo-button{display:inline-flex;align-items:center;justify-content:center;border:0;padding:0;background:transparent;color:var(--red);min-width:44px;min-height:44px;touch-action:manipulation}
.logo-button:focus-visible{outline:3px solid var(--red);outline-offset:8px}
.logo-button:active{opacity:.85}
.p-mark{width:min(64vw,320px,max(96px,calc((100svh - 250px) * 1.1347)));animation:none}
.p-title{margin-top:22px;font-size:clamp(24px,4vw,30px);animation:none}

/* User-selected stylized textbook P–QRS–T motif. Decorative, not patient data.
   Two comets 480 units apart share one transform, so the trace wraps like a
   monitor: the next head enters at the left while the last tail still fades
   at the right. No blink at the seam. */
.p-trace{position:absolute;top:50%;left:50%;width:min(88vw,480px);height:auto;aspect-ratio:480/112;transform:translate(-50%,-50%);overflow:hidden;pointer-events:none;color:var(--red);opacity:0}
.p-trace path{fill:none;stroke:currentColor;stroke-width:2;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.ecg-sweep,.ecg-head{transform:translateX(0)}
.ecg-head-line path{stroke-width:2.7}

/* ---------- Compact CTA: intentional, below the mark's visual weight ---------- */
.p-cta{width:auto;max-width:none;min-height:48px;margin-top:18px;padding:0 14px 0 18px;gap:8px;border-radius:14px;font-size:14px;letter-spacing:-.005em;animation:none}
.p-cta svg{width:18px;height:18px}
@media (min-width:600px){.p-cta{min-height:48px;padding:0 18px 0 22px;gap:10px;font-size:15px}.p-cta svg{width:18px;height:18px}}
@media (max-height:480px){.p-title{margin-top:16px;font-size:26px}.p-cta{margin-top:14px}}

/* Footer: centered under the composition */
.hx>.site-legal-footer{justify-content:center}

/* ---------- Heartbeat: lub-dub, then a long rest (one cycle per sweep) ----------
   Shorthand on purpose: public-pulse.css pauses with the more specific
   .pulse-logo[data-paused=true] .brand-contour, which still wins. */
@media (prefers-reduced-motion:no-preference){
  .pulse-logo .brand-contour{animation:hx-beat var(--sweep) var(--hb-start) infinite}
}
@keyframes hx-beat{
  0%{transform:scale(1);animation-timing-function:cubic-bezier(.3,0,.2,1)}
  6%{transform:scale(1.06);animation-timing-function:cubic-bezier(.4,0,.6,1)}
  14%{transform:scale(.995);animation-timing-function:cubic-bezier(.3,0,.2,1)}
  20%{transform:scale(1.03);animation-timing-function:cubic-bezier(.4,0,.6,1)}
  32%,100%{transform:scale(1)}
}

/* ---------- Entrance: two sweeps → drain → mark ---------- */
@media (prefers-reduced-motion:no-preference){
  /* t0 → +2.6 sweeps at constant speed: two full passes (0→960) plus the
     last tail draining off the right edge (→1248). */
  .ecg-sweep,.ecg-head{animation:hx-sweep calc(var(--sweep) * 2.6) linear var(--t0) both}
  /* Fully on from the first frame (nothing is in view until a head enters);
     fades only once the second head has left. */
  .p-trace{animation:hx-trace-out 450ms ease-in-out var(--sweeps-end) both}
  /* Variant 1: keep the logo free of the trace; hand off immediately after
     its 450ms drain. Settle before the first heartbeat, with no empty hold. */
  .v-ecg .p-mark .pulse-logo{animation:hx-resolve 600ms cubic-bezier(.25,.8,.25,1) calc(var(--sweeps-end) + 450ms) backwards}
}
@keyframes hx-sweep{to{transform:translateX(1248px)}}
@keyframes hx-trace-out{from{opacity:1}to{opacity:0}}
@keyframes hx-resolve{from{opacity:0;visibility:hidden;transform:scale(.96)}to{visibility:visible}}

/* Keep all entrance clocks aligned when the visitor switches tabs. The
   logo's explicit pause control remains independent after the entrance. */
html[data-intro-hold=true] .hx-stage *,
html[data-intro-hold=true] .site-legal-footer{animation-play-state:paused!important}

/* Reduced motion: final composition at once, no trace. */
@media (prefers-reduced-motion:reduce){
  .p-trace{display:none}
}

/* ---------- Dark dialog: raised surface, clear edge, deeper backdrop ---------- */
html[data-theme=dark] .wl-dialog{border-color:#363d4b}
html[data-theme=dark] .wl-dialog::backdrop{background:rgb(3 4 7 / .74)}


/* HEARTS coming soon · shared label sequence (ECG and impact variants).
   Opt-in: <body class="... ls-seq"> plus an h1.p-title.ls-labels holding
   .ls-first (EKG-App) and .ls-final (Coming Soon). Load after intro.css,
   which owns the clock: --label-start (L) is the first impulse of heartbeat
   cycle 2; --sweep (S) is one complete double-pulse cycle.

     L             EKG-App enters with the first impulse of cycle 2
     L + S - 80ms  EKG-App exit complete; an empty slot avoids overlapping text
     L + S         Coming Soon enters with the first impulse of cycle 3
     L + 2S        waitlist CTA and footer enter with the first impulse of cycle 4

   Final state: Coming Soon + CTA + footer. Hidden items use visibility:hidden
   until their start, so the CTA and footer links are not focusable early.
   Reduced motion: final composition at once, EKG-App never shown. */

/* Both labels share one grid cell: the line reserves the larger label's box,
   so nothing below jumps when the text swaps. */
.ls-labels{display:grid;justify-items:center}
.ls-label{grid-area:1/1;display:block;color:var(--ink);white-space:nowrap}
/* Static (and reduced-motion) state: only Coming Soon. */
.ls-first{opacity:0;visibility:hidden}

@media (prefers-reduced-motion:no-preference){
  /* The h1 itself stays put; only its labels move, a quarter line inside the slot. */
  .ls-seq .ls-first{animation:ls-first calc(var(--sweep) - 80ms) linear var(--label-start) forwards}
  .ls-seq .ls-final{animation:ls-rise 600ms cubic-bezier(.25,.8,.25,1) calc(var(--label-start) + var(--sweep)) backwards}
  .ls-seq .p-cta{animation:ls-settle 620ms cubic-bezier(.16,1,.3,1) calc(var(--label-start) + 2 * var(--sweep)) backwards}
  body.ls-seq>.site-legal-footer{animation:ls-fade 500ms ease-out calc(var(--label-start) + 2 * var(--sweep)) backwards}
}
@keyframes ls-first{
  0%{opacity:0;visibility:visible;transform:translateY(.25em);animation-timing-function:cubic-bezier(.25,.8,.25,1)}
  30%{opacity:1;visibility:visible;transform:none}
  83%{opacity:1;visibility:visible;transform:none;animation-timing-function:cubic-bezier(.5,0,.75,0)}
  100%{opacity:0;visibility:hidden;transform:translateY(-.2em)}
}
@keyframes ls-rise{from{opacity:0;visibility:hidden;transform:translateY(.25em)}to{visibility:visible}}
@keyframes ls-fade{from{opacity:0;visibility:hidden}to{visibility:visible}}
@keyframes ls-settle{from{opacity:0;visibility:hidden;transform:translateY(10px);filter:blur(3px)}to{visibility:visible}}

@media (prefers-reduced-motion:reduce){
  .ls-seq :is(.ls-first,.ls-final,.p-cta),body.ls-seq>.site-legal-footer{animation:none}
}
