/* Home page: floodlit pitch identity. Scoped to body.home-page. */
.home-page {
  --turf: #0c6636;
  --turf-stripe: #0f7340;
  --chalk: #f4f7f1;
  --night: #11152f;
  --bib: #f2d649;
  --display: "Onest", Inter, system-ui, sans-serif;
  --text: "Onest", Inter, system-ui, sans-serif;
}
.home-page main { font-family: var(--text); }

/* ---------- Hero: night arena with a floodlit pitch ---------- */
.pitch-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--chalk);
  background:
    radial-gradient(ellipse 55% 70% at 80% 105%, #0f6a3a59 0%, transparent 70%),
    linear-gradient(160deg, #161c3f 0%, var(--night) 48%, #0a0e22 100%);
  padding: clamp(2.5rem, 5vw, 3.75rem) 0 clamp(2.25rem, 4.5vw, 3.25rem);
}
/* Full-size pitch (105 × 68 m) seen from the stands. */
.pitch-stage {
  position: absolute;
  z-index: -1;
  right: -3%;
  bottom: -6%;
  width: min(60vw, 920px);
  perspective: 1000px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24%);
}
.pitch {
  display: block;
  width: 100%;
  height: auto;
  transform: rotateX(54deg);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 -6px 40px #2fbf6a26);
}
/* Floodlights from the top-right mast; switch on once on load. */
.pitch-light {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 38% 80% at 86% -14%, #fffbe22e 0%, #fffbe20d 50%, transparent 72%),
    radial-gradient(ellipse 30% 60% at 58% -18%, #fffbe214 0%, transparent 70%);
  animation: floodlights-on 1.6s ease-out .2s both;
}
@keyframes floodlights-on {
  0% { opacity: 0; }
  18% { opacity: .55; }
  26% { opacity: .1; }
  40% { opacity: .8; }
  100% { opacity: 1; }
}
.pitch-hero-inner { position: relative; }
.pitch-hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6.4vw, 4.1rem);
  line-height: 1;
  letter-spacing: -.04em;
  margin: 0 0 1.25rem;
}
.pitch-hero h1 span { color: #4fbd79; }
.pitch-lead {
  max-width: 32rem;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.55;
  color: #c4c9db;
  margin: 0 0 1.75rem;
}
.pitch-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.home-page .btn-ghost-light {
  background: transparent;
  border: 2px solid #f4f7f166;
  color: var(--chalk);
  border-radius: 10px;
}
.home-page .btn-ghost-light:hover { border-color: var(--chalk); background: #f4f7f10f; color: var(--chalk); }
.home-page .btn-ghost-light:focus-visible { outline: 3px solid var(--bib); outline-offset: 3px; box-shadow: none; }

/* Scoreboard */
.scoreboard {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  margin: 2.25rem 0 0;
  background: #0a0e22b3;
  border: 1px solid #ffffff1f;
  border-radius: 10px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.scoreboard > div {
  padding: .85rem 1.5rem .95rem;
  border-left: 1px solid #ffffff1a;
}
.scoreboard > div:first-child { border-left: 0; }
.scoreboard dt {
  font-weight: 500;
  font-size: .8rem;
  color: #a9afc6;
  margin-bottom: .2rem;
}
.scoreboard dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
  color: var(--bib);
  font-variant-numeric: tabular-nums;
}

/* ---------- Sections ---------- */
.home-block { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.home-block-soft { background: #f2f5f1; }
.home-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.home-page h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  letter-spacing: -.035em;
  margin: 0;
  color: var(--night);
}
.home-heading a { font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }

/* ---------- Fixtures (open games) ---------- */
.fixtures { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--night); }
.fixture {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) minmax(0, 15rem);
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem .25rem;
  border-bottom: 1px solid #dfe5e0;
  color: var(--night);
}
.fixture:hover { color: var(--night); background: #f4f8f5; }
.fixture:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.fixture-time strong {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.fixture-time span { display: block; margin-top: .35rem; font-size: .85rem; color: #5d6478; }
.fixture-body { display: flex; flex-direction: column; min-width: 0; }
.fixture-title { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.fixture-venue { color: #5d6478; font-size: .92rem; }
.fixture-spots { display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; }
/* 11 slots per row: one row per team on a full-size pitch. */
.lineup { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; max-width: calc(11 * 12px + 10 * 5px); }
.lineup i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: transparent;
}
.lineup i.taken { background: var(--night); border-color: var(--night); }
.lineup-text { font-size: .85rem; font-weight: 600; color: var(--brand); }

.home-empty {
  padding: 2rem;
  border: 2px dashed #c9d4cc;
  border-radius: 10px;
  color: #4b5366;
}
.home-empty p { margin: 0 0 1rem; max-width: 42rem; }
.home-empty p:last-child { margin-bottom: 0; }


/* ---------- Steps: a real sequence along a chalk line ---------- */
.home-steps-title { margin-bottom: 2.25rem !important; }
.home-steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin: 0;
  padding: 0;
  position: relative;
}
.home-steps::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  right: calc((100% - 4rem) / 3 - 1.25rem);
  border-top: 2px dashed #b9c7bd;
}
.home-steps li { position: relative; counter-increment: step; }
.home-steps li::before {
  content: counter(step);
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: var(--turf);
  color: var(--chalk);
  font-family: var(--display);
  font-weight: 700;
  box-shadow: 0 0 0 6px #fff;
}
.home-steps h3 { font-family: var(--text); font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: .4rem; }
.home-steps p { color: #5d6478; margin: 0; max-width: 22rem; line-height: 1.55; }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
  .pitch-stage {
    right: -22vw;
    bottom: -4%;
    width: 128vw;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 45%);
    mask-image: linear-gradient(180deg, transparent 0, #000 45%);
  }
  .pitch-hero { padding-bottom: 1.5rem; }
  .pitch-hero-inner { padding-bottom: 5.5rem; }
  .pitch-actions .btn { flex: 1 1 100%; }
  .scoreboard { display: grid; width: 100%; margin-top: 0; }
  .scoreboard > div { padding: .85rem .9rem .95rem; }
  .scoreboard dt { font-size: .74rem; }

  .fixture {
    grid-template-columns: 5.25rem minmax(0, 1fr);
    gap: .4rem 1rem;
    padding: 1.1rem .1rem;
  }
  .fixture-time strong { font-size: 1.3rem; }
  .fixture-time span { font-size: .78rem; }
  .fixture-spots { grid-column: 2; align-items: flex-start; }
  .lineup { justify-content: flex-start; }

  .home-steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .home-steps::before { display: none; }
  /* Connector from each circle down to the next one only */
  .home-steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(1.25rem - 1px); top: 2.15rem; bottom: -1.15rem; border-left: 2px dashed #b9c7bd; }
  .home-steps li { padding-left: 3.75rem; }
  .home-steps li::before { position: absolute; left: 0; top: -.35rem; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pitch-light { animation: none; }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .pitch-stage { right: -8%; bottom: -16%; }
}
