/* ============================================================================
   BYU Ticket Tracker — gameday theme
   Palette: BYU navy (#002E5D) + royal (#0057B8) + white, with a warm tan accent.
   ========================================================================== */
:root {
  --navy: #002E5D;
  --navy-deep: #00152E;
  --navy-mid: #013a72;
  --royal: #0057B8;
  --royal-bright: #1e7be0;
  --ice: #eaf1fa;
  --cream: #f7f4ee;
  --tan: #c9a227;
  --white: #ffffff;
  --ink: #0b1a2c;
  --muted: #5b6b80;
  --line: #d8e2ee;
  --shadow: 0 10px 30px rgba(0, 21, 46, .12);
  --shadow-lg: 0 24px 60px rgba(0, 21, 46, .22);
  --radius: 16px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --cond: "Barlow Condensed", "Oswald", "Arial Narrow", var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--royal); }

/* ---------------------------------------------------------------- header */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(0, 21, 46, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: .55rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
}
.wordmark {
  display: flex; align-items: center; gap: .6rem;
  color: var(--white); text-decoration: none; font-weight: 800;
  letter-spacing: .01em; line-height: 1.05;
}
.wordmark .shield {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px;
  background: linear-gradient(160deg, var(--royal-bright), var(--navy));
  display: grid; place-items: center; font-size: 15px; font-weight: 900;
  color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.wordmark b { display: block; font-size: 1rem; }
.wordmark span { display: block; font-size: .68rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: #9dc0e8; }
.nav { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; }
.nav a {
  color: #cfe0f2; text-decoration: none; font-size: .82rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}
.nav a:hover { color: #fff; }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; color: var(--white); overflow: hidden;
  background: var(--navy-deep);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url("../img/hero-stadium.jpg");
  background-size: cover; background-position: center 38%;
  filter: saturate(1.05);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,21,46,.86) 0%, rgba(0,21,46,.55) 34%,
                    rgba(0,21,46,.80) 72%, rgba(0,21,46,.96) 100%),
    radial-gradient(120% 80% at 50% 100%, rgba(0,87,184,.45), transparent 60%);
}
.hero-inner {
  position: relative; max-width: 1240px; margin: 0 auto;
  padding: 4.2rem 1.25rem 3.4rem;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2.5rem; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .74rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: #ffd98a; margin-bottom: 1rem;
}
.eyebrow::before, .eyebrow::after {
  content: ""; width: 26px; height: 2px; background: currentColor; opacity: .7;
}
.hero h1 {
  font-family: var(--cond); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.7rem, 6vw, 4.9rem); line-height: .94; margin: 0 0 .7rem;
  letter-spacing: -.005em; text-shadow: 0 6px 30px rgba(0,0,0,.45);
}
.hero h1 .accent { color: #ffd98a; display: block; }
.hero p.lede {
  font-size: 1.08rem; line-height: 1.6; color: #dbe8f6; max-width: 46ch;
  margin: 0 0 1.5rem;
}
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: .72rem 1.25rem; border-radius: 999px;
  font-weight: 700; font-size: .88rem; text-decoration: none; letter-spacing: .02em;
  border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--royal-bright); color: #fff; }
.btn-primary:hover { background: #2f8bee; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* countdown card */
.kick-card {
  background: rgba(4, 26, 52, .72); border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
.kick-card .tag {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: #9dc0e8; font-weight: 700;
}
.kick-card .matchup {
  font-family: var(--cond); font-size: 1.7rem; font-weight: 800;
  text-transform: uppercase; line-height: 1.05; margin: .35rem 0 .2rem;
}
.kick-card .where { font-size: .84rem; color: #b9d2ec; }
.clock { display: flex; gap: .5rem; margin: 1.1rem 0 .4rem; }
.clock .unit {
  flex: 1; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px; padding: .6rem .2rem; text-align: center;
}
.clock .n {
  font-family: var(--cond); font-size: 2rem; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.clock .l { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: #9dc0e8; margin-top: .25rem; }
.kick-card .foot { margin-top: .9rem; font-size: .8rem; color: #b9d2ec; }
.kick-card .foot b { color: #ffd98a; }

/* ---------------------------------------------------------------- ticker */
.ticker {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 50%, var(--navy) 100%);
  color: #fff; border-bottom: 3px solid var(--tan);
}
.ticker-inner {
  max-width: 1240px; margin: 0 auto; padding: .7rem 1.25rem;
  display: flex; gap: 1.6rem; overflow-x: auto; align-items: center;
}
.tick { display: flex; align-items: baseline; gap: .45rem; white-space: nowrap; }
.tick .k { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: #9dc0e8; }
.tick .v { font-family: var(--cond); font-size: 1.35rem; font-weight: 800; }
.tick .d { font-size: .72rem; color: #9dc0e8; }

/* ------------------------------------------------------------- sections */
.section { max-width: 1240px; margin: 0 auto; padding: 3.6rem 1.25rem; }
.section.tight { padding-top: 2.6rem; }
.section-head { margin-bottom: 1.6rem; }
.section-head h2 {
  font-family: var(--cond); font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  text-transform: uppercase; font-weight: 800; margin: 0; color: var(--navy);
  letter-spacing: -.005em;
}
.section-head .rule { width: 76px; height: 4px; background: var(--tan);
  border-radius: 2px; margin: .55rem 0 .7rem; }
.section-head p { margin: 0; color: var(--muted); max-width: 72ch; line-height: 1.6; }

/* cadence chips */
.cadence { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.step::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, var(--royal-bright), var(--navy));
}
.step .when { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--royal); font-weight: 800; }
.step .freq { font-family: var(--cond); font-size: 2.1rem; font-weight: 800;
  color: var(--navy); line-height: 1.05; margin: .3rem 0 .3rem; }
.step .desc { font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* ------------------------------------------------------------- game grid */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.game-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.game-card .cap {
  background: linear-gradient(120deg, var(--navy), var(--navy-mid));
  color: #fff; padding: .9rem 1.1rem; display: flex; align-items: center; gap: .8rem;
}
.mono {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
  display: grid; place-items: center; font-family: var(--cond); font-weight: 800;
  font-size: 1.15rem; letter-spacing: .02em;
}
.game-card .cap .who { min-width: 0; }
.game-card .cap .opp { font-family: var(--cond); font-size: 1.22rem; font-weight: 800;
  text-transform: uppercase; line-height: 1.1; }
.game-card .cap .when { font-size: .76rem; color: #b9d2ec; }
.game-card .body { padding: 1rem 1.1rem 1.15rem; flex: 1; display: flex;
  flex-direction: column; gap: .7rem; }
.price-row { display: flex; align-items: baseline; gap: .5rem; }
.price-row .big { font-family: var(--cond); font-size: 2.1rem; font-weight: 800;
  color: var(--navy); line-height: 1; }
.price-row .unit { font-size: .8rem; color: var(--muted); }
.src-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip {
  font-size: .72rem; font-weight: 700; padding: .22rem .5rem; border-radius: 999px;
  background: var(--ice); color: var(--navy); border: 1px solid var(--line);
  display: inline-flex; gap: .35rem; align-items: center;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
a.chip.link { text-decoration: none; }
a.chip.link:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.status {
  margin-top: auto; font-size: .78rem; color: var(--muted);
  display: flex; align-items: center; gap: .45rem;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; }
.pulse.off { background: #94a3b8; animation: none; }
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ---------------------------------------------------------------- charts */
.chart-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.2rem 1.2rem 1rem; margin-bottom: 1.6rem;
}
.chart-head { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
  margin-bottom: .9rem; }
.chart-head .t { min-width: 0; }
.chart-head h3 { font-family: var(--cond); font-size: 1.5rem; font-weight: 800;
  text-transform: uppercase; margin: 0; color: var(--navy); }
.chart-head .sub { font-size: .82rem; color: var(--muted); }
.chart-head .controls { margin-left: auto; display: flex; gap: .35rem; }
.toggle {
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  font: inherit; font-size: .76rem; font-weight: 700; padding: .35rem .7rem;
  border-radius: 999px; cursor: pointer;
}
.toggle.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.canvas-wrap { position: relative; height: 360px; }
.empty {
  height: 360px; display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg, #fbfdff, #fbfdff 12px, #f2f7fd 12px, #f2f7fd 24px);
  border: 1px dashed var(--line); border-radius: 12px; color: var(--muted);
  padding: 1.5rem; font-size: .95rem; line-height: 1.6;
}
.legend-note { margin-top: .8rem; font-size: .78rem; color: var(--muted); line-height: 1.6; }
.legend-note b { color: var(--navy); }

/* --------------------------------------------------------------- gallery */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; }
.shot {
  position: relative; overflow: hidden; border-radius: 14px; background: var(--navy);
  box-shadow: var(--shadow);
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.shot:hover img { transform: scale(1.06); }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .8rem .6rem;
  font-size: .74rem; font-weight: 600; color: #fff;
  background: linear-gradient(0deg, rgba(0,18,38,.92), transparent);
}
.shot.wide { grid-column: span 4; aspect-ratio: 16/9; }
.shot.tall { grid-column: span 2; aspect-ratio: 3/4; }
.shot.half { grid-column: span 3; aspect-ratio: 4/3; }
.shot.third { grid-column: span 2; aspect-ratio: 1/1; }

/* --------------------------------------------------------------- sources */
.source-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.source {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; box-shadow: var(--shadow); border-top: 4px solid var(--royal);
}
.source.blocked { border-top-color: #cbd5e1; opacity: .92; }
.source h4 { margin: 0 0 .3rem; font-size: 1.02rem; color: var(--navy); }
.source .state { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 800; color: #16a34a; }
.source.blocked .state { color: #b91c1c; }
.source p { margin: .6rem 0 0; font-size: .85rem; color: var(--muted); line-height: 1.55; }

/* ------------------------------------------------------------ seatgeek ctA */
.callout {
  background: linear-gradient(135deg, var(--navy) 0%, #06386b 55%, var(--royal) 130%);
  color: #fff; border-radius: 22px; padding: 2.2rem; box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.9fr); gap: 2rem;
}
.callout h2 { font-family: var(--cond); font-size: 2.2rem; text-transform: uppercase;
  margin: 0 0 .6rem; font-weight: 800; }
.callout p { color: #d7e6f7; line-height: 1.65; margin: 0 0 1rem; }
.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.steps li {
  counter-increment: s; position: relative; padding-left: 2.7rem; margin-bottom: .95rem;
  font-size: .92rem; line-height: 1.55; color: #eaf2fb;
}
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35);
  display: grid; place-items: center; font-family: var(--cond); font-weight: 800;
}
.steps code {
  background: rgba(255,255,255,.13); padding: .1rem .4rem; border-radius: 5px;
  font-size: .85em; word-break: break-all;
}
.callout .panel {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px; padding: 1.3rem; align-self: start;
}
.callout .panel h4 { margin: 0 0 .5rem; font-size: .95rem; letter-spacing: .04em;
  text-transform: uppercase; color: #ffd98a; }
.callout .panel ul { margin: 0; padding-left: 1.1rem; font-size: .86rem; line-height: 1.7;
  color: #e2edf8; }

/* ---------------------------------------------------------------- footer */
.footer {
  background: var(--navy-deep); color: #a9c2dd; padding: 2.6rem 1.25rem 3rem;
  font-size: .82rem; line-height: 1.7;
}
.footer-inner { max-width: 1240px; margin: 0 auto; }
.footer h4 { color: #fff; font-size: .8rem; letter-spacing: .16em;
  text-transform: uppercase; margin: 0 0 .6rem; }
.footer a { color: #8fb9e4; }
.attrib { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.14);
  font-size: .74rem; color: #7f9dbd; }
.attrib span { white-space: nowrap; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 3rem; }
  .callout { grid-template-columns: 1fr; padding: 1.6rem; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .shot.wide { grid-column: span 4; }
  .shot.tall, .shot.half, .shot.third { grid-column: span 2; }
}
@media (max-width: 620px) {
  .nav { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .shot.wide, .shot.tall, .shot.half, .shot.third { grid-column: span 2; }
  .canvas-wrap, .empty { height: 300px; }
}
