/* ============================================================
   BOOM TRIVIA — public website styles.
   Faithful translation of the JSX inline styles in
   Plan/bt-website.jsx + Plan/bt-website-pages.jsx.
   Tokens come from /boomtrivia/theme/tokens.css — no raw values
   that exist as tokens are duplicated here.
   ============================================================ */

html, body { margin: 0; padding: 0; background: var(--bg); }
body { color: var(--ink); font-family: var(--font-ui); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

.site {
  max-width: 1280px; margin: 0 auto; min-height: 100vh;
  background: var(--bg); color: var(--ink); font-family: var(--font-ui);
  display: flex; flex-direction: column; overflow-x: hidden;
}

/* ---------- SiteNav ---------- */
.sn {
  height: 64px; flex: 0 0 auto; display: flex; align-items: center; gap: 26px;
  padding: 0 44px; border-bottom: 1px solid var(--line);
  background: rgba(22,19,16,.92); position: relative; z-index: 3;
}
.sn-brand { display: flex; align-items: center; gap: 11px; }
.sn-logo { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; display: block; }
.sn-title { font-size: 17px; color: var(--ink); }
.sn-links { display: flex; gap: 22px; margin-left: 18px; }
.sn-link {
  font-size: 13.5px; cursor: pointer; color: var(--muted); font-weight: 400;
  border-bottom: 2px solid transparent; padding-bottom: 3px;
}
.sn-link.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent-danger); }
.sn-badge { margin-left: auto; transform: scale(.82); transform-origin: right center; }

/* ---------- SiteFooter ---------- */
.sf {
  flex: 0 0 auto; border-top: 1px solid var(--line); padding: 22px 44px;
  display: flex; align-items: center; gap: 22px; background: var(--bg-2);
  margin-top: auto;
}
.sf-logo { width: 24px; height: 24px; border-radius: 6px; overflow: hidden; display: block; }
.sf-copy { font-size: 10.5px; color: var(--muted); }
.sf-links { margin-left: auto; display: flex; gap: 20px; }
.sf-link { font-size: 12.5px; color: var(--muted); cursor: pointer; }

/* ---------- Home · hero ---------- */
.hero {
  height: 620px; flex: 0 0 auto; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(rgba(22,19,16,.55), rgba(22,19,16,.94)), url('/boomtrivia/public/assets/img/b1.jpg') center 30%/cover;
}
.hero-kicker { color: var(--accent-warn); margin-bottom: 16px; }
.hero-title { font-size: 96px; line-height: .92; letter-spacing: .01em; }
.hero-title .danger { color: var(--accent-danger); }
.hero-sub { font-size: 17px; color: var(--ink-dim); max-width: 560px; line-height: 1.55; margin-top: 20px; text-wrap: pretty; }
.hero-ctas { display: flex; gap: 14px; margin-top: 30px; align-items: center; }
.btn-trailer {
  padding: 13px 22px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); display: inline-block;
}

/* ---------- Home · modes strip ---------- */
.home-modes { flex: 0 0 auto; padding: 58px 44px 54px; }
.sec-kicker { color: var(--accent-danger); margin-bottom: 10px; }
.home-modes-title { font-size: 38px; margin-bottom: 26px; }
.home-modes-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.mode-card { padding: 18px 16px; }
.mode-num { font-size: 10px; font-weight: 700; letter-spacing: .12em; margin-bottom: 9px; }
.mode-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.mode-sub { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* ---------- Home · screens strip ---------- */
.home-screens {
  flex: 0 0 auto; padding: 54px 44px; background: var(--bg-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.home-screens-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.home-screens-title { font-size: 38px; }
.home-screens-note { font-size: 10.5px; color: var(--muted); }
.phone-row { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }

/* ---------- Home · story strip ---------- */
.home-story { flex: 0 0 auto; padding: 58px 44px; display: flex; gap: 48px; align-items: center; }
.home-story-art {
  width: 340px; height: 420px; flex: 0 0 auto; border-radius: 14px; overflow: hidden;
  box-shadow: var(--sh-card), inset 0 0 0 1px var(--line-strong);
  background-image: url('/boomtrivia/public/assets/img/a1.jpg');
  background-size: cover; background-position: center top;
}
.home-story-body { max-width: 560px; }
.home-story-title { font-size: 38px; line-height: 1; margin-bottom: 18px; }
.home-story-text { font-size: 15.5px; color: var(--ink-dim); line-height: 1.65; text-wrap: pretty; }
.home-story-chips { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.chip-outline {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; padding: 6px 11px; border-radius: 999px;
  color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* ---------- Home · CTA ---------- */
.home-cta {
  flex: 0 0 auto; padding: 64px 44px 72px; text-align: center; position: relative;
  background: linear-gradient(rgba(22,19,16,.82), rgba(22,19,16,.95)), url('/boomtrivia/public/assets/img/a2.jpg') center/cover;
}
.home-cta-title { font-size: 56px; line-height: .95; }
.home-cta-badge { margin-top: 26px; display: flex; justify-content: center; }
.home-cta-note { font-size: 10px; color: var(--muted); margin-top: 16px; }

/* ---------- Home · Zero-Hour Alert (email capture) ---------- */
.zh {
  flex: 0 0 auto; padding: 58px 44px; text-align: center;
  background: var(--bg-2); box-shadow: inset 0 1px 0 var(--line);
}
.zh-inner { max-width: 560px; margin: 0 auto; }
.zh-kicker { color: var(--accent-danger); margin-bottom: 14px; }
.zh-title { font-size: 40px; line-height: .98; margin-bottom: 14px; }
.zh-sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.zh-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.zh-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.zh-input {
  flex: 1 1 260px; max-width: 340px; padding: 13px 16px; border: none; border-radius: 10px;
  background: var(--surface); color: var(--ink); font-family: var(--font-mono); font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.zh-input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent-danger); }
.zh-btn { flex: 0 0 auto; }
.zh-flash {
  display: inline-block; margin-bottom: 18px; padding: 9px 16px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em;
}
.zh-flash.ok  { background: rgba(70,176,106,.16); color: var(--success); }
.zh-flash.err { background: rgba(232,57,43,.16); color: var(--accent-danger); }

/* ---------- Inner pages · PageHead ---------- */
.page-head { flex: 0 0 auto; padding: 46px 44px 30px; }
.page-head .bt-kicker { color: var(--accent-danger); margin-bottom: 10px; }
.page-title { font-size: 44px; line-height: .98; }
.page-sub { font-size: 15.5px; color: var(--ink-dim); line-height: 1.55; margin-top: 14px; max-width: 620px; text-wrap: pretty; }

/* ---------- Story page ---------- */
.story-grid {
  flex: 1; min-height: 0; padding: 0 44px 44px;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 470px; gap: 14px;
}
.story-intro { padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.story-intro-icon { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; }
.story-intro-title { font-size: 24px; line-height: 1; }
.story-intro-sub { font-size: 13px; color: var(--muted); line-height: 1.5; }
.story-tile {
  position: relative; border-radius: 12px; overflow: hidden;
  box-shadow: var(--sh-card), inset 0 0 0 1px var(--line-strong);
  background-size: cover; background-position: center top;
}
.story-tile-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,6,4,.94) 0%, rgba(8,6,4,.1) 40%, transparent 60%);
}
.story-tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 16px 16px; }
.story-tile-kicker { margin-bottom: 6px; font-size: 10px; }
.story-tile-title { font-size: 21px; color: #f3efe6; line-height: 1; }
.story-tile-sub { font-size: 12px; color: var(--ink-dim); margin-top: 6px; }

/* ---------- Modes page ---------- */
.modes-list { flex: 1; min-height: 0; padding: 0 44px 44px; display: flex; flex-direction: column; gap: 12px; }
.mode-row { flex: 1; min-height: 196px; padding: 18px 24px; display: flex; align-items: center; gap: 24px; }
.mode-row-num { font-size: 15px; font-weight: 700; width: 34px; flex: 0 0 auto; }
.mode-row-body { flex: 1; min-width: 0; }
.mode-row-head { display: flex; align-items: baseline; gap: 12px; }
.mode-row-name { font-size: 23px; }
.mode-row-tag { font-size: 11px; font-weight: 700; }
.mode-row-desc { font-size: 13.5px; color: var(--ink-dim); line-height: 1.5; margin-top: 7px; max-width: 640px; }
.mode-row-chips { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; align-items: flex-end; }
.mode-row-chip {
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em; padding: 4px 10px; border-radius: 999px;
  color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* ---------- Screens page ---------- */
.screens-grid {
  flex: 1; min-height: 0; padding: 0 44px 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 14px; justify-items: center;
}
.screens-cell { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.screens-label { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }

/* ---------- Support page ---------- */
.support-cols { flex: 1; min-height: 0; display: flex; gap: 48px; padding: 48px 44px; }
.support-main { flex: 1.5; min-width: 0; }
.support-title { font-size: 40px; margin-bottom: 26px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { padding: 15px 18px; }
.faq-q { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.faq-q-text { font-size: 14.5px; font-weight: 600; flex: 1; }
.faq-q-mark { font-size: 14px; color: var(--muted); }
.faq-item.open .faq-q-mark { color: var(--accent-danger); }
.faq-a { font-size: 13.5px; color: var(--ink-dim); line-height: 1.6; margin-top: 10px; max-width: 560px; }
.support-side { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.support-card { padding: 20px; }
.support-card .bt-label { color: var(--muted); margin-bottom: 10px; }
.support-card-text { font-size: 14px; color: var(--ink-dim); line-height: 1.55; margin-bottom: 14px; }
.support-email { font-size: 13px; font-weight: 700; color: var(--accent-warn); }
.support-reply { font-size: 10px; color: var(--muted); margin-top: 8px; }
.data-links { display: flex; flex-direction: column; gap: 8px; }
.data-link {
  display: flex; justify-content: space-between; align-items: center; padding: 9px 12px;
  border-radius: 8px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer;
}
.data-link-label { font-size: 13px; }
.data-link-arrow { color: var(--muted); font-size: 12px; }

/* ---------- Legal pages ---------- */
.legal-cols { flex: 1; min-height: 0; display: flex; gap: 52px; padding: 46px 44px 44px; }
.legal-toc { width: 250px; flex: 0 0 auto; }
.legal-toc .bt-kicker { color: var(--accent-danger); margin-bottom: 10px; }
.legal-title { font-size: 34px; line-height: 1; }
.legal-date { font-size: 10px; color: var(--muted); margin: 12px 0 22px; display: block; }
.legal-toc-list { display: flex; flex-direction: column; gap: 2px; }
.legal-toc-item {
  display: block; padding: 7px 12px; border-radius: 8px; font-size: 13px; cursor: pointer;
  color: var(--muted); font-weight: 400; background: transparent;
}
.legal-toc-item.active {
  color: var(--ink); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent-danger); background: var(--surface);
}
.legal-seealso { padding: 13px 15px; margin-top: 26px; }
.legal-seealso .bt-label { color: var(--muted); margin-bottom: 6px; }
.legal-seealso-link { font-size: 13px; font-weight: 600; color: var(--accent-warn); cursor: pointer; display: block; }
.legal-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 22px; max-width: 660px; }
.legal-sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.legal-sec-num { font-size: 11px; font-weight: 700; color: var(--accent-danger); }
.legal-sec-title { font-size: 17px; font-weight: 700; }
.legal-sec-body { font-size: 14px; color: var(--ink-dim); line-height: 1.7; text-wrap: pretty; }
.legal-contact { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* ---------- Leaderboard page ---------- */
.lb-wrap { flex: 1; min-height: 0; padding: 0 44px 54px; }
.lb-podium {
  display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 14px;
  align-items: end; max-width: 860px; margin: 6px auto 26px;
}
.lb-podium-card {
  position: relative; overflow: hidden; text-align: center; padding: 22px 16px 18px;
  box-shadow: var(--sh-card), inset 0 0 0 1px var(--medal);
}
.lb-podium-first { padding: 30px 16px 22px; }
.lb-podium-tape { position: absolute; top: 0; left: 0; right: 0; height: 6px; }
.lb-podium-place { font-size: 34px; color: var(--medal); line-height: 1; }
.lb-podium-first .lb-podium-place { font-size: 46px; }
.lb-podium-avatar {
  width: 58px; height: 58px; border-radius: 50%; margin: 12px auto 10px;
  background: var(--bg-2); display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 2.5px var(--medal);
}
.lb-podium-first .lb-podium-avatar { width: 72px; height: 72px; }
.lb-podium-handle { font-weight: 700; font-size: 16px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-podium-first .lb-podium-handle { font-size: 19px; }
.lb-podium-id { font-size: 9px; color: var(--muted); margin-top: 3px; letter-spacing: .04em; }
.lb-podium-rank { color: var(--medal); margin-top: 8px; }
.lb-podium-xp { font-size: 20px; font-weight: 700; color: var(--ink); margin-top: 10px; }
.lb-podium-first .lb-podium-xp { font-size: 24px; }
.lb-podium-coins { margin-top: 10px; display: flex; justify-content: center; }

.lb-table { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.lb-table-head { display: flex; align-items: center; gap: 14px; padding: 2px 18px 6px; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 11px 18px; border-radius: var(--r-md); }
.lb-col-num { width: 30px; flex: 0 0 auto; }
.lb-col-op { flex: 1; min-width: 0; }
.lb-col-rank { width: 110px; flex: 0 0 auto; }
.lb-col-xp { width: 84px; flex: 0 0 auto; text-align: right; }
.lb-col-coins { width: 84px; flex: 0 0 auto; text-align: right; }
.lb-row-num { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.lb-row-op { display: flex; align-items: center; gap: 11px; }
.lb-row-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.lb-row-names { min-width: 0; display: flex; flex-direction: column; }
.lb-row-handle { font-weight: 600; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row-id { font-size: 9px; color: var(--muted); letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row-rank { color: var(--muted); }
.lb-row-xp { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.lb-row-coins { font-size: 13px; color: var(--accent-warn); }
.lb-note { max-width: 860px; margin: 20px auto 0; text-align: center; }
.lb-note-text { font-size: 10px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }

/* ---------- Merch page ---------- */
.merch-wrap { flex: 1; min-height: 0; padding: 0 44px 54px; }
.merch-sealed { position: relative; max-width: 1060px; margin: 0 auto; }
.merch-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  filter: blur(2.5px) saturate(.75); opacity: .5;
  pointer-events: none; user-select: none;
}
.merch-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.merch-card-art { height: 150px; border-radius: var(--r-md); }
.merch-card-name { font-weight: 700; font-size: 14.5px; color: var(--ink); line-height: 1.2; }
.merch-card-sub { font-size: 12px; color: var(--muted); line-height: 1.4; }
.merch-card-price { font-size: 13px; font-weight: 700; color: var(--accent-warn); margin-top: auto; }
.merch-tape {
  position: absolute; inset: 0; z-index: 2; overflow: hidden;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.merch-tape-strip {
  position: absolute; left: -6%; right: -6%; height: 58px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-5deg); box-shadow: var(--sh-overlay);
}
.merch-tape-strip-2 { height: 26px; transform: rotate(4deg) translateY(72px); opacity: .9; }
.merch-tape-text {
  font-size: 24px; letter-spacing: .06em; color: #161310;
  background: var(--accent-warn); padding: 5px 20px;
  box-shadow: 0 0 0 3px #161310;
  white-space: nowrap;
}
.merch-sealed-note {
  display: block; text-align: center; margin: 22px auto 0;
  font-size: 10px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase;
}
.merch-notify {
  max-width: 620px; margin: 40px auto 0; padding: 28px 26px; text-align: center;
  position: relative; overflow: hidden;
}
.merch-notify::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background-image: repeating-linear-gradient(-45deg, var(--accent-warn) 0 7px, transparent 7px 14px); }
.merch-notify-kicker { color: var(--accent-danger); margin-bottom: 8px; }
.merch-notify-title { font-size: 28px; color: var(--ink); }
.merch-notify-sub { font-size: 13.5px; color: var(--muted); margin: 10px 0 18px; }
.merch-notify-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.merch-notify-input {
  flex: 1; min-width: 220px; max-width: 320px; padding: 12px 16px;
  border: none; border-radius: var(--r-md); font-family: var(--font-mono); font-size: 13px;
  background: var(--bg-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.merch-notify-input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent-danger); }
.merch-notify-input::placeholder { color: var(--muted); }
.merch-notify-thanks { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--success); }

/* ============================================================
   Responsive degradation (canvas is fixed 1280 — degrade only,
   never redesign). No horizontal scroll on mobile.
   ============================================================ */
@media (max-width: 1020px) {
  .home-modes-grid { grid-template-columns: repeat(3, 1fr); }
  .merch-grid { grid-template-columns: repeat(3, 1fr); }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .screens-grid { grid-template-columns: repeat(2, 1fr); }
  .home-story { flex-direction: column; align-items: flex-start; }
  .support-cols { flex-direction: column; }
  .legal-cols { flex-direction: column; }
  .legal-toc { width: auto; }
  .home-screens-head { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 680px) {
  .sn { flex-wrap: wrap; height: auto; min-height: 64px; padding: 10px 20px; row-gap: 8px; }
  .sn-links { margin-left: 0; flex-wrap: wrap; }
  .sn-badge { margin-left: auto; }
  .sf { flex-wrap: wrap; padding: 22px 20px; row-gap: 10px; }
  .sf-links { margin-left: 0; flex-wrap: wrap; }
  .hero { height: auto; min-height: 620px; padding: 60px 20px; }
  .hero-title { font-size: 56px; }
  .home-cta-title { font-size: 40px; }
  .home-modes, .home-screens, .home-story, .home-cta { padding-left: 20px; padding-right: 20px; }
  .home-modes-grid { grid-template-columns: 1fr; }
  .page-head { padding: 46px 20px 30px; }
  .story-grid { grid-template-columns: 1fr; grid-auto-rows: 420px; padding: 0 20px 44px; }
  .modes-list { padding: 0 20px 44px; }
  .mode-row { flex-wrap: wrap; }
  .mode-row-chips { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .screens-grid { grid-template-columns: 1fr; padding: 0 20px 40px; }
  .support-cols { padding: 48px 20px; }
  .legal-cols { padding: 46px 20px 44px; }
  .home-story-art { max-width: 100%; }

  /* leaderboard */
  .lb-wrap { padding: 0 20px 48px; }
  .lb-podium { grid-template-columns: 1fr; align-items: stretch; }
  .lb-podium-card { order: 2; }
  .lb-podium-first { order: 1; }
  .lb-table-head { display: none; }
  .lb-row { flex-wrap: wrap; row-gap: 4px; }
  .lb-col-rank { width: auto; }
  .lb-col-xp, .lb-col-coins { width: auto; text-align: left; }
  .lb-row-xp::after { content: ' XP'; font-size: 10px; color: var(--muted); }
  .lb-row-coins::after { content: ' COINS'; font-size: 10px; color: var(--muted); }

  /* merch */
  .merch-wrap { padding: 0 20px 48px; }
  .merch-grid { grid-template-columns: 1fr; }
  .merch-tape-text { font-size: 17px; padding: 4px 12px; }
  .merch-tape-strip { height: 46px; }
}
