.page-home {
  --home-tilt: -0.7deg;
  --home-tilt-2: 0.9deg;
  --home-pad: clamp(2.25rem, 6vw, 4.5rem);
  background: var(--night);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
}

.page-home img {
  max-width: 100%;
  height: auto;
}

.page-home .section {
  position: relative;
  padding: clamp(2.75rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--line);
}

.page-home .section__head {
  display: flex;
  align-items: flex-start;
  gap: clamp(.75rem, 2vw, 1.4rem);
}

.page-home .section__index {
  flex: none;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: .85;
  letter-spacing: .02em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
}

.page-home .section__title {
  margin: .35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--white);
}

.page-home .section__lead {
  max-width: 42ch;
  margin-top: 1.1rem;
  font-size: var(--fs-18);
  line-height: 1.75;
  color: rgba(232, 241, 248, .82);
}

.page-home .eyebrow {
  margin: 0;
  font-size: var(--fs-13);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.page-home .crumbs {
  font-size: var(--fs-13);
  color: var(--steel);
}

.page-home .crumbs__sep {
  margin: 0 .5rem;
  color: var(--line-strong);
}

.page-home .coord {
  font-size: var(--fs-13);
  letter-spacing: .14em;
  color: var(--gold);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2.25rem, 5vw, 3.25rem);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 0 100%);
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .3;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 23, 38, .6), rgba(8, 23, 38, .96) 88%, var(--night));
}

.hero__inner {
  position: relative;
}

.hero__crumb {
  margin: 0 0 .85rem;
}

.hero__coord {
  margin: 0 0 .5rem;
}

.hero__grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  color: var(--white);
}

.hero__title::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 1rem;
  background: linear-gradient(90deg, var(--neon), var(--ember));
  border-radius: 3px;
}

.hero__lead {
  max-width: 38ch;
  margin-top: 1.15rem;
  font-size: var(--fs-18);
  line-height: 1.75;
  color: rgba(232, 241, 248, .86);
}

.page-home .chipbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 1.5rem 0 1.1rem;
}

.page-home .chip {
  padding: .42rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-13);
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}

.page-home .chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.page-home .chip.is-shown {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--night);
  font-weight: 700;
}

.page-home .filter-status {
  width: 100%;
  margin: 0;
  font-size: var(--fs-13);
  color: var(--steel);
}

.page-home [data-filter-item].is-hidden {
  display: none;
}

.scorelist {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
}

.scorecard {
  position: relative;
  padding: 1rem 1.05rem 1.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}

.scorecard:nth-child(odd) {
  transform: rotate(var(--home-tilt));
}

.scorecard:nth-child(even) {
  transform: rotate(var(--home-tilt-2));
}

.scorecard:hover,
.scorecard:focus-within {
  transform: rotate(0deg) translateY(-3px);
  border-color: var(--neon);
}

.scorecard__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
}

.scorecard__league {
  font-size: var(--fs-13);
  color: var(--steel);
}

.page-home .tag {
  display: inline-block;
  padding: .18rem .5rem;
  border-radius: 4px;
  font-size: var(--fs-13);
  letter-spacing: .04em;
  border: 1px solid var(--line-strong);
  color: var(--steel);
}

.page-home .tag--live {
  border-color: rgba(61, 255, 158, .55);
  color: var(--neon);
}

.page-home .tag--live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: .35rem;
  border-radius: 50%;
  background: var(--neon);
  animation: home-pulse 1.6s var(--ease) infinite;
}

.page-home .tag--info {
  border-color: rgba(53, 214, 255, .5);
  color: var(--cyan);
}

@keyframes home-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.72); }
}

.page-home .scoreline {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .75rem 0 .4rem;
}

.page-home .scoreline__team {
  flex: 1 1 0;
  min-width: 0;
  font-size: var(--fs-15);
  color: var(--white);
}

.page-home .scoreline__team:last-of-type {
  text-align: right;
}

.page-home .scoreline__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--white);
}

.page-home .scoreline__num--live {
  color: var(--neon);
}

.page-home .scoreline__sep {
  font-family: var(--font-display);
  font-size: var(--fs-18);
  color: var(--steel);
}

.scorecard__note {
  margin: 0;
  font-size: var(--fs-13);
  color: var(--steel);
}

.scorecard__events {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  font-size: var(--fs-13);
  line-height: 1.6;
  color: var(--cyan);
  transition: max-height .32s var(--ease), opacity .32s var(--ease), margin-top .32s var(--ease);
}

@media (hover: hover) {
  .scorecard:hover .scorecard__events,
  .scorecard:focus-within .scorecard__events {
    max-height: 6rem;
    margin-top: .7rem;
    opacity: 1;
  }
}

@media (hover: none) {
  .scorecard__events {
    max-height: none;
    margin-top: .7rem;
    opacity: 1;
  }
}

.rankcard {
  position: relative;
  padding: 1.2rem 1.1rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}

.rankcard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--neon), var(--cyan) 55%, transparent);
}

.rankcard__label {
  margin: 0;
  font-size: var(--fs-13);
  letter-spacing: .14em;
  color: var(--gold);
}

.rankcard__title {
  margin: .5rem 0 1rem;
  font-family: var(--font-display);
  font-size: var(--fs-28);
  line-height: 1.15;
  color: var(--white);
}

.rankrow {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) 2.1rem 2.3rem 2.6rem;
  align-items: center;
  gap: .35rem;
  padding: .5rem 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-13);
}

.rankrow--head {
  border-top: none;
  padding-bottom: .25rem;
  color: var(--steel);
  letter-spacing: .06em;
}

.rankrow__pos {
  font-family: var(--font-display);
  color: var(--steel);
}

.rankrow__team {
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rankrow__pts {
  font-family: var(--font-display);
  font-size: var(--fs-18);
  color: var(--white);
}

.rankrow__up { color: var(--neon); }
.rankrow__down { color: var(--ember); }
.rankrow__flat { color: var(--steel); }

.rankcard__foot {
  margin: 1rem 0 0;
  font-size: var(--fs-13);
  line-height: 1.6;
  color: var(--steel);
}

.rail {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.rail a {
  padding: .38rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-13);
  color: rgba(232, 241, 248, .8);
  text-decoration: none;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}

.rail a:hover {
  border-color: var(--neon);
  color: var(--neon);
}

/* ---------- league detail ---------- */
.league-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.league-card {
  padding: 1.15rem 1.15rem 1.2rem;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm);
}

.league-card:nth-child(2) { border-left-color: var(--neon); }
.league-card:nth-child(3) { border-left-color: var(--ember); }

.league-card__label {
  margin: 0;
  font-size: var(--fs-13);
  letter-spacing: .1em;
  color: var(--steel);
}

.league-card__title {
  margin: .6rem 0 .5rem;
  font-family: var(--font-display);
  font-size: var(--fs-28);
  line-height: 1.18;
  color: var(--white);
}

.league-card__text {
  margin: 0 0 .85rem;
  font-size: var(--fs-15);
  line-height: 1.7;
  color: rgba(232, 241, 248, .8);
}

.mover-list {
  list-style: none;
  margin: 0 0 .9rem;
  padding: 0;
}

.mover {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .35rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: var(--fs-13);
  color: rgba(232, 241, 248, .82);
}

.mover__up { color: var(--neon); }
.mover__down { color: var(--ember); }
.mover__flat { color: var(--steel); }

.league-card__next {
  margin: 0;
  font-size: var(--fs-13);
  color: var(--cyan);
}

/* ---------- media frames ---------- */
.page-home .media-frame {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--night-2);
}

.page-home .media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .media-frame--wide img { aspect-ratio: 3 / 2; }
.page-home .media-frame--tall img { aspect-ratio: 3 / 2; }
.page-home .media-frame--square img { aspect-ratio: 10 / 7; }

.page-home .media-frame__caption {
  margin: 0;
  padding: .7rem .95rem;
  font-size: var(--fs-13);
  color: var(--steel);
  background: rgba(8, 23, 38, .72);
}

/* ---------- switch devices ---------- */
.switch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}

.switch-body .section__lead {
  max-width: 40ch;
}

.steplist {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.step__num {
  font-family: var(--font-display);
  font-size: var(--fs-28);
  line-height: 1;
  color: var(--neon);
}

.step__title {
  margin: 0 0 .3rem;
  font-size: var(--fs-18);
  color: var(--white);
}

.step__text {
  margin: 0;
  font-size: var(--fs-15);
  line-height: 1.7;
  color: rgba(232, 241, 248, .78);
}

.page-home .inline-link {
  margin: 1.5rem 0 0;
}

.page-home .btn {
  display: inline-block;
  padding: .6rem 1.1rem;
  border-radius: 999px;
  font-size: var(--fs-15);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  color: var(--white);
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}

.page-home .btn--sm {
  padding: .5rem .95rem;
  font-size: var(--fs-13);
}

.page-home .btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.page-home .btn--ember {
  background: var(--ember);
  border-color: var(--ember);
  color: #12161b;
  font-weight: 700;
}

.page-home .btn--pulse {
  border-color: rgba(61, 255, 158, .6);
  color: var(--neon);
}

.page-home .btn--pulse:hover {
  background: var(--neon);
  color: var(--night);
}

/* ---------- weekend panel ---------- */
.weekend {
  border-top: none;
}

.weekend__panel {
  padding: clamp(1.4rem, 4vw, 3rem);
  background: var(--cream);
  color: var(--ink-brown);
  border-radius: calc(var(--radius) + 6px);
  clip-path: polygon(0 0, 100% 1.6%, 100% 100%, 0 98.4%);
}

.weekend__panel .section__index {
  -webkit-text-stroke: 1px rgba(28, 22, 19, .32);
}

.weekend__panel .section__title {
  color: var(--ink-brown);
}

.weekend__panel .eyebrow {
  color: #a8501a;
}

.weekend__panel .section__lead {
  max-width: 44ch;
  color: rgba(28, 22, 19, .8);
}

.weekend__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: 1.75rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid rgba(28, 22, 19, .22);
  display: grid;
  gap: 1.1rem;
}

.timeline__item {
  position: relative;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.63rem;
  top: .5rem;
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: var(--ember);
}

.timeline__time {
  margin: 0 0 .25rem;
  font-family: var(--font-display);
  font-size: var(--fs-18);
  letter-spacing: .04em;
  color: var(--ink-brown);
}

.timeline__text {
  margin: 0;
  font-size: var(--fs-15);
  line-height: 1.7;
  color: rgba(28, 22, 19, .78);
}

.weekend__media {
  border-color: rgba(28, 22, 19, .2);
}

.weekend__panel .media-frame__caption {
  background: rgba(28, 22, 19, .08);
  color: rgba(28, 22, 19, .68);
}

.weekend__foot {
  margin: 1.75rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(28, 22, 19, .18);
  font-size: var(--fs-15);
  line-height: 1.75;
  color: rgba(28, 22, 19, .82);
}

/* ---------- old-version route ---------- */
.route-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.route-step {
  padding: 1.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  position: relative;
}

.route-step__num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-28);
  line-height: 1;
  color: var(--gold);
}

.route-step__title {
  margin: .6rem 0 .35rem;
  font-size: var(--fs-18);
  color: var(--white);
}

.route-step__text {
  margin: 0;
  font-size: var(--fs-15);
  line-height: 1.7;
  color: rgba(232, 241, 248, .78);
}

/* ---------- pre-match ---------- */
.report-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}

.fact-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: .7rem;
}

.fact-list li {
  padding-left: 1.1rem;
  position: relative;
  font-size: var(--fs-15);
  line-height: 1.75;
  color: rgba(232, 241, 248, .82);
}

.fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65rem;
  width: .45rem;
  height: .45rem;
  border-radius: 2px;
  background: var(--cyan);
}

.fact-list strong {
  color: var(--white);
}

.page-home .statgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  margin-top: 1.75rem;
}

.page-home .stat {
  padding: 1rem;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.page-home .stat__value {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1;
  color: var(--neon);
}

.page-home .stat__label {
  margin: .45rem 0 0;
  font-size: var(--fs-13);
  line-height: 1.6;
  color: var(--steel);
}

/* ---------- next stops ---------- */
.routes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.route-card {
  display: block;
  padding: 1.35rem 1.25rem 1.4rem;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}

.route-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon);
}

.route-card__num {
  margin: 0;
  font-size: var(--fs-13);
  letter-spacing: .16em;
  color: var(--gold);
}

.route-card__title {
  margin: .55rem 0 .5rem;
  font-family: var(--font-display);
  font-size: var(--fs-28);
  line-height: 1.16;
  color: var(--white);
}

.route-card__text {
  margin: 0;
  font-size: var(--fs-15);
  line-height: 1.72;
  color: rgba(232, 241, 248, .78);
}

.route-card__go {
  margin: 1rem 0 0;
  font-size: var(--fs-13);
  color: var(--cyan);
}

/* ---------- reveal ---------- */
.has-js .page-home [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}

.has-js .page-home [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  .scorelist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home .filter-status {
    width: auto;
    margin-left: auto;
  }

  .route-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .league-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .routes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  .hero {
    padding-top: clamp(2rem, 4vw, 3rem);
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    align-items: start;
  }

  .rankcard {
    margin-top: 3.5rem;
  }

  .switch-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .switch-media {
    position: sticky;
    top: calc(var(--bar-h) + 1.5rem);
  }

  .weekend__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: start;
  }

  .page-home .media-frame--tall img {
    aspect-ratio: 4 / 5;
  }

  .report-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  }

  .league-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-home .section__index {
    position: absolute;
    left: 0;
    top: clamp(2.75rem, 6vw, 5rem);
    transform: translateX(-120%) rotate(0deg);
    font-size: clamp(3rem, 4vw, 4.4rem);
  }

  .page-home .section > .shell > .section__head {
    padding-left: 0;
  }

  .rankrow {
    font-size: var(--fs-15);
    grid-template-columns: 1.6rem minmax(0, 1fr) 2.4rem 2.6rem 3rem;
  }
}

@media (min-width: 1180px) {
  .page-home .section__index {
    left: -1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home *,
  .has-js .page-home [data-reveal] {
    transition: none !important;
    animation: none !important;
  }

  .scorecard,
  .scorecard:nth-child(odd),
  .scorecard:nth-child(even),
  .route-card {
    transform: none !important;
  }

  .has-js .page-home [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
