.page-home {
  color: var(--color-text);
  font-family: var(--font-body);

  --home-slant: polygon(0 0, calc(100% - 20px) 0, 100% 100%, 20px 100%);
  --home-slant-flat: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  --home-line: rgba(192, 201, 207, 0.14);
  --home-panel: linear-gradient(135deg, rgba(16, 26, 43, 0.92), rgba(0, 168, 255, 0.08));
}

.page-home h1,
.page-home h2,
.page-home h3 {
  font-family: var(--font-headline);
  line-height: 1.08;
}

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

.page-home a {
  color: var(--color-electric-blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.page-home .home-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 64px;
}

.page-home .home-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-home .home-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: saturate(0.82);
}

.page-home .home-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 26, 0.92) 0%, rgba(10, 14, 26, 0.76) 58%, rgba(0, 168, 255, 0.1) 140%);
}

.page-home .home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(0, 168, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

.page-home .home-hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 32px;
}

.page-home .home-hero__content {
  max-width: 780px;
}

.page-home .home-hero__context {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--color-neon-green);
}

.page-home .home-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.page-home .home-hero__lead {
  max-width: 60ch;
  margin: 0 0 24px;
  font-size: 1.02rem;
  line-height: 1.72;
  color: rgba(234, 234, 234, 0.88);
}

.page-home .home-hero__shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.page-home .home-hero__shortcuts a {
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(0, 168, 255, 0.4);
  background: rgba(0, 168, 255, 0.08);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.page-home .home-hero__shortcuts a:hover {
  border-color: var(--color-electric-blue);
  background: var(--color-electric-blue);
  color: var(--color-deep-space);
}

.page-home .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.page-home .home-spotlight {
  position: relative;
  padding: 20px;
  border: 1px solid rgba(0, 168, 255, 0.28);
  background: linear-gradient(135deg, rgba(16, 26, 43, 0.92), rgba(0, 168, 255, 0.06));
  overflow: hidden;
  align-self: start;
}

.page-home .home-spotlight::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  background: var(--color-electric-blue);
  opacity: 0.16;
}

.page-home .home-spotlight__label {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--color-neon-green);
}

.page-home .home-spotlight__matches {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.page-home .home-spotlight__matches li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--home-line);
}

.page-home .home-spotlight__time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-electric-blue);
}

.page-home .home-spotlight__name {
  font-size: 0.92rem;
  line-height: 1.5;
}

.page-home .home-spotlight__countdown {
  margin-top: 18px;
  padding: 14px;
  border-left: 3px solid var(--color-neon-green);
  background: rgba(0, 0, 0, 0.18);
}

.page-home .home-spotlight__countdown-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.page-home .home-spotlight__digits {
  display: block;
  margin: 8px 0 6px;
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  line-height: 1;
  color: var(--color-electric-blue);
  text-shadow: 0 0 18px rgba(0, 168, 255, 0.65), 0 0 42px rgba(0, 168, 255, 0.25);
}

.page-home .home-spotlight__countdown-unit {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.page-home .home-matchday__grid {
  display: grid;
  gap: 16px;
}

.page-home .home-matchday__count,
.page-home .home-matchday__item {
  position: relative;
  padding: 22px 20px 18px;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
  overflow: hidden;
}

.page-home .home-matchday__count::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 168, 255, 0.2), transparent 70%);
  border-left: 4px solid var(--color-neon-green);
}

.page-home .home-matchday__item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--color-electric-blue);
}

.page-home .home-matchday__item:nth-child(even)::before {
  background: var(--color-neon-green);
}

.page-home .home-matchday__count-label {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--color-neon-green);
  position: relative;
}

.page-home .home-matchday__count-digits {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 7vw, 4rem);
  line-height: 1;
  color: var(--color-electric-blue);
  text-shadow: 0 0 18px rgba(0, 168, 255, 0.6);
  position: relative;
}

.page-home .home-matchday__count-note {
  margin: 12px 0 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  position: relative;
}

.page-home .home-matchday__time {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-electric-blue);
}

.page-home .home-matchday__item h3 {
  margin: 0 0 6px;
  font-size: 1.28rem;
}

.page-home .home-matchday__item p {
  margin: 0 0 14px;
  color: var(--color-muted);
  line-height: 1.65;
}

.page-home .home-matchday__link {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  text-decoration: none;
}

.page-home .home-leagues__intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 820px;
  margin-bottom: 24px;
}

.page-home .home-leagues__intro p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.75;
}

.page-home .home-leagues__grid {
  display: grid;
  gap: 18px;
}

.page-home .home-league-card {
  display: block;
  padding: 28px 24px 26px;
  border: 1px solid rgba(192, 201, 207, 0.12);
  background: linear-gradient(135deg, var(--color-card), #13263f);
  color: var(--color-text);
  text-decoration: none;
  clip-path: var(--home-slant);
  transition: clip-path 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s ease;
}

.page-home .home-league-card:hover,
.page-home .home-league-card:focus-visible {
  clip-path: var(--home-slant-flat);
  transform: translateY(-6px);
  background: linear-gradient(135deg, #13263f, #0f2c46);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 168, 255, 0.5);
  outline: none;
}

.page-home .home-league-card__code {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-neon-green);
}

.page-home .home-league-card h3 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

.page-home .home-league-card p {
  margin: 0 0 16px;
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.page-home .home-league-card__more {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-electric-blue);
}

.page-home .home-leagues__feature {
  display: grid;
  gap: 20px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--home-line);
}

.page-home .home-leagues__feature-media {
  overflow: hidden;
  border: 1px solid rgba(0, 168, 255, 0.22);
  background: var(--color-card);
}

.page-home .home-leagues__feature-media img {
  width: 100%;
  object-fit: cover;
}

.page-home .home-leagues__feature-text h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.page-home .home-leagues__feature-text p {
  margin: 0 0 16px;
  color: var(--color-muted);
  line-height: 1.75;
}

.page-home .home-calendar__layout {
  display: grid;
  gap: 28px;
}

.page-home .home-calendar__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.page-home .home-calendar__date {
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(192, 201, 207, 0.2);
  background: rgba(16, 26, 43, 0.6);
  color: var(--color-muted);
  font-family: var(--font-mono);
  cursor: pointer;
}

.page-home .home-calendar__date[aria-selected="true"] {
  border-color: var(--color-electric-blue);
  background: var(--color-electric-blue);
  color: var(--color-deep-space);
  font-weight: 700;
}

.page-home .home-calendar__panel {
  border-top: 1px solid var(--home-line);
}

.page-home .home-calendar__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-home .home-calendar__row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid var(--home-line);
}

.page-home .home-calendar__row--live {
  border-left: 3px solid var(--color-hot-red);
}

.page-home .home-calendar__col-time {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-electric-blue);
}

.page-home .home-calendar__col-match {
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.5;
}

.page-home .home-calendar__col-status {
  grid-column: 2;
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--color-neon-green);
}

.page-home .home-calendar__row--live .home-calendar__col-status {
  color: var(--color-hot-red);
}

.page-home .home-calendar__panel-footer {
  padding-top: 18px;
}

.page-home .home-calendar__panel-footer .btn {
  width: 100%;
  justify-content: center;
}

.page-home .home-calendar__aside {
  display: grid;
  gap: 16px;
  align-content: start;
}

.page-home .home-calendar__media {
  padding: 6px;
  border: 1px solid rgba(0, 168, 255, 0.22);
  background: var(--color-card);
}

.page-home .home-calendar__media img {
  width: 100%;
  object-fit: cover;
}

.page-home .home-calendar__aside p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.75;
}

.page-home .home-legacy__grid {
  display: grid;
  gap: 28px;
}

.page-home .home-legacy__lead {
  margin: 0 0 22px;
  color: var(--color-muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.page-home .home-legacy__list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.page-home .home-legacy__list li {
  color: var(--color-muted);
  line-height: 1.6;
}

.page-home .home-legacy__list span {
  display: inline-block;
  margin-right: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-text);
}

.page-home .home-legacy__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border-radius: 2px;
  background: var(--color-hot-red);
  color: #ffffff;
  font-family: var(--font-headline);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(255, 42, 42, 0.5);
  animation: home-legacy-pulse 2s infinite;
}

.page-home .home-legacy__cta:hover {
  filter: brightness(1.12);
}

.page-home .home-legacy__cta:focus-visible {
  outline: 3px solid var(--color-neon-green);
  outline-offset: 3px;
}

.page-home .home-legacy__note {
  margin: 14px 0 0;
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.page-home .home-legacy__details {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--home-line);
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.page-home .home-legacy__details summary {
  cursor: pointer;
  color: var(--color-neon-green);
  font-weight: 700;
}

.page-home .home-legacy__details ol {
  margin: 12px 0 0;
  padding-left: 20px;
}

.page-home .home-legacy__sign {
  position: relative;
  display: grid;
  align-content: center;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 42, 42, 0.3);
  background: linear-gradient(135deg, rgba(255, 42, 42, 0.14), rgba(16, 26, 43, 0.5));
}

.page-home .home-legacy__sign::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -40px;
  top: -40px;
  transform: rotate(45deg);
  background: rgba(255, 42, 42, 0.16);
}

.page-home .home-legacy__sign-label {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--color-hot-red);
}

.page-home .home-legacy__sign-num {
  margin: 6px 0 2px;
  font-family: var(--font-headline);
  font-size: clamp(4rem, 10vw, 6.5rem);
  line-height: 0.9;
  color: var(--color-text);
  text-shadow: 0 0 24px rgba(255, 42, 42, 0.45);
}

.page-home .home-legacy__sign-text {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.page-home .home-compat__layout {
  display: grid;
  gap: 24px;
}

.page-home .home-compat__media {
  padding: 8px;
  border: 1px solid rgba(0, 168, 255, 0.22);
  background: var(--color-card);
}

.page-home .home-compat__media img {
  width: 100%;
  object-fit: cover;
}

.page-home .home-compat__content p {
  color: var(--color-muted);
  line-height: 1.75;
}

.page-home .home-compat__table {
  width: 100%;
  border-collapse: collapse;
}

.page-home .home-compat__table th,
.page-home .home-compat__table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--home-line);
  text-align: left;
  font-size: 0.88rem;
}

.page-home .home-compat__table thead th {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-neon-green);
}

.page-home .home-compat__table tbody th {
  color: var(--color-text);
  font-weight: 600;
}

.page-home .home-compat__table td {
  color: var(--color-muted);
}

.page-home .home-compat__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-home .home-closing {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 28px var(--shell-pad);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--home-line);
}

.page-home .home-closing__title {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--color-muted);
}

.page-home .home-closing__links {
  display: flex;
  flex-wrap: wrap;
  gap: max(12px, 2vw);
}

.page-home .home-closing__links a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-decoration: none;
}

@keyframes home-legacy-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 42, 42, 0.55);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 42, 42, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 42, 42, 0);
  }
}

@media (min-width: 720px) {
  .page-home .home-matchday__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .page-home .home-calendar__row {
    grid-template-columns: auto 1fr auto;
  }

  .page-home .home-calendar__col-time {
    grid-row: auto;
  }

  .page-home .home-calendar__col-status {
    grid-column: auto;
    justify-self: end;
  }

  .page-home .home-calendar__panel-footer .btn {
    width: auto;
  }
}

@media (min-width: 960px) {
  .page-home .home-hero {
    padding: 96px 0 112px;
  }

  .page-home .home-hero__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: clamp(2.5rem, 5vw, 5rem);
  }

  .page-home .home-spotlight {
    padding: 26px;
  }

  .page-home .home-leagues__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-home .home-leagues__feature {
    grid-template-columns: minmax(260px, 480px) 1fr;
    align-items: center;
  }

  .page-home .home-calendar__layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.66fr);
    gap: 36px;
  }

  .page-home .home-legacy__grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.6fr);
    gap: 44px;
  }

  .page-home .home-compat__layout {
    grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
    gap: 36px;
  }

  .page-home .home-compat__layout > * {
    align-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-hero__shortcuts a,
  .page-home .home-league-card,
  .page-home .home-legacy__cta {
    transition: none;
    animation: none;
    transform: none;
  }

  .page-home .home-legacy__cta {
    box-shadow: none;
  }
}
