/* /testflight/ landing page. Builds on /styles.css tokens. */

.tf h1 {
  text-transform: none;
  letter-spacing: -0.035em;
  font-size: clamp(2.4rem, 9.5vw, 4.4rem);
  max-width: 15ch;
}

.tf h2 {
  text-transform: none;
  letter-spacing: -0.025em;
}

.tf :focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.tf-hero {
  padding: 1.5rem 0 3rem;
}

.tf-hero .lede {
  max-width: 30rem;
  margin-bottom: 1.6rem;
}

.tf-actions {
  display: grid;
  gap: 0.7rem;
  justify-items: start;
}

.tf-note {
  margin: 0;
  font-size: 0.95rem;
  color: #46464d;
}

/* Pace dial */
.tf-pace {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #f2f2f4;
  padding: 4rem 0 4.25rem;
  isolation: isolate;
}

.tf-rows {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  --row-size: clamp(3.4rem, 15vw, 7.5rem);
  font-family: var(--brand);
  font-weight: 700;
  font-size: var(--row-size);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #303036;
  white-space: nowrap;
  user-select: none;
}

.tf-row {
  overflow: hidden;
}

.tf-track {
  display: flex;
  width: max-content;
  gap: 0.35em;
  animation: tf-slide calc(var(--dur, 21s) * var(--k, 1)) linear infinite;
}

.tf-row:nth-child(2) { --k: 1.18; }
.tf-row:nth-child(3) { --k: 0.92; }
.tf-row:nth-child(4) { --k: 1.3; }
.tf-row:nth-child(5) { --k: 1.05; }

.tf-row--rev .tf-track {
  animation-direction: reverse;
}

.tf-track .is-accent {
  color: var(--red);
}

@keyframes tf-slide {
  to {
    transform: translateX(-50%);
  }
}

.tf-pace-panel {
  position: relative;
}

.tf-pace h2 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  max-width: 22ch;
  margin-bottom: 0.4rem;
}

.tf-readout {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0.3rem 0 0.4rem;
  cursor: pointer;
}

.tf-readout output {
  font-size: clamp(5.5rem, 27vw, 11.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 0.35em var(--ink), 0 0 0.15em var(--ink);
}

.tf-unit {
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  font-weight: 500;
  text-shadow: 0 0 0.5em var(--ink);
}

.tf-pace input[type="range"] {
  display: block;
  width: min(100%, 36rem);
  height: 2.75rem;
  margin: 0.25rem 0 0.75rem;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: grab;
  touch-action: pan-y;
}

.tf-pace input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: #f2f2f4;
}

.tf-pace input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: #f2f2f4;
}

.tf-pace input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 2.1rem;
  height: 2.1rem;
  margin-top: calc((6px - 2.1rem) / 2);
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--red);
}

.tf-pace input[type="range"]::-moz-range-thumb {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--red);
}

.tf-pace input[type="range"]:focus-visible {
  outline: none;
}

.tf-pace input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.tf-pace input[type="range"]:focus-visible::-moz-range-thumb {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.tf-help {
  max-width: 30rem;
  margin: 0;
  color: #d4d4da;
  text-shadow: 0 0 0.6em var(--ink);
}

/* FAQ */
.tf-faq h2 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}


.tf-faq {
  padding: 1rem 0 4rem;
}

.tf-faq .wrap {
  max-width: 44rem;
  margin-inline: max(1.125rem, calc((100% - 1080px) / 2));
}

.tf-faq details {
  border-top: 1px solid #8e8e94;
}

.tf-faq details:last-of-type {
  border-bottom: 1px solid #8e8e94;
}

.tf-faq summary {
  cursor: pointer;
  padding: 1rem 2rem 1rem 0;
  font-weight: 700;
  list-style: none;
  position: relative;
}

.tf-faq summary::-webkit-details-marker {
  display: none;
}

.tf-faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 0.85rem;
  font-size: 1.4rem;
  line-height: 1;
}

.tf-faq details[open] summary::after {
  content: "\2212";
}

.tf-faq details p {
  margin: 0 0 1.1rem;
  max-width: 36rem;
}

.tf-faq a {
  font-weight: 700;
}

.tf-close {
  padding: 1rem 0 4.5rem;
}

.tf-close h2 {
  font-size: clamp(2rem, 7vw, 3.4rem);
  margin-bottom: 1.2rem;
}

@media (min-width: 800px) {
  .tf-hero {
    padding: 3.5rem 0 4.5rem;
  }

  .tf-pace {
    padding: 5.5rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tf-track {
    animation: none;
  }
}

.tf-hero-visual {
  display: none;
  margin: 0;
}

@media (min-width: 900px) {
  .tf-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 3rem;
    align-items: center;
  }

  .tf-hero-visual {
    display: block;
  }

  .tf-hero-visual img {
    width: min(100%, 22rem);
    height: auto;
    margin-inline: auto;
  }

  .tf-faq .wrap {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    column-gap: 4rem;
    align-items: start;
  }

  .tf-faq h2 {
    grid-column: 1;
  }

  .tf-faq .wrap {
    max-width: none;
    margin-inline: auto;
  }

  .tf-faq details {
    grid-column: 2;
  }

  .tf-faq details:first-of-type {
    grid-row: 1;
  }
}
