/* ==========================================================================
   pages.css
   Inner pages (Platform, FAQ, Book a demo, legal), the header and mobile menu,
   forms, the Platform page groups and the shared scroll stories.
   ========================================================================== */
[hidden] {
  display: none !important;
}
/* Visually hidden, still read by screen readers */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* ==========================================================================
   Header: current page and the mobile menu
   ========================================================================== */
.nav-links a {
  position: relative;
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  background: var(--color-accent);
}
.nav-links a:focus-visible,
.brand:focus-visible,
.menu-btn:focus-visible {
  outline: 2px solid #c9fafd;
  outline-offset: 4px;
  border-radius: 6px;
}
.menu-btn {
  cursor: pointer;
}
.hdr-in {
  position: relative;
}
.mnav {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  gap: 2px;
  padding: var(--sp-10);
  border: 1px solid var(--color-line);
}
.mnav a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--sp-14);
  font-size: 17px;
  font-weight: 600;
  color: #e6e6ea;
}
.mnav a:not(.btn)[aria-current="page"] {
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--color-text);
}
.mnav a:not(.btn):focus-visible {
  outline: 2px solid #c9fafd;
  outline-offset: -2px;
}
.mnav .btn {
  margin-top: var(--sp-8);
}
/* Headline split: site.js wraps each line of a [data-split] heading in .ln > .li and adds .is-split while the
   lines slide up (the home hero uses the same rules, with its own delay in hero.css) */
[data-split] .ln {
  display: block;
  overflow: hidden;
  padding: 0.1em 0.08em 0.16em;
  margin: -0.1em -0.08em -0.16em;
}
[data-split] .li {
  display: block;
}
[data-split].is-split {
  display: block;
}
@media (prefers-reduced-motion: no-preference) {
  .js-motion .page-hero [data-split]:not(.rv-done) {
    opacity: 0;
    animation: hero-show 0.01s var(--hero-failsafe) forwards;
  }
  .js-motion [data-split].is-split {
    opacity: 1;
    animation: none;
  }
  .js-motion [data-split].is-split .li {
    animation: hero-line-up 0.85s var(--ease-out) both;
    animation-delay: calc(0.12s + var(--i) * 0.09s);
  }
  .js-motion:not(.hgo) .page-hero .lede,
  .js-motion:not(.hgo) .page-hero .cta-row {
    opacity: 0;
    animation: hero-show 0.01s var(--hero-failsafe) forwards;
  }
  .js-motion.hgo .page-hero .lede {
    animation: hero-rise 0.7s var(--ease-out) 0.42s both;
  }
  .js-motion.hgo .page-hero .cta-row {
    animation: hero-rise 0.7s var(--ease-out) 0.56s both;
  }
}
/* Eyebrow line above an inner-page heading (Platform, FAQ, the 404); the home hero's is in hero.css */
.page-hero .eyebrow {
  text-wrap: balance;
  font-size: var(--fs-body-3);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}
/* ==========================================================================
   Inner page hero
   ========================================================================== */
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #02080a;
  padding: clamp(132px, 13vw, 184px) 0 clamp(var(--sp-64), 7vw, 104px);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.page-hero-bg picture,
.page-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
.page-hero-bg img {
  object-fit: cover;
  object-position: var(--op, 50% 32%);
  transform: scale(1.08);
  filter: blur(5px) saturate(1.06);
}
.page-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(2, 8, 10, 0.84) 0,
      rgba(2, 8, 10, 0.62) 34%,
      rgba(2, 8, 10, 0.55) 62%,
      var(--color-bg) 100%
    ),
    radial-gradient(60% 55% at 50% 42%, rgba(2, 8, 10, 0.5), transparent 80%);
}
.page-hero-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url(../img/zgrain.png) 0 0/128px 128px repeat;
  opacity: 0.9;
  pointer-events: none;
}
.page-hero-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.page-hero h1 {
  max-width: 16ch;
  margin-top: var(--sp-22);
}
.page-hero h1.wide {
  max-width: 22ch;
}
/* Platform: two lines that break after the comma ("…runs on, / in one platform."); balanced wrapping
   would split "club / runs on". 13.75em sits in the middle of the widths that give this break. */
@media (min-width: 641px) {
  .page-hero h1.break-at-comma {
    max-width: 13.75em;
    text-wrap: wrap;
  }
}
.page-hero .lede {
  margin: var(--sp-20) auto 0;
  max-width: 640px;
  text-wrap: balance;
}
.page-hero .cta-row {
  justify-content: center;
  margin-top: var(--sp-30);
}
.page-hero.short {
  padding-bottom: clamp(var(--sp-40), 5vw, 72px);
}
@media (max-width: 640px) {
  .page-hero {
    padding: 112px 0 var(--sp-56);
  }
  .page-hero h1 {
    max-width: none;
  }
}
/* ==========================================================================
   Inner page sections
   ========================================================================== */
.section--tight {
  padding-top: clamp(var(--sp-40), 5vw, 72px);
}
/* ==========================================================================
   Book a demo form
   ========================================================================== */
.demo-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: var(--sp-16);
  align-items: start;
}
.form-card {
  padding: clamp(var(--sp-24), 3.4vw, var(--sp-44));
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-18) var(--sp-16);
  margin-top: var(--sp-26);
}
.field {
  display: grid;
  gap: var(--sp-8);
}
.field.full {
  grid-column: 1/-1;
}
.field label {
  font-size: 14px;
  font-weight: 600;
  color: #e6e6ea;
}
.field label .opt {
  color: var(--color-text-muted);
  font-weight: 500;
}
.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: var(--sp-14) var(--sp-16);
  color: var(--color-text);
  font: inherit;
  font-size: 16px;
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast);
}
.field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.5;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #6f6f78;
}
.field input:focus,
.field textarea:focus {
  outline: none;
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #f08a7a;
}
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-14) var(--sp-20);
  margin-top: var(--sp-26);
}
.form-foot .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
/* Sending: TrainOn's Button_M "Processing" variant (Product DS): tonal fill (Cerulean 20% on Night),
   the 16px Auto Renew icon in Cerulean, no label. It hugs the icon, so with the 48px sides it is 112px wide. */
.form-foot .btn.processing {
  opacity: 1;
  cursor: progress;
  background: linear-gradient(rgb(var(--accent-rgb) / 0.2), rgb(var(--accent-rgb) / 0.2)), var(--fg-black) !important;
  color: var(--fg-cerulean) !important;
}
.btn.processing svg {
  width: 16px;
  height: 16px;
  animation: btn-spin 1s linear infinite;
}
@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn.processing svg {
    animation: none;
  }
}
.form-help {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 42ch;
}
.form-state h2 {
  font-size: clamp(26px, 2.6vw, 36px);
  outline: none;
}
.form-state p {
  color: #c7c7cd;
  margin-top: var(--sp-14);
  font-size: 17px;
  line-height: 1.55;
  max-width: 52ch;
}
.form-state .btn {
  margin-top: var(--sp-26);
}
.form-state .sent-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-22);
  color: var(--color-accent);
}
.aside-card h3 {
  margin-top: 0;
}
.aside-card p {
  color: #b7b7bf;
  margin-top: var(--sp-14);
  font-size: 16px;
  line-height: 1.55;
}
.aside-card .aside-tagline {
  margin-top: var(--sp-22);
  padding-top: var(--sp-20);
  border-top: 1px solid var(--color-line);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--color-text);
}
@media (max-width: 900px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}
/* Short demo form at the end of an inner page (.cta-panel--form, FAQ).
   Three fields share the .field-grid grid; the third spans the row. */
.cta-panel--form {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(var(--sp-32), 5vw, 72px);
  align-items: start;
  text-align: left;
  padding: clamp(var(--sp-32), 5vw, var(--sp-64));
}
.cta-panel--form h2 {
  max-width: 14ch;
  margin: 0;
}
.cta-panel--form .micro {
  margin-top: var(--space-sub);
  color: var(--color-text-muted);
}
.cta-panel--form .field-grid {
  margin-top: 0;
}
.cta-panel--form .field-grid > .field:nth-child(3) {
  grid-column: 1/-1;
}
.cta-panel--form .btn {
  margin-top: 0;
}
.cta-panel--form .form-state h3 {
  outline: none;
}
.cta-panel--form .form-state .btn {
  margin-top: var(--space-grid);
}
@media (max-width: 900px) {
  .cta-panel--form {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================================
   404: links to the main pages
   ========================================================================== */
.notfound-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-grid);
}
.notfound-links a {
  display: block;
  text-wrap: pretty;
  padding-top: var(--sp-20);
  border-top: 1px solid var(--color-line-strong);
  color: var(--color-text);
  text-decoration: none;
}
.notfound-links b {
  display: block;
  font-size: var(--fs-body-2);
  font-weight: 500;
}
.notfound-links span {
  display: block;
  margin-top: var(--sp-6);
  color: var(--color-text-muted);
}
@media (hover: hover) {
  .notfound-links a:hover b {
    color: var(--fg-cerulean);
  }
}
.notfound-links a:focus-visible {
  outline: 2px solid #c9fafd;
  outline-offset: 4px;
}
.notfound-home {
  margin-top: var(--space-heading);
  text-align: center;
}
.notfound-home a {
  color: var(--color-text-muted);
}
@media (max-width: 820px) {
  .notfound-links {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal {
  max-width: 760px;
  margin: 0 auto;
}
.legal h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-top: var(--sp-44);
}
.legal h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  margin-top: var(--sp-24);
}
.legal a {
  color: var(--color-accent);
  text-underline-offset: 3px;
}
.legal p,
.legal li {
  color: #c3c3ca;
  font-size: 17px;
  line-height: 1.65;
  margin-top: var(--sp-12);
}
.legal ul {
  margin-top: var(--sp-6);
  padding-left: var(--sp-20);
  list-style: disc;
}
.legal ul li {
  margin-top: var(--sp-8);
}
/* effective and last-updated dates, above the text */
.legal .legal-dates {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-top: 0;
}
/* Book a demo page: the form and the aside may shrink below their content width */
.demo-grid > * {
  min-width: 0;
}
.form-card .form-state {
  padding: 0;
  margin-top: var(--sp-22);
}
/* ==========================================================================
   Scroll stories
   ========================================================================== */
.story {
  display: grid;
  align-items: stretch;
}
.story-steps {
  list-style: none;
  margin: var(--sp-40) 0 0;
  padding: 0;
  margin-top: var(--sp-26);
}
.story-step {
  position: relative;
  border-top: 1px solid var(--color-line);
}
.story-step:last-child {
  border-bottom: 1px solid var(--color-line);
}
.story-step-btn {
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color var(--dur-fast);
}
.story-step-btn:hover {
  color: #e6e6ea;
}
.story-step-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 8px;
}
.story-step.on .story-step-btn {
  color: var(--color-text);
}
.story-step-desc {
  display: grid;
  grid-template-rows: 0fr;
}
.story-step-desc p {
  overflow: hidden;
  color: var(--color-text-muted);
  line-height: 1.55;
  max-width: 44ch;
  margin: 0;
  padding: 0 0 0 var(--sp-48);
  opacity: 0;
}
.story-step.on .story-step-desc {
  grid-template-rows: 1fr;
}
.story-step.on .story-step-desc p {
  opacity: 1;
  transition-delay: 0.1s;
  padding-bottom: var(--sp-14);
}
.story-step-bar {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
  z-index: 1;
  opacity: 0;
  transition: opacity var(--dur-fast);
  width: 100%;
}
.story-step-bar b {
  display: block;
  height: 100%;
  background: var(--color-accent);
  transform-origin: 0 50%;
}
.story-step.on .story-step-bar {
  opacity: 1;
}
.story-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-line);
  overflow: hidden;
}
.story-caption {
  display: none;
}
.story-panel.on .story-screen {
  transform: none;
  opacity: 1;
}
.story-screen img {
  max-width: 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 84%, transparent);
  mask-image: linear-gradient(180deg, #000 84%, transparent);
  max-height: 300px;
}
@media (max-width: 820px) {
  .story-steps {
    display: none;
  }
  .story-panel {
    align-items: stretch;
  }
  .story-caption {
    gap: var(--sp-12);
  }
  .story-caption p {
    color: var(--color-text-muted);
    line-height: 1.5;
  }
}
.story-text {
  position: relative;
}
/* One centered stage, crossfading panels, lighter left column */
.story-track {
  display: block;
  gap: 0;
}
.story-sticky,
.story-stage {
  position: sticky;
  top: max(96px, calc(50vh - 240px));
}
.story-sticky .lede {
  font-size: 15px;
  line-height: 1.55;
  max-width: 46ch;
}
.story-step-btn {
  padding: 13px 0;
  font-size: 16px;
}
.story-step-desc p {
  font-size: 14px;
}
.story-stage .story-panel {
  min-height: 0;
  opacity: 0;
  visibility: hidden;
}
.story-stage .story-panel.on {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 820px) {
  .story-stage {
    flex-direction: column;
    gap: var(--sp-14);
  }
  .story {
    grid-template-columns: 1fr;
  }
  .story-sticky {
    position: static;
  }
}
/* ==========================================================================
   Modifiers used in page markup
   ========================================================================== */
.section--flush {
  padding-top: 0;
  /* continues the section above with no gap */
}
.cta-row--center {
  justify-content: center;
}
/* ==========================================================================
   Platform page groups
   ========================================================================== */
.platform-group-head {
  max-width: 760px;
}
.platform-group-head h2 {
  margin: 0;
}
.platform-group-head p {
  margin: var(--space-sub) 0 0;
}
.platform-features {
  list-style: none;
  margin: var(--space-heading) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-grid);
}
.platform-features li {
  border-top: 1px solid var(--color-line-strong);
  padding-top: var(--sp-18);
  display: grid;
  gap: var(--space-label);
  align-content: start;
}
/* The "Built in" tag sits at the top right of the title, on its first line; a long title wraps beside it */
.platform-features b {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-8);
}
.platform-features .feature-tag {
  flex: none;
}
