/* =========================================================
   visuals.css — infographic + media components for the
   marketing pages (index, science, filming). Loaded after
   style.css; uses its tokens only.
   ========================================================= */

/* ---------- Section rhythm ---------- */
.vz-section { padding-block: clamp(var(--space-10), 6vw, var(--space-16)); }
.vz-section--tight { padding-block: clamp(var(--space-8), 4vw, var(--space-12)); }
.vz-section--band {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.vz-section--band .eyebrow { color: var(--color-accent); }
.vz-section--soft { background: var(--color-surface-offset); }
.vz-head { max-width: 46rem; margin-bottom: var(--space-8); }
.vz-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  line-height: 1.15;
  margin-top: var(--space-3);
}
.vz-section--band .vz-head h2 { color: var(--color-text-inverse); }
.vz-head p { color: var(--color-text-muted); margin-top: var(--space-3); max-width: 38rem; }
.vz-section--band .vz-head p { color: oklch(from var(--color-text-inverse) l c h / 0.8); }
.vz-center { text-align: center; margin-inline: auto; }
.vz-center p { margin-inline: auto; }

/* ---------- Hero with phone ---------- */
.vz-hero { padding-block: clamp(var(--space-8), 6vw, var(--space-16)); }
.vz-hero__grid { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 900px) { .vz-hero__grid { grid-template-columns: 1.1fr 0.9fr; } }
.vz-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--color-primary);
  line-height: 1.08;
  margin-block: var(--space-4) var(--space-5);
}
.vz-hero .lede { max-width: 34rem; margin-bottom: var(--space-6); }
.vz-hero__proof {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  margin-top: var(--space-6); padding: 0; list-style: none;
  font-size: var(--text-sm); color: var(--color-text-muted);
}
.vz-hero__proof li { display: inline-flex; align-items: center; gap: var(--space-2); }
.vz-hero__proof svg { width: 16px; height: 16px; color: var(--color-accent-text); }
.vz-hero__media { display: grid; grid-template-columns: 1fr; gap: var(--space-4); align-items: end; justify-items: center; }
@media (min-width: 560px) { .vz-hero__media { grid-template-columns: 250px minmax(0, 1fr); } }
.vz-hero__media > img { width: 100%; max-width: 300px; justify-self: center; }
.vz-hero__media .phone { width: 100%; max-width: 250px; }

/* Phone frame — portrait video / screenshots */
.phone {
  position: relative;
  width: min(100%, 270px);
  aspect-ratio: 9 / 15.6;
  border-radius: 2.2rem;
  background: #0b1620;
  padding: 10px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #1f3140;
}
.phone::before {
  content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 18px; border-radius: 999px; background: #0b1620; z-index: 2;
}
.phone > video, .phone > img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  border-radius: 1.7rem; background: #0b1620;
}
.phone--sm { width: min(100%, 220px); }

/* Landscape media card */
.media-card {
  border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg);
  background: #0b1620; width: 100%;
}
.media-card > video, .media-card > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-card--16x9 { aspect-ratio: 16/9; }
.media-card--4x3 { aspect-ratio: 4/3; }

/* ---------- 3-step flow ---------- */
.flow { display: grid; gap: var(--space-6); position: relative; counter-reset: flow; }
@media (min-width: 760px) {
  .flow { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
  .flow::before {
    content: ""; position: absolute; left: 12%; right: 12%; top: 46px;
    border-top: 2px dashed var(--color-border);
  }
}
.flow__step {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--space-3); padding: var(--space-5);
  background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg);
}
.flow__icon {
  width: 92px; height: 92px; border-radius: var(--radius-full);
  background: var(--color-primary-soft); display: grid; place-items: center; position: relative;
}
.flow__icon svg { width: 60px; height: 60px; }
.flow__icon::after {
  counter-increment: flow; content: counter(flow, decimal-leading-zero);
  position: absolute; top: -6px; right: -6px; width: 30px; height: 30px; border-radius: 999px;
  background: var(--color-primary); color: #fff; font: 600 0.8rem/30px var(--font-body); text-align: center;
}
.flow__step h3 { font-size: var(--text-lg); font-weight: 600; color: var(--color-text); }
.flow__step p { color: var(--color-text-muted); font-size: var(--text-sm); max-width: 24rem; }
.flow__chip {
  display: inline-block; margin-top: var(--space-1);
  padding: 2px 10px; border-radius: 999px; font-size: var(--text-xs); font-weight: 600;
  background: var(--color-accent-soft); color: var(--color-accent-text);
}

/* ---------- Two-tap illustration + callout ---------- */
.twotap {
  display: grid; gap: var(--space-6); align-items: center;
  padding: var(--space-6); border-radius: var(--radius-xl);
  background: var(--color-surface); border: 1px solid var(--color-divider);
}
@media (min-width: 760px) { .twotap { grid-template-columns: 300px 1fr; } }
.twotap__art { width: 100%; max-width: 300px; margin-inline: auto; display: block; }
.twotap h3 { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-primary); font-weight: 500; }
.twotap p { color: var(--color-text-muted); margin-top: var(--space-2); }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-4); padding: 0; list-style: none; font-size: var(--text-sm); }
.legend li { display: inline-flex; align-items: center; gap: 8px; color: var(--color-text); }
.legend i { width: 14px; height: 14px; border-radius: 999px; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--color-border); }
.legend i.dot-head { background: #5f9c7f; }
.legend i.dot-heel { background: #7a4fd0; }
.legend i.dot-auto { background: #4fd1c5; }

/* ---------- Output gallery ---------- */
.outputs { display: grid; gap: var(--space-5); align-items: stretch; }
@media (min-width: 760px) { .outputs { grid-template-columns: 1.3fr 1fr 1fr; } }
.output {
  display: flex; flex-direction: column; gap: var(--space-3);
  background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.output__media { border-radius: var(--radius-md); overflow: hidden; background: #0b1620; aspect-ratio: 4/5; }
.output__media--wide { aspect-ratio: 16/9; }
.output__media--wide video { object-fit: contain; }
.output__media img, .output__media video { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.output__media--contain img { object-fit: contain; background: #f3f6f5; }
.output h3 { font-size: var(--text-base); font-weight: 600; }
.output p { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---------- Module cards (consolidated) ---------- */
.modules { display: grid; gap: var(--space-5); }
@media (min-width: 760px) { .modules { grid-template-columns: 1fr 1fr; } }
.module {
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-6); border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--color-divider);
}
.module__head { display: flex; align-items: center; gap: var(--space-3); }
.module__head svg { width: 40px; height: 40px; flex-shrink: 0; }
.module__head h3 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; color: var(--color-primary); }
.module__head small { display: block; font-family: var(--font-body); font-size: var(--text-xs); color: var(--color-text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.module__img { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16/9; background: #0b1620; }
.module__img img, .module__img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chips li {
  padding: 6px 12px; border-radius: 999px; font-size: var(--text-sm); font-weight: 500;
  background: var(--color-primary-soft); color: var(--color-primary); border: 1px solid var(--color-primary-highlight);
}
.chips--rider li { background: #eaf1fb; color: #24518f; border-color: #d4e2f6; }
.module .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Score scale infographic ---------- */
.scale { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-xl); padding: var(--space-6); }
.scale__bar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; margin-bottom: var(--space-3); }
.scale__seg { height: 14px; border-radius: 999px; }
.scale__seg--notable { background: var(--color-error); }
.scale__seg--mild { background: var(--color-warning); }
.scale__seg--good { background: var(--color-success); }
.scale__labels { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; font-size: var(--text-sm); }
.scale__labels b { display: block; font-weight: 600; color: var(--color-text); }
.scale__labels span { color: var(--color-text-muted); font-size: var(--text-xs); }
.scale__table { width: 100%; border-collapse: collapse; margin-top: var(--space-5); font-size: var(--text-sm); }
.scale__table th { text-align: left; font-weight: 600; font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-faint); padding: 6px 8px; border-bottom: 1px solid var(--color-divider); }
.scale__table td { padding: 10px 8px; border-bottom: 1px solid var(--color-divider); vertical-align: top; }
.scale__table tr:last-child td { border-bottom: 0; }
.scale__table td:first-child { font-weight: 600; color: var(--color-text); }
.scale__table .n-good { color: var(--color-success-hover); font-weight: 600; }
.scale__table .n-mild { color: var(--color-warning-hover); font-weight: 600; }
.scale__table .n-notable { color: var(--color-error-hover); font-weight: 600; }

/* ---------- Gauge bars (ideal band) ---------- */
.gauges { display: grid; gap: var(--space-3); }
@media (min-width: 560px) { .gauges { grid-template-columns: 1fr 1fr; } }
.gauge { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.gauge__row { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--text-sm); }
.gauge__row b { font-weight: 600; }
.gauge__row span { font-family: var(--font-display); color: var(--color-success-hover); }
.gauge__row span.is-out { color: var(--color-error-hover); }
.gauge__track { position: relative; height: 8px; border-radius: 999px; margin: 8px 0 4px; background: linear-gradient(90deg, var(--color-error-highlight) 0 30%, var(--color-warning-highlight) 30% 40%, var(--color-success-highlight) 40% 60%, var(--color-warning-highlight) 60% 70%, var(--color-error-highlight) 70% 100%); }
.gauge__track::after { content: ""; position: absolute; left: 50%; top: -3px; width: 2px; height: 14px; background: var(--color-text-faint); }
.gauge__dot { position: absolute; top: -4px; width: 16px; height: 16px; border-radius: 999px; border: 2px solid #fff; transform: translateX(-50%); background: var(--color-success); box-shadow: var(--shadow-sm); }
.gauge__dot.is-out { background: var(--color-error); }
.gauge__ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--color-text-faint); }

/* ---------- Pipeline (what happens after Track) ---------- */
.pipeline { display: grid; gap: var(--space-3); counter-reset: pipe; }
@media (min-width: 900px) { .pipeline { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 560px) and (max-width: 899px) { .pipeline { grid-template-columns: repeat(3, 1fr); } }
.pipe { position: relative; padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-md); }
.pipe::before { counter-increment: pipe; content: counter(pipe); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--color-primary); color: #fff; font-size: var(--text-xs); font-weight: 600; margin-bottom: var(--space-2); }
.pipe svg { width: 28px; height: 28px; display: block; margin-bottom: var(--space-2); color: var(--color-accent-text); }
.pipe h3 { font-size: var(--text-sm); font-weight: 600; margin-bottom: 4px; }
.pipe p { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.45; }

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1; color: var(--color-accent); }
.stat span { display: block; margin-top: 6px; font-size: var(--text-sm); color: oklch(from var(--color-text-inverse) l c h / 0.8); }

/* ---------- Compact install strip ---------- */
.install-strip { display: grid; gap: var(--space-4); align-items: center; padding: var(--space-5) var(--space-6); border-radius: var(--radius-lg); background: var(--color-primary-soft); border: 1px solid var(--color-primary-highlight); }
@media (min-width: 760px) { .install-strip { grid-template-columns: auto 1fr auto; } }
.install-strip svg { width: 34px; height: 34px; color: var(--color-primary); }
.install-strip h3 { font-size: var(--text-base); font-weight: 600; }
.install-strip p { font-size: var(--text-sm); color: var(--color-text-muted); }
.install-strip__steps { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.install-strip__steps li { font-size: var(--text-xs); padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--color-primary-highlight); color: var(--color-primary); }

/* ---------- Side-by-side figure blocks ---------- */
.split { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } .split--rev > :first-child { order: 2; } }
.split h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 500; color: var(--color-primary); margin-block: var(--space-2) var(--space-3); line-height: 1.2; }
.split p { color: var(--color-text-muted); }
.split figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-divider); background: var(--color-surface); }
.split figure img { width: 100%; display: block; }
.split figcaption { font-size: var(--text-xs); color: var(--color-text-muted); padding: var(--space-3) var(--space-4); }

/* ---------- Definition grid (toolkit) ---------- */
.defs { display: grid; gap: var(--space-3); }
@media (min-width: 760px) { .defs { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 480px) and (max-width: 759px) { .defs { grid-template-columns: 1fr 1fr; } }
.def { padding: var(--space-4); border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid var(--color-divider); }
.def h3 { font-family: var(--font-display); font-size: var(--text-base); color: var(--color-primary); margin-bottom: 4px; }
.def p { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; }

/* ---------- Roadmap compare ---------- */
.compare { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare__col { padding: var(--space-5); border-radius: var(--radius-lg); background: oklch(from var(--color-text-inverse) l c h / 0.08); border: 1px solid oklch(from var(--color-text-inverse) l c h / 0.14); }
.compare__col h3 { font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); margin-bottom: var(--space-3); }
.compare__col ul { margin: 0; padding-left: 1.1rem; font-size: var(--text-sm); display: grid; gap: 6px; color: oklch(from var(--color-text-inverse) l c h / 0.9); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) { .phone, .media-card { box-shadow: var(--shadow-md); } }

/* ---------- Meet the founder ---------- */
.founder { display: grid; gap: var(--space-8); align-items: start; }
@media (min-width: 900px) { .founder { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12, 3rem); } }
.founder__photo { margin: 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-divider); background: var(--color-surface); box-shadow: 0 18px 40px -24px rgba(28, 58, 82, .45); }
.founder__photo img { width: 100%; height: auto; display: block; aspect-ratio: 900 / 1135; object-fit: cover; }
.founder__photo figcaption { font-size: var(--text-xs); color: var(--color-text-muted); padding: var(--space-3) var(--space-4); }
.founder__body h2 { font-family: var(--font-display); font-weight: 500; color: var(--color-primary); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; margin-block: var(--space-2) var(--space-4); }
.founder__body p { color: var(--color-text-muted); margin-bottom: var(--space-4); max-width: 38rem; }
.founder__body p.founder__lead { color: var(--color-text); font-size: var(--text-lg, 1.125rem); }
.founder__sig { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--color-divider); }
.founder__sig b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; color: var(--color-primary); }
.founder__sig span { font-size: var(--text-sm); color: var(--color-text-muted); }

/* Riding journey timeline */
.journey { list-style: none; padding: 0; margin: var(--space-6) 0; display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.journey li { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 500; color: var(--color-text); }
.journey li span { padding: .35rem .8rem; border-radius: 999px; background: #eef4f1; border: 1px solid var(--color-divider); }
.journey li:not(:last-child)::after { content: ""; width: 14px; height: 2px; background: var(--color-divider); }
.journey li.is-now span { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* Why cards: no mirrors / little wins / so I built RideAlign */
.why { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
@media (min-width: 640px) { .why { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.why__card { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-4); }
.why__card svg { width: 28px; height: 28px; color: #5f9c7f; margin-bottom: var(--space-2); }
.why__card h3 { font-size: var(--text-base); color: var(--color-primary); margin-bottom: var(--space-1); }
.why__card p { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; }

/* Home page founder teaser */
.founder-teaser { display: grid; gap: var(--space-6); align-items: center; background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-6); }
@media (min-width: 720px) { .founder-teaser { grid-template-columns: 220px minmax(0, 1fr); padding: var(--space-8); } }
.founder-teaser img { width: 100%; max-width: 220px; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 30%; border-radius: 50%; display: block; }
.founder-teaser blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.3; color: var(--color-primary); }
.founder-teaser p { color: var(--color-text-muted); margin-top: var(--space-3); }
.founder-teaser .btn { margin-top: var(--space-4); }
