/* Home page (index.html) styles: hero, Live row, Tournaments toggle, organizer cards. */

/* (a) Hero: full-bleed court photo, big logo, one search; (e) two clear choices */
.hp-hero { position: relative; overflow: hidden; color: #fff; padding: 3.2rem 0 2.6rem; min-height: 420px; display: flex; align-items: center; }
.hp-hero-bg { position: absolute; inset: 0; background: #0b1530 center / cover no-repeat; transform: scale(1.03); }
.hp-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,10,25,.55) 0%, rgba(5,10,25,.72) 60%, rgba(5,10,25,.92) 100%); }
.hp-hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.1rem; width: 100%; }
.hp-hero-logo { width: min(560px, 86vw); height: auto; filter: drop-shadow(0 4px 18px rgba(0,0,0,.5)); }
.hp-h1 { margin: .2rem 0 0; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -.02em; color: #fff; }
.hp-search { position: relative; width: min(640px, 100%); }
.hp-search input { width: 100%; height: 60px; border-radius: 999px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.96); color: #0f172a;
  font-size: 1.08rem; padding: 0 3.2rem 0 3.3rem; box-shadow: 0 14px 40px rgba(0,0,0,.35); outline: none; }
.hp-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(26,159,255,.35), 0 14px 40px rgba(0,0,0,.35); }
.hp-search input::-webkit-search-cancel-button { display: none; }
.hp-search-ic { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); color: #475569; display: flex; }
.hp-q-clear { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: #e2e8f0; color: #0f172a; font-size: 1.4rem; cursor: pointer; }
.hp-cta { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; width: min(640px, 100%); }
.hp-cta-btn { flex: 1 1 220px; display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 56px; padding: .7rem 1.2rem; border-radius: 16px;
  font-weight: 750; font-size: 1.05rem; color: #fff; text-decoration: none; background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.hp-cta-btn.primary { background: var(--accent); border-color: var(--accent); box-shadow: 0 10px 28px rgba(26,159,255,.4); }
.hp-cta-btn:hover { transform: translateY(-1px); }
.hp-cta-ic { font-size: 1.25rem; }

/* section heads */
.hp-sec-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hp-sec-head h2 { margin: 0; display: flex; align-items: center; gap: .55rem; font-size: 1.55rem; }
.hp-dot { width: 12px; height: 12px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: hpPulse 1.6s infinite; }
@keyframes hpPulse { 70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.hp-swipe-hint { color: var(--muted); font-size: .85rem; }

/* (b)(f) Live row: big cards, swipeable on phones */
.hp-live { padding: 2rem 0 .5rem; }
.hp-live-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.hp-live-row.multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hp-live-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border-radius: 20px; overflow: hidden; background: var(--bg-card, #121a2e); border: 1px solid var(--border); box-shadow: var(--shadow); }
.hp-live-row.multi .hp-live-card { grid-template-columns: 1fr; }
.hp-live-card.is-live { border-color: rgba(239,68,68,.55); box-shadow: 0 0 0 1px rgba(239,68,68,.25), var(--shadow); }
.hp-live-media { position: relative; display: block; min-height: 220px; background: #0b1530; }
.hp-live-row.multi .hp-live-media { min-height: 0; aspect-ratio: 16 / 8; }
.hp-live-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-live-ph { position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, #1a9fff55, transparent 60%), #0b1530; }
.hp-live-pill { position: absolute; top: .8rem; left: .8rem; font-size: .9rem; padding: .3rem .75rem; }
.hp-live-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.hp-live-body h3 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.hp-live-body h3 a { color: var(--text); text-decoration: none; }
.hp-prizes { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.hp-prize { display: inline-flex; align-items: center; gap: .3rem; font-size: .95rem; }
.hp-demo-tag { font-size: .78rem; color: #b45309; background: #fef3c7; border-radius: 8px; padding: .2rem .5rem; align-self: flex-start; }
.hp-streams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.hp-stream { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.hp-stream img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.hp-play { position: absolute; inset: 0; margin: auto; width: 34px; height: 24px; border-radius: 7px; background: #ef4444; color: #fff; font-size: .75rem; display: grid; place-items: center; }
.hp-court { position: absolute; left: .35rem; bottom: .3rem; font-size: .7rem; font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000; }
.hp-live-btns { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: auto; padding-top: .3rem; }
.hp-btn { flex: 1 1 160px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; border-radius: 14px; font-weight: 750;
  font-size: 1rem; text-decoration: none; color: var(--text); border: 1.5px solid var(--border); background: transparent; }
.hp-btn.watch { background: #ef4444; border-color: #ef4444; color: #fff; }
.hp-live-card:not(.is-live) .hp-btn.watch { background: var(--accent); border-color: var(--accent); }
.hp-rec { width: 10px; height: 10px; border-radius: 50%; background: #fff; }

/* (c) Tournaments with Upcoming / Past toggle */
.hp-tours { padding: 2rem 0 .5rem; }
.hp-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(148,163,255,.1); border: 1px solid var(--border); }
.hp-seg[hidden] { display: none; }
.hp-seg-btn { min-height: 46px; min-width: 120px; padding: 0 1.1rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.hp-seg-btn b { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px; background: rgba(148,163,255,.18); font-size: .8rem; margin-left: .25rem; }
.hp-seg-btn.on { background: var(--accent); color: #fff; }
.hp-seg-btn.on b { background: rgba(255,255,255,.25); }
.hp-grid .home-card h3 { font-size: 1.1rem; }

/* (d) Organizer cards */
.hp-orgs { padding: 2rem 0 2.5rem; }
.hp-org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.hp-org-card { display: flex; flex-direction: column; gap: .7rem; padding: 1.1rem; border-radius: 18px; background: var(--bg-card, #121a2e); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.hp-org-card:hover { border-color: rgba(26,159,255,.6); transform: translateY(-2px); }
.hp-org-top { display: flex; gap: .85rem; align-items: center; }
.hp-org-top img, .hp-org-ph { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex: none; background: #0b1530; }
.hp-org-ph { display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: #fff; background: var(--accent); }
.hp-org-top h3 { margin: 0 0 .25rem; font-size: 1.1rem; line-height: 1.25; }
.hp-org-count { display: inline-block; font-size: .8rem; font-weight: 700; color: #16a34a; background: rgba(34,197,94,.14); padding: .15rem .55rem; border-radius: 999px; }
.hp-org-bio { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.hp-org-link { margin-top: auto; font-weight: 700; color: var(--accent); min-height: 32px; display: flex; align-items: center; }

/* (f) Phones: big tap targets, swipeable Live row */
@media (max-width: 760px) {
  .hp-hero { min-height: 0; padding: 2.2rem 0 1.8rem; }
  .hp-search input { height: 56px; font-size: 1rem; }
  .hp-cta-btn { flex: 1 1 100%; }
  .hp-live-card { grid-template-columns: 1fr; }
  .hp-live-media { min-height: 0; aspect-ratio: 16 / 9; }
  .hp-live-row.multi { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .8rem; margin: 0 -1rem; padding: 0 1rem .5rem; scrollbar-width: none; }
  .hp-live-row.multi::-webkit-scrollbar { display: none; }
  .hp-live-row.multi .hp-live-card { flex: 0 0 86%; scroll-snap-align: center; }
  .hp-sec-head h2 { font-size: 1.35rem; }
  .hp-seg { width: 100%; }
  .hp-seg-btn { flex: 1; min-height: 50px; }
  .hp-grid .home-card .card-body { padding: 1rem 1.05rem; }
}
html[data-theme="light"] .hp-seg-btn b { background: rgba(15,40,80,.08); }
.hp-live-row.multi .hp-live-card { display: flex; flex-direction: column; }
.hp-live-row.multi .hp-live-body { flex: 1; }
.hp-live-media { flex: none; }
.hp-live-pill { z-index: 1; font-size: .95rem; font-weight: 800; padding: .35rem .85rem; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.hp-live-card.is-live .hp-live-pill { background: #ef4444; color: #fff; }
.hp-org-next { margin: 0; color: var(--muted); font-size: .9rem; }
.hp-live-pill.soon { background: #fbbf24; color: #1f2937; }

/* Search typeahead dropdown (hero stays above the sections below so the menu isn't covered or clipped) */
.hp-hero { overflow: visible; z-index: 5; }
.hp-hero-bg { transform: none; }
.hp-search { z-index: 10; }
.hp-dd { position: absolute; left: 0; right: 0; top: calc(100% + 8px); max-height: min(420px, 60vh); overflow-y: auto; text-align: left;
  background: #fff; color: #0f172a; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.45); padding: .35rem; border: 1px solid rgba(15,40,80,.12); }
.hp-dd[hidden] { display: none; }
.hp-dd-group { padding: .55rem .75rem .25rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.hp-dd-opt { display: flex; align-items: center; gap: .7rem; min-height: 56px; padding: .45rem .6rem; border-radius: 12px; color: #0f172a; text-decoration: none; }
.hp-dd-opt:hover, .hp-dd-opt.on { background: #e8f3ff; }
.hp-dd-opt.on { outline: 2px solid var(--accent); outline-offset: -2px; }
.hp-dd-thumb { width: 52px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; background: #0b1530; }
.hp-dd-thumb.org { width: 40px; height: 40px; border-radius: 10px; }
.hp-dd-thumb.ph { display: grid; place-items: center; color: #fff; font-weight: 800; background: radial-gradient(circle at 30% 30%, #1a9fff, #0b1530); }
.hp-dd-txt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.hp-dd-txt b { font-size: .98rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-dd-txt small { font-size: .8rem; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-dd-txt small .pill { font-size: .68rem; padding: .05rem .45rem; margin-right: .2rem; }
.hp-dd-empty { padding: 1rem .9rem; color: #475569; font-size: .95rem; }
.hp-cta { justify-content: center; }
.hp-cta-btn { flex: 0 1 320px; }
@media (max-width: 760px) { .hp-cta-btn { flex: 1 1 100%; } }

/* Hero slideshow: 5 feature screens crossfading behind the hero (phones use the -m images) */
.hp-slides { background: #0b1530; overflow: hidden; }
.hp-slide { position: absolute; inset: 0; background: var(--d) center top / cover no-repeat; opacity: 0; transition: opacity 1.2s ease; transform: scale(1.04); }
.hp-slide.on { opacity: 1; animation: hpZoom 7s ease-out forwards; }
.hp-slide.lazy { background-image: none; }
@keyframes hpZoom { from { transform: scale(1.06); } to { transform: scale(1.0); } }
@keyframes hpBar { from { width: 0; } to { width: 100%; } }
.hp-hero::after { background: linear-gradient(180deg, rgba(5,10,25,.62) 0%, rgba(5,10,25,.70) 55%, rgba(5,10,25,.93) 100%); }
.hp-dots { display: flex; align-items: center; justify-content: center; gap: .1rem; flex-wrap: wrap; margin-top: .2rem; }
.hp-dot-btn { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; border-radius: 10px; }
.hp-dot-btn:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.hp-dot-bar { position: relative; display: block; width: 28px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.35); overflow: hidden; }
.hp-dot-btn.on .hp-dot-bar { width: 40px; background: rgba(255,255,255,.3); }
.hp-dot-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #fff; border-radius: 4px; }
.hp-cap { flex-basis: 100%; text-align: center; font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-top: -.3rem; }
.hp-reduce .hp-slide { transition: opacity .8s ease; animation: none !important; transform: none; }
@media (prefers-reduced-motion: reduce) { .hp-slide { transition: opacity .8s ease; animation: none !important; transform: none; } }
@media (max-width: 760px) {
  .hp-slide { background-image: var(--m); background-position: center top; }
  .hp-slide.lazy { background-image: none; }
  .hp-dot-bar { width: 22px; } .hp-dot-btn.on .hp-dot-bar { width: 34px; }
}
/* Per-slide focus: standings + podium images are cropped to the table / podium and centered in the frame */
.hp-slide { background-position: var(--pos, center top); }
@media (max-width: 760px) { .hp-slide { background-position: var(--pos, center top); } }

/* ---------- Oct 9 PM: glass search over the slideshow; solid when in use. Smaller Host button. ---------- */
.hp-search input { transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease, color .22s ease; }
.hp-search input:not(:focus):placeholder-shown { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.38); color: #fff; box-shadow: none; }
.hp-search input:not(:focus):placeholder-shown::placeholder { color: rgba(255,255,255,.85); }
.hp-search:not(:focus-within):has(input:placeholder-shown) .hp-search-ic { color: rgba(255,255,255,.9); }
.hp-search input:not(:focus):placeholder-shown:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.6); }
.hp-search-ic { transition: color .22s ease; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hp-search input, .hp-search-ic { transition: none; } }
.hp-cta { margin-top: -.1rem; }
.hp-cta .hp-cta-btn, .hp-cta-btn { flex: 0 0 auto; min-height: 44px; padding: .45rem 1.05rem; border-radius: 999px; font-size: .92rem; font-weight: 700;
  background: rgba(15,23,42,.28); border: 1px solid rgba(255,255,255,.4); box-shadow: none; gap: .4rem; }
.hp-cta-btn:hover { background: rgba(15,23,42,.45); border-color: rgba(255,255,255,.7); }
.hp-cta-ic { font-size: 1rem; }
@media (max-width: 760px) { .hp-cta .hp-cta-btn, .hp-cta-btn { flex: 0 0 auto; } }

/* ---------- Oct 10: Finished tournaments section (bottom of the homepage) ---------- */
.hp-orgs { padding-bottom: 1rem; }
.hp-fin { padding: 2rem 0 3rem; border-top: 1px solid var(--border); margin-top: 1rem; }
.hp-fin h2 { display: flex; align-items: center; gap: .45rem; }
.hp-fin-ic { font-size: 1.15em; }
.hp-fin-n { font-size: .8rem; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; background: rgba(16,185,129,.16); color: #34d399; }
.hp-fin-n:empty { display: none; }
html[data-theme="light"] .hp-fin-n { color: #047857; }
.hp-fin-more { display: flex; justify-content: center; margin-top: 1rem; }
.hp-fin-more .btn { min-height: 48px; padding: .6rem 1.4rem; }
@media (max-width: 640px) { .hp-fin-more .btn { width: 100%; } }
