/* Colorado Prep Hockey League — site styles
   Colors pulled from the league crest / GameSheet theme (031e53 navy, da0233 red) */
:root {
  --navy: #031e53;
  --navy-2: #0c2f73;
  --red: #da0233;
  --gold: #f2b705;
  --ice: #f3f6fb;
  --line: #d8e0ec;
  --ink: #14213d;
  --muted: #55627a;
  --card: #ffffff;
  --radius: 10px;
  --wrap: 1120px;
  --head: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--body); color: var(--ink); background: var(--ice); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-underline-offset: 2px; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; color: var(--navy); letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 .4rem; text-transform: uppercase; }
h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; text-transform: uppercase; }
h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- Header / nav ---------- */
.site-head { background: #000; color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 4px solid var(--red); }
.head-bar { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.brand img { height: 56px; width: auto; background: #fff; border-radius: 8px; padding: 3px; }
.brand span { font-family: var(--head); font-weight: 700; font-size: 1.15rem; line-height: 1.05; text-transform: uppercase; letter-spacing: .03em; }
.brand small { display: block; font-size: .72rem; color: #c7d2e6; letter-spacing: .12em; }
.brand:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 2px solid #fff; color: #fff; border-radius: 6px; padding: 6px 12px; font: 700 .9rem var(--body); cursor: pointer; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; gap: 2px; }
.nav li { position: relative; }
.nav a, .nav .grp { display: block; color: #fff; text-decoration: none; padding: 10px 12px; font-weight: 600; font-size: .95rem; border-radius: 6px; white-space: nowrap; cursor: pointer; }
.nav a:hover, .nav .grp:hover, .nav a[aria-current="page"] { background: var(--navy-2); color: #fff; }
.nav .grp::after { content: " ▾"; font-size: .75em; opacity: .8; }
.nav .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--navy); border-radius: 0 0 8px 8px; padding: 6px; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.nav li:hover > .sub, .nav li:focus-within > .sub { display: block; }
.nav .sub a { font-weight: 500; }
.nav .ext::after { content: " ↗"; opacity: .7; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .js .nav { display: none; }
  .js .nav.open { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); max-height: calc(100vh - 76px); overflow-y: auto; padding: 8px 16px 16px; }
  .nav > ul { flex-direction: column; }
  .nav .sub { display: block; position: static; box-shadow: none; padding: 0 0 6px 12px; background: none; min-width: 0; }
  .nav .grp { color: var(--gold); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; padding-bottom: 2px; cursor: default; }
  .nav .grp::after { content: ""; }
  .brand img { height: 46px; }
  .brand span { font-size: 1rem; }
}

/* ---------- Page chrome ---------- */
.page-title { background: var(--navy); color: #fff; padding: 36px 0 30px; background-image: linear-gradient(120deg, var(--navy) 60%, var(--navy-2)); }
.page-title h1 { color: #fff; }
.page-title p { margin: 0; color: #c7d2e6; max-width: 70ch; }
.crumb { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin-bottom: 6px; }
main { padding: 8px 0 48px; }
.prose { max-width: 75ch; }
.lead { font-size: 1.12rem; color: var(--muted); }

/* ---------- Hero (home) ---------- */
.hero { background: #000; }
.hero img { width: 100%; height: auto; max-height: 340px; object-fit: cover; object-position: 20% 50%; }
@media (max-width: 640px) { .hero img { height: 150px; object-position: 8% 50%; } }   /* phones: keep the players and flag */

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.three { grid-template-columns: repeat(3, 1fr); }   /* division tiles: Tier 1 row, Tier 2 + Ladies row */
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card > :last-child { margin-bottom: 0; }
a.tile { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--red); border-radius: var(--radius); padding: 16px 18px; transition: transform .12s, box-shadow .12s; }
a.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(3,30,83,.12); color: var(--ink); }
a.tile strong { display: block; font-family: var(--head); font-size: 1.2rem; color: var(--navy); text-transform: uppercase; }
a.tile span { color: var(--muted); font-size: .92rem; }
.section-band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0 28px; margin: 28px 0; }
.stat-line { margin: 4px 0 8px; color: var(--muted); font-size: .95rem; }
.stat-line b { color: var(--navy); white-space: nowrap; }
.contact-line { margin: 16px 0 0; }

/* ---------- Division grid ---------- */
.div-card h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.div-card .tier { font: 600 .75rem var(--body); text-transform: uppercase; letter-spacing: .08em; color: #fff; background: var(--red); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.div-card ul { margin: .5rem 0 1rem; padding-left: 1.3rem; columns: 2; column-gap: 1.5rem; }
.div-card li { break-inside: avoid; }
.div-bar p { margin: 0 0 6px; }
.div-bar p:last-child { margin-bottom: 0; }
.div-card { scroll-margin-top: 90px; }
.btn { display: inline-block; background: var(--navy); color: #fff; text-decoration: none; font-weight: 700; padding: 9px 16px; border-radius: 6px; }
.btn:hover { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn.ghost:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }

/* ---------- Directory ---------- */
.dir-filter { width: 100%; max-width: 420px; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 6px; margin: 4px 0 16px; }
.program h3 { margin-bottom: .25rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.chip { font-size: .78rem; font-weight: 600; background: var(--ice); border: 1px solid var(--line); color: var(--navy); padding: 2px 8px; border-radius: 999px; text-decoration: none; }
.program dl { margin: 0; }
.program dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 8px; }
.program dd { margin: 2px 0 0; }
.program dd ul { margin: 0; padding-left: 1.1rem; }
.tag { display: inline-block; font: 600 .7rem var(--body); text-transform: uppercase; letter-spacing: .06em; background: #fff8e1; color: #7a5a00; border: 1px solid #f2d27a; border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.pending { color: var(--muted); font-style: italic; }

/* ---------- Requirement blocks ---------- */
.req { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.req .card h3 { color: var(--navy); }
.req .card a.go { font-weight: 700; }
.badge-logo { width: 160px; margin: 8px 0 0; }

/* ---------- Docs list ---------- */
.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.docs li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.docs .meta { color: var(--muted); font-size: .88rem; }

/* ---------- Notices ---------- */
.notice { border-left: 5px solid var(--gold); background: #fff8e1; padding: 12px 16px; border-radius: 6px; margin: 16px 0; }
.notice.info { border-color: var(--navy-2); background: #eaf0fb; }

/* ---------- Tables ---------- */
table { border-collapse: collapse; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy); color: #fff; font-weight: 600; }

/* ---------- Embeds ---------- */
.embed { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.embed iframe { width: 100%; border: 0; display: block; }
.embed-actions { justify-content: flex-end; margin: 0 0 10px; }
.embed-note { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.gallery figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery figcaption { padding: 10px 14px; font-family: var(--head); font-weight: 700; text-transform: uppercase; color: var(--navy); }
.gallery figcaption small { display: block; font-family: var(--body); font-weight: 400; text-transform: none; color: var(--muted); }

a.zoom { display: block; cursor: zoom-in; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; cursor: zoom-out; }
.lightbox::backdrop { background: rgba(0,0,0,.85); }
.lightbox img { display: block; max-width: 96vw; max-height: 86vh; width: auto; height: auto; border-radius: 6px; }
.lb-cap { color: #fff; text-align: center; margin: 8px 0 0; font-family: var(--head); text-transform: uppercase; letter-spacing: .04em; }
.lb-close { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--navy); font: 700 1.4rem/1 var(--body); cursor: pointer; }

/* ---------- Footer ---------- */
.site-foot { background: #000; color: #c7d2e6; padding: 28px 0; font-size: .9rem; }
.site-foot a { color: #fff; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.site-foot img { height: 48px; width: auto; }

@media print {
  .site-head, .site-foot, .nav-toggle, .embed { display: none; }
  body { background: #fff; }
}

/* Phones: tile groups two across, tighter, so visitors reach content without long scrolling */
@media (max-width: 640px) {
  .grid:has(> a.tile), .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  a.tile { padding: 11px 12px; border-left-width: 4px; }
  a.tile strong { font-size: 1rem; line-height: 1.2; }
  a.tile span { font-size: .8rem; line-height: 1.35; display: block; margin-top: 3px; }
  h2 { font-size: 1.3rem; margin: 1.5rem 0 .6rem; }
}
