/* The home page: index.html (the nav grid) and gate.html (log-in and
   approval screens) — the two things "/" renders. */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 36px;
}
.home-hero img.logo-full {
  max-width: 460px;
  width: 90%;
  margin-bottom: 44px;
  border-radius: 12px;
}
.nav-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 1060px;
}
.nav-card {
  flex: 1 1 180px;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  padding: 22px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: background .18s, border-color .18s, color .18s, transform .12s;
  box-shadow: 0 1px 3px rgba(17,17,17,.10);
  line-height: 1.3;
}
.nav-card:hover {
  background: #E8F3FB;
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(19,125,197,.18);
}
.nav-card .nav-icon { font-size: 1.5rem; line-height: 1; }

/* The nav grid split in half: EuroLeague (orange) beside EuroCup (blue),
   stacked on narrow screens. Each half takes its colours from the same
   --comp* tokens a themed page does (base.css, .theme-*). */
.nav-halves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1240px;
}
@media (max-width: 860px) {
  .nav-halves { grid-template-columns: minmax(0, 1fr); }
}
.nav-half {
  background: var(--comp-bg);
  border: 2px solid var(--comp-line);
  border-top: 5px solid var(--comp);
  border-radius: 12px;
  padding: 16px 16px 20px;
}
.nav-half-title {
  margin-bottom: 14px;
  color: var(--comp-strong);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}
.nav-half .nav-grid { gap: 10px; }
.nav-half .nav-card {
  flex: 1 1 140px;
  max-width: 180px;
  padding: 18px 10px;
  border-color: var(--comp-line);
}
.nav-half .nav-card:hover {
  background: var(--surface);
  border-color: var(--comp);
  color: var(--comp-strong);
  box-shadow: 0 6px 16px rgba(17,17,17,.12);
}
.nav-general { margin-top: 20px; }

/* Prominent season switch on the landing page. The topbar carries the same
   control on every page; this is the one a visitor sees first. */
.home-season {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  margin: -20px 0 30px;
  box-shadow: 0 1px 3px rgba(17,17,17,.10);
}
.home-season .caption {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.home-season .opts { display: flex; gap: 8px; }
.home-season .opt {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  padding: 9px 22px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: all .15s;
}
.home-season .opt:hover { background: #E8F3FB; color: var(--blue); border-color: var(--accent); }
.home-season .opt.active {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 2px 8px rgba(19,125,197,.28);
}
.home-season .opt .sub {
  display: block;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  opacity: .8;
  margin-top: 2px;
}
@media (max-width: 700px) {
  .nav-card { flex-basis: 40%; max-width: none; }
  .home-hero img.logo-full { max-width: 320px; }
}

/* Gate screens: a guest sees the registration form, then (once they've
   submitted it) a "check WhatsApp" screen; an account that has clicked its
   magic link but isn't admin-approved yet sees "awaiting approval" instead.
   This template only ever renders one of the three — see home() in
   api/routes/home.py, which picks it over index.html for anyone who isn't at least
   an approved 'visitor'. */
.gate-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 1px 3px rgba(17,17,17,.10);
}
/* Author rules always beat the UA stylesheet's [hidden]{display:none} at
   equal specificity (see base.html's .season-menu[hidden]/.auth-bubble[hidden]
   for the same fix) — without this, #gateForm and #gateWaitingLink both
   render stacked regardless of the `hidden` attribute JS toggles. */
.gate-screen[hidden] { display: none; }
.gate-screen .gate-icon { font-size: 2rem; line-height: 1; }
.gate-screen h2 { margin: 0; font-size: 1.05rem; }
.gate-screen p { margin: 0; color: var(--text-dim); font-size: .86rem; line-height: 1.5; }
.gate-screen .gate-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.gate-screen .gate-field label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.gate-screen .gate-field input {
  width: 100%;
  font-family: inherit;
  font-size: .9rem;
  padding: 9px 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
}
.gate-screen .gate-field input:focus { outline: none; border-color: var(--blue); }
.gate-submit {
  width: 100%;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 7px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  transition: opacity .15s;
}
.gate-submit:hover { opacity: .88; }
.gate-submit:disabled { opacity: .6; cursor: default; }
.gate-msg { font-size: .78rem; min-height: 16px; }
.gate-msg.error { color: #C0392B; }
.gate-msg.success { color: #1E7E34; }
.gate-restart {
  background: none;
  border: none;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.gate-restart:hover { text-decoration: underline; }
