/* v=9 (FG14: bump it, and every /_site.css?v= reference, when this file changes) */
/* RallyPro marketing pages (2026-11 revamp, IA-WEB-09): the v3 store look on
   the web: court-green Inter Black headlines at the store's tracking, lime
   panels, straight phones with the real app, and the App Store scene as the
   home hero (morning in light mode, floodlights in dark mode). Colours come
   from /_tokens.css; lime is the same in both themes, so text on lime is
   always --accent-text. The "moment" tokens are the fixed dark palette for
   brand moments that stay dark in both themes (THEME-012). Linked by the
   marketing pages only (not the dashboard); links carry ?v=N. */

:root {
  --on-lime: var(--accent-text);
  --on-lime-muted: color-mix(in srgb, var(--accent-text) 80%, var(--accent));
  --on-lime-line: color-mix(in srgb, var(--accent-text) 11%, transparent);
  --bezel: color-mix(in srgb, var(--accent-text) 88%, black);
  --bezel-edge: color-mix(in srgb, var(--accent-text) 70%, var(--accent) 8%);
  --phone-shadow: color-mix(in srgb, var(--accent-text) 42%, transparent);
  --canvas-r: 36px;
  /* Fixed dark moment (the cut timeline): the same in both themes. */
  --moment-bg: var(--accent-text);
  --moment-ink: #F4FBE8;
  --moment-muted: color-mix(in srgb, var(--moment-ink) 70%, transparent);
  --moment-line: color-mix(in srgb, var(--moment-ink) 16%, transparent);
  --moment-lime: var(--accent);
  --moment-gold: #FFB23F;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
/* No Tailwind reset here: without this, display rules (img below) beat the
   hidden attribute, so the avatar's empty photo took up room before sign-in. */
[hidden]:not([hidden="until-found"]) { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  accent-color: var(--accent-ink);
}
body { margin: 0; background: var(--bg-grad-to); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
ul, ol { margin: 0; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { text-wrap: pretty; margin: 0; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-text); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: var(--text); color: var(--bg-grad-to); font-weight: 700; transition: top var(--d-pop) var(--e-out); }
.skip:focus-visible { top: 12px; outline-offset: 3px; }
.header { background: color-mix(in srgb, var(--bg-grad-to) 86%, transparent); }

/* ── Type (the store set's lettering: Inter Black, -0.045em) ──────────── */
.display { font-weight: 900; letter-spacing: -0.045em; line-height: 0.96; font-size: clamp(2.75rem, 5.6vw, 4.9rem); }
.display-md { font-weight: 900; letter-spacing: -0.042em; line-height: 0.98; font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
.display-sm { font-weight: 900; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.lede { font-size: clamp(1.06rem, 1.45vw, 1.25rem); line-height: 1.5; font-weight: 500; letter-spacing: -0.006em; color: var(--text-muted); }

/* ── Buttons on lime ──────────────────────────────────────────────────── */
.btn-court, .lime .btn-primary { background: var(--on-lime); color: var(--accent); border-color: transparent; }
.btn-court:hover, .lime .btn-primary:hover { background: var(--bezel); box-shadow: 0 14px 30px -16px var(--phone-shadow); }
.btn-on-lime-ghost { background: transparent; color: var(--on-lime); border-color: color-mix(in srgb, var(--accent-text) 30%, transparent); }
.btn-on-lime-ghost:hover { background: var(--on-lime-line); }
.lime :focus-visible { outline-color: var(--on-lime); }
/* The global ring is lime, which vanishes on white: light pages get the
   deep-green accent ink instead (no weight, so local rings still win). */
:where(html.theme-light) :focus-visible { outline-color: var(--accent-ink); }
/* Lime ring on the lime field would vanish (dark mode's accent ink is lime). */
.lime .store-btn:focus-visible { outline-color: var(--on-lime); }
/* Closed, the account menu leaves the tab order too (it only faded before). */
.user-pop { visibility: hidden; transition: opacity var(--d-pop) var(--e-out), transform var(--d-pop) var(--e-out), visibility 0s linear var(--d-pop); }
.user-pop.is-open { visibility: visible; transition-delay: 0s; }
/* The avatar is a <button>, so without a reset it kept the browser's button
   padding and its photo sat as a small rectangle inside the lime circle. The
   photo now covers the whole circle; until it loads, the initial shows. */
.user-avatar { position: relative; padding: 0; }
.user-avatar img { position: absolute; inset: 0; border-radius: inherit; }
/* Once the photo has loaded (script), no lime under it, or it shows as a
   hairline round the photo's edge. */
.user-avatar.has-photo { background: none; }

/* ── The lime canvas ──────────────────────────────────────────────────── */
.lime { position: relative; isolation: isolate; overflow: hidden; background: var(--accent); color: var(--on-lime); border-radius: var(--canvas-r); }
.lime .lede { color: var(--on-lime-muted); }
.lime-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 55% at 62% 22%, color-mix(in srgb, var(--moment-ink) 34%, transparent), transparent 70%); }
/* The store panels' court: a top-view outline, turned a few degrees, kept
   behind the phones so no line ever crosses a headline. */
.court-art { position: absolute; left: -12%; right: -12%; bottom: 0; height: 74%; z-index: -1; pointer-events: none; }
.court-art svg { width: 100%; height: 100%; display: block; }
.court-art * { fill: none; stroke: var(--on-lime-line); stroke-width: 4; vector-effect: non-scaling-stroke; }

/* ── Phone ────────────────────────────────────────────────────────────── */
.phone {
  --w: 300px;
  position: relative; width: var(--w); flex: none;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.155);
  background: var(--bezel);
  box-shadow: inset 0 0 0 1.5px var(--bezel-edge), 0 44px 80px -34px var(--phone-shadow), 0 18px 34px -24px var(--phone-shadow);
}
.phone img, .phone .screens { width: 100%; height: auto; aspect-ratio: 600 / 1304; border-radius: calc(var(--w) * 0.125); background: var(--accent-text); }
.phone::after { content: ""; position: absolute; left: 50%; top: calc(var(--w) * 0.058); width: 30%; height: calc(var(--w) * 0.085);
  translate: -50% 0; border-radius: 999px; background: var(--bezel); }
/* The phone screens follow the page's theme (IA-WEB-12): the app's light
   captures by day, its dark ones at night. Both twins are lazy, so the hidden
   one is fetched only if the visitor flips the theme. */
html.theme-light .shot-dark, html:not(.theme-light) .shot-light { display: none; }
/* By day a screen still loading (or just flipped to light) waits on a light
   backing, not the dark one. */
html.theme-light .phone img, html.theme-light .phone .screens { background: var(--surface-2); }

/* ── Sections ─────────────────────────────────────────────────────────── */
.sec { padding-block: clamp(64px, 9vw, 120px); }
.sec-head { max-width: 46rem; }
.sec-head .lede { margin-top: 18px; }
.more { margin-top: 32px; }
.more a { font-weight: 700; color: var(--accent-ink); display: inline-flex; gap: 8px; align-items: center; text-underline-offset: 4px; }
.more a:hover { text-decoration: underline; }

/* ── What RallyPro gives you (owner 2026-11-11): the four things under the
   hero phones, the same four as the store hero and the Instagram post. ─── */
.gives { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 40px; padding-block: 0; }
.gives li { display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 14px 16px; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--border); font-weight: 800; font-size: 16px; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
.gives .gi { flex: none; width: 46px; height: 46px; border-radius: var(--r-lg); display: grid; place-items: center;
  color: var(--accent-ink); border: 2px solid currentColor; }
@media (max-width: 1099px) { .gives { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; } }
@media (max-width: 520px) { .gives { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gives li { min-height: 0; padding: 11px 14px; } .gives .gi { width: 40px; height: 40px; } }

.footer-tm { max-width: 72ch; font-size: var(--text-xs); line-height: 1.5; color: var(--text-muted); }

/* ── Closing: one app row, App Store style ────────────────────────────── */
.closing { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 48px; align-items: center;
  padding: clamp(36px, 6vw, 72px) clamp(24px, 5vw, 64px); border-radius: var(--canvas-r);
  background: var(--surface-solid); border: 1px solid var(--border); }
.app-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-items: center; min-width: 300px; }
.app-ic { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px var(--border-strong), 0 10px 24px -14px var(--phone-shadow); }
.app-meta b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.app-meta span { display: block; font-size: 14px; color: var(--text-muted); line-height: 1.4; }
.app-row .btn { grid-column: 1 / -1; justify-content: center; }
@media (max-width: 760px) { .closing { grid-template-columns: 1fr; } .app-row { min-width: 0; } }

/* ── One real set: what was filmed, then what you watch (How it works) ── */
.tl { margin: 0; background: var(--moment-bg); color: var(--moment-ink); border-radius: 20px; padding: 14px 16px 12px;
  box-shadow: 0 30px 60px -30px var(--phone-shadow), 0 0 0 1px var(--moment-line); }
.tl-track { position: relative; height: 30px; margin-top: 10px; container-type: inline-size; }
.tl-ghost, .tl-bg { position: absolute; inset: 0; border-radius: 7px; }
.tl-ghost { border: 1px dashed var(--moment-line); }
.tl-bg { background: color-mix(in srgb, var(--moment-ink) 9%, transparent); clip-path: inset(0 0 0 0 round 7px); }
.seg { position: absolute; top: 6px; bottom: 6px; left: calc(var(--x) * 1%); width: max(3px, calc(var(--w) * 1%));
  border-radius: 2px; background: var(--moment-lime); box-shadow: 1px 0 0 var(--moment-bg); }
.seg.ex { background: var(--moment-gold); }
/* The static pair (How it works): what was filmed, then what you watch. */
.tl-pair .row { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) 3.4rem; gap: 12px; align-items: center; }
.tl-pair .row + .row { margin-top: 6px; }
.tl-pair .row .tl-track { margin-top: 0; }
.tl-pair .lbl { font-size: 12.5px; font-weight: 700; color: var(--moment-muted); }
.tl-pair .row b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.tl-pair .row.cut b { color: var(--moment-lime); }
.tl-pair .note { margin-top: 10px; font-size: 12.5px; color: var(--moment-muted); }
/* ── App tour ─────────────────────────────────────────────────────────── */
.tour { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 32px 64px; align-items: center; margin-top: 48px; }
.tour-tabs { display: flex; flex-direction: column; }
.tour-tab { position: relative; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 18px 0 16px; cursor: pointer; color: var(--text-muted); transition: color var(--d-pop) var(--e-out); }
.tour-tab:hover, .tour-tab.is-on { color: var(--text); }
.tour-tab .tt-short { display: none; }
.tour-tab .tt-long { display: block; font-size: clamp(1.3rem, 2.1vw, 1.7rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1.06; }
.tour-tab:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; border-radius: 10px; }
.tt-bar { display: block; height: 3px; margin-top: 12px; border-radius: 3px; overflow: hidden; background: transparent; }
.tour-tab.is-on .tt-bar { background: var(--border); }
.tt-bar i { display: block; height: 100%; background: var(--accent-ink); transform-origin: left; transform: scaleX(0); }
.tour-tab.is-on .tt-bar i { transform: scaleX(1); }
.tour.is-auto .tour-tab.is-on .tt-bar i { animation: ttFill var(--tour-step, 5200ms) linear both; }
.tour.is-paused .tour-tab.is-on .tt-bar i { animation-play-state: paused; }
@keyframes ttFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
html:not(.js) .tour-tabs { display: none; }
.tour-panel:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 6px; border-radius: var(--canvas-r); }
.tour-stage { height: 580px; display: flex; justify-content: center; padding-top: 56px; }
/* A step fades the new screen in over the old one, which stays put until it
   is covered, so the phone's backing never shows through mid-fade. Isolation
   keeps the raised slide under the phone's notch pill. */
.tour-stage .screens { position: relative; isolation: isolate; }
.tour-shot { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; opacity: 0; transform: translateY(14px) scale(.985);
  transition: opacity 0s linear 560ms, transform 0s linear 560ms; }
.tour-shot.is-on { z-index: 1; opacity: 1; transform: none; transition: opacity 420ms var(--e-out), transform 560ms var(--e-out); }
/* Every caption sits in one grid cell, so the tallest sets the height and a
   change never moves the page below. */
.tour-caps { margin-top: 20px; display: grid; }
.tour-cap { grid-area: 1 / 1; }
.tour-cap h3 { display: none; }
.tour-cap p { font-size: 17px; line-height: 1.55; color: var(--text-muted); max-width: 34rem; }
.js .tour-cap { transition: opacity var(--d-pop) var(--e-out), visibility 0s linear var(--d-pop); }
.js .tour-cap:not(.is-on) { opacity: 0; visibility: hidden; }
.js .tour-cap.is-on { transition-delay: 0s; }
/* Shown only while the tour steps through on its own (WCAG 2.2.2). */
.tour-stop { position: absolute; top: 14px; right: 14px; z-index: 3; width: 44px; height: 44px; border-radius: 999px; border: 0; cursor: pointer;
  display: none; place-items: center; color: var(--accent); background: var(--on-lime); transition: scale var(--d-press) var(--e-press); }
.tour-stop:active { scale: .94; }
.tour.is-auto .tour-stop { display: grid; }
html:not(.js) .tour-caps { display: block; }
html:not(.js) .tour-cap + .tour-cap { margin-top: 14px; }
@media (max-width: 900px) {
  .tour { grid-template-columns: 1fr; gap: 18px; margin-top: 32px; }
  .tour-tabs { flex-direction: row; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
    margin-inline: -24px; padding: 2px 24px 4px; scroll-padding-inline: 24px; }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tab { flex: none; min-height: 44px; border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 15px; scroll-snap-align: start; }
  .tour-tab.is-on { background: var(--text); color: var(--bg-grad-to); border-color: transparent; }
  .tour-tab .tt-long, .tt-bar { display: none; }
  .tour-tab .tt-short { display: inline; }
  .tour-stage { height: 440px; padding-top: 36px; }
  .tour-stage .phone { --w: 236px !important; }
  .tour-cap h3 { display: block; margin-bottom: 8px; }
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq { max-width: 46rem; margin: 32px auto 0; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { flex: none; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); transition: rotate var(--d-pop) var(--e-out); }
.faq details[open] summary .chev { rotate: 45deg; }
.faq details p { padding: 0 20px 18px; color: var(--text-muted); line-height: 1.6; font-size: 15px; max-width: 62ch; }
.faq summary:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: var(--r-xl); }

/* ── Entrance (animation-fill: a parse failure degrades to visible) ───── */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes phoneIn { from { opacity: 0; transform: translateY(44px); } to { opacity: 1; transform: none; } }
.js .in-1 { animation: rise var(--d-reveal) var(--e-out) 40ms both; }
.js .in-2 { animation: rise var(--d-reveal) var(--e-out) 110ms both; }
.js .in-3 { animation: rise var(--d-reveal) var(--e-out) 180ms both; }
.js .in-phone { animation: phoneIn 880ms var(--e-out) 200ms both; }
.js .in-phone.late { animation-delay: 340ms; }
.js .in-late { animation: rise var(--d-reveal) var(--e-out) 600ms both; }
@media (prefers-reduced-motion: reduce) {
  .js .in-1, .js .in-2, .js .in-3, .js .in-phone, .js .in-late { animation: none; }
}

/* Without script the tour is a plain stack: the first screen and every caption. */
html:not(.js) .tour { grid-template-columns: minmax(0, 1fr); max-width: 640px; }

/* ── Store buttons: straight to the App Store and Google Play (IA-WEB-06) ──
   Apple's and Google's official badges (web/brand/stores; owner 2026-11-11:
   the stores' logos on the buttons). Never restyled or recoloured: the same
   height, at least a quarter of their height apart. Script puts the
   visitor's own store first. */
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.store-btn { display: inline-flex; flex: none; border-radius: 9px;
  transition: transform var(--d-pop) var(--e-out), scale var(--d-press) var(--e-press); }
.store-btn img { display: block; height: 54px; width: auto; }
.store-btn:hover { transform: translateY(-1px); }
.store-btn:active { scale: .97; }
.store-btn:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.how-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-underline-offset: 4px; }
.how-link:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .store-btn img { height: 48px; }
}

/* ── The scene hero (home): the headline in the scene's sky ─────────────── */
.night { position: relative; overflow: hidden; isolation: isolate; background: var(--moment-bg); color: var(--moment-ink);
  height: max(52.9vw, 600px); }
.night-media { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 100%; z-index: -1; }
.night-copy { text-align: center; padding-top: clamp(44px, 5vw, 84px); }
.night-copy h1 { color: inherit; }
.night-copy .lede { margin: 20px auto 0; max-width: 34rem; color: inherit; }
.night-copy .stores { justify-content: center; margin-top: 30px; }
.night .store-btn:focus-visible, .night .scene-toggle:focus-visible { outline-color: var(--moment-lime); }
.night .scene-toggle { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 16px; top: auto; z-index: 3; }
.night-phones { position: relative; z-index: 2; display: flex; justify-content: center; align-items: flex-start; margin-top: -4.4vw; pointer-events: none; }
.night-phones .side { margin-top: 64px; }
.night-phones .l { margin-right: -38px; }
.night-phones .r { margin-left: -38px; }
.night-phones .c { position: relative; z-index: 2; }
.below-hero { text-align: center; margin-top: 28px; }
.below-hero .how-link { color: var(--accent-ink); }
@media (max-width: 1099px) {
  .night-copy { padding-top: 0; }
  .night-copy .lede { color: var(--text-muted); }
  .night-stack { padding-block: 40px 32px; }
  /* Zoomed to the court at every narrow width: the moon, the beams and the
     court in view, the lamps and the extra sky cropped. */
  .night { height: 58.7vw; }
  .night-media { inset: auto; left: -20%; bottom: 0; width: 140%; height: auto; object-fit: fill; }
  .night-phones { margin-top: -6vw; overflow-x: clip; }
  .night-phones .c { --w: clamp(210px, 40vw, 300px) !important; }
  .night-phones .side { --w: clamp(156px, 30vw, 232px) !important; margin-top: 40px; }
  .night-phones .l { margin-right: -52px; } .night-phones .r { margin-left: -52px; }
}
/* The copy comes first in the page (and for screen readers); on wide screens
   it rises into the scene's sky, on narrow ones it sits above the scene. */
.hero-night { position: relative; }
.night-stack { position: absolute; inset: 0 0 auto 0; z-index: 2; }
@media (max-width: 1099px) { .night-stack { position: static; } }
/* The copy takes the theme's ink: court green over the morning sky (light),
   cream over the night sky (dark). The black store badges hold over both. */
.night-copy { color: var(--text); }
.app-row .stores { grid-column: 1 / -1; }
