/* ==========================================================================
   First Visit page — vertical timeline walkthrough
   ========================================================================== */

/* Two-column layout: steps on the left, sticky video on the right */
.timeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--spacing-64);
  align-items: start;
  max-width: var(--max-width-container);
  margin-inline: auto;
}

@media (max-width: 900px) {
  .timeline-layout { grid-template-columns: 1fr; gap: var(--spacing-32); }
}

.timeline-layout > .timeline {
  padding-left: var(--spacing-48);
  max-width: 560px;
  margin-inline: 0;
}

/* Sticky video — a fixed-height panel (~1.5× first card) that stays vertically
   centred in the viewport while scrolling through the timeline section, and
   releases when the section ends. */
.timeline-layout {
  --video-h: 420px;   /* ~1.5x first timeline card height */
}

.timeline-layout__video {
  position: sticky;
  /* Centre the panel vertically within the viewport below the fixed nav */
  top: calc((100vh - var(--video-h) + var(--nav-height)) / 2);
  align-self: start;
  height: var(--video-h);
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 14px;
  background: #0a0a0a;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.35);
}

.timeline-layout__video-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .timeline-layout__video {
    position: static;
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: none;
    margin-bottom: var(--spacing-32);
    order: -1;
  }
  .timeline-layout > .timeline {
    padding-left: var(--spacing-48);
  }
}

.timeline {
  position: relative;
  max-width: 820px;
  margin-inline: auto;
  padding-left: var(--spacing-48);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-light-grey);
}

.timeline__step {
  position: relative;
  padding-bottom: var(--spacing-64);
  padding-left: var(--spacing-24);
}

.timeline__step:last-child { padding-bottom: 0; }

.timeline__number {
  position: absolute;
  left: calc(-1 * var(--spacing-48));
  top: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-default);
  border: 2px solid var(--color-black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  z-index: 1;
}

[data-reveal].is-visible .timeline__number {
  background: var(--color-black);
  color: var(--color-off-white);
  transition: background-color 500ms var(--ease-out), color 500ms var(--ease-out);
  transition-delay: 200ms;
}

.timeline__step-label {
  font-size: 0.75rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--spacing-8);
}

.timeline__step-title {
  font-size: 1.75rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: var(--spacing-16);
  max-width: 20ch;
}

.timeline__step-desc {
  font-size: 1.0625rem;
  color: var(--text-default);
  max-width: 56ch;
  margin-bottom: var(--spacing-16);
}

.timeline__step-extras {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  margin-top: var(--spacing-16);
  padding: var(--spacing-16) var(--spacing-24);
  background: var(--bg-surface);
  border: var(--border-hairline);
  border-left: 2px solid var(--color-black);
  max-width: 56ch;
}

.timeline__step-extras-label {
  font-size: 0.6875rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.timeline__step-extras p { font-size: 0.9375rem; max-width: none; }

@media (max-width: 640px) {
  .timeline { padding-left: var(--spacing-32); }
  .timeline::before { left: 10px; }
  .timeline__number {
    left: calc(-1 * var(--spacing-32));
    width: 28px; height: 28px;
    font-size: 0.75rem;
  }
  .timeline__step-title { font-size: 1.5rem; }
}

/* ==========================================================================
   FAQ — dark 2-column accordion grid (first-visit only)
   ========================================================================== */
.faq-section .faq-heading {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--color-light-grey);
  margin: 0 auto var(--spacing-64);
}

.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--spacing-80);
  row-gap: 0;
  max-width: var(--max-width-container);
  margin-inline: auto;
}

@media (max-width: 900px) {
  .faq { grid-template-columns: 1fr; column-gap: 0; }
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.faq-item__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-24);
  padding: var(--spacing-24) 0;
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  color: var(--color-off-white);
  line-height: 1.35;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.faq-item__trigger:hover { color: var(--color-mid-grey); }

.faq-item__trigger > span:first-child { flex: 1; }

.faq-item__trigger-icon {
  flex-shrink: 0;
  position: relative;
  width: 20px;
  height: 20px;
  transition: transform 300ms var(--ease-standard);
}

/* Plus icon rendered with two 1px bars; rotate 45deg on open to make an × */
.faq-item__trigger-icon::before,
.faq-item__trigger-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transform-origin: center;
  transition: transform 300ms var(--ease-standard);
}
.faq-item__trigger-icon::after {
  transform: rotate(90deg);
}

.faq-item__trigger[aria-expanded="true"] .faq-item__trigger-icon {
  transform: rotate(45deg);
}

.faq-item__panel {
  padding-bottom: var(--spacing-24);
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
  max-width: 56ch;
  color: var(--color-mid-grey);
}

.faq-item__panel p { color: var(--color-mid-grey); }

/* Pre-visit checklist */
.checklist {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-16);
}

@media (max-width: 1000px) { .checklist { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .checklist { grid-template-columns: 1fr; } }

.checklist__item {
  padding: var(--spacing-24);
  background: var(--bg-surface);
  border: var(--border-hairline);
  text-align: center;
}

.checklist__title {
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-8);
}

.checklist__icon {
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checklist__desc { font-size: 0.9375rem; color: var(--text-muted); }

/* Next-step cards — Saturday Community Sweat Pass + 30 Day Experience */
.next-step {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-24);
  margin-top: var(--spacing-40);
}

@media (max-width: 720px) { .next-step { grid-template-columns: 1fr; } }

/* .next-step__card / __title / __desc moved to css/components.css for reuse. */

/* --------------------------------------------------------------------------
   Members marquee — non-interactive auto-scrolling video reel.
   Reuses the .story / .story__* visual styling from testimonials.css; this
   block adds the marquee behavior and neutralises the testimonials' hover/
   click affordances (cursor pointer, scale-on-hover, opacity dim) since
   tiles here are decorative and not clickable.
   -------------------------------------------------------------------------- */
.stories-marquee {
  position: relative;
  margin-block: var(--spacing-32);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.stories-marquee__track {
  display: flex;
  width: max-content;
  padding-block: var(--spacing-8);
  /* Safari freezes the marquee when a var() appears inside the `animation`
     shorthand, so animation properties are spelled out longhand. */
  animation-name: stories-marquee-scroll;
  animation-duration: var(--marquee-duration, 75s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

/* Inter-item spacing lives on the items themselves (not as `gap` on the
   track) so the track width is exactly 2× the original-set width after the
   JS clones each item once. That lets the keyframe translate by a fixed
   -50% — keeping var() out of the keyframe, which Safari sometimes fails to
   resolve when the property is set via inline style. */
.stories-marquee .story { margin-inline-end: var(--spacing-8); }

@keyframes stories-marquee-scroll {
  to { transform: translateX(-50%); }
}

.stories-marquee:hover .stories-marquee__track,
.stories-marquee:focus-within .stories-marquee__track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .stories-marquee__track { animation: none; transform: none; }
}

/* Tiles inside the marquee are non-interactive — kill the testimonials hover affordances. */
.stories-marquee .story { cursor: default; }

.stories-marquee .story:hover,
.stories-marquee .story:focus-visible {
  transform: none;
  box-shadow: none;
}

.stories-marquee .story:hover .story__video,
.stories-marquee .story:focus-visible .story__video { opacity: 1; }

@media (max-width: 640px) {
  .stories-marquee .story { flex-basis: 160px; }
}
