.page-home {
  font-family: var(--font-body);
  color: var(--c-cream);
  background: var(--c-midnight);
  overflow-x: hidden;
}

.page-home h1,
.page-home h2,
.page-home h3 {
  font-family: var(--font-head);
  margin: 0;
}

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

/* ===== Hero ===== */
.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(820px, 94vh);
  padding: var(--space-5) var(--space-3);
  border-bottom: 1px solid var(--c-line);
  overflow: hidden;
  background: var(--c-midnight);
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: saturate(0.55) brightness(0.65);
}

.home-hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(169, 178, 201, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(169, 178, 201, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
}

.home-hero__axis {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--c-stone);
  opacity: 0.7;
}

.home-hero__axis--x {
  right: var(--space-3);
  bottom: var(--space-2);
}

.home-hero__axis--y {
  top: var(--space-5);
  right: var(--space-3);
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-5);
  width: min(100% - 32px, var(--content-max));
  margin-inline: auto;
}

.home-hero__kicker {
  margin: 0 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--c-orange);
  text-transform: uppercase;
}

.home-hero h1 {
  max-width: 9ch;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--c-cream);
}

.home-hero h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: var(--space-3);
  background: var(--c-neon);
}

.home-hero__lead {
  max-width: 48ch;
  margin: var(--space-3) 0 0;
  color: var(--c-stone);
  font-size: 1rem;
  line-height: 1.85;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.home-hero__board {
  display: grid;
  gap: var(--space-2);
  align-self: center;
}

/* ===== 90s refresh indicator ===== */
.home-refresh {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 380px;
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: rgba(17, 26, 51, 0.7);
}

.home-refresh__label {
  font-size: 0.8rem;
  color: var(--c-stone);
  white-space: nowrap;
}

.home-refresh__track {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--c-line);
}

.home-refresh__bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--c-neon);
  animation: home-refresh 90s linear infinite;
}

.home-refresh__num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--c-neon);
}

/* ===== Hero scorecard ===== */
.home-scorecard {
  position: relative;
  padding: var(--space-3);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: rgba(10, 16, 32, 0.86);
  box-shadow: var(--shadow);
}

.home-scorecard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.home-scorecard__clock {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-stone);
}

.home-scorecard__teams {
  display: grid;
  gap: var(--space-2);
}

.home-scorecard__club {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-2);
  border-bottom: 1px dashed var(--c-line);
}

.home-scorecard__name {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--c-cream);
}

.home-scorecard__num {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 900;
  line-height: 0.9;
  color: var(--c-neon);
}

.home-scorecard__foot {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: 0.75rem;
  color: var(--c-stone);
}

.home-scorecard__svg {
  display: block;
  width: 100%;
  max-width: 320px;
  justify-self: end;
  height: auto;
}

.home-scorecard__svg text {
  font-family: var(--font-mono);
}

.home-scorecard__svg circle {
  animation: home-blink 1.6s ease-in-out infinite;
}

/* ===== Shared sections ===== */
.home-section,
.home-speed {
  width: min(100% - 32px, var(--content-max));
  margin-inline: auto;
}

.home-section {
  margin-block: var(--space-5);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.home-section__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--c-line);
}

.home-section__head .index-tag {
  margin-left: auto;
  align-self: center;
}

.home-section__index {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--c-orange);
}

.home-section__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--c-stone);
  text-transform: uppercase;
}

.home-section__head h2 {
  margin-top: var(--space-1);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--c-cream);
}

/* ===== Today matches ===== */
.home-match-grid {
  display: grid;
  gap: var(--space-3);
}

.home-match {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-night);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}

.home-match:hover,
.home-match:focus-within {
  border-color: var(--c-neon);
  background: var(--c-hover);
  transform: translateY(-2px);
}

.home-match__box {
  display: block;
}

.home-match__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  cursor: pointer;
  list-style: none;
}

.home-match__summary::-webkit-details-marker {
  display: none;
}

.home-match__team {
  display: flex;
  flex: 1 1 100%;
  align-items: baseline;
  gap: var(--space-2);
}

.home-match__team--away {
  flex-direction: row-reverse;
}

.home-match__meta {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  order: 1;
}

.home-match__team--home {
  order: 0;
}

.home-match__team--away {
  order: 2;
}

.home-match__name {
  font-weight: 700;
  color: var(--c-cream);
}

.home-match__score {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--c-neon);
}

.home-match__status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-stone);
}

.home-match__vs {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--c-stone);
  opacity: 0.6;
}

.home-match__extra {
  display: grid;
  gap: var(--space-1);
  padding: 0 var(--space-3) var(--space-3);
  border-top: 1px dashed var(--c-line);
  color: var(--c-stone);
  font-size: 0.9rem;
  line-height: 1.7;
}

.home-match__extra p {
  margin: 0;
}

.home-match--live .home-match__score {
  animation: home-blink 2.8s ease-in-out infinite;
}

/* ===== Split layout ===== */
.home-split {
  display: grid;
  gap: var(--space-5);
  width: min(100% - 32px, var(--content-max));
  margin-inline: auto;
  margin-block: var(--space-3);
}

.home-split .home-section {
  margin-block: 0;
}

/* ===== Lineup timeline ===== */
.home-lineup__media {
  margin-bottom: var(--space-3);
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}

.home-lineup__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.home-timeline {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--c-line);
  list-style: none;
}

.home-timeline__item {
  position: relative;
  padding-left: var(--space-4);
}

.home-timeline__item::before {
  content: "";
  position: absolute;
  top: 2px;
  left: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--c-neon);
  border-radius: 50%;
  background: var(--c-midnight);
}

.home-timeline__time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-neon);
}

.home-timeline__content h3 {
  margin: 4px 0;
  font-size: 1.05rem;
  color: var(--c-cream);
}

.home-timeline__content p {
  margin: 0;
  color: var(--c-stone);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ===== Next match ===== */
.home-next__card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-night);
}

.home-next__visual img {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}

.home-next__body h3 {
  margin: var(--space-2) 0 var(--space-1);
  font-size: 1.15rem;
  color: var(--c-cream);
}

.home-next__time {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-neon);
}

.home-next__note {
  margin: var(--space-1) 0 var(--space-2);
  color: var(--c-stone);
  font-size: 0.82rem;
  line-height: 1.6;
}

.home-next__list {
  display: grid;
  gap: var(--space-1);
  margin: 0;
}

.home-next__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: 6px;
  border-bottom: 1px dashed var(--c-line);
}

.home-next__row dt {
  color: var(--c-stone);
  font-size: 0.8rem;
}

.home-next__row dd {
  margin: 0;
  color: var(--c-cream);
  font-size: 0.8rem;
}

.home-next__extra {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.home-next__extra li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--c-line);
  color: var(--c-stone);
  font-size: 0.9rem;
}

.home-next__extra li span {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-orange);
}

/* ===== Quick access ===== */
.home-quick__grid {
  display: grid;
  gap: var(--space-3);
}

.home-quick__card {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-night);
  color: var(--c-cream);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.home-quick__card:hover {
  border-color: var(--c-neon);
  background: var(--c-hover);
  transform: translateY(-4px);
}

.home-quick__num {
  font-family: var(--font-mono);
  color: var(--c-orange);
}

.home-quick__card strong {
  font-family: var(--font-head);
  font-size: 1.15rem;
}

.home-quick__card span:last-child {
  color: var(--c-stone);
  font-size: 0.9rem;
  line-height: 1.6;
}

.home-quick__hint {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-left: 2px solid var(--c-orange);
  background: rgba(17, 26, 51, 0.45);
  color: var(--c-stone);
  font-size: 0.9rem;
  line-height: 1.7;
}

.home-quick__hint strong {
  color: var(--c-cream);
}

/* ===== Stats ===== */
.home-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: 0;
}

.home-stats__grid > div {
  padding: var(--space-3);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(17, 26, 51, 0.85) 0%, rgba(17, 26, 51, 0.3) 100%);
}

.home-stats__grid dt {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--c-neon);
}

.home-stats__grid dd {
  margin: var(--space-1) 0 0;
  color: var(--c-stone);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ===== Speed banner ===== */
.home-speed {
  margin-top: var(--space-5);
  margin-bottom: var(--space-5);
}

.home-speed img {
  display: block;
  width: 100%;
  height: clamp(48px, 8vw, 100px);
  object-fit: cover;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}

/* ===== Animations ===== */
@keyframes home-refresh {
  0% {
    width: 0%;
    opacity: 1;
  }
  88% {
    width: 100%;
    opacity: 1;
  }
  92% {
    width: 100%;
    opacity: 1;
  }
  94% {
    width: 100%;
    opacity: 0.2;
  }
  96% {
    width: 100%;
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 1;
  }
}

@keyframes home-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* ===== Desktop ===== */
@media (min-width: 760px) {
  .home-quick__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-next__card {
    grid-template-columns: 140px 1fr;
  }
}

@media (min-width: 900px) {
  .home-hero {
    padding-inline: var(--space-5);
  }

  .home-hero__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
  }

  .home-match-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-match--wide {
    grid-column: 1 / -1;
  }

  .home-match__team {
    flex: 1 1 30%;
  }

  .home-match__meta {
    flex: 0 1 auto;
  }

  .home-match__team--home {
    order: 0;
  }

  .home-match__meta {
    order: 1;
  }

  .home-match__team--away {
    order: 2;
  }

  .home-split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }

  .home-stats__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-refresh__bar,
  .home-match--live .home-match__score,
  .home-scorecard__svg circle {
    animation: none;
  }
}
