/* Home page (/): the rider's story told with code-native SVG — a parked bike
   armed at night (hero), four illustrated benefits (bento), a four-panel
   storyboard, check-in cadence strips, an ownership-check scene on the
   security deck and a ride-off scene in the CTA. Draws with the kit in art.css
   (.tb-art, .a-*, and its real-world palette: the orange bike, the graphite
   tracker, map land/parks/water/roads, moonlight and lamplight); this bundle
   holds layout plus a few home-only primitives (hm-*). Every animation here
   stops under prefers-reduced-motion.
   Loaded via $page_styles = ['marketing', 'art', 'home']. */

/* ═══════════ Home-only drawing primitives ═══════════ */
.tb-art { --hm-alert: var(--warn); --hm-alert-soft: var(--warn-soft); --hm-live: var(--ok); }
:root .deck .tb-art { --hm-alert: #fbbf24; --hm-alert-soft: rgba(251, 191, 36, 0.16); --hm-live: #4ade80; }
.tb-art .hm-alert-soft { fill: var(--hm-alert-soft); }
.tb-art .hm-alert { fill: var(--hm-alert); }
.tb-art .hm-ico-alert { color: var(--hm-alert); }
.tb-art .hm-ring-alert { stroke: var(--hm-alert); }
.tb-art .hm-live { fill: var(--hm-live); }
.tb-art .hm-solid { fill: var(--art-surface); }
.tb-art .hm-dash { stroke-dasharray: 4 6; }
.tb-art .hm-knob { fill: #fff; }
.tb-art .hm-core { stroke: var(--art-surface); stroke-width: 3; }
.tb-art .hm-knob-ring { fill: var(--art-surface); stroke: var(--art-primary); stroke-width: 2.5; }
/* Lit windows at night (warm lamplight), and a river on a phone's map: a
   water-coloured ribbon drawn over its darker casing (--edge first). */
.tb-art .hm-window { fill: var(--art-lamp); fill-opacity: 0.6; }
.tb-art .hm-river { fill: none; stroke: var(--art-water); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.tb-art .hm-river--edge { stroke: var(--art-water-edge); stroke-opacity: 0.7; stroke-width: 10; }
.tb-art .hm-zone { fill: var(--art-cyan-soft); stroke: var(--art-glow); stroke-opacity: 0.6; stroke-width: 1.5; stroke-dasharray: 5 7; animation: hm-march 1.6s linear infinite; }
.tb-art .hm-rider { fill: none; stroke: var(--art-ink); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.tb-art .hm-rider--far { stroke-opacity: 0.55; }
.tb-art .hm-head { fill: var(--art-ink); }
/* A nearer, greener hill in front of .a-hill (touring scene). */
.tb-art .hm-hill-2 { fill: var(--art-park); }
.tb-art .hm-lane { fill: none; stroke: var(--art-line); stroke-opacity: 0.4; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 18 26; animation: hm-lane 0.9s linear infinite; }
.tb-art .hm-ahead { fill: none; stroke: var(--art-glow); stroke-opacity: 0.35; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 8; }
/* A label group (chip, notification) that grows on phones so its text stays
   legible; it scales about its own box (bottom-right corner for --br). */
.tb-art .hm-grow { transform-box: fill-box; transform-origin: 50% 50%; }
.tb-art .hm-grow--br { transform-origin: 100% 100%; }
/* motion */
.tb-art .hm-nudge { transform-box: view-box; transform-origin: 120px 392px; animation: hm-nudge 4.8s var(--ease-standard) infinite; }
.tb-art .hm-nudge--step { transform-origin: 38px 170px; }
.tb-art .hm-float { animation: hm-float 3.2s ease-in-out infinite; }
.tb-art .hm-wheel { transform-box: fill-box; transform-origin: center; animation: art-spin 1.4s linear infinite; }
.tb-art .hm-draw { stroke-dasharray: 1 1; animation: hm-draw 6s var(--ease-standard) infinite; }
.tb-art .hm-progress { transform-box: fill-box; transform-origin: left center; animation: hm-progress 6s var(--ease-standard) infinite; }
.tb-art .hm-scrub { animation: hm-scrub 6s var(--ease-standard) infinite; }
.tb-art .hm-d1 { animation-delay: 0.5s; }
.tb-art .hm-d2 { animation-delay: 1s; }
.tb-art .hm-d3 { animation-delay: 1.5s; }
@keyframes hm-march { to { stroke-dashoffset: -24; } }
@keyframes hm-lane { to { stroke-dashoffset: 44; } }
@keyframes hm-nudge { 0%, 62%, 100% { transform: rotate(0); } 66% { transform: rotate(-1.8deg); } 70% { transform: rotate(1.2deg); } 74% { transform: rotate(-0.8deg); } 78% { transform: rotate(0); } }
@keyframes hm-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes hm-draw { 0% { stroke-dashoffset: 1; } 80%, 100% { stroke-dashoffset: 0; } }
@keyframes hm-progress { 0% { transform: scaleX(0); } 80%, 100% { transform: scaleX(1); } }
@keyframes hm-scrub { 0% { transform: translateX(-186px); } 80%, 100% { transform: translateX(114px); } }

/* ═══════════ Hero: day in the light theme, night in the dark ═══════════ */
/* The hero left the command deck (which is always night): by day it is a
   pale sky over the street with the sun up, in the dark theme the deck's navy
   with its glows and the moon. The scene's .a-day / .a-night groups follow
   the same rule (art.css). Its own properties (--hh-*) carry the text, pill
   and link colours per theme; the dark values match the deck. */
.hm-hero {
    --hh-text: var(--text); --hh-muted: var(--text-muted);
    --hh-link: var(--primary-strong); --hh-ico: var(--accent); --hh-rule: var(--border-strong);
    --hh-pill-bg: var(--accent-soft); --hh-pill: var(--accent); --hh-pill-border: color-mix(in srgb, var(--accent) 35%, transparent);
    --hh-grad: linear-gradient(120deg, var(--primary-strong), var(--accent) 55%, var(--violet));
    --deck-grid: rgba(29, 78, 216, 0.07);
    position: relative; overflow: hidden; isolation: isolate; color: var(--hh-text);
    background:
        radial-gradient(820px 380px at 88% -6%, rgba(251, 191, 36, 0.20), transparent 60%),
        radial-gradient(760px 360px at 4% 104%, rgba(34, 211, 238, 0.14), transparent 60%),
        linear-gradient(180deg, #d4eafb 0%, #e8f2fb 58%, var(--bg) 100%);
}
:root[data-theme="dark"] .hm-hero {
    --hh-text: var(--deck-text); --hh-muted: var(--deck-muted);
    --hh-link: #a5f3fc; --hh-ico: #67e8f9; --hh-rule: var(--deck-border);
    --hh-pill-bg: rgba(103, 232, 249, 0.10); --hh-pill: #a5f3fc; --hh-pill-border: rgba(103, 232, 249, 0.32);
    --hh-grad: linear-gradient(120deg, #93c5fd, #67e8f9 55%, #c4b5fd);
    --deck-grid: rgba(103, 232, 249, 0.09);
    background: var(--grad-deck);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hm-hero {
        --hh-text: var(--deck-text); --hh-muted: var(--deck-muted);
        --hh-link: #a5f3fc; --hh-ico: #67e8f9; --hh-rule: var(--deck-border);
        --hh-pill-bg: rgba(103, 232, 249, 0.10); --hh-pill: #a5f3fc; --hh-pill-border: rgba(103, 232, 249, 0.32);
        --hh-grad: linear-gradient(120deg, #93c5fd, #67e8f9 55%, #c4b5fd);
        --deck-grid: rgba(103, 232, 249, 0.09);
        background: var(--grad-deck);
    }
}
.hm-hero h1, .hm-hero strong { color: var(--hh-text); }
.hm-hero h1 .gradient-text { background-image: var(--hh-grad); }
.hm-hero .lede, .hm-hero .hero-tertiary, .hm-hero .hero-proof li { color: var(--hh-muted); }
.hm-hero .hero-tertiary a { color: var(--hh-link); }
.hm-hero .status-pill { background: var(--hh-pill-bg); color: var(--hh-pill); border-color: var(--hh-pill-border); }
.hm-hero .hero-proof { border-top-color: var(--hh-rule); }
.hm-hero .hero-proof li .ic { color: var(--hh-ico); }
/* The ghost button on the night hero, as on the deck (components.css). */
:root[data-theme="dark"] .hm-hero .btn-ghost { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.28); color: #fff; }
:root[data-theme="dark"] .hm-hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); color: #fff; }
:root[data-theme="dark"] .hm-hero .btn-primary { box-shadow: var(--glow-accent); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hm-hero .btn-ghost { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.28); color: #fff; }
    :root:not([data-theme="light"]) .hm-hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); color: #fff; }
    :root:not([data-theme="light"]) .hm-hero .btn-primary { box-shadow: var(--glow-accent); }
}
/* Daytime clouds in the hero sky. */
.tb-art .hm-cloud { fill: var(--art-surface); fill-opacity: 0.92; }
@media (min-width: 961px) { .hm-hero .home-hero-inner { grid-template-columns: 1fr 1.08fr; } }
.hm-hero__art { position: relative; margin: 0; }
.hm-hero__art::before {
    content: ''; position: absolute; inset: 6% 2% 12%; z-index: -1; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(34, 211, 238, 0.14), transparent); filter: blur(8px);
}

/* ═══════════ The app and the dashboard ═══════════ */
/* The two-screen scene beside two columns, one per screen, each with its
   checklist and its link; stacked on narrow screens (the columns side by
   side while there is room). */
.hm-screens { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--sp-6); align-items: center; }
.hm-screens__art {
    position: relative; margin: 0; padding: var(--sp-4) var(--sp-4) var(--sp-3); overflow: hidden;
    border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    background: radial-gradient(120% 100% at 50% 0%, var(--primary-soft), transparent 72%), var(--surface-inset);
}
.hm-screens__art svg:not(.ic) { max-width: 640px; margin-inline: auto; }
.hm-screens__cols { display: grid; gap: var(--sp-4); }
.hm-screens__col { padding: var(--sp-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.hm-screens__col h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 0 0 var(--sp-3); }
.hm-screens__col .btn { margin-top: var(--sp-4); }
.hm-screens__col .field__hint { display: block; margin-top: 8px; }
/* A checklist whose ticks take the card's hue. */
.hm-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hm-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--text-muted); }
.hm-checks li .ic { flex-shrink: 0; margin-top: 4px; font-size: 13px; color: var(--tint, var(--primary-strong)); }

/* ═══════════ Who it's for ═══════════ */
.hm-who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.hm-who__card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.hm-who__art {
    margin: 10px 10px 0; padding: var(--sp-3); border: 1px solid var(--border); border-radius: calc(var(--radius-lg) - 6px);
    background: radial-gradient(120% 100% at 50% 0%, var(--tint-soft, var(--primary-soft)), transparent 72%), var(--surface-inset);
}
.hm-who__art svg:not(.ic) { max-width: 320px; margin-inline: auto; }
.hm-who__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; gap: 10px; }
.hm-who__body h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; }
.hm-who__body h3::before { content: ''; flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--tint, var(--primary)); }
.hm-who__body > p { margin: 0; font-size: 15px; color: var(--text-muted); }

/* ═══════════ Questions ═══════════ */
/* Native <details>: the chevron turns when open; keyboard focus shows the
   site's ring on the summary. */
.hm-faq { max-width: 820px; margin: 0 auto; display: grid; gap: var(--sp-3); }
.hm-faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.hm-faq__item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: 16px 20px; cursor: pointer; border-radius: var(--radius); font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); }
.hm-faq__item summary::-webkit-details-marker { display: none; }
.hm-faq__item summary .ic { flex-shrink: 0; color: var(--primary-strong); transition: transform var(--dur) var(--ease); }
.hm-faq__item[open] summary .ic { transform: rotate(180deg); }
.hm-faq__item summary:hover { background: var(--surface-2); }
.hm-faq__item summary:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.hm-faq__item[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.hm-faq__body { padding: 2px 20px 18px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.hm-faq__body p { margin: 0; }
.hm-faq__body p + p { margin-top: 8px; }
.hm-faq__body a { color: var(--primary-strong); font-weight: 600; }

/* ═══════════ Benefits bento ═══════════ */
.hm-bento { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.hm-benefit { padding: 0; display: flex; flex-direction: column; }
.hm-benefit--wide { grid-column: span 2; flex-direction: row; align-items: stretch; }
.hm-benefit__art {
    position: relative; margin: 10px 10px 0; padding: var(--sp-4); overflow: hidden;
    border: 1px solid var(--border); border-radius: calc(var(--radius-lg) - 6px);
    background: radial-gradient(120% 100% at 50% 0%, var(--primary-soft), transparent 72%), var(--surface-inset);
}
.hm-benefit--wide .hm-benefit__art { flex: 1.7 1 0; margin: 10px 0 10px 10px; display: flex; align-items: center; }
.hm-benefit__body { position: relative; padding: var(--sp-5); }
.hm-benefit--wide .hm-benefit__body { flex: 1 1 0; display: flex; flex-direction: column; justify-content: center; padding: var(--sp-6); }
.hm-benefit .icon { display: flex; background: var(--surface); box-shadow: inset 0 0 0 100px var(--tint-soft, var(--primary-soft)), 0 0 0 4px var(--surface), var(--shadow-sm); color: var(--tint, var(--primary-strong)); }
.hm-benefit:not(.hm-benefit--wide) .icon { margin-top: calc(-22px - var(--sp-5)); margin-bottom: var(--sp-3); }
.hm-benefit--wide h3 { font-size: 20px; }
.hm-benefit--wide p { font-size: 15px; }
.hm-nowrap { white-space: nowrap; }

/* ═══════════ Storyboard (how it works) ═══════════ */
.hm-story { list-style: none; margin: 0; padding: 64px 0 0; position: relative; }
.hm-story::before {
    content: ''; position: absolute; top: 19px; height: 3px; border-radius: 2px;
    left: calc((100% - 3 * var(--sp-4)) / 8); right: calc((100% - 3 * var(--sp-4)) / 8);
    background: linear-gradient(90deg, var(--primary), var(--accent-bright));
}
.hm-story::after {
    content: ''; position: absolute; top: 15px; width: 11px; height: 11px; border-radius: 50%;
    left: calc((100% - 3 * var(--sp-4)) / 8); background: var(--accent-bright); box-shadow: 0 0 0 4px var(--accent-soft);
    animation: hm-rail 6s linear infinite;
}
@keyframes hm-rail { 0% { left: calc((100% - 3 * var(--sp-4)) / 8); opacity: 0; } 8% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - (100% - 3 * var(--sp-4)) / 8); opacity: 0; } }
/* z-index lifts each step (and its badge) above the travelling rail dot: .reveal's
   transform makes every step its own stacking context. */
.hm-step { padding: 0; display: flex; flex-direction: column; overflow: visible; z-index: 1; }
.hm-step .num { position: absolute; top: -64px; left: 50%; margin: 0; transform: translateX(-50%); box-shadow: 0 0 0 6px var(--surface-2), var(--shadow-sm); z-index: 1; }
.hm-step__art {
    padding: var(--sp-3) var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: radial-gradient(120% 100% at 50% 0%, var(--primary-soft), transparent 72%), var(--surface-inset);
}
.hm-step__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.hm-note { margin: var(--sp-5) 0 0; text-align: center; font-size: 13px; color: var(--text-dim); }
.hm-more { margin: var(--sp-3) 0 0; text-align: center; font-size: 15px; color: var(--text-muted); }
.hm-more a { color: var(--primary-strong); font-weight: 600; white-space: nowrap; }
.hm-note .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--series-1); margin-right: 6px; vertical-align: 0; }
.hm-note .dot + .dot { margin-left: -3px; background: var(--warn); }

/* ═══════════ Tracking profiles ═══════════ */
.hm-cadence svg:not(.ic) { max-width: 300px; margin-inline: auto; }
.hm-cadence { margin: calc(-1 * var(--sp-5)) calc(-1 * var(--sp-5)) 4px; padding: 10px 16px; border-bottom: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--surface-inset); }

/* ═══════════ Security band ═══════════ */
.hm-sec__art { margin: var(--sp-6) 0 0; }

/* ═══════════ CTA: ride-off scene ═══════════ */
.hm-ride { margin: var(--sp-6) auto calc(-1 * var(--sp-8)); max-width: 820px; }
.hm-ride svg:not(.ic) { height: clamp(104px, 15vw, 150px); }

/* ═══════════ Responsive ═══════════ */
@media (max-width: 1024px) {
    .hm-story { padding-top: 0; }
    .hm-story::before, .hm-story::after { display: none; }
    .hm-step .num { order: 1; align-self: flex-start; position: static; transform: none; margin: -20px 0 0 var(--sp-5); box-shadow: 0 0 0 4px var(--surface), var(--shadow-sm); }
    .hm-step__body { order: 2; padding-top: var(--sp-3); }
    /* The badge now overlaps the art's bottom edge: keep the scene's ground line clear of it,
       and cap the drawings so their labels stay quieter than the step titles. */
    .hm-step__art { padding-bottom: var(--sp-4); }
    .hm-step__art svg:not(.ic) { max-width: 300px; margin-inline: auto; }
}
@media (max-width: 960px) {
    .hm-screens { grid-template-columns: 1fr; }
    .hm-screens__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-who { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
    .hm-bento { grid-template-columns: repeat(2, 1fr); }
    .hm-benefit--wide { grid-column: auto; flex-direction: column; }
    .hm-benefit--wide .hm-benefit__art { flex: none; margin: 10px 10px 0; display: block; }
    .hm-benefit--wide .hm-benefit__body { padding: var(--sp-5); }
    .hm-benefit--wide .icon { margin-top: calc(-22px - var(--sp-5)); margin-bottom: var(--sp-3); }
    .hm-benefit--wide h3 { font-size: 17px; }
    .hm-benefit--wide p { font-size: 14px; }
    /* Every card now pulls its icon badge up into the art: keep the drawing clear of it. */
    .hm-benefit__art { padding-bottom: 22px; }
    .hm-benefit__art svg:not(.ic) { max-width: 400px; margin-inline: auto; }
    .hm-hero__art { max-width: 620px; margin-inline: auto; }
    .hm-sec__art { max-width: 560px; margin-inline: auto; }
}
/* Below ~760px two bento columns squeeze the drawings until their labels are too small to read. */
@media (max-width: 760px) { .hm-bento { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
    .hm-screens__cols { grid-template-columns: 1fr; }
    .hm-ride { margin-top: var(--sp-5); }
    .hm-benefit__art { padding: 14px 8px 22px; }
}

@media (max-width: 560px) {
    .hm-hero__art { margin-inline: calc(-1 * var(--page-x) + 8px); }
    .hm-hero__art .a-text--lg, .hm-sec__art .a-text--lg { font-size: 19px; }
    .hm-hero__art .hm-grow { transform: scale(1.3); }
    /* One column: the steps hang off a vertical timeline, one connector per gap. */
    .hm-story { padding-left: 52px; }
    .hm-step__art { padding-bottom: var(--sp-2); }
    .hm-step .num { position: absolute; top: 0; left: -52px; margin: 0; box-shadow: 0 0 0 5px var(--surface-2), var(--shadow-sm); }
    .hm-step:not(:last-child)::before {
        content: ''; position: absolute; left: -33.5px; top: 40px; bottom: calc(-1 * var(--sp-4)); width: 3px; border-radius: 2px;
        background: linear-gradient(180deg, var(--primary), var(--accent-bright));
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-faq__item summary .ic { transition: none; }
    .tb-art .hm-zone, .tb-art .hm-lane, .tb-art .hm-nudge, .tb-art .hm-float, .tb-art .hm-wheel,
    .tb-art .hm-draw, .tb-art .hm-progress, .tb-art .hm-scrub { animation: none; }
    .tb-art .hm-draw { stroke-dasharray: none; }
    .tb-art .hm-progress { transform: scaleX(0.62); }
    .hm-story::after { display: none; }
}
