/* =========================================================================
   Trailmetry design system — tm.css
   One stylesheet for every marketing page (home, platform, suspension,
   video, pricing). Product colour is information: blue = Suspension
   Intelligence, orange = Video Intelligence. Never swap them.
   ========================================================================= */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Base */
  /* White theme. All text is black: no grey text anywhere. */
  --tm-ink:        #FFFFFF;   /* page background */
  --tm-surface:    #F3F5F7;   /* raised panels, media backgrounds */
  --tm-surface-2:  #E8ECEF;   /* hover / nested */
  --tm-line:       rgba(10, 15, 20, 0.10);
  --tm-line-strong:rgba(10, 15, 20, 0.22);
  --tm-text:       #0A0F14;
  --tm-muted:      #0A0F14;   /* kept as a token, set to black on purpose */
  --tm-dark:       #0A0F14;   /* photo overlays, lightbox */
  --tm-chalk:      #E8EDF0;   /* light band background */
  --tm-chalk-ink:  #1B2730;

  /* Products */
  --tm-susp:       #2B95FF;   /* fills, lines, dots */
  --tm-susp-ink:   #0B6BCB;   /* blue used as text: 5.3:1 on white */
  --tm-susp-soft:  rgba(43, 149, 255, 0.14);
  --tm-video:      #FF6B2E;   /* fills, lines, dots */
  --tm-video-ink:  #C2410C;   /* orange used as text: 5.2:1 on white */
  --tm-video-soft: rgba(255, 107, 46, 0.14);

  /* Type */
  --tm-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --tm-body:    "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Scale (≈ 1.25 minor third, fluid at the top) */
  --tm-fs-xs:  0.8125rem;
  --tm-fs-sm:  0.9375rem;
  --tm-fs-md:  1.0625rem;
  --tm-fs-lg:  1.25rem;
  --tm-fs-xl:  clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --tm-fs-2xl: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --tm-fs-3xl: clamp(2.25rem, 1.5rem + 3vw, 4rem);

  /* Space */
  --tm-gutter: clamp(20px, 4vw, 48px);
  --tm-max:    1240px;
  --tm-section: clamp(72px, 9vw, 136px);

  /* Shape: small radius for controls, medium for media, none for bands */
  --tm-r-control: 6px;
  --tm-r-media:   12px;

  --tm-header-h: 68px;
  --tm-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--tm-ink);
  color: var(--tm-text);
  font-family: var(--tm-body);
  font-size: var(--tm-fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
figure { margin: 0; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--tm-display);
  font-weight: 800;
  font-stretch: 100%;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--tm-fs-3xl); }
h2 { font-size: var(--tm-fs-2xl); }
h3 { font-size: var(--tm-fs-xl); font-stretch: 100%; line-height: 1.1; }
h4 { font-size: var(--tm-fs-lg); font-stretch: 100%; font-weight: 700; line-height: 1.25; }
ul { margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--tm-text);
  outline-offset: 3px;
  border-radius: 2px;
}
.tm-skip {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: var(--tm-text); color: var(--tm-ink);
  padding: 10px 14px; border-radius: var(--tm-r-control); text-decoration: none; font-weight: 700;
}
.tm-skip:focus { top: 12px; }
.tm-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- 3. Layout ---------------------------------------------------- */
.tm-wrap { width: 100%; max-width: var(--tm-max); margin: 0 auto; padding: 0 var(--tm-gutter); }
.tm-section { padding: var(--tm-section) 0; position: relative; }
.tm-section + .tm-section { border-top: 1px solid var(--tm-line); }
.tm-section--flush-top { padding-top: 0; }
.tm-section--chalk { background: var(--tm-chalk); color: var(--tm-chalk-ink); border-top: 0 !important; }
.tm-section--chalk .tm-muted { color: var(--tm-chalk-ink); }

.tm-lede { font-size: var(--tm-fs-lg); color: var(--tm-muted); max-width: 40em; }
.tm-muted { color: var(--tm-muted); }
.tm-measure { max-width: 38em; }

.tm-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 64px); }
.tm-head h2 + p, .tm-head h1 + p { margin-top: 20px; }

.tm-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.tm-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.tm-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tm-split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.tm-split--flip { grid-template-columns: 7fr 5fr; }
.tm-split--flip > :first-child { order: 2; }
@media (max-width: 960px) {
  .tm-grid-3, .tm-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-split, .tm-split--flip { grid-template-columns: 1fr; }
  .tm-split--flip > :first-child { order: 0; }
}
@media (max-width: 640px) {
  .tm-grid-2, .tm-grid-3, .tm-grid-4 { grid-template-columns: 1fr; }
}

/* ---------- 4. Header / navigation -------------------------------------- */
.tm-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000; height: var(--tm-header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--tm-line);
}
.tm-header .tm-wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.tm-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.tm-brand img { width: 28px; height: 28px; border-radius: 6px; }
.tm-brand span { font-family: var(--tm-display); font-weight: 800; font-stretch: 100%; font-size: 1.05rem; letter-spacing: -0.01em; }

.tm-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.tm-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--tm-r-control);
  color: var(--tm-muted); text-decoration: none; font-size: var(--tm-fs-sm); font-weight: 500;
  transition: color .2s, background-color .2s;
}
.tm-nav a:hover { color: var(--tm-text); background: var(--tm-surface); }
.tm-nav a[aria-current="page"] { color: var(--tm-text); }
.tm-nav a[aria-current="page"]::after { content: ""; position: absolute; }
.tm-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.tm-dot--susp { background: var(--tm-susp); }
.tm-dot--video { background: var(--tm-video); }

.tm-header-actions { display: flex; align-items: center; gap: 10px; }
.tm-lang { position: relative; }
.tm-lang-btn, .tm-user-btn, .tm-menu-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--tm-text); font: inherit; font-size: var(--tm-fs-sm);
  border: 1px solid var(--tm-line-strong); border-radius: var(--tm-r-control);
  padding: 7px 10px; cursor: pointer;
}
.tm-lang-btn:hover, .tm-user-btn:hover, .tm-menu-btn:hover { background: var(--tm-surface); }
.tm-popover {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px;
  background: #fff; border: 1px solid var(--tm-line-strong); border-radius: 10px;
  padding: 6px; margin: 0; list-style: none; box-shadow: 0 18px 40px rgba(10,15,20,.14);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.tm-popover.active { opacity: 1; visibility: visible; transform: none; }
.tm-popover button, .tm-popover a {
  display: flex; width: 100%; align-items: center; gap: 10px; text-align: left;
  background: none; border: 0; color: var(--tm-text); font: inherit; font-size: var(--tm-fs-sm);
  padding: 9px 10px; border-radius: var(--tm-r-control); cursor: pointer; text-decoration: none;
}
.tm-popover button:hover, .tm-popover a:hover { background: var(--tm-surface-2); }
.tm-popover .active, .tm-popover [aria-checked="true"] { color: var(--tm-susp-ink); font-weight: 700; }
.tm-popover-head { padding: 9px 10px 10px; border-bottom: 1px solid var(--tm-line); margin-bottom: 6px; font-weight: 600; font-size: var(--tm-fs-sm); }
.tm-popover .logout { color: var(--tm-video-ink); }
.tm-user { position: relative; }
.tm-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--tm-surface-2); display: grid; place-items: center; }

.tm-menu-btn { display: none; padding: 8px; }
.tm-mobile-menu {
  display: none; position: fixed; top: var(--tm-header-h); left: 0; right: 0; bottom: 0; z-index: 999;
  background: var(--tm-ink); overflow-y: auto; padding: 16px var(--tm-gutter) 40px;
}
.tm-mobile-menu.is-open { display: block; }
.tm-mobile-menu a {
  display: flex; align-items: center; gap: 12px; padding: 16px 0;
  border-bottom: 1px solid var(--tm-line); text-decoration: none;
  font-family: var(--tm-display); font-stretch: 100%; font-weight: 700; font-size: 1.35rem;
}
.tm-mobile-menu .tm-mobile-actions { display: grid; gap: 10px; margin-top: 24px; }
.tm-mobile-menu .tm-mobile-actions a { border: 0; padding: 0; font-family: var(--tm-body); font-size: var(--tm-fs-md); }
.tm-mobile-menu .tm-mobile-actions .tm-btn { justify-content: center; }

@media (max-width: 900px) {
  .tm-nav { display: none; }
  .tm-header-actions .tm-auth-desktop { display: none !important; } /* beats the inline display set by the auth script */
  .tm-menu-btn { display: inline-flex; }
  .tm-header .tm-wrap { justify-content: space-between; }
  .tm-header-actions { margin-left: auto; }
}

/* ---------- 5. Buttons --------------------------------------------------- */
.tm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--tm-r-control); border: 1px solid transparent;
  font-family: var(--tm-body); font-size: var(--tm-fs-md); font-weight: 700; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--tm-ease);
}
.tm-btn:active { transform: translateY(1px); }
.tm-btn--primary { background: var(--tm-text); color: var(--tm-ink); }
.tm-btn--primary:hover { background: #26323C; }
.tm-btn--ghost { background: transparent; color: var(--tm-text); border-color: var(--tm-line-strong); }
.tm-btn--ghost:hover { border-color: var(--tm-text); }
/* Product buttons: dark text keeps contrast above 6:1 on both accents */
.tm-btn--susp { background: var(--tm-susp); color: #ffffff; }
.tm-btn--susp:hover { background: #55AAFF; }
.tm-btn--video { background: var(--tm-video); color: #ffffff; }
.tm-btn--video:hover { background: #FF8752; }
.tm-btn--sm { min-height: 38px; padding: 0 14px; font-size: var(--tm-fs-sm); }
.tm-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.tm-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tm-section--chalk .tm-btn--ghost { color: var(--tm-chalk-ink); border-color: rgba(27,39,48,.3); }

.tm-link { color: var(--tm-text); font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.tm-link:hover { text-decoration-thickness: 2px; }

/* ---------- 6. Product tag (encodes which product a block belongs to) --- */
.tm-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--tm-display); font-stretch: 100%; font-weight: 700; font-size: var(--tm-fs-sm);
  margin-bottom: 18px;
}
.tm-tag::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
/* doubled class so card/section text colours never override the product colour */
.tm-tag.tm-tag--susp { color: var(--tm-susp-ink); }
.tm-tag.tm-tag--video { color: var(--tm-video-ink); }

/* ---------- 7. Hero ------------------------------------------------------ */
.tm-hero {
  --tm-ink: #0A0F14; --tm-text: #FFFFFF; --tm-muted: #FFFFFF;
  --tm-line: rgba(255,255,255,.18); --tm-line-strong: rgba(255,255,255,.34);
  --tm-susp-ink: #6CB6FF; --tm-video-ink: #FF8A5C;
  background: var(--tm-dark); color: #FFFFFF;
  position: relative; min-height: min(100svh, 920px);
  display: flex; align-items: flex-end;
  padding: calc(var(--tm-header-h) + 72px) 0 0;
  overflow: hidden; isolation: isolate;
}
.tm-hero-media { position: absolute; inset: 0; z-index: -2; }
.tm-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.tm-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,15,20,.55) 0%, rgba(10,15,20,.2) 35%, rgba(10,15,20,.78) 72%, rgba(10,15,20,.94) 100%),
    linear-gradient(90deg, rgba(10,15,20,.75) 0%, rgba(10,15,20,0) 60%);
}
.tm-hero-inner { width: 100%; padding-bottom: clamp(40px, 6vw, 72px); }
.tm-hero h1 { max-width: 12ch; }
.tm-hero-sub {
  display: block; margin-top: 14px;
  font-family: var(--tm-display); font-weight: 400; font-stretch: 100%;
  font-size: clamp(1.3rem, 1rem + 1.4vw, 2.1rem); letter-spacing: 0; line-height: 1.15;
  color: var(--tm-text);
}
.tm-hero p.tm-lede { color: #FFFFFF; margin: 28px 0 32px; max-width: 34em; }

/* Hero trace — the one orchestrated motion on the site */
.tm-trace { width: 100%; height: clamp(64px, 9vw, 120px); margin-top: clamp(40px, 6vw, 72px); overflow: visible; }
.tm-trace path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tm-trace .t-susp { stroke: var(--tm-susp); }
.tm-trace .t-video { stroke: var(--tm-video); stroke-width: 2.5; }
.tm-trace .t-zero { stroke: var(--tm-line-strong); stroke-width: 1; stroke-dasharray: 2 6; }
.tm-trace .t-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: tm-draw 2.2s var(--tm-ease) .3s forwards; }
.tm-trace .t-video.t-draw { animation-delay: .7s; }
@keyframes tm-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .tm-trace .t-draw { animation: none; stroke-dashoffset: 0; } }

.tm-hero-products {
  display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--tm-line-strong);
}
.tm-hero-products a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 0; text-decoration: none;
}
.tm-hero-products a + a { padding-left: 28px; border-left: 1px solid var(--tm-line-strong); }
.tm-hero-products strong { font-family: var(--tm-display); font-stretch: 100%; font-size: var(--tm-fs-lg); display: inline-flex; align-items: center; gap: 10px; }
.tm-hero-products span { color: #FFFFFF; font-size: var(--tm-fs-sm); }
.tm-hero-products a:hover strong { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 720px) {
  .tm-hero-products { grid-template-columns: 1fr; }
  .tm-hero-products a + a { padding-left: 0; border-left: 0; border-top: 1px solid var(--tm-line); }
}

/* Page hero (inner pages) */
.tm-page-hero { padding: calc(var(--tm-header-h) + clamp(56px, 8vw, 112px)) 0 clamp(48px, 6vw, 80px); }
.tm-page-hero h1 { font-size: clamp(2.1rem, 1.4rem + 2.4vw, 3.4rem); max-width: 18ch; }
.tm-page-hero .tm-lede { margin: 24px 0 32px; }
.tm-page-hero--susp { box-shadow: inset 0 3px 0 var(--tm-susp); }
.tm-page-hero--video { box-shadow: inset 0 3px 0 var(--tm-video); }

/* ---------- 8. Media frames -------------------------------------------- */
.tm-frame {
  position: relative; overflow: hidden; border-radius: var(--tm-r-media);
  background: var(--tm-surface); border: 1px solid var(--tm-line);
}
.tm-frame > img, .tm-frame > video { width: 100%; object-fit: cover; }
.tm-frame--contain > img, .tm-frame--contain > video { object-fit: contain; }
.tm-frame--wide { aspect-ratio: 9 / 11; }
.tm-frame--wide2 { aspect-ratio: 9 / 9; }   /* homepage Video Intelligence video */
.tm-frame--tall { aspect-ratio: 4 / 5; }
.tm-frame--phone { aspect-ratio: 9 / 16; max-height: 640px; margin-inline: auto; width: auto; }
.tm-frame figcaption, .tm-caption { font-size: var(--tm-fs-sm); color: var(--tm-muted); margin-top: 12px; }
.tm-frame--susp { box-shadow: 0 0 0 1px var(--tm-susp-soft), 0 30px 70px -36px rgba(43,149,255,.45); }
.tm-frame--video { box-shadow: 0 0 0 1px var(--tm-video-soft), 0 30px 70px -36px rgba(255,107,46,.45); }

/* ---------- 9. Product pair (Platform section) -------------------------- */
.tm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--tm-line); border: 1px solid var(--tm-line); border-radius: var(--tm-r-media); overflow: hidden; }
.tm-pair > article { background: var(--tm-ink); padding: clamp(24px, 3.5vw, 44px); display: flex; flex-direction: column; }
.tm-pair > article .tm-frame { margin-bottom: 28px; aspect-ratio: 16 / 10; }
.tm-pair h3 { margin-bottom: 14px; }
.tm-pair p { color: var(--tm-muted); }
.tm-pair .tm-actions { margin-top: auto; padding-top: 12px; }
.tm-pair-meta { font-size: var(--tm-fs-sm); color: var(--tm-muted); border-top: 1px solid var(--tm-line); padding-top: 14px; margin: 8px 0 24px; }
@media (max-width: 860px) { .tm-pair { grid-template-columns: 1fr; } }

/* ---------- 10. Steps (real sequences only) ----------------------------- */
.tm-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; border-top: 1px solid var(--tm-line-strong); }
.tm-steps--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.tm-steps > li { counter-increment: step; padding: 22px 24px 8px 0; position: relative; }
.tm-steps > li + li { padding-left: 24px; border-left: 1px solid var(--tm-line); }
.tm-steps > li::before {
  content: counter(step); display: block; margin-bottom: 18px;
  font-family: var(--tm-display); font-stretch: 100%; font-weight: 800; font-size: 2.25rem; line-height: 1;
  color: var(--tm-accent, var(--tm-text));
}
.tm-steps h4 { margin-bottom: 8px; }
.tm-steps p { color: var(--tm-muted); font-size: var(--tm-fs-sm); }
.tm-steps--video { --tm-accent: var(--tm-video-ink); }
.tm-steps--susp { --tm-accent: var(--tm-susp-ink); }
@media (max-width: 960px) {
  .tm-steps, .tm-steps--3 { grid-template-columns: 1fr 1fr; }
  .tm-steps > li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .tm-steps > li:nth-child(n+3) { border-top: 1px solid var(--tm-line); }
}
@media (max-width: 560px) {
  .tm-steps, .tm-steps--3 { grid-template-columns: 1fr; }
  .tm-steps > li { padding-left: 0 !important; border-left: 0 !important; }
  .tm-steps > li + li { border-top: 1px solid var(--tm-line); }
}

/* ---------- 11. Lists and feature blocks -------------------------------- */
.tm-list { list-style: none; display: grid; gap: 10px; margin: 20px 0 0; }
.tm-list li { position: relative; padding-left: 22px; }
.tm-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--tm-accent, var(--tm-muted)); }
.tm-list--susp { --tm-accent: var(--tm-susp); }
.tm-list--video { --tm-accent: var(--tm-video); }

.tm-feature { padding-top: 22px; border-top: 1px solid var(--tm-line-strong); }
.tm-feature h4 { margin-bottom: 10px; }
.tm-feature p { color: var(--tm-muted); font-size: var(--tm-fs-sm); }
.tm-feature .tm-list { font-size: var(--tm-fs-sm); margin-top: 14px; }

/* Question block: the suspension story is told as questions a rider asks */
.tm-q { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(32px, 5vw, 64px) 0; }
.tm-q + .tm-q { border-top: 1px solid var(--tm-line); }
.tm-q--flip > :first-child { order: 2; }
.tm-q h3 { margin-bottom: 16px; }
.tm-q p { color: var(--tm-muted); }
@media (max-width: 900px) { .tm-q { grid-template-columns: 1fr; } .tm-q--flip > :first-child { order: 0; } }

/* ---------- 12. Connect section (two perspectives) ---------------------- */
.tm-bridge { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; }
.tm-bridge > div { padding: clamp(24px, 3.5vw, 40px); background: var(--tm-surface); }
.tm-bridge > div:first-child { border-radius: var(--tm-r-media) 0 0 var(--tm-r-media); box-shadow: inset 3px 0 0 var(--tm-susp); }
.tm-bridge > div:last-child { border-radius: 0 var(--tm-r-media) var(--tm-r-media) 0; box-shadow: inset -3px 0 0 var(--tm-video); }
.tm-bridge-join {
  width: 72px; display: grid; place-items: center; background: var(--tm-surface);
  border-left: 1px dashed var(--tm-line-strong); border-right: 1px dashed var(--tm-line-strong);
}
.tm-bridge-join svg { width: 32px; height: 32px; color: var(--tm-text); }
.tm-bridge h3 { font-size: var(--tm-fs-lg); margin-bottom: 12px; }
.tm-bridge p { color: var(--tm-muted); font-size: var(--tm-fs-sm); }
@media (max-width: 860px) {
  .tm-bridge { grid-template-columns: 1fr; }
  .tm-bridge > div:first-child { border-radius: var(--tm-r-media) var(--tm-r-media) 0 0; box-shadow: inset 0 3px 0 var(--tm-susp); }
  .tm-bridge > div:last-child { border-radius: 0 0 var(--tm-r-media) var(--tm-r-media); box-shadow: inset 0 -3px 0 var(--tm-video); }
  .tm-bridge-join { width: auto; height: 56px; border: 0; border-top: 1px dashed var(--tm-line-strong); border-bottom: 1px dashed var(--tm-line-strong); }
}

/* ---------- 13. Capability grid (Video) --------------------------------- */
.tm-cap { padding: 24px; background: var(--tm-surface); border-radius: var(--tm-r-media); border-top: 3px solid var(--tm-accent, var(--tm-line-strong)); }
.tm-cap h4 { margin-bottom: 4px; }
.tm-cap .tm-list { font-size: var(--tm-fs-sm); gap: 8px; margin-top: 14px; color: var(--tm-text); }
.tm-caps--video .tm-cap { --tm-accent: var(--tm-video); }
.tm-caps--susp .tm-cap { --tm-accent: var(--tm-susp); }

/* ---------- 14. Example gallery + lightbox ------------------------------ */
.tm-example { display: block; width: 100%; padding: 0; border: 1px solid var(--tm-line); border-radius: var(--tm-r-media); overflow: hidden; background: var(--tm-surface); color: inherit; font: inherit; text-align: left; cursor: zoom-in; }
.tm-example img { width: 100%; height: auto; }
.tm-example-info { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--tm-line); }
.tm-example-info strong { display: block; font-family: var(--tm-display); font-stretch: 100%; }
.tm-example-info span { font-size: var(--tm-fs-sm); color: var(--tm-muted); }
.tm-example:hover { border-color: var(--tm-line-strong); }
.tm-examples { display: grid; gap: 20px; max-width: 1000px; }

.tm-lightbox { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 24px; }
.tm-lightbox.is-open { display: flex; }
.tm-lightbox-backdrop { position: absolute; inset: 0; background: rgba(10,15,20,.92); }
.tm-lightbox-content { position: relative; width: min(1500px, 96vw); color: #FFFFFF; }
.tm-lightbox-content img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 8px; }
.tm-lightbox-close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: #FFFFFF; color: #0A0F14; font-size: 22px; cursor: pointer; }
.tm-lightbox-caption { margin-top: 14px; }
.tm-lightbox-caption strong { display: block; }
.tm-lightbox-caption span { color: #FFFFFF; font-size: var(--tm-fs-sm); }

/* ---------- 15. Downloads ---------------------------------------------- */
.tm-downloads { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.tm-download {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px;
  background: var(--tm-surface); border: 1px solid var(--tm-line-strong); border-radius: var(--tm-r-control);
  text-decoration: none; font-size: var(--tm-fs-sm); font-weight: 600; line-height: 1.25;
}
.tm-download:hover { border-color: var(--tm-video); background: var(--tm-surface-2); }
.tm-download img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.tm-download small { display: block; font-weight: 400; color: var(--tm-muted); }
.tm-download[aria-disabled="true"] { opacity: .6; pointer-events: none; }
@media (max-width: 960px) { .tm-downloads { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .tm-downloads { grid-template-columns: 1fr; } }

.tm-badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tm-badges img { height: 44px; width: auto; }

/* ---------- 16. Hardware card ------------------------------------------ */
.tm-hw { display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: center; padding: 24px; background: var(--tm-surface); border-radius: var(--tm-r-media); }
.tm-hw img { width: 160px; height: 160px; object-fit: contain; background: var(--tm-surface); border-radius: 8px; padding: 12px; }
.tm-hw h4 { margin-bottom: 6px; }
.tm-hw .tm-list { font-size: var(--tm-fs-sm); margin: 10px 0 16px; }
@media (max-width: 520px) { .tm-hw { grid-template-columns: 1fr; } }

/* ---------- 17. Start paths / plans ------------------------------------ */
.tm-path { padding: clamp(24px, 3vw, 36px); border: 1px solid var(--tm-line-strong); border-radius: var(--tm-r-media); display: flex; flex-direction: column; }
.tm-path h3 { font-size: var(--tm-fs-lg); margin-bottom: 10px; }
.tm-path p { color: var(--tm-muted); font-size: var(--tm-fs-sm); }
.tm-path .tm-actions { margin-top: auto; padding-top: 20px; }
.tm-path--susp { border-top: 3px solid var(--tm-susp); }
.tm-path--video { border-top: 3px solid var(--tm-video); }
.tm-price { font-family: var(--tm-display); font-stretch: 100%; font-weight: 800; font-size: var(--tm-fs-xl); margin: 6px 0 12px; }
.tm-price small { font-family: var(--tm-body); font-weight: 400; font-size: var(--tm-fs-sm); color: var(--tm-muted); }

/* Pricing-page skin hooks — apply to the existing pricing markup.
   These only restyle; they never change ids, handlers or form fields. */
.tm-plan-card { background: var(--tm-surface); border: 1px solid var(--tm-line-strong); border-radius: var(--tm-r-media); padding: 32px; position: relative; display: flex; flex-direction: column; }
.tm-plan-card.is-featured { border-color: var(--tm-text); }
.tm-plan-card .tm-plan-name { font-family: var(--tm-display); font-stretch: 100%; font-weight: 800; font-size: var(--tm-fs-lg); }
.tm-plan-card ul { list-style: none; display: grid; gap: 8px; font-size: var(--tm-fs-sm); margin: 18px 0 24px; }
.tm-plan-card li { padding-left: 22px; position: relative; color: var(--tm-text); }
.tm-plan-card li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 2px; background: var(--tm-muted); }
.tm-plan-card li[data-product="suspension"]::before { background: var(--tm-susp); }
.tm-plan-card li[data-product="video"]::before { background: var(--tm-video); }

/* ---------- 18. FAQ (native details/summary = keyboard accessible) ------ */
.tm-faq { max-width: 52rem; border-top: 1px solid var(--tm-line-strong); }
.tm-faq details { border-bottom: 1px solid var(--tm-line); }
.tm-faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center;
  padding: 22px 0; font-weight: 600; font-size: var(--tm-fs-md);
}
.tm-faq summary::-webkit-details-marker { display: none; }
.tm-faq summary::after { content: "+"; font-family: var(--tm-display); font-size: 1.5rem; line-height: 1; color: var(--tm-muted); transition: transform .2s; }
.tm-faq details[open] summary::after { transform: rotate(45deg); }
.tm-faq details > div { padding: 0 0 22px; color: var(--tm-muted); max-width: 44em; }

/* ---------- 19. Final CTA ---------------------------------------------- */
.tm-final { text-align: left; }
.tm-final h2 { font-size: var(--tm-fs-3xl); max-width: 14ch; }
.tm-final .tm-lede { margin: 24px 0 36px; }
.tm-final-foot { display: flex; flex-wrap: wrap; gap: 28px 48px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--tm-line); }
.tm-final-foot > div { min-width: 240px; }
.tm-final-foot h4 { font-size: var(--tm-fs-md); margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }

/* ---------- 20. Footer -------------------------------------------------- */
.tm-footer { border-top: 1px solid var(--tm-line); padding: 64px 0 32px; font-size: var(--tm-fs-sm); }
.tm-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.tm-footer h2 { font-size: var(--tm-fs-sm); font-stretch: 100%; font-family: var(--tm-body); font-weight: 700; margin-bottom: 14px; }
.tm-footer ul { list-style: none; display: grid; gap: 10px; }
.tm-footer a { color: var(--tm-muted); text-decoration: none; }
.tm-footer a:hover { color: var(--tm-text); }
.tm-footer p { color: var(--tm-muted); max-width: 30em; }
.tm-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--tm-line); color: var(--tm-muted); }
.tm-footer-bottom ul { display: flex; gap: 20px; flex-wrap: wrap; }
.tm-social { display: flex; gap: 10px; margin-top: 18px; }
.tm-social a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--tm-line-strong); border-radius: var(--tm-r-control); }
.tm-social svg { width: 18px; height: 18px; }
@media (max-width: 860px) { .tm-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .tm-footer-grid { grid-template-columns: 1fr; } }

/* ---------- 21. Utility ------------------------------------------------- */
.tm-mt-0 { margin-top: 0; } .tm-mt-s { margin-top: 16px; } .tm-mt-m { margin-top: 32px; } .tm-mt-l { margin-top: 64px; }
.tm-mb-m { margin-bottom: 32px; }
.tm-note { font-size: var(--tm-fs-sm); color: var(--tm-muted); }
.tm-anchor { scroll-margin-top: calc(var(--tm-header-h) + 24px); }
[id] { scroll-margin-top: calc(var(--tm-header-h) + 24px); }

/* ---------- 22. Pricing page ------------------------------------------- */
/* Class names below (pricing-card, pricing-button.primary/secondary,
   active-subscription-button, hidden-feature, modal-overlay, *-message)
   are the ones the pricing script toggles. Keep them. */
.tm-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.tm-device { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: var(--tm-fs-sm); color: var(--tm-muted); }
.tm-device .platform-switch-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: transparent; color: var(--tm-text); font: inherit; font-weight: 600;
  border: 1px solid var(--tm-line-strong); border-radius: var(--tm-r-control); padding: 8px 12px;
}
.tm-device .platform-switch-btn:hover { border-color: var(--tm-text); }

.ios-notice {
  margin-top: 20px; padding: 14px 18px; max-width: 40rem;
  border: 1px solid var(--tm-line-strong); border-left: 3px solid var(--tm-text);
  border-radius: var(--tm-r-control); background: var(--tm-surface); font-size: var(--tm-fs-sm);
}
#message { margin-top: 20px; min-height: 0; }
.success-message, .error-message {
  display: inline-block; padding: 12px 16px; border-radius: var(--tm-r-control);
  font-weight: 600; font-size: var(--tm-fs-sm);
}
.success-message { background: #E7F6EE; color: #0F5132; border: 1px solid #A6DBBE; }
.error-message { background: #FDECEA; color: #8A1C10; border: 1px solid #F2B8AF; }

.tm-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 1000px) { .tm-plans { grid-template-columns: 1fr; max-width: 34rem; } }

.pricing-card {
  position: relative; display: flex; flex-direction: column;
  background: #FFFFFF; border: 1px solid var(--tm-line-strong);
  border-top: 3px solid var(--tm-accent, var(--tm-line-strong));
  border-radius: var(--tm-r-media); padding: 28px;
}
.tm-plans--susp { --tm-accent: var(--tm-susp); }
.tm-plans--video { --tm-accent: var(--tm-video); }
.pricing-card.is-highlight { border-color: var(--tm-text); border-top-color: var(--tm-accent); }
.popular-badge {
  position: absolute; top: 20px; right: 20px;
  font-size: var(--tm-fs-xs); font-weight: 700; padding: 4px 10px; border-radius: 99px;
  background: var(--tm-text); color: var(--tm-ink);
}
.plan-name { font-family: var(--tm-display); font-stretch: 100%; font-weight: 800; font-size: var(--tm-fs-lg); margin: 0 0 10px; padding-right: 96px; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 18px; min-width: 0; }
.plan-price .price { font-family: var(--tm-display); font-stretch: 100%; font-weight: 800; font-size: clamp(1.75rem, 1.3rem + 1.2vw, 2.4rem); line-height: 1.05; overflow-wrap: anywhere; }
.plan-price .period { color: var(--tm-muted); font-size: var(--tm-fs-sm); }
.pricing-features { flex-grow: 1; border-top: 1px solid var(--tm-line); padding-top: 16px; margin-bottom: 24px; }
.pricing-features ul { list-style: none; display: grid; gap: 9px; font-size: var(--tm-fs-sm); }
.pricing-features li { position: relative; padding-left: 20px; color: var(--tm-text); }
.pricing-features li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--tm-accent, var(--tm-muted)); }
.pricing-features li.is-excluded { color: var(--tm-muted); }
.pricing-features li.is-excluded::before { background: var(--tm-muted); width: 8px; }
.hidden-feature { display: none; }
.expand-features-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 0;
  background: none; border: 0; color: var(--tm-text); font: inherit; font-size: var(--tm-fs-sm); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.expand-features-btn svg { width: 10px; height: 10px; transition: transform .2s; }

.pricing-button {
  width: 100%; min-height: 48px; padding: 0 18px; cursor: pointer;
  border-radius: var(--tm-r-control); border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: var(--tm-fs-md);
  transition: background-color .2s, border-color .2s, color .2s;
}
.pricing-button.primary { background: var(--tm-accent, var(--tm-text)); color: #0A1218; }
.tm-plans--susp .pricing-button.primary:hover { background: #55AAFF; }
.tm-plans--video .pricing-button.primary:hover { background: #FF8752; }
.pricing-button.secondary { background: transparent; color: var(--tm-text); border-color: var(--tm-line-strong); }
.pricing-button.secondary:hover { border-color: var(--tm-text); }
.pricing-button:disabled { background: var(--tm-surface-2) !important; color: var(--tm-muted) !important; border-color: var(--tm-line) !important; cursor: not-allowed; }
.pricing-button.active-subscription-button,
.pricing-button.active-subscription-button:disabled { background: #E7F6EE !important; color: #0F5132 !important; border-color: #A6DBBE !important; cursor: default; }

.billing-toggle { display: inline-flex; padding: 4px; gap: 4px; margin-bottom: 28px; background: var(--tm-surface); border: 1px solid var(--tm-line-strong); border-radius: 10px; }
.billing-toggle button { border: 0; background: transparent; color: var(--tm-muted); font: inherit; font-weight: 600; font-size: var(--tm-fs-sm); padding: 8px 18px; border-radius: var(--tm-r-control); cursor: pointer; }
.billing-toggle button.active { background: var(--tm-video); color: #1A0A03; }

/* Device selection dialog (mobile browsers only; desktop never shows it) */
.modal-overlay { position: fixed; inset: 0; z-index: 2500; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 15, 20, .6); transition: opacity .2s, visibility .2s; }
.modal-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.modal-content { width: min(460px, 100%); background: #FFFFFF; border: 1px solid var(--tm-line-strong); border-radius: var(--tm-r-media); padding: 32px; }
.modal-title { font-size: var(--tm-fs-xl); margin-bottom: 10px; }
.modal-subtitle { color: var(--tm-muted); margin-bottom: 24px; }
.platform-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.platform-btn { min-height: 72px; background: var(--tm-ink); color: var(--tm-text); border: 1px solid var(--tm-line-strong); border-radius: var(--tm-r-control); font: inherit; font-weight: 700; font-size: var(--tm-fs-lg); cursor: pointer; }
.platform-btn:hover { border-color: var(--tm-text); }
.modal-note { font-size: var(--tm-fs-sm); color: var(--tm-muted); margin: 0; }

/* ---------- 23. Suspension workflow with media + app strip ------------- */
.tm-flow { list-style: none; margin: 0; padding: 0; }
.tm-flow-n {
  display: block; margin-bottom: 14px;
  font-family: var(--tm-display); font-stretch: 100%; font-weight: 800; font-size: 2.5rem; line-height: 1;
  color: var(--tm-susp-ink);
}
.tm-frame--phone { aspect-ratio: 9 / 16; height: min(620px, 78vh); width: auto; max-width: 100%; margin-inline: auto; }

/* Horizontal screenshot strip: native scroll + snap, no carousel script */
.tm-strip {
  list-style: none; margin: 0; display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--tm-gutter);
  padding: 4px max(var(--tm-gutter), calc((100vw - var(--tm-max)) / 2 + var(--tm-gutter))) 20px;
  scrollbar-width: thin; scrollbar-color: var(--tm-line-strong) transparent;
}
.tm-strip li { flex: 0 0 clamp(240px, 28vw, 340px); scroll-snap-align: start; }
.tm-strip figure { margin: 0; }
.tm-strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--tm-r-media); border: 1px solid var(--tm-line); background: var(--tm-surface); }
.tm-strip figcaption { margin-top: 12px; font-size: var(--tm-fs-sm); color: var(--tm-muted); }
.tm-strip:focus-visible { outline-offset: -2px; }

/* ---------- 24. Scene frame: screenshot on a trail photo --------------- */
/* As on the previous site: app screens and videos sit on mtbhorizontal.jpg */
.tm-frame--scene {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(14px, 2.4vw, 32px);
  background: #1B2730 url("/images_ads/mtbhorizontal.jpg") center / cover no-repeat;
}
.tm-frame.tm-frame--scene > img,
.tm-frame.tm-frame--scene > video {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.tm-frame--scene.tm-frame--phone { aspect-ratio: 4 / 5; height: auto; width: 100%; }

/* ---------- 25. Black section (homepage sensors) ------------------------ */
.tm-section--black {
  --tm-ink: #000000; --tm-text: #FFFFFF; --tm-muted: #FFFFFF;
  --tm-surface: #141414; --tm-surface-2: #1F1F1F;
  --tm-line: rgba(255,255,255,.14); --tm-line-strong: rgba(255,255,255,.3);
  --tm-susp-ink: #6CB6FF; --tm-video-ink: #FF8A5C;
  background: #000000; color: #FFFFFF; border-top: 0 !important;
}
.tm-section--black + .tm-section { border-top: 0; }
.tm-section--black .tm-hw img { background: #1F1F1F; }
.tm-section--black .tm-btn--ghost:hover { background: #FFFFFF; color: #000000; border-color: #FFFFFF; }

/* ---------- 26. Download cards (Video page) ---------------------------- */
.tm-dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .tm-dl-grid { grid-template-columns: 1fr; } }
.tm-dl {
  position: relative; display: grid; grid-template-columns: 56px 1fr 28px; align-items: center; gap: 18px;
  padding: 22px 22px; background: #FFFFFF; color: var(--tm-text); text-decoration: none;
  border: 1px solid var(--tm-line-strong); border-radius: var(--tm-r-media);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--tm-ease);
}
.tm-dl:hover { border-color: var(--tm-video); box-shadow: 0 14px 36px -18px rgba(255, 107, 46, .55); transform: translateY(-2px); }
.tm-dl:hover .tm-dl-arrow { color: var(--tm-video-ink); transform: translateY(2px); }
.tm-dl-icon { width: 56px; height: 56px; display: grid; place-items: center; background: var(--tm-surface); border-radius: 12px; }
.tm-dl-icon img { width: 30px; height: 30px; object-fit: contain; }
.tm-dl-text { display: grid; gap: 4px; min-width: 0; }
.tm-dl-text strong { font-family: var(--tm-display); font-weight: 800; font-size: var(--tm-fs-lg); line-height: 1.2; }
.tm-dl-text small { font-size: var(--tm-fs-sm); color: var(--tm-text); }
.tm-dl-arrow { width: 26px; height: 26px; color: var(--tm-text); transition: transform .2s, color .2s; }
.tm-dl-badge {
  display: none; position: absolute; top: -11px; left: 20px;
  padding: 3px 10px; border-radius: 99px; background: var(--tm-video); color: #ffffff;
  font-size: var(--tm-fs-xs); font-weight: 700;
}
.tm-dl.is-recommended { border: 2px solid var(--tm-video); padding: 21px; }
.tm-dl.is-recommended .tm-dl-badge { display: inline-block; }
.tm-dl[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.tm-dl-help { margin: 18px 0 0; font-size: var(--tm-fs-sm); }
.tm-dl-mobile { padding: 14px 18px; margin: 0 0 18px; background: var(--tm-surface); border-left: 3px solid var(--tm-video); border-radius: var(--tm-r-control); }
.tm-dl-plans {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 40px; padding: 22px 24px; background: var(--tm-surface); border-radius: var(--tm-r-media);
}
.tm-dl-plans p { margin: 0; max-width: 36em; }

/* ---------- 27. Button colours: pricing + buy sensor ------------------- */
/* Pricing: all subscribe / change-plan buttons in orange #FFA12F.
   Dark text: white on #FFA12F is only 2:1, dark text is 9.5:1. */
.pricing-button.primary,
.tm-plans--susp .pricing-button.primary,
.tm-plans--video .pricing-button.primary { background: #FFA12F; color: #1A0A03; border-color: #FFA12F; }
.pricing-button.primary:hover,
.tm-plans--susp .pricing-button.primary:hover,
.tm-plans--video .pricing-button.primary:hover { background: #FFB454; border-color: #FFB454; }

/* Buy Sensor / Buy Mounting Kit: red with white text (4.8:1) */
.tm-btn--buy { background: #ff0000; color: #FFFFFF; border-color: #ff0000; }
.tm-btn--buy:hover,
.tm-section--black .tm-btn--buy:hover { background: #ff0000; color: #FFFFFF; border-color: #ff0000; }
