/* CricLens homepage — v0.9 */

.home-hero {
  padding: clamp(2.5rem, 5vw, 5.2rem) 0 2.25rem;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(310px, .9fr) minmax(0, 1.1fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: stretch;
}

.home-next-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--line, #dde3ea);
  border-radius: 20px;
  background: var(--panel, #fff);
}

.home-next-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: .9rem;
}

.home-next-head h2 {
  margin: .25rem 0 0;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  letter-spacing: -.035em;
}

.home-next-head a,
.home-text-link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.home-next-list {
  display: grid;
  gap: .7rem;
}

.home-next-card {
  display: grid;
  gap: .65rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line, #dde3ea);
  border-radius: 14px;
  color: inherit;
  background: var(--bg, #fff);
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease;
}

.home-next-card:hover {
  transform: translateY(-2px);
}

.home-next-card-top,
.home-next-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  color: var(--muted, #667085);
  font-size: .78rem;
}

.home-next-comp {
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.home-next-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .6rem;
}

.home-next-teams strong:first-child {
  text-align: left;
}

.home-next-teams strong:last-child {
  text-align: right;
}

.home-next-teams strong {
  overflow-wrap: anywhere;
  font-size: .98rem;
  line-height: 1.2;
}

.home-next-teams span {
  color: var(--muted, #667085);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.home-next-empty {
  display: grid;
  gap: .45rem;
  padding: 1rem;
  border: 1px dashed var(--line, #dde3ea);
  border-radius: 14px;
  color: var(--muted, #667085);
}

.home-next-empty strong {
  color: var(--ink, #101828);
}

.home-next-empty a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.home-next-skeleton {
  min-height: 92px;
  border: 1px solid var(--line, #dde3ea);
  border-radius: 14px;
  opacity: .45;
  animation: homePulse 1.3s ease-in-out infinite alternate;
}

@keyframes homePulse {
  from { opacity: .28; }
  to { opacity: .65; }
}

.home-hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(.4rem, 2vw, 1rem) 0;
}

.home-brand-lockup {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: .55rem;
  margin-bottom: 1.25rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -.025em;
}

.home-brand-lockup img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.home-hero h1 {
  margin: .6rem 0 1.05rem;
  max-width: 780px;
  font-size: clamp(2.75rem, 6vw, 5.4rem);
  line-height: .96;
  letter-spacing: -.055em;
}

.home-lede {
  max-width: 680px;
  margin: 0;
  font-size: clamp(1.03rem, 1.55vw, 1.22rem);
  line-height: 1.65;
  color: var(--muted, #667085);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.55rem;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .72rem 1rem;
  border: 1px solid var(--line, #dde3ea);
  border-radius: 12px;
  color: inherit;
  background: var(--panel, #fff);
  text-decoration: none;
  font-weight: 700;
}

.home-button-primary {
  border-color: transparent;
  background: var(--ink, #101828);
  color: var(--bg, #fff);
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  overflow: hidden;
  border: 1px solid var(--line, #dde3ea);
  border-radius: 16px;
  background: var(--line, #dde3ea);
}

.home-stat {
  min-height: 100px;
  padding: 1.15rem 1.2rem;
  background: var(--panel, #fff);
}

.home-stat strong,
.home-stat span {
  display: block;
}

.home-stat strong {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  letter-spacing: -.04em;
}

.home-stat span {
  margin-top: .3rem;
  color: var(--muted, #667085);
  font-size: .88rem;
}

.home-section {
  padding: clamp(3rem, 6vw, 5.3rem) 0;
  border-top: 1px solid var(--line, #dde3ea);
}

.home-section-head {
  margin-bottom: 1.6rem;
}

.home-section-head h2,
.home-method h2 {
  margin: .4rem 0 .45rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -.045em;
}

.home-explore-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.home-explore-card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  padding: clamp(1.3rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line, #dde3ea);
  border-radius: 18px;
  color: inherit;
  background: var(--panel, #fff);
  text-decoration: none;
  transition: transform 140ms ease;
}

.home-explore-card:hover {
  transform: translateY(-2px);
}

.home-card-kicker {
  color: var(--muted, #667085);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.home-explore-card h3 {
  margin: 1rem 0 .65rem;
  font-size: clamp(1.35rem, 2.2vw, 1.82rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.home-explore-card p {
  margin: 0;
  color: var(--muted, #667085);
  line-height: 1.65;
}

.home-card-link {
  margin-top: auto;
  padding-top: 1.35rem;
  font-weight: 700;
}

.home-method-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: start;
}

@media (max-width: 900px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  /* Upcoming matches stay first on mobile, as requested. */
  .home-next-panel {
    order: 0;
  }

  .home-hero-copy {
    order: 1;
  }

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

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

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

@media (max-width: 640px) {
  .home-stats,
  .home-explore-grid {
    grid-template-columns: 1fr;
  }

  .home-stat {
    min-height: 84px;
  }

  .home-explore-card {
    min-height: auto;
  }

  .home-next-teams {
    grid-template-columns: 1fr;
    gap: .2rem;
  }

  .home-next-teams strong:last-child {
    text-align: left;
  }

  .home-next-teams span {
    display: none;
  }
}
