/* btb.css: Bribe The Band's shared styles.
   Source of truth: the BTB Design System (tokens + components). Tokens are
   CSS custom properties; components are plain classes prefixed btb-.
   Every page links this file BEFORE its own <style>, so a page's own rules
   still win while pages move onto these classes one area at a time.
   Fonts load from Google Fonts in each page's <head>:
   Barlow Condensed 600-800 (display) and Barlow 400-700 (everything else). */

:root {
  /* Colour: one dark theme, "House Lights Down" */
  --bg: #0e0c0a;
  --bg-deep: #160f0c;
  --surface: #2a2622;
  --surface-raised: #332d28;
  --surface-bar: #16130f;
  --line: #2a2622;
  --line-on-surface: #3a342e;
  --line-gold: rgba(212,160,23,0.15);
  --line-gold-strong: rgba(212,160,23,0.4);
  --control-border: rgba(244,228,200,0.4);
  --text: #f4e4c8;
  --text-2: #cdbe9f;
  --text-3: #b8a88c;
  --gold: #d4a017;
  --gold-strong: #b8860f;
  --on-fill: #0e0c0a;
  --gold-tint: rgba(212,160,23,0.12);
  --rust: #8b2e1f;
  --rust-tint: rgba(139,46,31,0.35);
  --success: #4caf7d;
  --success-tint: rgba(76,175,125,0.18);
  --danger: #e0616b;
  --danger-tint: rgba(224,97,107,0.12);
  --neutral-tint: rgba(244,228,200,0.1);
  --scrim: rgba(0,0,0,0.6);
  --focus: var(--gold);
  /* Type families */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-sans: Barlow, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-18: 72px;
  --space-25: 100px;
  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  /* Shadow */
  --shadow-float: 0 4px 14px rgba(0,0,0,0.4);
  --shadow-sheet: 0 -10px 30px rgba(0,0,0,0.45);
  --shadow-popover: 0 6px 20px rgba(0,0,0,0.35);
  /* Opacity */
  --opacity-hover: 0.88;
  --opacity-disabled: 0.5;
  /* Size */
  --touch-min: 44px;
  --control-height: 48px;
  --go-live-height: 56px;
  /* Breakpoint */
  --bp-nav: 980px;
  --bp-stack: 900px;
  --bp-phone: 640px;
}

.btb, .btb *, .btb *::before, .btb *::after { box-sizing: border-box; }
/* Browsers give form controls the system font by default; use the page's font. */
button, input, select, textarea { font-family: inherit; }

/* Focus: one ring everywhere */
.btb-btn:focus-visible, .btb-text-btn:focus-visible, .btb-link:focus-visible, .btb-tip:focus-visible,
.btb-input:focus-visible, .btb-select:focus-visible, .btb-tabbar a:focus-visible, .btb-nav a:focus-visible,
.btb-nav-toggle:focus-visible, .btb-faq summary:focus-visible, .btb-logo:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}

/* ---------- Type helpers (mirror the type styles in tokens.json) ---------- */
.btb-hero-title { margin: 0; font: 700 76px/76px var(--font-display); text-wrap: balance; }
.btb-h1 { margin: 0; font: 700 56px/58px var(--font-display); text-wrap: balance; }
.btb-h2 { margin: 0; font: 700 40px/42px var(--font-display); text-wrap: balance; }
.btb-screen-title { margin: 0; font: 700 44px/44px var(--font-display); }
.btb-lede { margin: 0; font: 400 19px/30px var(--font-sans); color: var(--text-2); max-width: 65ch; }
.btb-body { margin: 0; font: 400 16px/26px var(--font-sans); max-width: 65ch; }
.btb-label { font: 600 13px/16px var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.btb-caption { font: 400 13px/18px var(--font-sans); color: var(--text-2); }
@media (max-width: 640px) {
  .btb-hero-title { font-size: 46px; line-height: 46px; }
  .btb-h1 { font-size: 36px; line-height: 38px; }
  .btb-h2 { font-size: 30px; line-height: 32px; }
  .btb-lede { font-size: 17px; line-height: 27px; }
}

/* ---------- Eyebrow ---------- */
.btb-eyebrow { display: block; font: 700 13px/16px var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.btb-eyebrow--pill { display: inline-block; padding: 7px 16px; border: 1px solid var(--line-gold-strong); border-radius: var(--radius-pill); }

/* ---------- Logo ----------
   Lockup rule: everything scales from the wordmark's font-size (1em).
   Mark = 1.2em square, so the mic is the same height as the capitals (cap height = 0.70em).
   Gap = 0.4em. Centers line up on the capitals, not the text box: the text box is trimmed
   to cap height; browsers without text-box trimming get a 0.05em lift instead.
   The mark file's viewBox is "0 -3 100 100" so the mic sits centred in its own box. */
.btb-logo { display: inline-flex; align-items: center; gap: 0.4em; font: 700 24px/1 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); text-decoration: none; }
.btb-logo-mark { width: 1.2em; height: 1.2em; flex: 0 0 auto; display: block; }
.btb-logo-text { line-height: 1; white-space: nowrap; text-box: trim-both cap alphabetic; }
@supports not (text-box: trim-both cap alphabetic) { .btb-logo-text { transform: translateY(-0.05em); } }
.btb-logo-accent { color: var(--gold); }
/* The name set as a logo anywhere (stacked over the mic, page headers): always caps. In running text it stays "Bribe The Band". */
.btb-wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.btb-logo--sm { font-size: 18px; color: var(--text-3); }
.btb-logo--sm .btb-logo-mark { opacity: 0.6; }
.btb-logo--sm .btb-logo-accent { color: inherit; }
.btb-logo--lg { font-size: 40px; font-weight: 800; letter-spacing: 0.03em; }

/* ---------- Buttons ---------- */
.btb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-height); padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--radius-md);
  background: var(--gold); color: var(--on-fill);
  font: 700 16px/20px var(--font-sans); text-decoration: none; cursor: pointer;
}
.btb-btn:hover { opacity: var(--opacity-hover); }
.btb-btn:active { background: var(--gold-strong); }
.btb-btn:disabled, .btb-btn[aria-disabled="true"] { opacity: var(--opacity-disabled); cursor: not-allowed; }
.btb-btn--lg { min-height: 52px; padding: 0 30px; font-size: 17px; }
.btb-btn--block { display: flex; width: 100%; }
.btb-btn--secondary { background: transparent; color: var(--text); border-color: var(--control-border); }
.btb-btn--secondary:active { background: var(--neutral-tint); }
.btb-btn--danger { background: var(--danger); color: var(--on-fill); }
.btb-btn--danger:active { background: var(--danger); opacity: 0.8; }
.btb-btn--sm { min-height: var(--touch-min); padding: 0 14px; font-size: 14px; border-radius: var(--radius-sm); }
.btb-btn--go {
  min-height: var(--go-live-height); border-radius: var(--radius-lg);
  font: 700 26px/26px var(--font-display); letter-spacing: 0.06em; text-transform: uppercase;
}
.btb-text-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--touch-min); min-height: var(--touch-min); padding: 0 8px;
  background: none; border: 0; border-radius: var(--radius-sm);
  color: var(--gold); font: 600 15px/20px var(--font-sans); cursor: pointer; text-decoration: none;
}
.btb-text-btn:hover { opacity: var(--opacity-hover); }
.btb-link { color: var(--text); font: 600 16px/20px var(--font-sans); text-decoration: none; border-bottom: 1px solid var(--control-border); padding-bottom: 2px; }
.btb-link:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- Cards ---------- */
.btb-card { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-5); }
.btb-card--outlined { border: 1px solid var(--line-gold); }
.btb-well { background: var(--bg); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); }
.btb-band { background: var(--bg-deep); }

/* ---------- Checklist rows (console Get ready, settings) ---------- */
.btb-rows { background: var(--surface); border-radius: var(--radius-lg); display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.btb-row { display: flex; gap: var(--space-3); align-items: flex-start; padding: 14px; border-bottom: 1px solid var(--line-on-surface); }
.btb-row:last-child { border-bottom: 0; }
.btb-row-num {
  flex: 0 0 26px; height: 26px; margin-top: 1px; border-radius: 13px; border: 1px solid var(--control-border);
  display: flex; align-items: center; justify-content: center; font: 500 13px/1 var(--font-sans); color: var(--text-2);
}
.btb-row-num--done { background: var(--success); border-color: var(--success); color: var(--on-fill); }
.btb-row-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.btb-row-label { font: 600 13px/16px var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.btb-row-value { font: 600 16px/22px var(--font-sans); color: var(--text); }
.btb-row-note { font: 400 13px/18px var(--font-sans); color: var(--text-2); }
.btb-row .btb-text-btn { flex: 0 0 auto; margin: -9px -4px -9px 0; }

/* ---------- Badges ---------- */
.btb-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill);
  font: 700 13px/16px var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.btb-badge--pending { color: var(--gold); background: var(--gold-tint); }
.btb-badge--accepted { color: var(--success); background: var(--success-tint); }
.btb-badge--declined { color: var(--text-2); background: var(--neutral-tint); }
.btb-badge--boost { color: var(--gold); background: var(--gold-tint); text-transform: none; letter-spacing: 0; }
.btb-badge--lastcall { color: var(--text); background: var(--rust-tint); }
.btb-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: btb-lastcall 2.5s ease-in-out infinite; }
@keyframes btb-lastcall { 50% { background: var(--rust); } }
@media (prefers-reduced-motion: reduce) { .btb-badge-dot { animation: none; } }

/* ---------- Fields ---------- */
.btb-field { display: flex; flex-direction: column; gap: 6px; }
.btb-field-label { font: 600 14px/18px var(--font-sans); color: var(--text-2); }
.btb-input, .btb-select {
  width: 100%; min-height: var(--control-height); padding: 0 14px;
  background: var(--bg); color: var(--text); border: 1px solid var(--control-border); border-radius: var(--radius-sm);
  font: 400 16px/22px var(--font-sans);
}
.btb-input::placeholder { color: var(--text-3); }
.btb-input:focus, .btb-select:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.btb-input[aria-invalid="true"] { border-color: var(--danger); }
.btb-field-note { font: 400 13px/18px var(--font-sans); color: var(--text-3); }
.btb-field-note--ok { color: var(--success); }
.btb-field-note--err { color: var(--danger); }

/* ---------- Switch ---------- */
.btb-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--touch-min); cursor: pointer; font: 600 16px/22px var(--font-sans); color: var(--text); }
.btb-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.btb-switch-track { position: relative; flex: 0 0 48px; height: 28px; border-radius: 14px; background: var(--bg); border: 1px solid var(--control-border); transition: background 0.15s; }
.btb-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-3); transition: transform 0.15s; }
.btb-switch input:checked + .btb-switch-track { background: var(--gold); border-color: var(--gold); }
.btb-switch input:checked + .btb-switch-track::after { transform: translateX(20px); background: var(--on-fill); }
.btb-switch input:focus-visible + .btb-switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.btb-switch input:disabled + .btb-switch-track { opacity: var(--opacity-disabled); }
@media (prefers-reduced-motion: reduce) { .btb-switch-track, .btb-switch-track::after { transition: none; } }

/* ---------- Tip buttons (crowd page) ---------- */
.btb-tips { display: flex; gap: var(--space-2); }
.btb-tip {
  flex: 1 1 0; min-width: 60px; min-height: var(--control-height);
  border-radius: var(--radius-sm); border: 1px solid var(--control-border); background: transparent;
  color: var(--text); font: 600 16px/20px var(--font-sans); font-variant-numeric: tabular-nums; cursor: pointer;
}
.btb-tip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--on-fill); font-weight: 700; }

/* ---------- Stat ---------- */
.btb-stat { display: flex; flex-direction: column; gap: var(--space-1); }
.btb-stat-value { font: 700 40px/40px var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); }
.btb-stat-value--gold { color: var(--gold); }
.btb-stat-note { font: 400 14px/20px var(--font-sans); font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ---------- Bandmate code ---------- */
.btb-code { font: 600 15px/20px var(--font-mono); letter-spacing: 0.06em; }
.btb-code--lg { font-size: 32px; line-height: 36px; letter-spacing: 0.12em; }
.btb-code-box { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); background: var(--bg); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); }

/* ---------- Console tab bar ---------- */
.btb-tabbar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--surface-bar); border-top: 1px solid var(--line);
}
.btb-tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px;
  color: var(--text-3); font: 500 12px/14px var(--font-sans); text-decoration: none; border-radius: var(--radius-sm);
}
.btb-tabbar a[aria-current="page"] { color: var(--gold); font-weight: 600; }
.btb-tabbar svg { width: 24px; height: 24px; }

/* ---------- Marketing nav ---------- */
.btb-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); padding: var(--space-6) var(--space-18); }
.btb-nav-links { display: flex; align-items: center; gap: 22px; }
.btb-nav-link { color: var(--text-2); font: 500 15px/20px var(--font-sans); text-decoration: none; }
.btb-nav-link:hover { color: var(--text); }
.btb-nav-link[aria-current="page"] { color: var(--gold); font-weight: 600; }
.btb-nav-toggle { display: none; align-items: center; justify-content: center; width: var(--touch-min); height: var(--touch-min); background: none; border: 0; color: var(--text); cursor: pointer; border-radius: var(--radius-sm); }
@media (max-width: 980px) {
  .btb-nav { padding: 20px var(--space-6); flex-wrap: wrap; }
  .btb-nav-toggle { display: inline-flex; }
  .btb-nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line-gold-strong); border-radius: var(--radius-sm); padding: 0 var(--space-4); }
  .btb-nav[data-open] .btb-nav-links { display: flex; }
  .btb-nav-links > * { padding: 14px 0; }
}

/* ---------- Marketing footer ---------- */
.btb-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); padding: 36px var(--space-18); border-top: 1px solid var(--line); }
.btb-footer-copy { font: 400 13px/18px var(--font-sans); color: var(--text-3); }
@media (max-width: 900px) { .btb-footer { padding: 28px var(--space-6); } }

/* ---------- Bottom sheet (crowd page) ---------- */
.btb-sheet {
  background: var(--surface); border-top: 1px solid var(--line-gold-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-sheet);
  padding: 12px var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  transition: transform 0.25s ease;
}
.btb-sheet[hidden] { display: block; transform: translateY(105%); }
.btb-sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--control-border); margin: 0 auto 14px; }
@media (prefers-reduced-motion: reduce) { .btb-sheet { transition: none; } }

/* ---------- Dialog (confirms) ---------- */
.btb-dialog { width: min(360px, calc(100% - 32px)); background: var(--surface-raised); color: var(--text); border: 0; border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-popover); }
.btb-dialog::backdrop { background: var(--scrim); }
.btb-dialog-title { margin: 0 0 var(--space-2); font: 700 30px/32px var(--font-display); }
.btb-dialog-body { margin: 0 0 var(--space-5); font: 400 16px/24px var(--font-sans); color: var(--text-2); }
.btb-dialog-actions { display: flex; gap: var(--space-3); }
.btb-dialog-actions .btb-btn { flex: 1 1 0; padding: 0 12px; }

/* ---------- FAQ item ---------- */
.btb-faq { border-top: 1px solid var(--line); }
.btb-faq summary { list-style: none; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); padding: 18px 2px; cursor: pointer; font: 600 18px/26px var(--font-sans); color: var(--text); }
.btb-faq summary::-webkit-details-marker { display: none; }
.btb-faq summary::after { content: "+"; flex: 0 0 auto; font: 400 26px/26px var(--font-sans); color: var(--gold); transition: transform 0.2s; }
.btb-faq[open] summary::after { transform: rotate(45deg); }
.btb-faq summary:hover { color: var(--gold); }
.btb-faq-answer { margin: 0; padding: 0 2px 20px; max-width: 68ch; font: 400 16px/27px var(--font-sans); color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .btb-faq summary::after { transition: none; } }
