/* GetLightLeads visualizer — GLL design system (night-first, volt accent)
   Tokens sourced from the GetLightLeads Design System: sharp corners, opaque
   surfaces (no blur), skew motif, sticker shadows, volt as a scalpel. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* neutrals — night-first */
  --night: #0B0D10; --ink: #111417; --charcoal: #1E2126; --carbon: #23262B;
  --line: #3A3D42; --slate: #4A4F56; --steel: #6E7681; --silver: #9AA0A6;
  --mist: #C6CBD1; --fog: #E9EBEE; --white: #FFFFFF;
  /* brand accent */
  --volt: #FFD600; --volt-hover: #FFE14D; --volt-deep: #F0BC00;
  /* type */
  --font-display: "rift", sans-serif;
  --font-head: "industry", sans-serif;
  --font-body: "acumin-pro", sans-serif;
  --ls-caps: .08em;
  /* effects */
  --skew: -10deg;
  --shadow-sticker-sm: 4px 4px 0 #000;
  --glow-volt-soft: 0 0 24px rgba(255, 214, 0, .35);
  --ease-snap: cubic-bezier(.2, .9, .3, 1); --t-fast: 120ms; --t-med: 180ms;
  --focus-ring: 0 0 0 2px var(--night), 0 0 0 4px var(--volt);
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--night);
  color: var(--white);
  font-family: var(--font-body), "Segoe UI", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* photo left, menu right — the panel never covers the photo */
body { display: flex; flex-direction: row; }
#stage { position: relative; flex: 1; min-width: 0; height: 100vh; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

button { font-family: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---------- brand ---------- */
#brand {
  position: absolute; top: 16px; left: 18px; z-index: 5;
  padding: 12px 18px;
  background: var(--ink); border: 1px solid var(--carbon);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700; font-style: italic;
  font-size: 26px; line-height: 1; letter-spacing: .005em;
  color: var(--white); white-space: nowrap;
}
.wordmark .volt { color: var(--volt); }
.wordmark .bolt { height: .68em; width: auto; fill: var(--volt); vertical-align: baseline; margin: 0 .02em; }
.wordmark .tld { color: var(--steel); font-size: .55em; }
.brand-sub {
  margin-top: 5px;
  font-family: var(--font-head); font-weight: 700; font-size: 10px;
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--steel);
}
body.embed #brand { display: none; }

/* ---------- loading ---------- */
#loading {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: var(--night); transition: opacity var(--t-med) var(--ease-snap);
}
#loading.done { opacity: 0; pointer-events: none; }
.loading-glow {
  width: 12px; height: 12px;
  background: var(--volt);
  box-shadow: var(--glow-volt-soft);
  transform: skewX(var(--skew));
  animation: breathe 1.2s var(--ease-snap) infinite;
}
.loading-text {
  font-family: var(--font-head); font-weight: 700; font-size: 12px;
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--steel);
}
@keyframes breathe { 50% { transform: skewX(var(--skew)) scale(1.4); opacity: .65; } }

/* ---------- panel ---------- */
#panel {
  width: 340px; flex-shrink: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 16px;
  background: var(--ink); border-left: 1px solid var(--carbon);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}

.geo-banner {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 12px;
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--mist);
  background: var(--charcoal); border: 1px solid var(--carbon);
  padding: 9px 12px; margin-bottom: 14px;
}
.geo-bar { width: 4px; height: 14px; background: var(--volt); transform: skewX(var(--skew)); flex-shrink: 0; }

.home-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.home-btn {
  padding: 9px 4px;
  background: var(--charcoal); border: 1px solid var(--carbon);
  cursor: pointer; color: var(--steel);
  font-family: var(--font-head); font-weight: 700; font-size: 11.5px;
  letter-spacing: .06em; text-transform: uppercase;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.home-btn:hover { color: var(--mist); background: var(--carbon); }
.home-btn.active { border-color: var(--volt); color: var(--volt); }

.photo-credit {
  margin-top: 6px; text-align: center;
  font-size: 9.5px; color: var(--slate);
}
.photo-credit a { color: var(--steel); text-decoration: none; }
.photo-credit a:hover { color: var(--volt); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--carbon); margin-bottom: 14px; }
.tab {
  position: relative; flex: 1; padding: 9px 4px 11px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 12.5px;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--steel); transition: color var(--t-fast);
}
.tab:hover { color: var(--mist); }
.tab.active { color: var(--white); }
.tab.active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px;
  background: var(--volt); transform: skewX(var(--skew));
}

.tab-page { display: none; }
.tab-page.active { display: block; }

/* ---------- theme chips ---------- */
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 10px 12px;
  background: var(--charcoal); border: 1px solid var(--carbon);
  cursor: pointer; color: var(--white); text-align: left;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease-snap);
}
.chip:hover { background: var(--carbon); border-color: var(--line); }
.chip.active { border-color: var(--volt); }
.chip-label {
  font-family: var(--font-head); font-weight: 700; font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase;
}
.swatches { display: flex; gap: 4px; }
.swatch {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid var(--line);
}

/* ---------- team list ---------- */
.team-list { display: flex; flex-direction: column; gap: 6px; }
.team-list.tall { max-height: 280px; overflow-y: auto; margin-top: 8px; padding-right: 4px; }
.team-loading { color: var(--steel); font-size: 14px; padding: 10px 2px; }
.team-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  background: var(--charcoal); border: 1px solid var(--carbon);
  cursor: pointer; color: var(--white); width: 100%; text-align: left;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.team-row:hover { background: var(--carbon); border-color: var(--line); }
.team-row.active { border-color: var(--volt); }
.team-name {
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
  letter-spacing: .04em; text-transform: uppercase;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.team-meta { font-size: 12px; color: var(--steel); }
.league-badge {
  font-family: var(--font-head); font-weight: 700; font-size: 9.5px;
  letter-spacing: var(--ls-caps);
  padding: 3px 6px;
  background: var(--carbon); color: var(--silver);
  transform: skewX(var(--skew));
}

.legal-note {
  margin-top: 10px;
  font-size: 11px; line-height: 1.55; color: var(--steel);
}

.link-btn {
  background: none; border: none; color: var(--volt);
  font-family: var(--font-head); font-weight: 700; font-size: 11.5px;
  letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; padding: 12px 2px 2px; text-align: left; width: 100%;
  transition: color var(--t-fast);
}
.link-btn:hover { color: var(--volt-hover); }

.league-filter {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px;
}
.league-filter button {
  padding: 5px 8px;
  background: var(--charcoal); border: 1px solid var(--carbon);
  color: var(--steel); cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 9.5px;
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.league-filter button:hover { color: var(--mist); }
.league-filter button.active { border-color: var(--volt); color: var(--volt); }

#team-search {
  width: 100%; margin-top: 8px; padding: 9px 12px;
  background: var(--night); border: 1px solid var(--line);
  color: var(--white); font-size: 14px; font-family: var(--font-body);
}
#team-search:focus { border-color: var(--volt); }
#team-search::placeholder { color: var(--steel); }

/* ---------- patterns + sliders ---------- */
.divider { height: 1px; background: var(--carbon); margin: 14px 0 12px; flex-shrink: 0; }
.row-label {
  font-family: var(--font-head); font-weight: 700; font-size: 11px;
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--steel);
  margin-bottom: 8px;
}

.pattern-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pattern-btn {
  padding: 8px 4px;
  background: var(--charcoal); border: 1px solid var(--carbon);
  cursor: pointer; color: var(--steel);
  font-family: var(--font-head); font-weight: 700; font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.pattern-btn:hover { color: var(--mist); background: var(--carbon); }
.pattern-btn.active { border-color: var(--volt); color: var(--volt); }

.sliders { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.sliders label {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 11px;
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--steel);
}
.sliders input[type="range"] { flex: 1; accent-color: var(--volt); height: 4px; }

/* ---------- CTA ---------- */
.cta {
  display: block; text-align: center; margin-top: 16px;
  padding: 14px 16px;
  background: var(--volt);
  color: var(--night);
  font-family: var(--font-display); font-weight: 700; font-style: italic;
  font-size: 19px; line-height: 1; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none;
  transform: skewX(var(--skew));
  transition: transform var(--t-fast) var(--ease-snap), box-shadow var(--t-fast) var(--ease-snap), background var(--t-fast);
}
.cta:hover {
  background: var(--volt-hover);
  transform: skewX(var(--skew)) translate(-2px, -2px);
  box-shadow: var(--shadow-sticker-sm);
}
.cta:active { transform: skewX(var(--skew)) translate(1px, 1px); box-shadow: none; }
.fine-print {
  margin-top: 10px; text-align: center;
  font-family: var(--font-head); font-weight: 500; font-size: 10px;
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--steel);
}

/* ---------- panel toggle (mobile / embed) ---------- */
#panel-toggle {
  position: fixed; bottom: 18px; right: 18px; z-index: 7;
  width: 52px; height: 52px;
  background: var(--ink); border: 1px solid var(--line);
  cursor: pointer; display: none;
  align-items: center; justify-content: center;
}
#panel-toggle svg { height: 22px; width: auto; fill: var(--volt); }

@media (max-width: 720px) {
  body { flex-direction: column; }
  #stage { height: 46vh; flex: none; }
  #panel { width: 100%; height: auto; flex: 1; border-left: none; border-top: 1px solid var(--carbon); }
  #brand { top: 10px; left: 10px; padding: 9px 13px; }
  .wordmark { font-size: 20px; }
  .brand-sub { display: none; }
}
