/* ==========================================================================
   Pages: sport landing pages — loaded after site.css by
     /accelerate-karting-success/, /maximize-circuit-racing-performance/,
     /turbocharge-time-attack/ and /accelerate-motorbike-racing/
   All four share one layout; per-page differences are modifiers.
   ========================================================================== */

/* ---------- Hero: the shared purple .hero, without the product image ---------- */
.sport-hero {
  overflow: hidden;
  padding-bottom: 109px;
}

/* 60px on phones like the live site, but shrunk so the longest word still fits the
   screen (live clips "Accelerate" and "Performance" at 390px).
   --fit = width of the longest word in em (Termina 600). */
.sport-hero .hero__title {
  --fit: 4.7;
  font-size: min(60px, (100vw - 20px) / var(--fit));
  line-height: 1.2;
}
.sport-hero--karting .hero__title { --fit: 6.72; }   /* "Accelerate" */
.sport-hero--circuit .hero__title { --fit: 8.24; }   /* "Performance" */
.sport-hero--time-attack .hero__title { --fit: 6.13; } /* "Dominate" */

.sport-hero .hero__text {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 20px 0 0;
  color: #adadad;
}
.sport-hero .hero__text p { font-size: 20px; line-height: 30px; }
/* circuit and motorbike pages: the live text sits in a <p>, which the live theme sets at 18px */
.sport-hero--small-text .hero__text { padding-bottom: 14px; }
.sport-hero--small-text .hero__text p { font-size: 18px; line-height: 27px; }

.sport-hero .store-badges { margin-top: 20px; }

@media (min-width: 768px) {
  /* 768 → 1024: interpolate between the live phone and tablet layouts */
  .sport-hero {
    padding-bottom: clamp(109px, 3.906vw + 79px, 119px);
    background-position: 0 -3px;
  }
  .sport-hero .hero__title { font-size: 60px; line-height: clamp(60px, 108px - 4.6875vw, 72px); }
  .sport-hero--loose .hero__title { line-height: clamp(72px, 3.516vw + 45px, 81px); }
  .sport-hero .store-badges { margin-top: clamp(20px, 3.906vw - 10px, 30px); }
}

@media (min-width: 1025px) {
  .sport-hero { background-position: -97px 45px; }
  .sport-hero .hero__title { font-size: 75px; line-height: 81px; }
}

/* ---------- "MyRaceLab helps you get faster lap times" — white band tilted over the hero ---------- */
.sport-intro {
  z-index: 1;
  margin-top: -98px;
  padding: 100px 0 90px;
  background: var(--c-white);
}

.sport-intro__grid { width: 100%; padding-top: 40px; }

.sport-intro__ghost { display: none; }

.sport-intro__title {
  display: flex;
  flex-wrap: wrap;
  column-gap: 15px;
  padding-left: 15px;
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 500;
  line-height: 30px;
  color: var(--c-text);
}
.sport-intro__phrase { color: rgba(56, 56, 56, .58); }
.sport-intro--stack .sport-intro__title { flex-direction: column; }

@media (min-width: 768px) {
  /* 768 → 1024: interpolate between the live phone and tablet layouts */
  .sport-intro { padding-bottom: clamp(30px, 270px - 23.4375vw, 90px); }
  /* stacked title (circuit page): 90px below it at 768, 4px overlap at 1024 */
  .sport-intro--stack { padding-bottom: 0; }
  .sport-intro--stack .sport-intro__grid { margin-bottom: clamp(-4px, 372px - 36.72vw, 90px); }
  .sport-intro__grid { padding-top: clamp(0px, 160px - 15.625vw, 40px); }
  .sport-intro__title {
    font-size: clamp(30px, 5.859vw - 15px, 45px);
    line-height: clamp(30px, 3.906vw, 40px);
  }
}

@media (min-width: 1025px) {
  .sport-intro { padding: 100px 0 0; }
  .sport-intro__grid {
    display: grid;
    grid-template-columns: 545px 1fr;
    row-gap: 20px;
    width: calc(100% - 2 * var(--gutter));
    margin-bottom: -4px;
    padding-top: 50px;
  }
  .sport-intro__ghost {
    display: block;
    grid-column: 2;
    font-family: var(--font-body);
    font-size: 45px;
    font-weight: 500;
    line-height: 40px;
    white-space: nowrap;
  }
  .sport-intro__ghost--1 { grid-row: 1; color: rgba(56, 56, 56, .09); }
  .sport-intro__ghost--3 { grid-row: 3; color: rgba(56, 56, 56, .22); }
  .sport-intro__ghost--4 { grid-row: 4; color: rgba(56, 56, 56, .09); }
  .sport-intro__title,
  .sport-intro--stack .sport-intro__title {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    grid-row: 2;
    column-gap: 0;
    font-size: 45px;
    line-height: 40px;
  }
  .sport-intro__title span { white-space: nowrap; }
}

/* ---------- Numbered list that highlights one item at a time ----------
   Items 2–4 start greyed out; hovering one lights it up and greys item 1. */
:is(.numbered-list--focus > .numbered-item:not(:first-child):not(:hover),
    .numbered-list--focus:has(> .numbered-item:not(:first-child):hover) > .numbered-item:first-child) .numbered-item__icon {
  opacity: .3;
}
:is(.numbered-list--focus > .numbered-item:not(:first-child):not(:hover),
    .numbered-list--focus:has(> .numbered-item:not(:first-child):hover) > .numbered-item:first-child) :is(.numbered-item__title, p) {
  color: #a2a2a2;
}
:is(.numbered-list--focus > .numbered-item:not(:first-child):not(:hover),
    .numbered-list--focus:has(> .numbered-item:not(:first-child):hover) > .numbered-item:first-child) .numbered-item__title::after {
  display: none;
}
:is(.numbered-list--focus > .numbered-item:not(:first-child):not(:hover),
    .numbered-list--focus:has(> .numbered-item:not(:first-child):hover) > .numbered-item:first-child) p {
  margin-top: 1px;
}

/* list headings are 24px at every size on these pages */
.sport-why .numbered-item__title,
.sport-smart .numbered-item__title { font-size: 24px; }

/* ---------- "Why analyzing data …" — phone left, list right ---------- */
.sport-why { margin-top: 75px; }
.sport-why .split__media { padding: 0 var(--pad); }
.sport-why .split__media img { width: 80%; }
.sport-why .split__body { margin-top: 40px; padding: 0 var(--pad); }
.sport-why .section-title { margin-bottom: 40px; padding: 0 var(--pad); line-height: 47px; }

@media (min-width: 768px) {
  .sport-why { padding: 10px 0; }
  .sport-why .split__media,
  .sport-why .split__body { margin-top: 0; padding: var(--pad); }
}

@media (min-width: 1025px) {
  .sport-why .split__media img { max-width: 349px; }
}

/* ---------- Video CTA ---------- */
.sport-cta { margin-top: 50px; }
.sport-cta .store-badges img { height: 50px; }

@media (min-width: 768px) {
  .sport-cta { padding: 10px 0; }
}

/* ---------- "The smart way to beating your fastest lap" — list left, phone right ---------- */
.sport-smart { margin-top: 100px; }
.sport-smart .split__body,
.sport-smart .split__media { padding: 0 var(--pad); }
.sport-smart .section-title { margin-bottom: 40px; padding: 0 var(--pad); line-height: 1; }
.sport-smart .split__media { margin-top: 50px; }
.sport-smart .split__media img { width: 79%; }

@media (min-width: 768px) {
  .sport-smart { padding: 10px 0; }
  .sport-smart .section-title { line-height: clamp(30px, 7.42vw - 27px, 49px); }
  .sport-smart .split__body,
  .sport-smart .split__media { margin-top: 0; padding: var(--pad); }
}

/* ---------- FAQ ---------- */
.sport-faq {
  padding: 150px 0 50px;
  background: var(--c-light);
}
.sport-faq .split { align-items: flex-start; }
.sport-faq .split > * { padding: 0 15px; }
.sport-faq .section-title { margin-bottom: 20px; padding: 0 var(--pad); }

@media (min-width: 768px) {
  /* the live FAQ band has no side padding: full width up to the 1140px container */
  .sport-faq {
    margin-top: clamp(0px, 19.53vw - 150px, 50px);
    padding: clamp(130px, 210px - 7.8125vw, 150px) 0 clamp(50px, 19.53vw - 100px, 100px);
  }
  .sport-faq .container { width: 100%; }
  .sport-faq .split > * { padding: var(--pad); }
  .sport-faq .section-title,
  .sport-news .section-title { line-height: clamp(36px, 5.078vw - 3px, 49px); }
}

/* ---------- News ---------- */
.sport-news { margin-top: 75px; padding-bottom: 30px; }
.sport-news .section-title { margin-bottom: 40px; padding: 0 var(--pad); }
.sport-news .news-card__image--center { object-position: center; }

@media (min-width: 768px) {
  .sport-news { padding: clamp(0px, 3.906vw - 30px, 10px) 0 clamp(30px, 15.625vw - 90px, 70px); }
  .sport-news .section-title { margin-bottom: clamp(40px, 11.72vw - 50px, 70px); }
}
