/* =============================================================
   HOMEPAGE.CSS — Front page layout only (loaded via is_front_page)
   ============================================================= */

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
.hp-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--p-navy);
}

.hp-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: brightness(.38) saturate(.85);
  transform: scale(1.04);
  transition: transform 8s ease;
  will-change: transform;
}

.hp-hero.is-loaded .hp-hero-bg {
  transform: scale(1);
}

/* Layered gradient overlay */
.hp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 65% at 15% 50%, rgba(16,216,118,.11) 0%, transparent 55%),
    radial-gradient(ellipse 50% 80% at 85% 20%, rgba(56,189,248,.07) 0%, transparent 50%),
    linear-gradient(180deg, rgba(10,15,30,.2) 0%, rgba(10,15,30,.7) 55%, rgba(10,15,30,.98) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Noise texture overlay */
.hp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: .4;
}

.hp-hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 56px;
  align-items: center;
  padding: 130px 0 80px;
}

/* ── Hero content column ── */
.hp-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--p-accent);
  background: rgba(16,216,118,.08);
  border: 1px solid rgba(16,216,118,.2);
  border-radius: 20px;
  padding: 6px 14px;
  margin-bottom: 24px;
}

.hp-hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--p-accent);
  flex-shrink: 0;
  animation: hp-pulse 2.2s ease infinite;
}

@keyframes hp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.6); }
}

.hp-hero-content h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.04em;
  color: #fff;
  margin-bottom: 20px;
}

.hp-hero-content h1 .gradient-text {
  background: linear-gradient(135deg, var(--p-accent) 0%, #5de8b2 40%, var(--p-sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hp-hero-desc {
  font-size: 1.0625rem;
  color: rgba(226,232,240,.72);
  max-width: 520px;
  line-height: 1.72;
  margin-bottom: 36px;
}

.hp-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hp-hero-actions .btn-primary {
  font-size: .9375rem;
  padding: 13px 30px;
  border-radius: 26px;
}

.hp-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9375rem;
  font-weight: 600;
  color: rgba(226,232,240,.8);
  padding: 12px 24px;
  border-radius: 26px;
  border: 1.5px solid rgba(255,255,255,.12);
  transition: border-color var(--p-dur) var(--p-ease),
              color var(--p-dur) var(--p-ease),
              background var(--p-dur) var(--p-ease);
}

.hp-btn-ghost:hover {
  border-color: rgba(255,255,255,.35);
  color: #fff;
  background: rgba(255,255,255,.05);
}

/* ── Hero featured card ── */
.hp-featured-card {
  background: var(--p-navy-3);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
  transition: transform 400ms var(--p-ease), box-shadow 400ms var(--p-ease);
}

.hp-featured-card:hover {
  transform: translateY(-5px) rotate(.3deg);
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 0 1px rgba(16,216,118,.15);
}

.hp-featured-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  display: block;
  background: var(--p-navy-4);
}

.hp-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--p-ease);
  display: block;
}

.hp-featured-card:hover .hp-featured-img img {
  transform: scale(1.06);
}

.hp-featured-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,15,30,.85) 100%);
  pointer-events: none;
}

.hp-featured-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: var(--p-accent);
  color: var(--p-navy);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
}

.hp-featured-body {
  padding: 20px 22px 22px;
}

.hp-featured-body h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
}

.hp-featured-body h2 a {
  color: inherit;
  transition: color var(--p-dur) var(--p-ease);
}

.hp-featured-body h2 a:hover {
  color: var(--p-accent);
}

.hp-featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
}

.hp-featured-meta span {
  font-size: .78rem;
  color: var(--p-muted);
  padding: 0 10px;
  border-right: 1px solid var(--p-border);
}

.hp-featured-meta span:first-child { padding-left: 0; }
.hp-featured-meta span:last-child  { border-right: none; }

/* ── Stats bar ── */
.hp-stats-bar {
  position: relative;
  z-index: 2;
  background: rgba(10,15,30,.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--p-border);
}

.hp-stats-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hp-stat {
  padding: 28px 32px;
  border-right: 1px solid var(--p-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hp-stat:last-child {
  border-right: none;
}

.hp-stat strong {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -.03em;
  margin-bottom: 6px;
}

.hp-stat span {
  font-size: .72rem;
  color: var(--p-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════
   FEATURED STADIUMS — Spotlight grid
═══════════════════════════════════════════════════════════ */
.hp-stadiums {
  padding: 88px 0;
}

.hp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
}

.hp-section-head h2 {
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1.12;
  margin: 8px 0 0;
}

.hp-section-desc {
  font-size: .9375rem;
  color: var(--p-muted);
  max-width: 360px;
  text-align: right;
  line-height: 1.65;
}

.hp-section-cta {
  text-align: center;
  margin-top: 44px;
}

/* Spotlight grid: bento — tall hero left, wide card top-right, 2 small bottom-right */
.hp-spotlight-grid {
  display: grid;
  grid-template-columns: 3fr 2fr 2fr;
  gap: 20px;
  align-items: stretch;
}

/* Card 1: tall hero, spans 2 rows */
.hp-spotlight-grid > .stadium-card:first-child {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
}

.hp-spotlight-grid > .stadium-card:first-child .stadium-thumb {
  flex: 1;
  aspect-ratio: unset;
  min-height: 300px;
}

.hp-spotlight-grid > .stadium-card:first-child .stadium-body h3 {
  font-size: 1.125rem;
}

/* Card 2: wide, spans right 2 columns on row 1 */
.hp-spotlight-grid > .stadium-card:nth-child(2) {
  grid-column: 2 / 4;
}

/* ═══════════════════════════════════════════════════════════
   REGIONS
═══════════════════════════════════════════════════════════ */
.hp-regions {
  padding: 80px 0;
  background: var(--p-navy-2);
  border-top: 1px solid var(--p-border);
  border-bottom: 1px solid var(--p-border);
  position: relative;
  overflow: hidden;
}

.hp-regions::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(ellipse, rgba(16,216,118,.07) 0%, transparent 65%);
  pointer-events: none;
}

.hp-regions-head {
  text-align: center;
  margin-bottom: 44px;
}

.hp-regions-head .section-kicker {
  justify-content: center;
}

.hp-regions-head .section-kicker::before {
  display: none;
}

.hp-regions-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin: 8px 0 12px;
}

.hp-regions-head p {
  font-size: .9375rem;
  color: var(--p-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.65;
}

.hp-region-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.hp-region-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 16px 26px;
  background: var(--p-navy-3);
  border: 1px solid var(--p-border);
  border-radius: 16px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border-color var(--p-dur) var(--p-ease),
              background var(--p-dur) var(--p-ease),
              transform var(--p-dur) var(--p-ease),
              box-shadow var(--p-dur) var(--p-ease);
}

.hp-region-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--p-accent), var(--p-sky));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--p-dur) var(--p-ease);
}

.hp-region-card:hover {
  border-color: rgba(16,216,118,.3);
  background: var(--p-navy-4);
  transform: translateY(-5px);
  box-shadow: 0 10px 32px rgba(0,0,0,.35);
}

.hp-region-card:hover::after {
  transform: scaleX(1);
}

.hp-region-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 14px;
}

.hp-region-name {
  font-size: .9375rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.2;
}

.hp-region-count {
  font-size: .75rem;
  color: var(--p-muted);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--p-border);
  border-radius: 20px;
  padding: 3px 12px;
  transition: background var(--p-dur) var(--p-ease),
              color var(--p-dur) var(--p-ease);
}

.hp-region-card:hover .hp-region-count {
  background: rgba(16,216,118,.1);
  color: var(--p-accent);
}

/* ═══════════════════════════════════════════════════════════
   RANKING
═══════════════════════════════════════════════════════════ */
.hp-ranking {
  padding: 88px 0;
}

.hp-ranking-wrap {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: start;
}

.hp-ranking-intro {
  position: sticky;
  top: 100px;
}

.hp-ranking-intro h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin: 8px 0 14px;
  line-height: 1.15;
}

.hp-ranking-intro p {
  font-size: .9375rem;
  color: var(--p-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.hp-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* First 3 rows get medal borders */
.hp-ranking-list > .rank-row {
  background: var(--p-navy-3);
  border: 1px solid var(--p-border);
}

.hp-ranking-list > .rank-row:nth-child(1) {
  border-color: rgba(245,166,35,.3);
  background: rgba(245,166,35,.04);
}

.hp-ranking-list > .rank-row:nth-child(2) {
  border-color: rgba(192,192,192,.2);
  background: rgba(192,192,192,.03);
}

.hp-ranking-list > .rank-row:nth-child(3) {
  border-color: rgba(205,127,50,.2);
  background: rgba(205,127,50,.03);
}

/* ═══════════════════════════════════════════════════════════
   FIXTURES
═══════════════════════════════════════════════════════════ */
.hp-fixtures {
  padding: 80px 0;
  background: var(--p-navy-2);
  border-top: 1px solid var(--p-border);
  border-bottom: 1px solid var(--p-border);
}

.hp-fixtures-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.hp-fixtures-head h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin: 8px 0 0;
  line-height: 1.15;
}

.hp-fixtures-link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--p-accent);
  white-space: nowrap;
  transition: opacity var(--p-dur) var(--p-ease);
  flex-shrink: 0;
}

.hp-fixtures-link:hover { opacity: .7; }

.hp-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hp-match-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--p-navy-3);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 20px 22px;
  text-decoration: none;
  transition: border-color var(--p-dur) var(--p-ease),
              background var(--p-dur) var(--p-ease),
              transform var(--p-dur) var(--p-ease);
}

.hp-match-card:hover {
  border-color: rgba(56,189,248,.3);
  background: var(--p-navy-4);
  transform: translateY(-2px);
}

.hp-match-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: rgba(56,189,248,.07);
  border: 1px solid rgba(56,189,248,.2);
  border-radius: 12px;
  flex-shrink: 0;
}

.hp-match-date strong {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--p-sky);
  line-height: 1;
}

.hp-match-date span {
  font-size: .58rem;
  color: var(--p-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 1px;
}

.hp-match-info {
  flex: 1;
  min-width: 0;
}

.hp-match-info h3 {
  font-size: .9375rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.hp-match-info p {
  font-size: .78rem;
  color: var(--p-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-match-time {
  font-size: .875rem;
  font-weight: 700;
  color: var(--p-text);
  white-space: nowrap;
  background: var(--p-navy-4);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  padding: 6px 10px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════
   NEWS — Magazine grid
═══════════════════════════════════════════════════════════ */
.hp-news {
  padding: 88px 0;
}

.hp-news-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.hp-news-head h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin: 8px 0 0;
  line-height: 1.15;
}

.hp-news-link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--p-accent);
  white-space: nowrap;
  transition: opacity var(--p-dur) var(--p-ease);
  flex-shrink: 0;
}

.hp-news-link:hover { opacity: .7; }

/* 3-col grid, first card spans 2 columns */
.hp-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hp-news-grid > .article-card:first-child {
  grid-column: 1 / 3;
  display: grid;
  grid-template-rows: auto 1fr;
}

.hp-news-grid > .article-card:first-child .article-img {
  aspect-ratio: 16/8;
}

.hp-news-grid > .article-card:first-child .article-body h3 {
  font-size: 1.125rem;
  line-height: 1.3;
}

/* Newsletter */
.hp-newsletter {
  margin-top: 56px;
  background: linear-gradient(135deg, rgba(16,216,118,.07) 0%, rgba(56,189,248,.05) 100%);
  border: 1px solid rgba(16,216,118,.15);
  border-radius: 18px;
  padding: 44px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hp-newsletter-copy h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -.02em;
}

.hp-newsletter-copy p {
  font-size: .9375rem;
  color: var(--p-muted);
  max-width: 380px;
  line-height: 1.6;
}

.hp-newsletter-form {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.hp-newsletter-form input[type="email"] {
  background: var(--p-navy-2);
  border: 1.5px solid var(--p-border);
  border-radius: 26px;
  padding: 11px 22px;
  font-size: .875rem;
  color: var(--p-text);
  outline: none;
  font-family: inherit;
  min-width: 260px;
  transition: border-color var(--p-dur) var(--p-ease),
              box-shadow var(--p-dur) var(--p-ease);
}

.hp-newsletter-form input[type="email"]:focus {
  border-color: var(--p-accent);
  box-shadow: 0 0 0 3px rgba(16,216,118,.12);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hp-hero-inner {
    grid-template-columns: 1fr;
    padding: 110px 0 64px;
  }
  .hp-hero-card { display: none; }

  .hp-hero-desc { max-width: 100%; }

  .hp-ranking-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hp-ranking-intro { position: static; }

  .hp-spotlight-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hp-spotlight-grid > .stadium-card:first-child {
    grid-column: 1 / 3;
    grid-row: auto;
  }
  .hp-spotlight-grid > .stadium-card:first-child .stadium-thumb {
    min-height: 200px;
    aspect-ratio: 16/9;
    flex: none;
  }
  .hp-spotlight-grid > .stadium-card:nth-child(2) {
    grid-column: auto;
  }

  .hp-region-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .hp-section-head  { flex-direction: column; gap: 12px; }
  .hp-section-desc  { text-align: left; max-width: 100%; }
  .hp-fixtures-head { flex-direction: column; align-items: flex-start; }
  .hp-news-head     { flex-direction: column; align-items: flex-start; }

  .hp-region-grid   { grid-template-columns: repeat(3, 1fr); }
  .hp-match-grid    { grid-template-columns: 1fr; }
  .hp-news-grid     { grid-template-columns: 1fr; }
  .hp-news-grid > .article-card:first-child { grid-column: auto; }
  .hp-news-grid > .article-card:first-child .article-img { aspect-ratio: 16/9; }

  .hp-newsletter    { flex-direction: column; padding: 32px 24px; }
  .hp-newsletter-form { flex-direction: column; width: 100%; }
  .hp-newsletter-form input[type="email"] { min-width: 0; width: 100%; }

  .hp-stats-inner   { grid-template-columns: 1fr; }
  .hp-stat          { border-right: none; border-bottom: 1px solid var(--p-border); }
  .hp-stat:last-child { border-bottom: none; }

  .hp-spotlight-grid { grid-template-columns: 1fr; }
  .hp-spotlight-grid > .stadium-card:first-child { grid-column: auto; grid-row: auto; }
  .hp-spotlight-grid > .stadium-card:nth-child(2) { grid-column: auto; }
}

@media (max-width: 480px) {
  .hp-region-grid   { grid-template-columns: 1fr 1fr; }
  .hp-hero-actions  { flex-direction: column; }
  .hp-hero-actions .btn-primary,
  .hp-btn-ghost     { text-align: center; justify-content: center; }
}
