/* Mawqif Sports — homepage */

.home {
  padding-bottom: 0;
}

.home-section {
  padding-block: 40px;
}

.home-section--fixtures {
  padding-top: 28px;
}

.home-section--stories {
  padding-block: 32px;
}

.home-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.home-section__title {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--ink);
}

.home-section__tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-wrap: wrap;
}

.home-section__chip {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}

.home-section__more {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  transition: color var(--t-fast);
}

.home-section__more:hover {
  color: var(--mawqif-green);
}

.home-rail-nav {
  display: inline-flex;
  gap: 6px;
}

.home-rail-nav__btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  background: #fff;
  color: var(--ink);
  transition: border-color var(--t-fast), color var(--t-fast);
}

.home-rail-nav__btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-rail-nav__btn:hover {
  border-color: var(--mawqif-green);
  color: var(--mawqif-green);
}

.home-empty {
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  background: #fff;
  padding: 40px 24px;
  text-align: center;
}

.home-empty--compact {
  padding: 28px 20px;
}

.home-empty__title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.home-empty__body {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--stone);
}

/* ── Fixtures rail ── */

.fixture-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}

.fixture-rail::-webkit-scrollbar {
  display: none;
}

.fixture-card {
  flex: 0 0 268px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  min-height: 168px;
  position: relative;
}

.fixture-card__link {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px 16px;
  height: 100%;
  color: inherit;
}

.fixture-card__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.fixture-card__date {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.fixture-card__meta {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--stone);
  text-align: right;
}

.fixture-card__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.fixture-card__team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fixture-card__team--away {
  justify-content: flex-end;
}

.fixture-card__mark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--rf);
  border: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--mawqif-green);
  background: var(--mawqif-green-light);
}

.fixture-card__name {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-card__vs {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}

.fixture-card__foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
}

.fixture-card__time,
.fixture-card__venue {
  font-size: 0.75rem;
  color: var(--stone);
}

.fixture-card__flag {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mawqif-green);
}

.fixture-card:hover {
  border-color: #c9d3cc;
}

/* ── Latest coverage ── */

.home-coverage {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  min-height: 420px;
}

.home-coverage--solo {
  grid-template-columns: 1fr;
}

.home-coverage__stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

.coverage-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r3);
  background: var(--surface-dark);
  color: #fff;
  min-height: 180px;
}

.coverage-card--feature {
  min-height: 420px;
}

.coverage-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.coverage-card:hover img {
  transform: scale(1.04);
}

.coverage-card__overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 20px 20px 18px;
  background: linear-gradient(to top, rgba(11, 32, 25, 0.92) 0%, rgba(11, 32, 25, 0.45) 62%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1;
}

.coverage-card--side .coverage-card__overlay {
  padding: 14px 16px 14px;
}

.coverage-card__kicker {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.coverage-card__title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.coverage-card--feature .coverage-card__title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.coverage-card__meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
}

/* ── Stories ── */

.home-stories-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.story-card {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  min-height: 112px;
  position: relative;
}

.story-card__copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.story-card__kicker {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mawqif-green);
}

.story-card__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink);
}

.story-card__byline {
  font-size: 0.75rem;
  color: var(--stone);
}

.story-card__thumb {
  width: 88px;
  height: 88px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--pitch-100);
  flex-shrink: 0;
}

.story-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-index-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  min-height: 96px;
  justify-content: center;
}

.team-index-card:hover {
  border-color: #c9d3cc;
}

.team-index-card:hover .story-card__title {
  color: var(--mawqif-green);
}

.story-card:hover .story-card__title {
  color: var(--mawqif-green);
}

/* ── Explore sports ── */

.home-sports-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.home-sport-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--r3);
  background: var(--surface-dark);
  color: #fff;
}

.home-sport-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.home-sport-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 32, 25, 0.82) 0%, rgba(11, 32, 25, 0.28) 50%, rgba(11, 32, 25, 0.12) 100%);
}

.home-sport-card:hover img {
  transform: scale(1.05);
}

.home-sport-card__label {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ── Athletes ── */

.home-athletes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.home-athlete {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
}

.home-athlete__media {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r3);
  background: var(--pitch-100);
}

.home-athlete__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.home-athlete:hover img {
  transform: scale(1.04);
}

.home-athlete__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--pitch-200), var(--pitch-100));
}

.home-athlete__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.home-athlete__meta,
.home-athlete__year {
  font-size: 0.8125rem;
  color: var(--stone);
}

.home-athlete__year {
  letter-spacing: 0.04em;
}

/* ── Sidelines ── */

.sidelines {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 92px;
  gap: 8px;
}

.sidelines__item {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-dark);
  grid-column: span 3;
  grid-row: span 2;
}

.sidelines__item.is-portrait {
  grid-row: span 3;
  grid-column: span 2;
}

.sidelines__item.is-wide {
  grid-column: span 5;
  grid-row: span 2;
}

.sidelines__item:nth-child(1) {
  grid-column: 1 / span 5;
  grid-row: 1 / span 4;
}

.sidelines__item:nth-child(2) {
  grid-column: 6 / span 3;
  grid-row: 1 / span 2;
}

.sidelines__item:nth-child(3) {
  grid-column: 9 / span 4;
  grid-row: 1 / span 2;
}

.sidelines__item:nth-child(4) {
  grid-column: 6 / span 4;
  grid-row: 3 / span 2;
}

.sidelines__item:nth-child(5) {
  grid-column: 10 / span 3;
  grid-row: 3 / span 2;
}

.sidelines__item:nth-child(6) {
  grid-column: 1 / span 4;
  grid-row: 5 / span 2;
}

.sidelines__item:nth-child(7) {
  grid-column: 5 / span 8;
  grid-row: 5 / span 2;
}

.sidelines--n1 .sidelines__item:nth-child(1),
.sidelines--n2 .sidelines__item:nth-child(1) {
  grid-column: 1 / span 7;
  grid-row: 1 / span 4;
}

.sidelines--n2 .sidelines__item:nth-child(2) {
  grid-column: 8 / span 5;
  grid-row: 1 / span 4;
}

.sidelines img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.sidelines__item:hover img {
  transform: scale(1.04);
}

/* ── Watch ── */

.home-watch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.watch-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r3);
  background: var(--surface-dark);
  color: #fff;
}

.watch-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.watch-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 32, 25, 0.88) 0%, rgba(11, 32, 25, 0.2) 55%, transparent 100%);
}

.watch-card:hover img {
  transform: scale(1.04);
}

.watch-card .play-glyph {
  z-index: 2;
}

.watch-card__title {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 1.6vw, 1.375rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* ── Brand closer ── */

.brand-closer {
  background: var(--mawqif-green-dark);
  color: var(--on-brand);
  padding: 72px 0;
  margin-top: 24px;
}

.brand-closer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1.3fr) auto;
  gap: 36px 40px;
  align-items: center;
}

.brand-closer__name {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-brand-faint);
  margin-bottom: 10px;
}

.brand-closer__tag {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 14ch;
}

.brand-closer__rule {
  width: 1px;
  height: 88px;
  background: var(--brand-rule);
}

.brand-closer__copy {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--on-brand-muted);
  max-width: 36ch;
}

.brand-closer__social {
  display: flex;
  gap: 10px;
}

.brand-closer__icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand-rule);
  border-radius: var(--rf);
  color: var(--on-brand);
}

.brand-closer__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.brand-closer__icon:hover {
  background: rgba(255, 255, 255, 0.08);
}

main:has(.brand-closer) + .site-footer {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .home-coverage {
    grid-template-columns: 1.4fr 1fr;
    min-height: 360px;
  }

  .coverage-card--feature {
    min-height: 360px;
  }

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

  .home-stories-row {
    grid-template-columns: 1fr 1fr;
  }

  .brand-closer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .brand-closer__rule {
    display: none;
  }
}

@media (max-width: 1023px) {
  .home-coverage {
    grid-template-columns: 1fr 1fr;
    min-height: 0;
  }

  .coverage-card--feature,
  .coverage-card--side {
    min-height: 240px;
    aspect-ratio: 16 / 10;
  }

  .home-coverage__stack {
    grid-template-rows: 1fr 1fr;
  }

  .home-watch {
    grid-template-columns: 1fr;
  }

  .sidelines {
    display: flex;
    overflow-x: auto;
    grid-auto-rows: unset;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }

  .sidelines::-webkit-scrollbar {
    display: none;
  }

  .sidelines__item,
  .sidelines__item.is-portrait,
  .sidelines__item.is-wide,
  .sidelines__item:nth-child(n) {
    flex: 0 0 auto;
    width: 240px;
    height: 280px;
    grid-column: auto;
    grid-row: auto;
  }

  .sidelines__item.is-portrait {
    width: 180px;
  }

  .sidelines__item.is-wide,
  .sidelines__item:nth-child(1),
  .sidelines__item:nth-child(7) {
    width: 320px;
    height: 280px;
  }
}

@media (max-width: 767px) {
  .home-section {
    padding-block: 32px;
  }

  .home-section--fixtures {
    padding-top: 20px;
  }

  .home-section__head {
    align-items: flex-start;
  }

  .home-section__tools {
    width: 100%;
    margin-left: 0;
  }

  .home-coverage,
  .home-coverage--solo {
    grid-template-columns: 1fr;
  }

  .home-coverage__stack {
    grid-template-rows: none;
    gap: 12px;
  }

  .coverage-card--feature {
    min-height: 280px;
    aspect-ratio: 4 / 3;
  }

  .home-stories-row,
  .home-sports-grid,
  .home-athletes {
    grid-template-columns: 1fr;
  }

  .home-sports-grid,
  .home-athletes {
    grid-template-columns: 1fr 1fr;
  }

  .story-card {
    grid-template-columns: 1fr 72px;
  }

  .story-card__thumb {
    width: 72px;
    height: 72px;
  }

  .brand-closer {
    padding: 48px 0;
  }

  .brand-closer__inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .brand-closer__tag {
    max-width: none;
  }
}

@media (max-width: 479px) {
  .fixture-card {
    flex-basis: 78vw;
  }

  .home-sports-grid .home-sport-card {
    aspect-ratio: 4 / 3;
  }
}
