/* Moonlift v5 — more pictures, more motion, easier to find your way.
   VOICE: calm, friendly expert for busy US owners.
   IDEA: an AI answer being built, then lifted.
   PICTURE: sources flowing into AI, a live dashboard, a before/after slider.
   COLOUR/TYPE: brand navy + gold, Google Sans everywhere, Fraunces only in the logo. One moon only (logo).
   LAYOUT: hero, jump bar, then one picture per section. */

/* ---------- Scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--sp, 0)); background: linear-gradient(90deg, var(--gold), #F2C46B); }

/* ---------- Hero: slow drifting grid of light ---------- */
.home5 .hero4-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask: radial-gradient(70% 70% at 70% 40%, #000, transparent 75%); mask: radial-gradient(70% 70% at 70% 40%, #000, transparent 75%);
  animation: drift 26s linear infinite;
}
@keyframes drift { to { background-position: 56px 56px, 56px 56px; } }
.home5 .demo { will-change: transform; }

/* ---------- Jump bar ---------- */
.jump { position: sticky; top: var(--header-h); z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.jump-in { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; padding-bottom: 10px; }
.jump-in::-webkit-scrollbar { display: none; }
.jump a { flex: none; font-size: .9rem; font-weight: 500; color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 999px; transition: background-color .2s ease, color .2s ease; }
.jump a:hover { color: var(--ink); background: var(--tint); }
.jump a.is-here { color: #fff; background: var(--navy); }
.jump a.jump-cta { margin-left: auto; color: var(--night, #0E1830); background: var(--gold); font-weight: 700; }
.jump a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
html { scroll-padding-top: calc(var(--header-h) + 72px); }

/* ---------- How AI picks: flow diagram ---------- */
.flow { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(40px,.45fr) auto minmax(30px,.25fr) minmax(0,1fr); align-items: center; margin-top: 8px; }
.flow-src { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.flow-src li { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--sh-1); transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease; }
.flow-src li strong { display: block; color: var(--ink); font-size: .98rem; }
.flow-src li span:last-child { font-size: .85rem; color: var(--muted); }
.flow-src li.lit { transform: translateX(6px); border-color: var(--gold); box-shadow: 0 10px 28px rgba(224,164,58,.25); }
.wire-box { position: relative; align-self: stretch; min-height: 300px; }
.flow-wire { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow-wire path { fill: none; vector-effect: non-scaling-stroke; }
.w-base path { stroke: var(--line-2); stroke-width: 2; }
.w-pulse path { stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 14 200; stroke-dashoffset: 214; opacity: 0; }
.w-pulse path.on { opacity: 1; animation: pulse 1.4s linear infinite; }
@keyframes pulse { to { stroke-dashoffset: 0; } }
.flow-ai { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.flow-ai .ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, var(--gold), transparent 35%, var(--navy) 60%, transparent 85%, var(--gold)); animation: spin 6s linear infinite; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
@keyframes spin { to { transform: rotate(1turn); } }
.flow-ai .core { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #F2C46B; box-shadow: 0 16px 40px rgba(20,33,61,.3); }
.flow-ai b { position: absolute; bottom: -30px; font-size: .85rem; color: var(--ink); white-space: nowrap; }
.flow-out { background: #fff; border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-3); }
.fo-q { margin: 0 0 12px auto; width: fit-content; max-width: 100%; background: var(--navy); color: #fff; border-radius: 14px 14px 4px 14px; padding: 8px 12px; font-size: .9rem; }
.flow-out ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flow-out li { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: .92rem; color: var(--ink); opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.flow-out li span { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--tint); font-weight: 700; font-size: .8rem; flex: none; }
.flow-out li em { margin-left: auto; font-style: normal; font-size: .75rem; font-weight: 700; color: var(--green); background: var(--green-tint); border-radius: 999px; padding: 3px 8px; }
.flow-out li.fo-you { border-color: var(--gold); background: var(--gold-tint); }
.flow-out li.fo-you span { background: var(--gold); color: #0E1830; }
.flow.in .flow-out li { opacity: 1; transform: none; }
.flow.in .flow-out li:nth-child(2) { transition-delay: .15s; } .flow.in .flow-out li:nth-child(3) { transition-delay: .3s; }
.fo-note { margin: 10px 0 0; font-size: .75rem; color: var(--muted); }

/* ---------- Prices on offer cards ---------- */
.price { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 12px; }
.price b { font-family: var(--font-sans); font-size: 2.2rem; line-height: 1; color: var(--ink); }
.price span { font-size: .9rem; color: var(--muted); }
.offer-card { position: relative; }
.offer-card--star { outline: 2px solid var(--gold); outline-offset: -2px; }
.star-tag { position: absolute; top: 14px; right: 14px; z-index: 2; margin: 0; font-size: .75rem; font-weight: 700; color: #0E1830; background: var(--gold); border-radius: 999px; padding: 5px 10px; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: clamp(32px,5vw,72px); align-items: center; }
.dash-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; margin-top: 24px; }
.dash-tabs button { font: 500 .95rem var(--font-sans); min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.dash-tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
.dash-tabs button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.dash-text .lead { margin-top: 20px; }
.dash-hint { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.dash { margin: 0; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-3); overflow: hidden; }
.dash .browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.dash .b-dots { display: inline-flex; gap: 5px; } .dash .b-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.dash-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 18px; padding: 20px; }
.gauge { position: relative; text-align: center; background: var(--surface); border-radius: var(--r-md); padding: 16px 12px 12px; }
.gauge svg { width: 100%; max-width: 220px; display: block; margin: 0 auto; }
.g-track, .g-fill { fill: none; stroke-width: 14; stroke-linecap: round; }
.g-track { stroke: var(--line); }
.g-fill { stroke: var(--gold); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--s, 0)); transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.g-num { margin: -46px 0 0; font-size: .9rem; color: var(--muted); }
.g-num b { font-family: var(--font-sans); font-size: 2.6rem; color: var(--ink); }
.g-label { margin: 4px 0 0; font-weight: 700; color: var(--ink); font-size: .9rem; }
.tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: center; }
.tools li { display: grid; grid-template-columns: 92px minmax(0,1fr) auto; gap: 10px; align-items: center; font-size: .85rem; color: var(--ink); }
.tools .bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tools .bar i { display: block; height: 100%; width: var(--w); border-radius: 999px; background: linear-gradient(90deg, var(--navy), var(--gold)); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.tools .st { font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.st.yes { color: var(--green); background: var(--green-tint); }
.st.no { color: var(--muted); background: var(--surface); }
.fixes { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; }
.fixes p { margin: 0 0 8px; font-weight: 700; color: var(--ink); font-size: .9rem; }
.fixes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fixes li { font-size: .85rem; background: var(--tint); color: var(--ink); border-radius: 999px; padding: 6px 12px; animation: popIn .4s ease both; }
.fixes li::before { content: "✓ "; color: var(--green); font-weight: 700; }
@keyframes popIn { from { opacity: 0; transform: scale(.85); } }

/* ---------- Steps: icons pop in turn ---------- */
.home5 .step .ic { transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
.home5 .step.rv:not(.in) .ic { transform: scale(.4) rotate(-20deg); }
.home5 .step.in .ic { transform: none; }

/* ---------- Before / after slider ---------- */
.compare-wrap { margin-top: clamp(56px, 7vw, 88px); }
.compare-wrap .muted { color: var(--muted); margin: 8px 0 24px; }
.compare { max-width: 640px; margin: 0 auto; padding: 22px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-3); transition: background-color .6s ease; }
.compare.is-after { background: linear-gradient(180deg, #fff, var(--gold-tint)); }
.cmp-switch { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: 999px; margin-bottom: 18px; }
.cmp-switch button { flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; font: 500 .95rem var(--font-sans); color: var(--muted); cursor: pointer; transition: background-color .25s ease, color .25s ease; }
.cmp-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.cmp-switch button[data-v="after"][aria-pressed="true"] { background: var(--gold); color: #0E1830; font-weight: 700; }
.cmp-switch button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.compare .d-user { margin: 0 0 14px auto; }
.cmp-list { list-style: none; margin: 0; padding: 0; position: relative; height: 236px; }
.cmp-list li { position: absolute; left: 0; right: 0; top: calc(var(--i, 0) * 60px); height: 52px; display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font-size: .92rem; color: var(--ink); transition: top .7s cubic-bezier(.2,.9,.25,1.1), opacity .5s ease, border-color .5s ease, box-shadow .5s ease, background-color .5s ease; }
.cmp-list li b { font-weight: 500; white-space: nowrap; }
.cmp-list .n { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--tint); font-weight: 700; font-size: .8rem; flex: none; }
.cmp-list .why { font-style: normal; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cmp-list .tag { margin-left: auto; font-style: normal; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 3px 8px; white-space: nowrap; flex: none; }
.cmp-list li.miss { opacity: .55; border-style: dashed; background: var(--surface); }
.cmp-list li.miss .tag { color: var(--muted); background: #fff; }
.cmp-list li.hit { border: 1.5px solid var(--gold); box-shadow: 0 10px 28px rgba(224,164,58,.3); }
.cmp-list li.hit .n { background: var(--gold); color: #0E1830; }
.cmp-list li.hit .tag { color: var(--green); background: var(--green-tint); }
.center { text-align: center; }

/* ---------- Dock: free check + back to top ---------- */
.dock { position: fixed; right: 18px; bottom: 18px; z-index: 45; display: flex; gap: 10px; align-items: center; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.dock.show { opacity: 1; transform: none; pointer-events: auto; }
.dock .btn { box-shadow: 0 10px 30px rgba(20,33,61,.25); min-height: 44px; }
.to-top { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 30px rgba(20,33,61,.25); }
.to-top:focus-visible, .dock .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.dock.at-form .btn { display: none; }
@media (min-width: 861px) { .dock .btn { display: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .flow { grid-template-columns: minmax(0,1fr); justify-items: center; gap: 0; }
  .flow-src { width: 100%; max-width: 520px; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .wire-box { display: none; }
  .flow-ai { margin: 36px 0 52px; }
  .flow-ai::before, .flow-ai::after { content: ""; position: absolute; left: 50%; width: 2px; height: 28px; background: linear-gradient(var(--line-2), var(--gold)); }
  .flow-ai::before { top: -34px; } .flow-ai::after { bottom: -58px; }
  .flow-ai b { bottom: -26px; }
  .flow-out { width: 100%; max-width: 520px; }
  .dash-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 600px) {
  .flow-src { grid-template-columns: minmax(0,1fr); }
  .dash-body { grid-template-columns: minmax(0,1fr); }
  .tools li { grid-template-columns: 80px minmax(0,1fr) auto; }
  .compare { padding: 16px; }
  .cmp-list .why { display: none; }
  .dock { left: 12px; right: 12px; justify-content: space-between; }
  .dock .btn { flex: 1; }
  .jump a { padding: 8px 12px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .home5 .hero4-panel::before, .flow-ai .ring, .w-pulse path.on { animation: none; }
  .flow-out li { opacity: 1; transform: none; }
  .progress { display: none; }
}
