/* ============================================
   HOME.CSS — Home Page Only
   Relies on variables defined in style.css
   ============================================ */

/* ── Hero Banner ────────────────────────────── */
#home-hero {
  position: relative;
  width: 100%;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

#home-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0,212,255,0.08) 0%, transparent 50%),
    linear-gradient(to bottom, #0d1320 0%, var(--bg-deep) 100%);
  z-index: 0;
}

#home-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridScroll 20s linear infinite;
}

#home-hero-bg::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,212,255,0.10) 0%, transparent 70%);
  border-radius: 50%;
}

#home-hero-bg-orb2 {
  position: absolute;
  bottom: -60px; left: 10%;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(0,212,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

@keyframes gridScroll {
  from { background-position: 0 0; }
  to   { background-position: 40px 40px; }
}

#home-hero-content {
  position: relative;
  z-index: 1;
  padding: 36px 40px 32px;
  width: 100%;
}

#home-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7em; font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.1s forwards;
}

#home-hero-content h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.6em, 6vw, 5em);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--text-primary);
  margin: 0 0 4px;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.2s forwards;
}

#home-hero-content h1 span { color: var(--accent); }

#home-hero-sub {
  font-family: 'Barlow', sans-serif;
  font-size: 0.95em;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.3s forwards;
}

#home-hero-divider {
  width: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-top: 18px;
  animation: expandWidth 0.8s ease 0.4s forwards;
}

@keyframes expandWidth { to { width: min(500px, 70vw); } }

/* ── Main Layout ─────────────────────────────── */
main {
  padding: 24px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

/* ── Home Cards ──────────────────────────────── */
.home-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 1500px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.4s ease forwards;
}

.home-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 60%);
  opacity: 0.6;
}

.home-card:nth-child(1) { animation-delay: 0.15s; }
.home-card:nth-child(2) { animation-delay: 0.20s; }
.home-card:nth-child(3) { animation-delay: 0.25s; }
.home-card:nth-child(4) { animation-delay: 0.30s; }

.home-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72em; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}

.home-card-title::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}

/* ── Home Grid ───────────────────────────────── */
#home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 1500px;
  opacity: 0;
  animation: fadeUp 0.4s ease 0.15s forwards;
}

#home-grid .home-card { animation: none; opacity: 1; }

/* ── Table Wrappers ──────────────────────────── */
.home-table-wrapper { overflow-x: auto; border-radius: 8px; }

/* ── Score Tables ────────────────────────────── */
#split1, #lans, #totals, #prizeTable {
  width: 100%;
  border: none;
  border-collapse: collapse;
  font-family: 'Barlow', sans-serif;
}

#split1 th, #lans th, #totals th, #prizeTable th {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75em; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px; text-align: center;
  border-bottom: 1px solid var(--border);
  background: transparent; white-space: nowrap;
}

#split1 th a, #lans th a {
  color: var(--accent);
  font-weight: 700;
  transition: color 0.2s, opacity 0.2s;
}

#split1 th a:hover, #lans th a:hover { color: var(--text-primary); opacity: 0.9; }

#split1 td, #lans td, #totals td, #prizeTable td {
  padding: 9px 14px; text-align: center;
  font-size: 0.88em;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  transition: background 0.15s;
}

/* All links inside home tables */
#split1 td a, #lans td a, #totals td a, #prizeTable td a {
  color: var(--text-primary);
}

#split1 td:first-child, #lans td:first-child,
#totals td:first-child, #prizeTable td:first-child {
  text-align: left; font-weight: 500;
}

#split1 tbody tr:last-child td, #lans tbody tr:last-child td,
#totals tbody tr:last-child td, #prizeTable tbody tr:last-child td { border-bottom: none; }

#split1 tbody tr:hover td, #lans tbody tr:hover td,
#totals tbody tr:hover td, #prizeTable tbody tr:hover td { background: var(--accent-dim); }

/* ── Top Performers ──────────────────────────── */
#home-tops { max-width: 1500px; animation-delay: 0.35s; }

.tops-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.tops-card {
  flex: 1; min-width: 180px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.tops-card:hover { border-color: var(--border-accent); transform: translateY(-2px); }

.tops-table {
  width: 100%; border: none;
  border-collapse: collapse;
  font-family: 'Barlow', sans-serif;
}

.tops-table thead th {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72em; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2); text-align: left;
}

.tops-table td {
  padding: 7px 12px; font-size: 0.85em;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  transition: background 0.15s;
}

/* All links inside tops tables */
.tops-table td a { color: var(--text-primary); }

.tops-table tbody tr:last-child td { border-bottom: none; }
.tops-table tbody tr:hover td { background: var(--accent-dim); }

/* First place gold */
.tops-table tbody tr:first-child td,
.tops-table tbody tr:first-child td a { color: var(--gold); }

/* ── Footer ──────────────────────────────────── */
footer { background: var(--bg-card); border-top: 1px solid var(--border); margin-top: 0; }

/* ── Responsive ──────────────────────────────── */
@media screen and (max-width: 1000px) { #home-grid { grid-template-columns: 1fr; } }

@media screen and (max-width: 768px) {
  main { padding: 16px; gap: 16px; }
  #home-hero-content { padding: 24px 20px 20px; }
  #home-hero-content h1 { font-size: 2.4em; }
  .tops-card { min-width: 140px; }
}

@media screen and (max-width: 480px) { .tops-grid { flex-direction: column; } }
