/* The feature story stays readable without script; enhancement adds the scroll stage. */
.feature-scene .feature-scroll {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.feature-scene .feature-scroll::before {
  display: none;
}
.feature-scroll .feature-intro {
  position: relative;
  z-index: 1;
  margin-bottom: 54px;
}
.feature-scroll-runway {
  position: relative;
  z-index: 1;
}
.feature-sticky {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
}
.feature-stage {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: min(1256px, calc(100% - 48px));
  padding: 40px;
  border-radius: 32px;
  overflow: hidden;
  background: #e6ddff;
}
.feature-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  /* Translate a generous bleed rather than rotating a rectangle: every corner
     stays painted as the stage expands, contracts, and changes aspect ratio. */
  inset: -30%;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at var(--gradient-x, 24%) var(--gradient-y, 24%),
      #6f4fff91 0%,
      #6f4fff40 27%,
      #6f4fff00 57%
    ),
    radial-gradient(ellipse at 84% 18%, #1a12405c 0%, #6f4fff00 52%),
    radial-gradient(ellipse at 80% 92%, #edf2b9ed 0%, #edf2b900 48%),
    radial-gradient(ellipse at 12% 90%, #eee5ff 0%, #eee5ff00 60%),
    linear-gradient(125deg, #e6ddff 6%, #b7a2ff 46%, #dcd2fa 76%, #f0f2df);
  transform: translate3d(
    calc(var(--stage-progress, 0) * -9%),
    calc(var(--stage-progress, 0) * 7%),
    0
  );
}
.tour-ball-scene {
  --tour-ball-size: clamp(150px, 12.5vw, 212.5px);
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  contain: layout paint;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.feature-scroll-ready .tour-ball-scene:not([hidden]) {
  visibility: visible;
}
.tour-ball {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--tour-ball-size);
  height: var(--tour-ball-size);
  transform: translate3d(var(--ball-x, 0px), var(--ball-y, 0px), 0)
    translate(-50%, -50%);
  will-change: transform;
}
.tour-ball-body {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.tour-ball-body img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  transform: rotate(var(--ball-spin, 0deg));
  filter: drop-shadow(0 4px 5px #1a12401f);
  -webkit-user-drag: none;
  will-change: transform;
}
.tour-ball-shadow {
  position: absolute;
  z-index: 0;
  top: calc(100% - 4px + var(--ball-shadow-offset-y, 0px));
  left: 50%;
  width: 72%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #1a1240 0%, #1a124000 72%);
  opacity: var(--ball-shadow-opacity, 0.14);
  transform: translateX(-50%) scale(var(--ball-shadow-scale, 1));
  filter: blur(4px);
}
.feature-nav {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
}
.feature-nav-item {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  min-width: 0;
  padding: 10px 18px;
  border: 2px solid #ffffffd9;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffffe3;
  color: #51446f;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.15px;
  cursor: pointer;
}
.feature-nav-item:hover {
  border-color: #fff;
  background: #fff;
}
.feature-nav-item:focus-visible {
  outline: 3px solid var(--night);
  outline-offset: 4px;
}
.feature-nav-fill {
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: calc(var(--feature-progress, 0) * 100%);
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(115deg, #dacbff, #b69aff 65%, #d9c8ff);
  pointer-events: none;
}
.feature-nav-fill::after {
  content: "";
  position: absolute;
  inset: -55% -70%;
  background: linear-gradient(
    110deg,
    #ffffff00 32%,
    #ffffff15 42%,
    #ffffffa8 50%,
    #ffffff15 58%,
    #ffffff00 68%
  );
  opacity: 0.7;
}
@media (prefers-reduced-motion: reduce) {
  .feature-stage::before,
  .feature-stage::after {
    transform: none;
  }
}
.feature-nav-icon {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  color: inherit;
  stroke-width: 1.8;
}
.feature-nav-label {
  white-space: nowrap;
}
.feature-nav-item[aria-current="true"],
.feature-nav-item[aria-current="step"],
.feature-nav-item[aria-selected="true"] {
  border-color: #fff;
  color: var(--night);
}
.feature-window {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
}
.feature-scroll .feature-track {
  display: grid;
  gap: 28px;
  margin: 0;
}
.feature-scroll .feature-row {
  position: relative;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  margin: 0;
  padding: 38px;
  border-radius: 24px;
  background: #fff;
}
.feature-scroll .feature-row:nth-child(n) .feature-copy {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  max-width: 320px;
  justify-self: center;
  text-align: left;
}
.feature-scroll .feature-row:nth-child(n) .feature-panel {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 600px;
  height: auto;
  padding: 20px;
  border-radius: 18px;
  justify-self: center;
  box-shadow: none;
  background: #f4f1f9;
}
.feature-scroll .feature-copy::before {
  display: none;
}
.feature-scroll .feature-copy h3 {
  font-size: clamp(28px, 2.55vw, 36px);
  line-height: 1.15;
  letter-spacing: -1.15px;
}
.feature-scroll .feature-copy p {
  margin-top: 20px;
  max-width: 32ch;
  font-size: 14px;
  line-height: 1.75;
}
.feature-scroll .feature-row:nth-child(n) .trim-panel,
.feature-scroll .feature-row:nth-child(n) .community-panel {
  max-width: 480px;
}
.feature-scroll .feature-panel.record-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  justify-content: normal;
  padding: 16px;
}
.feature-scroll .shotmap-card,
.feature-scroll .match-stats-card {
  min-height: 0;
  padding: 18px 14px;
  border-radius: 12px;
}
.feature-scroll .shotmap-plot {
  min-height: 240px;
}
.feature-scroll .stats-card-heading h4,
.feature-scroll .shotmap-heading h4 {
  font-size: 19px;
}
.feature-scroll .match-stats-list {
  gap: 13px;
}
.feature-scroll .stat-comparison {
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  row-gap: 7px;
}
.feature-scroll .stat-comparison dt {
  font-size: 10px;
}
.feature-scroll .stats-value {
  font-size: 18px;
}
.feature-scroll .stats-value small {
  font-size: 8px;
}
.feature-scroll .shotmap-legend {
  gap: 7px 12px;
  font-size: 9px;
}
.feature-scroll .community-art {
  gap: 14px;
}
.feature-scroll .timeline-surface,
.feature-scroll .timeline-match-details {
  border-radius: 12px;
}
.feature-scroll .timeline-surface {
  padding: 15px 17px 17px;
}
.feature-scroll .timeline-header {
  min-height: 36px;
}
.feature-scroll .timeline-next {
  margin-top: 12px;
}
.feature-scroll .timeline-match-details {
  padding: 20px;
}
.feature-scroll .timeline-match-details .match-going {
  margin-top: 18px;
}

/* Enhancement is enabled only when the complete preview fits the viewport. */
@media (min-width: 760px) and (min-height: 680px) and (prefers-reduced-motion: no-preference) {
  .feature-scroll-ready .feature-scroll-runway {
    height: var(--feature-runway-height, 510svh);
  }
  .feature-scroll-ready .feature-sticky {
    position: sticky;
    top: 0;
    height: 100svh;
  }
  .feature-scroll-ready .feature-stage {
    --stage-compact-width: min(1120px, 88vw);
    --stage-wide-width: calc(100vw - 48px);
    --stage-compact-height: min(690px, calc(100svh - 48px));
    --stage-wide-height: calc(100svh - 48px);
    width: calc(
      var(--stage-compact-width) +
        (var(--stage-wide-width) - var(--stage-compact-width)) *
        var(--stage-expand, 0)
    );
    height: calc(
      var(--stage-compact-height) +
        (var(--stage-wide-height) - var(--stage-compact-height)) *
        var(--stage-expand, 0)
    );
    max-height: calc(100svh - 48px);
    justify-content: center;
    padding: 36px 40px;
    gap: 20px;
    will-change: width, height;
  }
  .feature-scroll-ready .feature-window {
    position: relative;
    flex: 1 1 auto;
    max-height: 580px;
    min-height: 0;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 15px 55px #291a5814;
  }
  .feature-scroll-ready .feature-track {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    gap: 0;
    isolation: isolate;
  }
  .feature-scroll-ready .feature-row {
    position: absolute;
    inset: 0;
    opacity: var(--slide-opacity, 0);
    transform: translate3d(var(--slide-x, 0px), 0, 0);
    pointer-events: none;
    background: transparent;
    will-change: opacity, transform;
  }
  .feature-scroll-ready .feature-row.is-active {
    pointer-events: auto;
  }
}

@media (min-width: 921px) and (min-height: 680px) and (max-height: 800px) {
  .feature-scroll-ready .feature-stage {
    padding: 24px 32px;
    gap: 16px;
  }
  .feature-scroll-ready .feature-row {
    padding: 28px;
    gap: 30px;
  }
  .feature-scroll-ready .feature-row:nth-child(n) .trim-panel {
    max-width: 430px;
    padding: 14px;
  }
  .feature-scroll-ready .trim-art .mini-heading {
    padding: 14px 16px;
    font-size: 13px;
  }
  .feature-scroll-ready .trim-timelines {
    padding: 15px 16px;
    gap: 13px;
  }
  .feature-scroll-ready .feature-row:nth-child(n) .community-panel {
    padding: 14px;
  }
}

@media (min-width: 760px) and (max-width: 1100px) {
  .feature-scroll .feature-row {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
    gap: 26px;
    padding: 28px;
  }
  .feature-scroll .feature-copy h3 {
    font-size: 28px;
    letter-spacing: -0.9px;
  }
  .feature-scroll .feature-copy p {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.65;
  }
  .feature-scroll .feature-row:nth-child(n) .feature-panel {
    padding: 14px;
  }
  .feature-scroll .feature-panel.record-panel {
    gap: 10px;
    padding: 11px;
  }
  .feature-scroll .match-stats-card,
  .feature-scroll .shotmap-card {
    padding: 14px 10px;
  }
  .feature-scroll .match-stats-players {
    gap: 14px;
    font-size: 11px;
  }
  .feature-scroll .stats-card-heading h4,
  .feature-scroll .shotmap-heading h4 {
    font-size: 16px;
  }
  .feature-scroll .stat-comparison {
    grid-template-columns: 31px minmax(0, 1fr) 31px;
  }
  .feature-scroll .stat-comparison dt {
    font-size: 9px;
  }
  .feature-scroll .stats-value {
    font-size: 16px;
  }
  .feature-scroll .stats-value small {
    font-size: 7px;
  }
  .feature-scroll .shotmap-plot {
    min-height: 235px;
  }
  .feature-scroll .shotmap-heading > span {
    font-size: 8px;
  }
  .feature-scroll .shotmap-legend {
    font-size: 8px;
  }
  .feature-scroll .timeline-plan-label {
    gap: 4px;
    font-size: 11px;
  }
  .feature-scroll .timeline-header h4 {
    font-size: 16px;
  }
  .feature-scroll .timeline-day strong {
    width: 29px;
    height: 29px;
    font-size: 15px;
  }
  .feature-scroll .timeline-day > small {
    font-size: 9px;
  }
  .feature-scroll .timeline-next strong {
    font-size: 12px;
  }
  .feature-scroll .timeline-next-details > span {
    font-size: 11px;
  }
}

@media (min-width: 760px) and (max-width: 920px) and (min-height: 680px) {
  .feature-scroll-ready .feature-stage {
    padding: 24px;
    gap: 16px;
  }
  .feature-scroll-ready .feature-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 18px;
    padding: 24px;
  }
  .feature-scroll-ready .feature-row:nth-child(n) .feature-copy {
    grid-column: 1;
    grid-row: 1;
    max-width: 560px;
  }
  .feature-scroll-ready .feature-copy h3 {
    font-size: 25px;
  }
  .feature-scroll-ready .feature-copy h3 br {
    display: none;
  }
  .feature-scroll-ready .feature-copy p {
    margin-top: 10px;
    max-width: 62ch;
    font-size: 12px;
    line-height: 1.55;
  }
  .feature-scroll-ready .feature-row:nth-child(n) .feature-panel {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    max-width: 500px;
    padding: 12px;
  }
  .feature-scroll-ready .trim-panel {
    max-width: 420px !important;
  }
  .feature-scroll-ready .trim-art .mini-heading {
    padding: 12px 16px;
    font-size: 12px;
  }
  .feature-scroll-ready .trim-timelines {
    padding: 14px 16px;
    gap: 12px;
  }
  .feature-scroll-ready .feature-panel.record-panel {
    max-width: 480px;
  }
  .feature-scroll-ready .match-stats-card,
  .feature-scroll-ready .shotmap-card {
    padding-block: 12px;
  }
  .feature-scroll-ready .match-stats-list {
    gap: 10px;
  }
  .feature-scroll-ready .match-stats-players {
    margin-top: 12px;
  }
  .feature-scroll-ready .shotmap-plot {
    min-height: 210px;
    margin-top: 12px;
  }
  .feature-scroll-ready .feature-row:nth-child(n) .community-panel {
    max-width: 420px;
    padding: 10px;
  }
  .feature-scroll-ready .community-art {
    gap: 10px;
  }
  .feature-scroll-ready .timeline-surface {
    padding: 10px 14px 12px;
  }
  .feature-scroll-ready .timeline-header {
    min-height: 30px;
  }
  .feature-scroll-ready .timeline-days {
    margin-top: 5px;
    gap: 3px;
  }
  .feature-scroll-ready .timeline-day {
    gap: 3px;
    font-size: 9px;
  }
  .feature-scroll-ready .timeline-day strong {
    width: 27px;
    height: 27px;
    font-size: 14px;
  }
  .feature-scroll-ready .timeline-next {
    min-height: 38px;
    margin-top: 8px;
  }
  .feature-scroll-ready .timeline-match-details {
    padding: 15px;
  }
  .feature-scroll-ready .timeline-match-details h4 {
    margin-top: 9px;
    font-size: 21px;
  }
  .feature-scroll-ready .timeline-match-details .match-going {
    margin-top: 12px;
  }
  .feature-scroll-ready .timeline-match-details .mini-avatar {
    width: 30px;
    height: 30px;
    font-size: 9px;
  }
}

@media (max-width: 759px) {
  .feature-scene .feature-scroll {
    padding-top: 12px;
  }
  .feature-scroll .feature-intro {
    margin-bottom: 35px;
  }
  .feature-stage {
    width: calc(100% - 24px);
    padding: 24px 16px;
    border-radius: 25px;
    gap: 22px;
  }
  .feature-nav {
    gap: 6px;
  }
  .feature-nav-item {
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-height: 65px;
    padding: 8px 5px;
    border-radius: 13px;
    font-size: 10px;
  }
  .feature-nav-icon {
    width: 21px;
    height: 21px;
  }
  .feature-scroll .feature-track {
    gap: 18px;
  }
  .feature-scroll .feature-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 26px 20px 20px;
    border-radius: 18px;
  }
  .feature-scroll .feature-row:nth-child(n) .feature-copy {
    grid-column: 1;
    grid-row: 1;
    max-width: 460px;
  }
  .feature-scroll .feature-copy h3 {
    font-size: 28px;
    letter-spacing: -0.9px;
  }
  .feature-scroll .feature-copy p {
    margin-top: 14px;
    max-width: 40ch;
    font-size: 13px;
    line-height: 1.7;
  }
  .feature-scroll .feature-row:nth-child(n) .feature-panel {
    grid-column: 1;
    grid-row: 2;
    max-width: 480px;
    padding: 12px;
    border-radius: 13px;
  }
  .feature-scroll .feature-panel.record-panel {
    grid-template-columns: minmax(0, 1fr);
    max-width: 420px;
    gap: 16px;
  }
  .feature-scroll .match-stats-card,
  .feature-scroll .shotmap-card {
    padding: 20px 16px;
  }
  .feature-scroll .stats-card-heading h4,
  .feature-scroll .shotmap-heading h4 {
    font-size: 21px;
  }
  .feature-scroll .match-stats-list {
    gap: 15px;
  }
  .feature-scroll .stat-comparison {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }
  .feature-scroll .stat-comparison dt {
    font-size: 11px;
  }
  .feature-scroll .stats-value {
    font-size: 20px;
  }
  .feature-scroll .stats-value small {
    font-size: 9px;
  }
  .feature-scroll .shotmap-plot {
    min-height: 320px;
  }
  .feature-scroll .timeline-surface {
    padding: 13px 12px 15px;
  }
  .feature-scroll .timeline-match-details {
    padding: 18px 15px;
  }
}

@media (max-width: 390px) {
  .feature-stage {
    padding-inline: 12px;
  }
  .feature-scroll .feature-row {
    padding-inline: 15px;
  }
  .feature-scroll .feature-copy h3 {
    font-size: 26px;
  }
  .feature-scroll .stats-card-heading {
    gap: 6px;
  }
  .feature-scroll .stats-card-heading h4 {
    font-size: 19px;
  }
  .feature-scroll .stats-card-heading > span {
    font-size: 8px;
  }
  .feature-scroll .feature-row:nth-child(n) .feature-panel {
    padding: 9px;
  }
  .feature-scroll .trim-art .mini-heading {
    padding: 14px 12px;
    font-size: 12px;
  }
  .feature-scroll .trim-timelines {
    padding: 16px 12px;
  }
  .feature-scroll .timeline-header h4 {
    font-size: 14px;
  }
  .feature-scroll .timeline-plan-label {
    gap: 4px;
    font-size: 10px;
  }
  .feature-scroll .timeline-calendar {
    width: 13px;
    height: 13px;
  }
  .feature-scroll .timeline-day {
    font-size: 8px;
  }
  .feature-scroll .timeline-day strong {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
  .feature-scroll .timeline-day > small {
    font-size: 8px;
  }
  .feature-scroll .timeline-next {
    grid-template-columns: 18px minmax(0, 1fr) 10px;
    gap: 7px;
  }
  .feature-scroll .timeline-sport-emoji {
    font-size: 17px;
  }
  .feature-scroll .timeline-next strong {
    font-size: 10px;
  }
  .feature-scroll .timeline-next-details > span {
    font-size: 10px;
  }
  .feature-scroll .timeline-match-details h4 {
    font-size: 20px;
  }
}
