/* ============================================================
   RATCOM Sports — modern stylesheet
   ============================================================ */

:root {
  --bg: #0d1321;
  --bg-soft: #131a2b;
  --panel: #1a2236;
  --panel-2: #212b44;
  --border: #2c3852;
  --text: #e8ecf4;
  --text-dim: #9aa6bd;
  --accent: #ff8c2e;
  --accent-deep: #e06900;
  --accent-soft: rgba(255, 140, 46, 0.14);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --maxw: 100%; /* full-width layout; side padding keeps content off the edges */
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #0d1321; /* prevents Chrome white flash before CSS loads */
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(255, 140, 46, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(64, 110, 255, 0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: "Barlow Condensed", "Inter", -apple-system, sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #ffb066; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Header / Nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 19, 33, 0.92);
  border-bottom: 1px solid var(--border);
}

/* blur only on desktop: backdrop-filter creates a containing block that
   would trap the fixed-position mobile menu inside the header */
@media (min-width: 861px) {
  .site-header {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  color: var(--text);
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.15s;
}
.brand:hover { opacity: 0.85; color: var(--text); }
.brand-svg { height: 44px; width: auto; display: block; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.main-nav > ul > li { position: relative; }

.main-nav a,
.main-nav .dropbtn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}

.main-nav > ul > li > a:hover,
.main-nav .dropbtn:hover,
.main-nav li.open > .dropbtn {
  background: var(--accent-soft);
  color: var(--accent);
}

.main-nav .caret {
  font-size: 0.6rem;
  transition: transform 0.2s ease;
}
.main-nav li.open .caret { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.main-nav li.open .dropdown-menu { display: flex; }

.dropdown-menu a {
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text);
  font-size: 0.9rem;
}
.dropdown-menu a:hover { background: var(--accent-soft); color: var(--accent); }

/* Last dropdown opens to the left so it doesn't clip off-screen */
.main-nav > ul > li:last-child .dropdown-menu {
  left: auto;
  right: 0;
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 14px 0 12px;
}

.hero-split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
}
.hero-split-left { min-width: 0; }
.hero-split-right {
  min-width: 0;
  border-left: 2px solid var(--border);
  padding-left: 28px;
}
.hero-split-right p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
  max-width: 540px;
}

.hero .kicker {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(255, 140, 46, 0.35);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero h1 .accent { color: var(--accent); }
.hero p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 0 0 14px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #14100a;
}
.btn-primary:hover { filter: brightness(1.1); color: #14100a; }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--panel);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------- Scoreboard ticker ---------------- */

.ticker-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  overflow: hidden;
  display: block;
}
.ticker-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 24px 0;
  max-width: var(--maxw);
  margin: 0 auto;
}
.ticker-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-right: 4px;
}
.ticker-toggle {
  display: flex;
  gap: 4px;
}
.ticker-toggle button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.ticker-toggle button.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.ticker {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 24px 10px;
  scrollbar-width: thin;
  max-width: var(--maxw);
  margin: 0 auto;
}
.ticker-game {
  flex: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.82rem;
  min-width: 165px;
  color: var(--text);
}
.ticker-game .status { color: var(--accent); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; }
.ticker-game .row { display: flex; justify-content: space-between; gap: 14px; }
.ticker-game .row .score { font-weight: 700; }
.ticker-empty { font-size: 0.82rem; color: var(--text-dim); padding: 4px 0; white-space: nowrap; }

/* ---------------- Page layout ---------------- */

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  padding: 36px 0 64px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.section-head h2 {
  font-size: 1.9rem;
  text-transform: uppercase;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-head h2::before {
  content: "";
  width: 6px;
  height: 28px;
  border-radius: 3px;
  background: linear-gradient(var(--accent), var(--accent-deep));
}

.feed-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tabs {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.tabs button {
  border: 0;
  background: none;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: inherit;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.tabs button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #14100a;
}

.refresh-note { color: var(--text-dim); font-size: 0.78rem; }
.refresh-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.refresh-btn:hover { color: var(--accent); border-color: var(--accent); }
.refresh-btn.spinning { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- News feed ---------------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.news-card {
  grid-column: span 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.news-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.news-card.featured { grid-column: 1 / -1; }

.news-card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--panel-2);
}
.news-card.featured .thumb { aspect-ratio: 21 / 9; }
.news-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.news-card:hover .thumb img { transform: scale(1.04); }

.news-card .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(13, 19, 33, 0.85);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 46, 0.4);
}

.news-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card h3 { font-size: 1.35rem; margin: 0; }
.news-card.featured h3 { font-size: 1.8rem; }
.news-card h3 a { color: var(--text); }
.news-card h3 a:hover { color: var(--accent); }
.news-card .desc { color: var(--text-dim); font-size: 0.92rem; margin: 0; flex: 1; }
.news-card .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 6px;
}
.news-card .meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

.feed-status {
  padding: 40px;
  text-align: center;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------------- Sidebar ---------------- */

.sidebar { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.widget {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.widget h3 {
  font-size: 1.25rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.widget h3::before {
  content: "";
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(var(--accent), var(--accent-deep));
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { border-bottom: 1px solid var(--border); }
.widget ul li:last-child { border-bottom: 0; }
.widget ul a {
  display: block;
  padding: 9px 2px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}
.widget ul a:hover { color: var(--accent); }

/* ---------------- Content pages ---------------- */

.page-main { min-width: 0; }
.content-page { padding: 44px 24px 64px; max-width: none; }
.content-page .page-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  text-transform: uppercase;
}
.content-page .page-title .accent { color: var(--accent); }
.content-page .lede { color: var(--text-dim); font-size: 1.05rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin: 24px 0;
}
.card h2 { font-size: 1.6rem; text-transform: uppercase; color: var(--accent); }
.card h3 { font-size: 1.25rem; }
.card .hero-img { border-radius: 10px; margin-bottom: 18px; }
.card p { color: #c7cfdf; }
.card strong { color: var(--text); }

/* champions table */
.champ-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.champ-table th, .champ-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.champ-table th {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}
.champ-table tr:hover td { background: var(--accent-soft); }
.champ-table .champ-name { font-weight: 700; color: var(--text); }
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
}
.tag.mbb { background: var(--accent-soft); color: var(--accent); }
.tag.wbb { background: rgba(110, 140, 255, 0.16); color: #9fb3ff; }

/* hall of fame */
.hof-class { margin-bottom: 8px; }
.hof-class h3 { color: var(--accent); text-transform: uppercase; margin-bottom: 8px; }
.hof-class ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.hof-class li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.hof-class li:last-child { border-bottom: 0; }
.hof-class .school { color: var(--text-dim); }

/* staff */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.staff-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.staff-card img { border-radius: 10px; margin-bottom: 12px; width: 100%; max-width: 200px; }
.staff-card h4 { font-size: 1.15rem; margin-bottom: 2px; }
.staff-card .role { color: var(--accent); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.staff-card p { font-size: 0.9rem; }

/* spread game */
.group-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.group-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
}
.group-card.eliminated { border-left-color: var(--border); opacity: 0.65; }
.group-card .gname { font-weight: 800; color: var(--text); }
.group-card .members { color: var(--text-dim); }
.results-log p { margin: 6px 0; color: #c7cfdf; font-size: 0.95rem; }
.results-log h4 { color: var(--accent); margin: 18px 0 6px; text-transform: uppercase; font-size: 1rem; }

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 44px 0 28px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 7px 0; }
.footer-grid a { color: var(--text-dim); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-logo { height: 60px; width: auto; margin-bottom: 14px; }
.footer-about p { color: var(--text-dim); font-size: 0.9rem; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ---------------- Responsive ---------------- */

@media (min-width: 1500px) {
  /* use the extra width on big screens instead of stretching two columns */
  .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-grid { grid-template-columns: minmax(0, 1fr) 400px; }
}

@media (max-width: 1000px) {
  .page-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--bg);
    overflow-y: auto;
    display: none;
    padding: 16px 24px 40px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--border); }
  .main-nav a, .main-nav .dropbtn { width: 100%; justify-content: space-between; padding: 15px 6px; font-size: 1rem; }
  .dropdown-menu {
    position: static;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 10px 14px;
    min-width: 0;
  }
  .news-grid { grid-template-columns: 1fr; }
  .hero { padding: 32px 0 20px; }
  .hero-split { grid-template-columns: 1fr; gap: 16px; }
  .hero-split-right { border-left: 0; border-top: 1px solid var(--border); padding-left: 0; padding-top: 16px; }
}
