/* Daily Driver OS: page motion layer ("wow factor" prototype, 18 Nov 2026).
   Everything here waits for the class "mo" on <html>, which a tiny script in <head> sets only when the visitor has
   NOT asked for reduced motion and the address has no ?motion=off. Without "mo" the page is exactly today's page.
   Rules: animate only opacity and the individual transform properties (translate, scale, rotate), so hover and press
   effects that use `transform` keep working; fill mode "backwards" so nothing is held after an animation ends;
   nothing on the first screen waits for JavaScript. */

/* ---------- 1. Page load: about one second, CSS only, starts with the first paint ---------- */

@keyframes mo-rise { from { opacity: 0; translate: 0 var(--mo-y, 18px); } }
@keyframes mo-fade { from { opacity: 0; } }
/* The paragraph under the headline is the page's largest text (Chrome's LCP element): it slides but never fades,
   so the page counts as loaded at the first paint, exactly as today. */
@keyframes mo-slide { from { translate: 0 14px; } }
@keyframes mo-word { from { opacity: 0; translate: 0 0.42em; rotate: 3deg; } }
@keyframes mo-pop { 0% { opacity: 0; scale: 0.9; } 60% { opacity: 1; scale: 1.035; } 100% { scale: 1; } }
@keyframes mo-cell { from { opacity: 0; translate: 0 -10px; scale: 0.9; } }
@keyframes mo-needle { 0% { rotate: -125deg; } 70% { rotate: 12deg; } 85% { rotate: -5deg; } 100% { rotate: 0deg; } }
@keyframes mo-mark { from { background-size: 0% 100%; color: var(--on-ink); } }
@keyframes mo-bump { 0%, 100% { scale: 1; } 45% { scale: 1.09; } }

.mo:not(.mo-done) .site-header .brand { animation: mo-fade 0.5s ease-out backwards; }
/* The logo is a gauge: its needle revs up once on load (and again when the logo is tapped, see motion.js). */
.mo .site-header .mark path:nth-of-type(2) { transform-box: view-box; transform-origin: 14px 16px; }
.mo:not(.mo-done) .site-header .mark path:nth-of-type(2) { animation: mo-needle 1.1s cubic-bezier(0.3, 0.7, 0.3, 1) 0.15s backwards; }
.mo .site-header .mark.is-rev path:nth-of-type(2) { animation: mo-needle 0.9s cubic-bezier(0.3, 0.7, 0.3, 1); }

.mo:not(.mo-done) .s-hero .s-eyebrow { --mo-y: 10px; animation: mo-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s backwards; }
.mo .s-title .mo-w { display: inline-block; }
.mo:not(.mo-done) .s-title .mo-w { animation: mo-word 0.6s cubic-bezier(0.2, 0.75, 0.25, 1) backwards; animation-delay: calc(0.1s + var(--w, 0) * 0.055s); }
/* "twice": the highlighter sweeps across, then the word bumps once. */
.mo .s-title mark { background-repeat: no-repeat; background-size: 100% 100%; }
.mo:not(.mo-done) .s-title mark { animation: mo-mark 0.5s cubic-bezier(0.6, 0, 0.2, 1) 0.62s backwards; }
.mo:not(.mo-done) .s-title .mo-mark { animation: mo-word 0.6s cubic-bezier(0.2, 0.75, 0.25, 1) backwards, mo-bump 0.42s ease-in-out 1.12s; animation-delay: calc(0.1s + var(--w, 0) * 0.055s), 1.12s; }
.mo:not(.mo-done) .s-hero .s-sub { animation: mo-slide 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.mo:not(.mo-done) .s-hero .s-outcomes li { animation: mo-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; animation-delay: calc(0.5s + var(--i, 0) * 0.07s); }
.mo .s-hero .s-outcomes li:nth-child(2) { --i: 1; }
.mo .s-hero .s-outcomes li:nth-child(3) { --i: 2; }
.mo:not(.mo-done) .s-hero .s-offer { animation: mo-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 0.46s backwards; }
.mo:not(.mo-done) .s-hero .s-tcell { animation: mo-cell 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.2) backwards; animation-delay: calc(0.62s + var(--i, 0) * 0.06s); }
.mo .s-hero .s-tcell:nth-child(2) { --i: 1; }
.mo .s-hero .s-tcell:nth-child(3) { --i: 2; }
.mo .s-hero .s-tcell:nth-child(4) { --i: 3; }
.mo:not(.mo-done) .s-hero [data-hero-cta] { animation: mo-pop 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) 0.58s backwards; }
.mo:not(.mo-done) .s-hero .s-price-line { animation: mo-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.46s backwards; }
.mo:not(.mo-done) .s-hero .s-after, .mo:not(.mo-done) .s-hero .s-trust { animation: mo-fade 0.5s ease-out 0.8s backwards; }
.mo:not(.mo-done) .s-hero .s-hero-visual { animation: mo-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.42s backwards; --mo-y: 26px; }

/* Elements that hold a guide seat only fade (Dot measures where they sit). */
/* ---------- 2. Scroll reveals (classes added by motion.js; without it nothing is hidden) ---------- */

.mo .mo-r { opacity: 0; translate: 0 22px; transition: opacity 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s), translate 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s); }
.mo .mo-r.mo-zoom { translate: 0 18px; scale: 0.96; transition-property: opacity, translate, scale; transition-duration: 0.45s, 0.55s, 0.55s; }
.mo .mo-r.mo-fade { translate: none; }
.mo .mo-r.is-in { opacity: 1; translate: none; scale: none; }
/* Headings come in word by word. */
.mo .mo-split .mo-w { display: inline-block; opacity: 0; translate: 0 0.5em; transition: opacity 0.4s ease-out, translate 0.5s cubic-bezier(0.2, 0.75, 0.25, 1); transition-delay: calc(var(--d, 0s) + var(--w, 0) * 0.035s); }
.mo .mo-split.is-in .mo-w { opacity: 1; translate: none; }
/* The yellow dot before each section label pops when its section arrives. */
.mo .s-eyebrow.mo-r::before { scale: 0; transition: scale 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) calc(var(--d, 0s) + 0.25s); }
.mo .s-eyebrow.mo-r.is-in::before { scale: 1; }
/* Proof numbers: a small bump when the count-up lands. */
.mo .s-proof-num.mo-landed { display: inline-block; animation: mo-bump 0.4s ease-in-out; }
/* The daily loop diagram: the three steps pop in order, then the "next day" line flows three times. */
.mo .s-loop.mo-r rect, .mo .s-loop.mo-r text { opacity: 0; transition: opacity 0.4s ease-out; }
.mo .s-loop.mo-r.is-in rect, .mo .s-loop.mo-r.is-in text { opacity: 1; }
.mo .s-loop.mo-r.is-in rect:nth-of-type(2), .mo .s-loop.mo-r.is-in text:nth-of-type(2) { transition-delay: 0.25s; }
.mo .s-loop.mo-r.is-in rect:nth-of-type(3), .mo .s-loop.mo-r.is-in text:nth-of-type(3) { transition-delay: 0.5s; }
.mo .s-loop.mo-r.is-in text:nth-of-type(n+4) { transition-delay: 0.7s; }
@keyframes mo-flow { to { stroke-dashoffset: -40; } }
.mo .s-loop.is-in path[stroke-dasharray] { animation: mo-flow 1.4s linear 0.9s 3; }
/* The handoff calendar fills in, one column after another. */
@keyframes mo-heat { from { opacity: 0; scale: 0.4; } }
.mo .s-heat.mo-r.is-in svg rect { transform-box: fill-box; transform-origin: center; animation: mo-heat 0.35s ease-out backwards; animation-delay: calc(0.2s + var(--c, 0) * 0.018s); }

/* ---------- 3. Micro-interactions ---------- */

/* Buy buttons: a light sweep crosses them every few seconds; the arrow nudges at the same moment. */
.mo .btn { position: relative; overflow: hidden; isolation: isolate; }
.mo .s-btn-glow::after, .mo .s-btn-pop::after {
  content: ""; position: absolute; z-index: -1; top: -20%; bottom: -20%; left: 0; width: 38%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75) 50%, transparent);
  translate: -140% 0; rotate: 0deg; pointer-events: none;
  animation: mo-shine 5.5s ease-in-out 1.6s infinite;
}
.mo .s-btn-pop::after { animation-delay: 2.4s; }
@keyframes mo-shine { 0% { translate: -140% 0; } 16%, 100% { translate: 330% 0; } }
.mo .btn .btn-arrow { animation: mo-nudge 5.5s ease-in-out 1.6s infinite; }
@keyframes mo-nudge { 0%, 6%, 16%, 100% { translate: 0 0; } 10% { translate: 5px 0; } }
.mo .btn:hover .btn-arrow { animation: none; }
/* Labels sit in their own layer so the magnet can move them a little further than the button. */
.mo .btn [data-buy-label], .mo .btn .btn-arrow { display: inline-block; translate: var(--lx, 0px) var(--ly, 0px); transition: translate 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
/* Magnetic buttons (mouse): motion.js sets --mx/--my while the pointer is near. */
.mo .mo-mag { translate: var(--mx, 0px) var(--my, 0px); transition: translate 0.55s cubic-bezier(0.2, 1.6, 0.4, 1), scale 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
.mo .mo-mag.is-near { transition: translate 0.12s ease-out, scale 0.2s ease-out; scale: 1.04; }
.mo .mo-mag.is-near [data-buy-label], .mo .mo-mag.is-near .btn-arrow { transition: translate 0.12s ease-out; animation: none; }
/* Phones: the button squishes toward the finger, and a ripple starts where it touched. */
.mo .mo-mag.is-squish { scale: 0.965; transition: translate 0.1s ease-out, scale 0.1s ease-out; }
.mo-ripple { position: absolute; z-index: -1; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); pointer-events: none; animation: mo-ripple 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.s-btn-pop .mo-ripple, .s-btn-ink .mo-ripple, .s-bar-x .mo-ripple { background: rgba(255, 255, 255, 0.6); }
@keyframes mo-ripple { from { scale: 1; opacity: 0.9; } to { scale: 28; opacity: 0; } }
/* A Buy button that scrolls into view on a phone gives one small pull. */
@keyframes mo-snap { 0% { scale: 1; } 35% { scale: 1.06; } 65% { scale: 0.985; } 100% { scale: 1; } }
.mo .mo-mag.is-snap { animation: mo-snap 0.6s cubic-bezier(0.3, 0.7, 0.3, 1); }

/* Cards lift under the mouse and press under a finger. */
.mo .s-ba-card, .mo .s-when-step, .mo .s-step, .mo .s-fit-card, .mo .s-cmd, .mo .s-extra, .mo .s-proof-item {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s, opacity 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s), translate 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s);
}
@media (hover: hover) and (pointer: fine) {
  .mo .s-ba-card:hover, .mo .s-when-step:hover, .mo .s-step:hover, .mo .s-fit-card:hover, .mo .s-cmd:hover, .mo .s-extra:hover {
    transform: translateY(-4px); box-shadow: 0 18px 36px -24px rgba(40, 40, 40, 0.45);
  }
  .mo .s-cmd:hover code { background: var(--yellow); }
}
.mo .s-ba-card:active, .mo .s-when-step:active, .mo .s-step:active, .mo .s-fit-card:active, .mo .s-cmd:active, .mo .s-extra:active { transform: scale(0.985); transition-duration: 0.1s; }
.mo .s-cmd code { transition: background-color 0.25s; }

/* 3D tilt (mouse only, motion.js): the hero terminal and the price card lean toward the pointer. */
.mo .mo-tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform; }
.mo .mo-tilt.is-tilting { transition: transform 0.12s ease-out; }

/* The countdown's numbers flip when they change. */
@keyframes mo-tick { from { opacity: 0.2; translate: 0 -38%; } }
.mo .s-tnum.mo-tick { display: inline-block; animation: mo-tick 0.32s cubic-bezier(0.2, 0.8, 0.3, 1.2); }

/* Tapping the headline answers: the words jump in a wave and the highlighter sweeps again. */
@keyframes mo-wave { 0%, 100% { translate: 0 0; } 40% { translate: 0 -0.16em; } }
.mo .s-title.is-wave .mo-w { animation: mo-wave 0.45s cubic-bezier(0.3, 0.7, 0.3, 1) backwards; animation-delay: calc(var(--w, 0) * 0.04s); }
.mo .s-title.is-wave mark { animation: mo-mark 0.45s cubic-bezier(0.6, 0, 0.2, 1) 0.2s backwards; }
.mo .s-title { cursor: default; -webkit-tap-highlight-color: transparent; }

/* FAQ answers slide in when opened. */
.mo .s-faq details[open] .faq-a, .mo details[open] > .faq-a { animation: mo-rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); --mo-y: -6px; }

/* Reading progress: a thin yellow line at the top shows how much page is left. */
.mo-progress { position: fixed; z-index: 40; left: 0; top: 0; width: 100%; height: 3px; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; box-shadow: 0 0 8px rgba(255, 225, 67, 0.6); }

/* Final dark section: its button gets a soft glow that breathes. */
@keyframes mo-breathe { 0%, 100% { box-shadow: 0 14px 34px -12px rgba(255, 225, 67, 0.55); } 50% { box-shadow: 0 18px 46px -8px rgba(255, 225, 67, 0.85); } }
.mo .s-final .s-btn-glow.is-in-view { animation: mo-breathe 2.8s ease-in-out infinite; }
