/* Home page only; loaded after styles.css, which holds the tokens, font, headings, tints, header, footer and FAQ list.
   Motion that waits for home.js is scoped to html.js, so without JavaScript everything shows in its final state.
   home.js adds .off to looping elements while they are off screen, which pauses their animations. */
:root { --app-bg: #0D0F12; --app-card: #161A20; --app-2: #1E242D; --app-fg: #F2F4F7; --app-fg-2: #8A949F; --amber: #F5A623; }
.off, .off * { animation-play-state: paused !important; }

/* Hero */
.hero { text-align: center; padding: 56px 0 0; }
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); margin: 0 auto 20px; max-width: 13ch; }
.hero .lead { max-width: 44ch; margin: 0 auto 30px; }
.store { display: inline-flex; flex-direction: column; background: var(--orange); color: #fff; padding: 12px 22px; border-radius: 14px; text-align: left; line-height: 1.2; }
.store small { font-size: 12px; opacity: .8; }
.store b { font-size: 18px; }

/* Phones over the navy band; they fan out from a stack on load. */
.phones { position: relative; height: 560px; margin-top: 64px; overflow: hidden; }
.phones::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 62%; background: var(--ink); }
.phone { position: absolute; bottom: -120px; width: 280px; border-radius: 42px; background: #000; padding: 10px; box-shadow: 0 30px 60px -20px rgba(20,33,61,.4); }
.phone .screen { border-radius: 33px; background: var(--app-bg); color: var(--app-fg); height: 560px; padding: 44px 14px 14px; font-size: 13px; overflow: hidden; }
.phone.mid { left: 50%; bottom: -80px; transform: translateX(-50%); z-index: 2; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.phone.l { left: calc(50% - 330px); transform: rotate(-7deg); animation: fanl 1s .25s cubic-bezier(.2,.8,.2,1) both; }
.phone.r { left: calc(50% + 50px); transform: rotate(7deg); animation: fanr 1s .25s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { transform: translateX(-50%) translateY(140px); opacity: 0; } }
@keyframes fanl { from { transform: translateX(170px) rotate(0); opacity: 0; } }
@keyframes fanr { from { transform: translateX(-170px) rotate(0); opacity: 0; } }
.s-title { font-weight: 800; font-size: 22px; margin: 0 0 12px; }
.s-card { background: var(--app-card); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.s-card b { display: block; font-size: 15px; }
.s-card b.s-big { font-size: 28px; }
.s-row + .s-card { margin-top: 10px; }
.s-muted { color: var(--app-fg-2); }
.s-photo { display: block; width: calc(100% + 4px); height: 110px; object-fit: cover; border-radius: 10px; margin: -2px -2px 10px; background: radial-gradient(120% 90% at 30% 20%, #3a4350, #1e242d); }
.s-row { display: flex; justify-content: space-between; padding: 9px 10px; background: var(--app-2); border-radius: 9px; margin-bottom: 7px; }
.s-row.check { box-shadow: inset 0 0 0 1.5px var(--amber); }
.s-pill { display: inline-block; margin-top: 6px; color: var(--amber); background: rgba(245,166,35,.15); padding: 2px 8px; border-radius: 6px; font-weight: 600; font-size: 12px; animation: pop .5s 1.9s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.s-btn { background: var(--orange); color: #fff; text-align: center; border-radius: 12px; padding: 11px; font-weight: 700; margin-top: 12px; }

/* Reminder notifications slide in over the phones, one after another.
   The ring and close shadow outline the top edge, which sits on the white page. */
.toasts { position: absolute; left: 50%; top: 18px; width: min(370px, calc(100% - 32px)); transform: translateX(-50%); z-index: 5; display: grid; }
.toast { grid-area: 1 / 1; display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: start; text-align: left;
  background: #fff; border-radius: 20px; padding: 12px 14px;
  box-shadow: 0 0 0 1px rgba(20,33,61,.07), 0 2px 8px rgba(20,33,61,.07), 0 20px 44px -16px rgba(20,33,61,.5); font-size: 14px; line-height: 1.35;
  animation: toast 12s infinite both; animation-delay: calc(var(--m) * 4s + 1.4s); }
.toast img { display: block; }
.toast b { display: block; font-size: 15px; }
.toast span, .toast time { color: var(--ink-2); }
.toast time { font-size: 12px; }
@keyframes toast { 0% { transform: translateY(-28px) scale(.95); opacity: 0; } 4%, 29% { transform: none; opacity: 1; } 33%, 100% { transform: translateY(-10px) scale(.97); opacity: 0; } }

/* Feature rows */
section.rows { padding: 120px 0 40px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; margin-bottom: 110px; }
.row:nth-child(even) .art { order: 2; }
.art { border-radius: 32px; padding: 44px; display: grid; place-items: center; min-height: 340px; }
.row h2, .more h2, .faq h2 { font-size: clamp(32px, 4.4vw, 52px); }
.row h2 { margin: 0 0 16px; }
.row p { color: var(--ink-2); margin: 0; max-width: 42ch; font-size: 19px; }
.widget { border-radius: 20px; padding: 18px; width: 100%; max-width: 340px; font-size: 15px; }
.widget .wt { font-weight: 700; margin-bottom: 10px; }
.wl { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.wl small { color: var(--ink-2); display: block; font-size: 13px; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.soon-tag { background: var(--sun); color: #8A4B00; } .ok-tag { background: var(--mint); color: #11643C; }
.bigstat { font-weight: 800; font-size: 46px; letter-spacing: -.03em; line-height: 1; }
[data-count] { font-variant-numeric: tabular-nums; }
.bars { margin-top: 14px; }
.meter { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; margin: 6px 0 12px; }
.meter i { display: block; height: 100%; width: var(--w); background: var(--orange); border-radius: 5px; transform-origin: left; }

/* Receipt: a scan line sweeps the receipt, then each line's value and tag appear in turn (--i). */
.beam { display: none; }
.scan { position: relative; overflow: hidden; }
/* The beam covers the whole card with its glow in the bottom 60px, so translating by its own height sweeps the card. */
.js .beam { display: block; position: absolute; inset: 0; pointer-events: none; transform: translateY(-100%);
  background: linear-gradient(transparent calc(100% - 60px), rgba(232,99,10,.16)); border-bottom: 2px solid var(--orange); }
.js .scan.in .beam { animation: beam 3.4s ease-in-out infinite; }
@keyframes beam { 0% { transform: translateY(-100%); } 55%, 100% { transform: translateY(calc(100% + 2px)); } }
.js .scan .v, .js .scan .tag { opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s; transition-delay: calc(.5s + var(--i) * .5s); }
.js .scan .tag { transform: scale(.7); transition-delay: calc(.7s + var(--i) * .5s); }
.js .scan.in .v, .js .scan.in .tag { opacity: 1; transform: none; }

/* Reminder: a little odometer rolls down to the miles left. */
.trip { display: flex; align-items: center; gap: 10px; padding: 12px 0 6px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.mini-odo { display: inline-flex; gap: 3px; }
.mini-odo .d { width: 24px; height: 34px; overflow: hidden; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 700; font-size: 21px; text-align: center; }
.mini-odo .s { display: block; transform: translateY(calc(var(--d) * -34px)); }
.mini-odo .s span { display: block; height: 34px; line-height: 34px; }
.js .mini-odo .s { transform: translateY(-306px); transition: transform 1.8s cubic-bezier(.2,.7,.1,1) calc(var(--i) * .12s); }
.js .in .mini-odo .s { transform: translateY(calc(var(--d) * -34px)); }

/* Bars grow when they scroll into view, one after another (--i). */
.js .meter i { transform: scaleX(0); transition: transform 1.3s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * .15s); }
.js .in .meter i { transform: none; }

/* Buyer report: the status tags stamp on one after another (--i) once the meter has filled. */
.report-card small { color: var(--ink-2); font-size: 13px; }
.report-card .wt small { display: block; font-weight: 400; }
.js .report-card .tag { opacity: 0; transform: scale(.7); transition: opacity .3s, transform .3s; transition-delay: calc(.9s + var(--i) * .35s); }
.js .report-card.in .tag { opacity: 1; transform: none; }
.sample-link { display: inline-block; margin-top: 20px; font-weight: 700; font-size: 19px; }

/* Mileage chart draws itself, and a dot drives along its tip (home.js). */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .line { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: #fff; stroke: var(--orange); stroke-width: 3; }
.chart stop { stop-color: var(--orange); }
.js .chart .line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .chart .area { opacity: 0; transition: opacity .8s 1.4s; }
.js .chart .dot { opacity: 0; transition: opacity .2s; }
.js .in .chart .area, .js .in .chart .dot { opacity: 1; }
.chart-read { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-top: 8px; }

/* Feature chips. Static and wrapped by default; home.js clones each track and adds .loop,
   then the two rows drift past in opposite directions and hovering pauses them. */
.more { padding: 40px 0 100px; }
.more h2, .faq h2 { margin: 0 0 32px; text-align: center; }
.marquee { display: grid; gap: 12px; }
.track { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.marquee:not(.loop) .track.rev { display: none; }
.marquee.loop { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.loop .track { flex-wrap: nowrap; justify-content: flex-start; width: max-content; animation: slide 60s linear infinite; }
.loop .track.rev { animation-direction: reverse; }
.marquee.loop:hover .track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(calc(-50% - 6px)); } }
.chip { background: var(--sky); border-radius: 999px; padding: 12px 20px; font-weight: 600; white-space: nowrap; }
.chip:nth-child(3n+2) { background: var(--mint); } .chip:nth-child(3n) { background: var(--lilac); }

/* Launch notifications. The button is ink so it doesn't compete with the orange App Store badge.
   home.js posts the form in place and sets .err / .done; without it the API redirects to /joined. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.notify { max-width: 460px; margin: 28px auto 0; }
.notify-row { display: flex; gap: 8px; }
.notify input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-size: 17px; }
.notify input:focus-visible { outline: none; border-color: var(--orange); }
.notify button { height: 52px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--ink); color: #fff; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.notify button:disabled { opacity: .6; cursor: progress; }
.notify-note { margin: 10px 0 0; font-size: 15px; color: var(--ink-2); }
.notify.err .notify-note { color: #A3261B; font-weight: 600; }
.notify.done .notify-row { display: none; }
.notify.done .notify-note { margin-top: 0; font-size: 18px; color: var(--ink); font-weight: 700; }

/* Questions */
.faq { padding-top: 80px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.signup { margin-top: 96px; border-radius: 32px; padding: 56px 24px; text-align: center; }
.signup h2 { font-size: clamp(32px, 4.4vw, 52px); margin: 0; }

@media (max-width: 860px) {
  .row { grid-template-columns: 1fr; gap: 32px; margin-bottom: 72px; }
  .row:nth-child(even) .art { order: 0; }
  .art { padding: 28px 20px; min-height: 0; }
  .phone.l, .phone.r { display: none; }
  .phones { height: 520px; }
  section.rows { padding-top: 80px; }
  .signup { margin-top: 72px; padding: 40px 20px; border-radius: 24px; }
}
@media (max-width: 420px) {
  .notify input, .notify button { font-size: 16px; }
  .notify button { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .phone, .s-pill, .toast { animation: none !important; }
  .js .scan .v, .js .scan .tag, .js .report-card .tag, .js .meter i, .js .mini-odo .s, .js .chart .area { transition: none !important; }
  .toast:not(:first-child), .js .beam { display: none; }
}
