/* Imarika Super Cup — public site styles. Plain CSS, no build step, no
   framework (spec section 19: "Plain CSS", "Vanilla JavaScript", "Minimal
   JavaScript dependencies", "Responsive design"). */
@import url("../../fonts/fonts.css");


:root {
  --imarika-yellow: #FDD41D;
  --imarika-navy: #062137;
  --imarika-teal: #40C0C5;
  --imarika-light: #EFEFEF;
  --max-width: 1120px;
  --radius: 10px;
  /* Imarika Updates 8: Nouveau Nostalgia for "Hatuzeeki", Lemon Milk for
     everything else. Actual font files aren't bundled (licensed/commercial
     fonts) -- see static/fonts/README.txt. Until they're added, these
     fallback stacks keep every page readable. */
  --font-hatuzeeki: "Nouveau Nostalgia", Georgia, "Times New Roman", serif;
  --font-body: "Lemon Milk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Lemon Milk is a display/branding typeface with no true lowercase
     letterforms -- lowercase text renders as cap-height glyphs, which
     reads fine in headings and buttons but makes anything typed into a
     field (contact form, login, signup, coach dashboard) look stuck in
     caps lock even though the underlying text is completely normal
     case. Editable fields always use --font-ui instead, further down. */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Anchor jump targets (e.g. team page "Imarika Index History" / "Squad"
   pills) land just below the section heading instead of flush against
   the top of the viewport. */
h2[id], h3[id] { scroll-margin-top: 16px; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--imarika-navy);
  background: #fff;
  line-height: 1.55;
}

/* Every editable field on the site (contact form, login, signup, coach
   dashboard, search boxes, etc.) always uses a normal readable font,
   never the display font above -- see the --font-ui comment. */
input, textarea, select {
  font-family: var(--font-ui);
}

a { color: var(--imarika-navy); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* ── Header / nav ─────────────────────────────────────────────── */
.site-header {
  background: var(--imarika-navy);
  color: var(--imarika-light);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-logo-link { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
.brand a { color: var(--imarika-light); font-weight: 800; font-size: 1.25rem; letter-spacing: .02em; }
.brand .brand-accent { color: var(--imarika-yellow); }
.brand .tagline { font-size: .75rem; opacity: .8; font-family: var(--font-hatuzeeki); }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--imarika-light);
  color: var(--imarika-light); border-radius: 6px; padding: 6px 10px; cursor: pointer;
}

.site-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.site-nav a { color: var(--imarika-light); font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--imarika-yellow); text-decoration: none; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none; width: 100%; padding: 0 20px 14px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 14px; }
  .site-header .container { flex-wrap: wrap; }
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(135deg, rgba(6,33,55,.92) 0%, rgba(10,51,85,.88) 100%),
    url("../../images/imarika_background_1.jpeg");
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 56px 0;
}
.hero h1 { font-size: 2.4rem; margin: 0 0 10px; }
.hero .tagline-big { color: var(--imarika-yellow); font-weight: 800; font-family: var(--font-hatuzeeki); }
.hero p.lead { max-width: 620px; opacity: .9; }
.hero .cta-row { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  font-weight: 700; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--imarika-yellow); color: var(--imarika-navy); }
.btn-primary:hover { background: #ffe266; text-decoration: none; }
.btn-outline { border-color: var(--imarika-light); color: var(--imarika-light); background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,.1); text-decoration: none; }

/* ── Countdown widget ─────────────────────────────────────────── */
.countdown {
  display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap;
}
.countdown .unit {
  background: rgba(255,255,255,.08); border-radius: var(--radius);
  padding: 10px 16px; min-width: 74px; text-align: center;
}
.countdown .unit .num { font-size: 1.6rem; font-weight: 800; color: var(--imarika-yellow); display: block; }
.countdown .unit .label { font-size: .7rem; text-transform: uppercase; opacity: .8; }

/* ── Sections / cards ─────────────────────────────────────────── */
section.block { padding: 44px 0; }
section.block.alt {
  background:
    linear-gradient(rgba(239,239,239,.94), rgba(239,239,239,.94)),
    url("../../images/imarika_background_2.jpeg");
  background-size: cover;
  background-position: center;
}
section.auth-block {
  background:
    linear-gradient(rgba(255,255,255,.93), rgba(255,255,255,.93)),
    url("../../images/imarika_background_3.jpeg");
  background-size: cover;
  background-position: center;
}
h2.section-title {
  font-size: 1.5rem; margin: 0 0 22px; border-left: 6px solid var(--imarika-teal); padding-left: 12px;
}

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid #e3e3e3; border-radius: var(--radius); padding: 18px; background: #fff;
}
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card .meta { font-size: .85rem; color: #555; }
a.card { display: block; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
a.card:hover { box-shadow: 0 4px 14px rgba(6,33,55,.12); transform: translateY(-2px); text-decoration: none; }

.team-badge {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.team-badge img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; border: 1px solid #ddd; }

.fixture-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid #eee; gap: 12px; flex-wrap: wrap;
}
.fixture-row .teams { font-weight: 700; }
.fixture-teams { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fixture-team { display: inline-flex; align-items: center; gap: 6px; }
.fixture-team-logo { width: 26px; height: 26px; object-fit: cover; border-radius: 50%; border: 1px solid #ddd; }
.fixture-vs { font-weight: 400; color: #999; font-size: .82rem; }

/* ── Pills (age-category / metric filters) ────────────────────────
   Rounded-rectangle buttons (not stadium pills), bold text, a solid
   navy "active" state — one filter group per row, stacked directly
   below the previous group (metric row, then category row beneath it). */
.pill-group { margin-bottom: 6px; }
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.pill-group .pill-row { margin-bottom: 12px; }
.pill {
  display: inline-block; padding: 10px 20px; border-radius: 8px; font-size: .85rem;
  font-weight: 700; background: #fff; color: var(--imarika-navy);
  border: 2px solid var(--imarika-navy); text-decoration: none; line-height: 1.2;
}
a.pill:hover { background: var(--imarika-light); text-decoration: none; }
.pill-active { background: var(--imarika-navy); color: #fff !important; border-color: var(--imarika-navy); }
.pill-static { cursor: default; }
.pill-small { padding: 4px 12px; font-size: .72rem; border-radius: 6px; border-width: 1.5px; }

/* ── Rank rows (standings team / leaderboard player, with logo/photo
   and a rise-drop indicator) ─────────────────────────────────────── */
.rank-team { display: inline-flex; align-items: center; gap: 8px; }
.rank-avatar {
  width: 26px; height: 26px; object-fit: cover; border-radius: 50%;
  border: 1px solid #ddd; flex-shrink: 0;
}
.rank-arrow { font-weight: 700; margin-left: 4px; font-size: .8rem; }
.rank-arrow.up { color: #1a7a3d; }
.rank-arrow.down { color: #a12626; }
.fixture-row .status-badge {
  font-size: .72rem; text-transform: uppercase; padding: 3px 10px; border-radius: 999px;
  background: var(--imarika-teal); color: var(--imarika-navy); font-weight: 700;
}
.fixture-row .status-badge.completed { background: var(--imarika-light); }
.fixture-row .status-badge.live { background: var(--imarika-yellow); }

/* ── Tables (standings/leaderboard) ───────────────────────────── */
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td {
  padding: 10px 8px; text-align: left; border-bottom: 1px solid #eee; font-size: .92rem;
}
table.data-table th { background: var(--imarika-navy); color: var(--imarika-light); }
table.data-table tr:nth-child(1) td { font-weight: 700; }

/* ── Calendar month grid ──────────────────────────────────────── */
.calendar-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-grid .dow { text-align: center; font-weight: 700; font-size: .8rem; color: #555; padding-bottom: 6px; }
.calendar-day {
  min-height: 70px; border: 1px solid #eee; border-radius: 6px; padding: 6px; font-size: .78rem;
}
.calendar-day.outside { background: #fafafa; color: #bbb; }
.calendar-day.today { border-color: var(--imarika-teal); border-width: 2px; }
.calendar-day .day-num { font-weight: 700; }
.calendar-day .evt { display: block; margin-top: 4px; background: var(--imarika-yellow); border-radius: 4px; padding: 1px 4px; }

/* ── Loading / feedback states (spec 23) ──────────────────────── */
.state-loading, .state-empty, .state-error, .state-success, .state-warning, .state-info, .state-debug {
  padding: 14px 16px; border-radius: var(--radius); font-size: .9rem; margin: 12px 0;
}
.state-loading { background: var(--imarika-light); color: var(--imarika-navy); }
.state-empty { background: #f7f7f7; color: #777; text-align: center; }
.state-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; font-weight: 600; }
.state-error ul { margin: 0; padding-left: 18px; list-style: disc; color: inherit; }
.state-error li { color: inherit; }
.state-success { background: #e9f9ef; color: #1a7a3d; border: 1px solid #bfe8cd; }
.state-warning { background: #fff8e1; color: #7a5b00; border: 1px solid var(--imarika-yellow); }
.state-info { background: #eaf7f8; color: #0d5a5e; border: 1px solid var(--imarika-teal); }
.state-debug { background: #f7f7f7; color: #777; border: 1px solid #ddd; }
.spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid var(--imarika-teal);
  border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ─────────────────────────────────────────────────────── */
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .9rem; }
.form-field input, .form-field textarea {
  width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; font-family: var(--font-ui);
}

/* ── Password visibility toggle ───────────────────────────────────── */
.password-field { position: relative; }
.password-field input { padding-right: 42px !important; }
.password-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.1rem; line-height: 1;
  padding: 6px 8px; color: #777;
}
.password-toggle:hover { color: var(--imarika-navy); }

/* ── Pagination ────────────────────────────────────────────────── */
.pagination-row {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 28px 0 8px; font-size: .9rem;
}
.pagination-row .meta { margin: 0; }

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
  background:
    linear-gradient(rgba(6,33,55,.93), rgba(6,33,55,.93)),
    url("../../images/imarika_background_4.jpeg");
  background-size: cover;
  background-position: center;
  color: var(--imarika-light);
  padding: 32px 0;
  margin-top: 40px;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--imarika-light); opacity: .85; }
.site-footer .legal-links { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer .fine-print { opacity: .6; font-size: .8rem; margin-top: 16px; }

/* Utility: apply the Hatuzeeki display font to any inline occurrence of
   the word/tag outside the header + hero (e.g. the footer tagline). */
.font-hatuzeeki { font-family: var(--font-hatuzeeki); }

/* ── Knockout bracket visual (Imarika Updates 9) ──────────────────
   Deliberately not pixel-perfect connector lines -- each round column
   spreads its matches evenly (`justify-content: space-around`) across
   the same overall height, which lines a round's matches up roughly
   against the matches that feed them without needing per-match height
   math. A thin connector nub on each match hints at the bracket shape;
   it's a "such as this" reference visual, not a slide-deck rebuild. */
.bracket {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 10px 4px 30px;
  align-items: stretch;
}
.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 190px;
}
.bracket-final-round { align-items: center; justify-content: center; }
.bracket-match {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--imarika-navy);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 10px 18px;
  font-size: .82rem;
  min-width: 150px;
}
.bracket-round:not(.bracket-final-round) .bracket-match::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -18px;
  width: 18px;
  height: 1px;
  background: #bfc7cc;
}
.bracket-team { display: flex; align-items: center; justify-content: flex-start; gap: 6px; padding: 2px 0; }
.bracket-team.winner { font-weight: 800; color: var(--imarika-navy); }
.bracket-team-logo { width: 18px; height: 18px; object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.bracket-score {
  text-align: center;
  font-weight: 800;
  color: var(--imarika-navy);
  border-top: 1px solid var(--imarika-light);
  margin-top: 6px;
  padding-top: 4px;
}
.bracket-pens { font-weight: 600; color: #5c6b74; font-size: .78em; }
.bracket-tbd { color: #999; font-style: italic; text-align: center; padding: 4px 0; }
.bracket-champion {
  text-align: center;
  margin-top: 10px;
  font-weight: 800;
  color: var(--imarika-navy);
}
.bracket-trophy-logo { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 3px var(--imarika-yellow); }

/* Imarika Updates 10: 3rd Place Play-Off and the 9th/10th Placement
   Match shown side by side rather than stacked. */
.bracket-side-by-side { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 12px; }
.bracket-side-by-side > div { flex: 1; min-width: 220px; }

/* Imarika Updates 11: visually separates one category's knockout
   bracket from the next on the "All Categories" knockout view. */
.bracket-divider { border: none; border-top: 2px solid var(--imarika-light); margin: 36px 0; }