/* Public site styles. The design system is written down in DESIGN.md at the
   repo root ("The Tracked Rally"); keep the two in step.

   Palette comes from lib/theme/app_tokens.dart so the site and the app are
   recognisably one product: brand violet #A855F7 on the near-black brandInk /
   brandDeep, coral action, and the feature accents.

   Two hard constraints, both from the hosting CSP (`default-src 'none'`):
     - no JavaScript, so every animation here is CSS;
     - no webfonts at all (font-src has no allowance), so the system stack is
       not a preference, it is the only option.

   The legal documents keep the typography of lib/screens/legal_text.dart —
   15px/700 headers, body at line-height 1.55 — so the in-app and web copies
   read the same. Hand-written; tool/gen_legal_web.mjs never touches this file. */

:root {
  /* brand — fixed in both themes, as in AppTokens */
  --brand: #a855f7;
  --brand-strong: #7c3aed; /* violet that carries white text (5.7:1) */
  --brand-ink: #0e0716;
  --brand-deep: #1a0b2e;
  --ball-glow: #e9d5ff;
  --coral: #ff6b6b;

  /* surfaces — these are the ones that flip */
  --bg: #ffffff;
  --surface: #f7f7f9;
  --text-hi: #101418;
  --text-mid: #333c45;
  --text-lo: #5d6670;
  --rule: #e3e7eb;
  --link: #7c3aed;
  --focus: var(--link);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0d;
    --surface: #1a1a1a;
    --text-hi: #f2f5f7;
    --text-mid: #c3ccd4;
    --text-lo: #8b96a1;
    --rule: #242b32;
    --link: #c4a0ff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-mid);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  /* a short page (the 404) still ends on the dark footer, not on white */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main { flex: 1 0 auto; width: 100%; }

/* ── browser surfaces ── the parts the browser would otherwise draw */

::selection {
  background: color-mix(in srgb, var(--brand) 32%, transparent);
  color: var(--text-hi);
}

/* One focus ring everywhere: link violet on the page, ball glow on the dark
   hero (which resets --focus). Offset, so it never sits on a pill's edge. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* The reading column. The header and footer are full-width bands, so the
   column lives on their inner `.bar` rather than on the elements themselves. */
main,
.bar {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 20px;
}

main { padding-top: 20px; }

/* ── site header ─────────────────────────────────────────────────────────── */

/* Same bar on every page, dark in both themes: with the hero below it the
   home page opens as one night-hall band, and with the dark footer every page
   is framed top and bottom. Sticky, so the navigation stays in reach on the
   long legal documents; opaque, because text scrolls underneath it. */
.site-header {
  --focus: var(--ball-glow);
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--brand-ink);
  border-bottom: 1px solid #2a1b3d;
}

.site-header .bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 60px;
}

.landing .site-header .bar { max-width: 62rem; }

.home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
  color: var(--text-hi);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-header .home { color: #fff; }
.site-header .home:hover { text-decoration: none; }

.mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: block;
}

/* The link row sits centred between the brand and the language switch. */
.nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 4px 26px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #cfc4dd;                     /* 11.9:1 on hall ink */
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current] {
  color: #fff;
  text-decoration: none;
}

.nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--brand); }

/* In-page targets of the nav links: stop them landing under the sticky bar. */
h2[id] { scroll-margin-top: 76px; }

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

/* Language switch: EN | DE, the page's own language filled in. */
.lang {
  display: flex;
  border: 1px solid #7a5aa6;          /* 3.6:1 on hall ink */
  border-radius: 999px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang a,
.lang span { padding: 5px 11px; }

.lang a { color: #cfc4dd; text-decoration: none; }
.lang a:hover { color: #fff; text-decoration: none; }
.lang span { background: var(--brand-strong); color: #fff; }
a:hover { text-decoration: underline; }

/* Phone menu: hidden on wide screens, where the link row is shown. */
.menu { display: none; }

@media (max-width: 40rem) {
  .site-header .bar { gap: 12px; min-height: 56px; }
  .nav { display: none; }
  .lang { margin-left: auto; }
  .lang a,
  .lang span { padding: 9px 12px; }

  .menu { display: block; }

  .menu summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px 0 10px;
    border: 1px solid #7a5aa6;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
  }

  .menu summary::-webkit-details-marker { display: none; }
  .menu summary:hover { border-color: var(--ball-glow); }

  .menu-ico {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .menu-x { display: none; }
  .menu[open] .menu-bars { display: none; }
  .menu[open] .menu-x { display: inline; }
  .menu[open] summary { border-color: var(--ball-glow); }

  /* The panel drops below the bar across its full width. While it is open the
     header stops being sticky, so an in-page link scrolls the panel away with
     the page instead of leaving it over the section. */
  .site-header:has(.menu[open]) { position: relative; }

  .menu-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand-ink);
    border-bottom: 1px solid #2a1b3d;
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.8);
  }

  .menu-nav ul {
    list-style: none;
    margin: 0;
    padding: 4px 20px 12px;
  }

  .menu-nav li + li { border-top: 1px solid #2a1b3d; }

  .menu-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
  }

  .menu-nav a:hover { color: var(--ball-glow); }
}

/* ── typography ──────────────────────────────────────────────────────────── */

h1 {
  color: var(--text-hi);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin: 8px 0 16px;
}

h2 {
  color: var(--text-hi);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin: 32px 0 8px;
}

h3 {
  color: var(--text-hi);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}

p { margin: 0 0 12px; }

.caption {
  color: var(--text-lo);
  font-size: 13px;
  font-style: italic;
  margin-bottom: 20px;
}

/* Prose lists — the deletion page's steps and its list of what is erased.
   The legal documents are pure paragraphs, so this is the only place a list
   appears inside running text. */
.bullets {
  margin: 0 0 12px;
  padding-left: 22px;
}

.bullets li { margin: 0 0 6px; }

/* ── hero ────────────────────────────────────────────────────────────────── */

/* Always dark, in both themes — this is the app's own header band (AppTokens
   scopes the brand violet to exactly this one surface). */
.hero {
  --focus: var(--ball-glow);
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--brand-deep) 0%, var(--brand-ink) 62%),
    var(--brand-ink);
  border-bottom: 1px solid #2a1b3d;
  overflow: hidden;
}

.hero-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 64px 20px 40px;
  text-align: center;
}

/* The promise is the headline; the brand lives in the header bar. The second
   sentence is lit in ball glow — emphasis by colour, not a gradient fill. */
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 6.4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0 0 18px;
}

.hero h1 span {
  display: block;
  color: var(--ball-glow);
}

.hero .lead {
  color: #cfc4dd;
  font-size: 17px;
  line-height: 1.5;
  max-width: 34rem;
  margin: 0 auto 18px;
  text-wrap: pretty;
}

/* What makes Trainoro different, in four short facts under the promise. */
.proof {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 0 0 6px;
  padding: 0;
  color: #cfc4dd;
  font-size: 13px;
  font-weight: 600;
}

.proof li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.proof svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--ball-glow);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Entrance: each element a short beat after the one above. It starts from a
   faint, already-visible state, so a delayed or skipped animation never hides
   the headline. */
.hero h1,
.hero .lead,
.proof,
.cta,
.hero .art { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero .lead { animation-delay: 0.05s; }
.proof { animation-delay: 0.1s; }
.cta { animation-delay: 0.15s; }
.hero .art { animation-delay: 0.2s; }

@keyframes rise {
  from { opacity: 0.35; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ── hero artwork: the tracked rally ─────────────────────────────────────── */

/* A regulation table seen from behind the end line, where the phone films
   from. The geometry and every keyframe come from tool/hero_rally.mjs, which
   writes the motion to rally.css; colours and strokes live here. The glow is
   drawn as a second circle, not a CSS filter: a filtered SVG child inside an
   animated group does not composite reliably. Geometry always draws. */
.art {
  display: block;
  width: 100%;
  max-width: 32rem;
  height: auto;
  margin: 12px auto 0;
  overflow: visible;
}

.rl-table {
  fill: rgba(168, 85, 247, 0.12);
  stroke: #6d3fa8;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

/* the table's front edge, so it has thickness */
.rl-apron { fill: #1a0b2e; stroke: #6d3fa8; stroke-width: 1.5; stroke-linejoin: round; }

.rl-line {
  fill: none;
  stroke: rgba(233, 213, 255, 0.38);
  stroke-width: 1;
}

.rl-net { fill: rgba(154, 110, 222, 0.16); }

.rl-mesh {
  fill: none;
  stroke: rgba(154, 110, 222, 0.5);
  stroke-width: 0.6;
}

.rl-cord {
  fill: none;
  stroke: var(--ball-glow);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.rl-post {
  fill: none;
  stroke: #9a6ede;
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* the tracked path: the whole rally faintly, and a comet tail on the ball */
.rl-trace {
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.2;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
  opacity: 0.35;
}

.rl-tail {
  fill: none;
  stroke: var(--brand);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.rl-shadow { fill: #000; }

.rl-dot { fill: var(--coral); }

/* the stroke grows with the pulse, so the ring thins out as it fades */
.rl-ring,
.rl-hit {
  fill: none;
  stroke-width: 1.6;
}

.rl-ring { stroke: var(--coral); }
.rl-hit { stroke: var(--ball-glow); }

.rl-box path {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.rl-ball .glow { fill: var(--ball-glow); opacity: 0.28; }
.rl-ball .core { fill: #fff; }

/* ── hero backdrop ── two slow glows and a still measuring grid behind the
   content. Pure decoration on pseudo-elements, so there is nothing to hide
   from a screen reader and nothing to lose if an engine skips it. The rally
   is the hero's one moving moment; the glows only drift. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero::before {
  /* larger than the band, so the drift never shows the layer's edge */
  inset: -12%;
  background:
    radial-gradient(38rem 22rem at 18% 30%, rgba(168, 85, 247, 0.34), transparent 70%),
    radial-gradient(30rem 20rem at 85% 70%, rgba(255, 107, 107, 0.20), transparent 70%);
  animation: drift 16s ease-in-out infinite alternate;
}

.hero::after {
  background-image:
    linear-gradient(rgba(233, 213, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 213, 255, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
}

@keyframes drift {
  from { transform: translate3d(-4%, -3%, 0) scale(1); }
  to { transform: translate3d(4%, 3%, 0) scale(1.12); }
}

/* ── buttons ── */
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 6px;
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid #7a5aa6;          /* 3.6:1 on hall ink */
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--brand);
}

/* Hall-ink text on the gradient: 5.0:1 at the violet end, 7.1:1 at coral.
   White failed both ends. */
.btn-primary {
  border-color: transparent;
  color: var(--brand-ink);
  background: linear-gradient(100deg, var(--brand), var(--coral));
  box-shadow: 0 10px 30px -10px rgba(168, 85, 247, 0.8);
}

.btn-primary:hover { box-shadow: 0 14px 36px -10px rgba(255, 107, 107, 0.8); }

/* ── home page: layout ───────────────────────────────────────────────────── */

/* The home pages (`<body class="landing">`) get a wider column than the legal
   documents, which stay at a reading measure. */
.landing main,
.landing .bar { max-width: 62rem; }

.landing .index h2 {
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 72px 0 6px;
}

/* a short brand bar above each section title */
.landing .index h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--coral));
}

.sub { color: var(--text-lo); margin-bottom: 20px; }

/* ── video ── a framed player on a violet glow that pools beneath it */
.player {
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, var(--brand), #2a1b3d 40%, var(--coral));
  box-shadow: 0 28px 60px -32px rgba(168, 85, 247, 0.75);
}

.player video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 19px;
  background: var(--brand-ink);
}

/* ── screenshots ── a row that scrolls sideways and snaps per phone; on wide
   screens it becomes a grid, so nothing hides behind a scrollbar */
.screens {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0 -20px;
  padding: 6px 20px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) transparent;
}

.screens:focus-visible { outline-offset: -2px; }

.screens li {
  flex: 0 0 auto;
  width: 200px;
  scroll-snap-align: start;
}

.screens figure { margin: 0; }

.screens img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid #3b2a55;
  box-shadow: 0 18px 40px -22px rgba(168, 85, 247, 0.7);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.32s ease;
}

.screens li:hover img {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 26px 50px -22px rgba(255, 107, 107, 0.7);
}

.screens figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-mid);
  text-wrap: balance;
}

@media (min-width: 48rem) {
  .screens {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px 24px;
    margin: 0;
    padding: 6px 0 0;
    overflow: visible;
  }

  .screens li { width: auto; }
}

/* ── feature groups ── one panel per area of the app, one row per feature.
   Analyse leads full width; Train and Matches sit side by side; the extras
   close full width. */
.groups {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

/* AppTokens feature accents. These live here rather than in a `style` attribute
   on the row because the CSP (`style-src 'self'`) blocks inline styles — and
   blocks them silently, leaving the icon with no stroke at all. */
.f-analysis,
.f-motion3d,
.f-stroke,
.f-replay { --accent: #ff6b6b; }  /* accentVideo */
.f-drills { --accent: #ffab40; }  /* accentDrill */
.f-serves { --accent: #f06292; }  /* accentServe */
.f-fitness { --accent: #69f0ae; } /* accentFitness */
.f-plans { --accent: #7cb342; }   /* accentPlan */
.f-score { --accent: #ffd54f; }   /* accentScore */
.f-matches,
.f-rating { --accent: #ff8a65; }  /* accentMatches */
.f-stats { --accent: #b388ff; }   /* accentStats */
.f-racket { --accent: #4dd0e1; }  /* accentRacket */
.f-game { --accent: #448aff; }    /* accentGame */
.f-ai { --accent: #a855f7; }      /* brand */

.group {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 20px;               /* AppTokens.radiusCard */
  padding: 20px 22px 8px;
}

.group h3 {
  font-size: 17px;
  margin: 0 0 6px;
}

.group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.group li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}

.group h4 {
  color: var(--text-hi);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
}

.group li p {
  margin: 0;
  font-size: 14px;
  color: var(--text-lo);
}

.group .ico {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.group li:hover .ico { transform: scale(1.1) rotate(-6deg); }

/* The lead panel: video analysis is what Trainoro is for. */
.group-analyse {
  background: color-mix(in srgb, var(--coral) 6%, var(--surface));
  border-color: color-mix(in srgb, var(--coral) 28%, var(--rule));
}

.group-analyse h3 { font-size: 20px; }

@media (min-width: 48rem) {
  .groups { grid-template-columns: 1fr 1fr; }

  .group-analyse,
  .group-more { grid-column: 1 / -1; }

  .group-analyse ul,
  .group-more ul {
    display: grid;
    column-gap: 32px;
  }

  .group-analyse ul { grid-template-columns: 1fr 1fr; }
  .group-more ul { grid-template-columns: repeat(3, 1fr); }
}

/* ── plans ───────────────────────────────────────────────────────────────── */

/* Launch status: a quiet pill, with a coral dot for "not yet". */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--text-hi);
  font-size: 13px;
  font-weight: 700;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

.plans {
  list-style: none;
  display: grid;
  gap: 8px 28px;
  margin: 20px 0 12px;
  padding: 0;
}

.plans li {
  padding-top: 14px;
  border-top: 2px solid var(--rule);
}

.plans li:first-child { border-top-color: var(--brand); }

.plans h3 { font-size: 17px; margin-bottom: 6px; }

.plans p {
  margin: 0 0 12px;
  font-size: 14px;
  max-width: 40ch;
}

@media (min-width: 40rem) {
  .plans { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ── download block ── shown once a store listing is live */

.stores {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 16px 0 0;
  padding: 0;
}

.store {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.store a { font-weight: 600; text-decoration: none; }
.store a:hover { text-decoration: underline; }

/* The QR SVGs carry an opaque white ground so they stay scannable in dark
   mode; the padded card makes that read as deliberate rather than broken. */
.store img {
  display: block;
  width: 160px;
  height: auto;
  max-width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 14px;               /* AppTokens.radiusChip */
}

.soon { color: var(--text-lo); font-size: 14px; margin-top: 12px; }

/* ── document index ──────────────────────────────────────────────────────── */

.index { padding-top: 8px; padding-bottom: 8px; }

/* ── site footer ─────────────────────────────────────────────────────────── */

/* The dark bookend: the same night hall as the hero, in both themes, on every
   page. The rally from the hero ends along its top edge (`.foot-arc`, still —
   the hero keeps the site's one loop). Text is Hero Lilac (11.9:1), links are
   white and turn Ball Glow on hover, titles are Ball Glow; the focus ring is
   Ball Glow here, as in the hero. */
.site-footer {
  --focus: var(--ball-glow);
  position: relative;
  isolation: isolate;
  margin-top: 64px;
  background:
    radial-gradient(90% 120% at 50% 100%, var(--brand-deep) 0%, var(--brand-ink) 70%),
    var(--brand-ink);
  border-top: 1px solid #2a1b3d;
  color: #cfc4dd;
  font-size: 14px;
  overflow: hidden;
}

.landing .site-footer { margin-top: 96px; }

.foot-arc {
  display: block;
  width: 100%;
  max-width: 62rem;
  height: auto;
  margin: 0 auto;
  overflow: visible;
  /* the rally comes in out of the dark rather than starting mid-air */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%);
  mask-image: linear-gradient(90deg, transparent, #000 30%);
}

.foot-path {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 4 6;
  opacity: 0.55;
  vector-effect: non-scaling-stroke;
}

.foot-ring {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2;
  opacity: 0.9;
  vector-effect: non-scaling-stroke;
}

.foot-glow { fill: var(--ball-glow); opacity: 0.2; }
.foot-ball { fill: #fff; }

/* Brand block, then Explore / Help / Legal, then the base row. */
.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
  padding-top: 8px;
  padding-bottom: 28px;
}

.foot-brand { grid-column: 1 / -1; }

.landing .foot-grid,
.foot-grid { max-width: 62rem; }

.site-footer .home { color: #fff; }

.foot-promise {
  margin: 14px 0 18px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.foot-promise span {
  display: block;
  color: var(--ball-glow);
}

.foot-title {
  color: var(--ball-glow);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-col li { margin: 0 0 8px; }

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ball-glow);
  text-decoration: underline;
}

.foot-col a { font-weight: 600; }

/* Launch status on the dark band: the Plans pill's dot and words without the
   pill, so it can wrap in the narrow brand column and the dot stays on the
   first line. */
.status-dark {
  align-items: baseline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  line-height: 1.45;
}

.status-dark::before {
  flex: 0 0 auto;
  transform: translateY(-1px);
}

.foot-stores { margin: 0; }
.foot-stores a { font-weight: 700; }

.social {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
}

.social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #7a5aa6;
  border-radius: 999px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.social a:hover {
  border-color: var(--ball-glow);
  transform: translateY(-2px);
}

.social svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.foot-base {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  padding-top: 18px;
  border-top: 1px solid #2a1b3d;
  color: #a99bbd;                     /* 7.6:1 on hall ink */
  font-size: 13px;
}

.foot-base p { margin: 0; }

.foot-langs span[aria-current] {
  color: #fff;
  font-weight: 700;
}

@media (min-width: 48rem) {
  .foot-grid { grid-template-columns: 1.5fr 1fr 1fr 1.1fr; }
  .foot-brand { grid-column: auto; }
}

/* ── reveal on scroll ──
   Driven by the scroll position itself (no script — the CSP allows none).
   Inside @supports on purpose: where scroll timelines do not exist, the
   elements simply sit there, fully visible. It moves `translate`, not
   `transform`, so the hover lifts above keep working once it has run. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}

@keyframes reveal {
  from { opacity: 0.2; translate: 0 28px; }
  to { opacity: 1; translate: 0 0; }
}

/* ── narrow screens ──────────────────────────────────────────────────────── */

@media (max-width: 30rem) {
  .landing .index h2 { font-size: 22px; margin-top: 56px; }
  .screens li { width: 168px; }
  .hero-inner { padding: 44px 20px 32px; }
  .hero .lead { font-size: 15px; }
  .group { padding: 18px 16px 6px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-col:last-of-type { grid-column: 1 / -1; }
  .foot-col li { margin: 0; }
  .foot-col a,
  .foot-langs a,
  .foot-langs span[aria-current] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .social a { width: 44px; height: 44px; }
  .foot-base { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 21px; }
  h2 { font-size: 16px; }
}

/* ── reduced motion ──────────────────────────────────────────────────────── */

/* Everything above is decoration. Someone who has asked for less movement gets
   the finished frame: ball resting at the bounce, path drawn, nothing looping. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  /* the base rules already are the parked frame; just stop the loops (the
     rally's own keyframes only run under no-preference, see rally.css) */
  .hero::before { animation: none; }
}
