/* ALSI Basketball — base: reset extras, typography, app shell, top bar,
   bottom nav, utilities. Mobile-first (360–414px); desktop is a widened column. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--ink-900);
  background: var(--paper-50);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--orange-600); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 800; line-height: 1.1; margin: 0 0 var(--sp-3); color: var(--ink-900); }
h1 { font-size: var(--step-2); }
h2 { font-size: var(--step-1); }
p { margin: 0 0 var(--sp-3); }
:focus-visible { outline: 3px solid var(--orange-500); outline-offset: 2px; border-radius: 4px; }

/* App shell: centered column, max 480px mobile → 680px larger. */
.app {
  min-height: 100dvh;
  max-width: 680px;
  margin: 0 auto;
  background: var(--paper-0);
  display: flex;
  flex-direction: column;
}
@media (min-width: 481px) { .app { box-shadow: 0 0 0 1px var(--line); } }

.main {
  flex: 1;
  padding: var(--sp-4);
  padding-bottom: calc(72px + env(safe-area-inset-bottom) + var(--sp-4));
}
.main.no-chrome { padding: 0; }

/* ---- top app bar ---------------------------------------------------------- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 56px; padding: var(--sp-2) var(--sp-4);
  background: var(--paper-0);
  border-bottom: 1px solid transparent;
}
.appbar.scrolled { border-bottom-color: var(--line); }
.appbar__title { font-family: var(--font-heading); font-weight: 800; font-size: var(--step-1); margin: 0; }
.appbar__logo { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.appbar__spacer { flex: 1; }
.appbar__action {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border: none; background: none;
  color: var(--ink-700); cursor: pointer; border-radius: var(--r-full);
}
.appbar__action:hover { background: var(--paper-100); }
.appbar__action svg { width: 22px; height: 22px; }

/* ---- yellow hero band ----------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--sun-500); color: var(--ink-900);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-4);
  margin-bottom: var(--sp-4);
}
.hero h1, .hero h2 { color: var(--ink-900); }
.hero__facet {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
}
.hero__facet::before, .hero__facet::after {
  content: ""; position: absolute;
}
.hero__facet::before {
  right: -20px; top: -20px; width: 120px; height: 120px;
  background: var(--sun-400);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}
.hero__facet::after {
  right: 24px; bottom: -30px; width: 90px; height: 90px;
  background: var(--orange-400);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  opacity: .55;
}
.hero > * { position: relative; z-index: 1; }

/* ---- bottom tab bar ------------------------------------------------------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  margin: 0 auto; max-width: 680px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--paper-0);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav__tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 60px; padding: var(--sp-2) 0;
  color: var(--ink-500); font-size: .68rem; font-weight: 700;
  text-decoration: none; letter-spacing: .01em;
}
.bottomnav__tab svg { width: 24px; height: 24px; }
.bottomnav__tab.is-active { color: var(--ink-900); }
.bottomnav__tab.is-active .bottomnav__icon {
  background: var(--sun-500); color: var(--ink-900);
  border-radius: var(--r-full);
}
.bottomnav__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 30px;
}
.bottomnav__tab.is-active::after {
  content: ""; position: absolute; bottom: 6px;
  width: 20px; height: 3px; border-radius: 3px; background: var(--orange-500);
}
.bottomnav__badge {
  position: absolute; top: 4px; right: 50%; transform: translateX(20px);
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--orange-500); color: #fff;
  font-size: .62rem; font-weight: 800; line-height: 18px; text-align: center;
  border-radius: var(--r-full);
}

/* ---- utilities ------------------------------------------------------------ */
.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.row--between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--ink-500); }
.mono { font-family: var(--font-mono); }
.script { font-family: var(--font-script); color: var(--grass-500); font-size: 1.35em; line-height: 1; }
.center { text-align: center; }
.section-title {
  font-family: var(--font-heading); font-weight: 800; font-size: var(--step-1);
  margin: var(--sp-6) 0 var(--sp-3);
}
.section-title:first-child { margin-top: 0; }
.overflow-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hidden { display: none !important; }
.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
