/* PowerBoxDJ — bridge between the original stylesheets and the shared theme.
   Loaded after style.css, nav.css and theme.css.

   style.css and nav.css were written for one mode (black) and one accent (gold), so
   a number of colours are baked in as literals. Everything below re-states those
   few places in terms of the shared tokens, which is what lets the Dark / Light
   toggle and the brush square in the header actually take effect.

   Tokens come from theme.css:  --bg --panel --line --text --gold(=--accent) …       */

/* ── chrome that had literal blacks ── */

#site-header { background: var(--bg); border-bottom-color: var(--line-soft); }

header.site { background: var(--header-bg); }
header.site.open { background: var(--header-bg-open); }

.mm-drop { background: var(--drop-bg); }
.mm-scrim { background: var(--scrim); }
.mmm { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }

.sf { background: var(--overlay-bg); }
.sf-box { background: var(--sheet-bg); box-shadow: var(--shadow); }
.sf-foot { background: var(--hairline); }

.mm-search { background: var(--sheen); }
.mm-search kbd { background: var(--hairline); }
.mm-chips a { background: var(--sheen); }
.mm-shot { background: var(--panel); }

/* The wordmark follows the chosen mode, not the operating system's preference —
   nav.css sets it from prefers-color-scheme, which is wrong once a toggle exists. */
html[data-theme] .brand,
html[data-theme] .brand span,
html[data-theme] header.site .bar .brand:hover { color: var(--text); }

/* ── gold-tinted hover states follow the brush ── */

.mm-t.on              { background: var(--accent-softer); }
.mm-list a:hover      { background: var(--accent-softer); }
.mm-chips a:hover     { background: var(--accent-softer); }
.mm-search:hover      { background: var(--accent-softer); }
.subnav a:hover       { background: var(--accent-soft); }
.sf-hit:hover,
.sf-hit.sel           { background: var(--accent-soft); }
.mm-shot.todo         { background: var(--accent-softer); }
.mm-shot.todo .cap    { background: var(--accent-softer); border-top-color: var(--accent-dim); }

/* ── the gold button becomes the brush button ── */

.btn-gold {
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  color: var(--accent-ink);
  box-shadow: 0 6px 22px var(--accent-glow);
}
.btn-gold:hover { color: var(--accent-ink); box-shadow: 0 10px 30px var(--accent-glow); }
.btn-ghost { background: var(--sheen); }

/* ── page background wash follows the brush ── */

body::before {
  background:
    radial-gradient(1000px 520px at 78% -12%, var(--accent-soft), transparent 66%),
    radial-gradient(760px 420px at 4% 8%, var(--accent-softer), transparent 66%);
}

/* ── light mode: surfaces that were pure black read as paper ── */

html[data-theme="light"] .hero-shot,
html[data-theme="light"] .mm-shot { background: var(--panel); }

html[data-theme="light"] .subnav { background: color-mix(in srgb, var(--bg) 93%, transparent); }

html[data-theme="light"] .sf-hit .ic,
html[data-theme="light"] .mm-search { border-color: var(--line); }

/* Text that sits on top of a photograph keeps its dark scrim in both modes, so it
   stays white — switching to light must not make it disappear into the picture. */
.stage-over h1,
.stage-over h2,
.stage-over .big { color: #fff; }
.stage-over p,
.stage-over .sub { color: rgba(255, 255, 255, .84); }

/* Screenshots were shot against a black UI; a hair of contrast keeps them from
   floating on a white page. */
html[data-theme="light"] .stage img,
html[data-theme="light"] .shot img,
html[data-theme="light"] .gal img { border: 1px solid var(--line-soft); border-radius: 0; }

/* ═══════════ density ═══════════
   The old spacing was built for four short pages. With forty, the padding was
   doing more scrolling than reading. Everything below tightens the rhythm. */

section { padding: 38px 0; }
section.tight { padding: 22px 0; }
.hero-band { padding-block: 34px 26px; }
.section-head { margin-bottom: 20px; }
.cards { gap: 14px; }
.card { padding: 16px 18px; }
.card h3 { margin-bottom: 4px; }
.faq details { padding: 12px 0; }
.wrap.center, .center { text-align: center; }
.center .section-head { margin-inline: auto; }
.center .cta { justify-content: center; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* related-link chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .03em;
  border: 1px solid var(--line-soft); border-radius: 0; padding: 6px 13px;
  color: var(--text-2); background: var(--sheen); text-decoration: none;
  transition: border-color .14s, color .14s, background .14s, transform .16s cubic-bezier(.32,.72,0,1);
}
.chips a:hover {
  border-color: var(--accent-dim); color: var(--accent);
  background: var(--accent-softer); transform: translateY(-2px);
}

/* ═══════════ flare ═══════════ */

/* cards lift and pick up the brush */
.card {
  transition: border-color .16s ease, transform .18s cubic-bezier(.32,.72,0,1), box-shadow .18s ease, background .16s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
  background: var(--accent-softer);
}
html[data-theme="light"] .card:hover { box-shadow: 0 10px 24px rgba(0,0,0,.08); }

/* a hairline of brush colour crawls along the top of a hovered card */
.card { position: relative; overflow: hidden; }
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s cubic-bezier(.32,.72,0,1);
}
.card:hover::before { transform: scaleX(1); }

/* numbered steps get a brush-coloured chip */
.card .badge { background: var(--accent); color: var(--accent-ink); }

/* section headings underline themselves as they arrive */
.section-head h2 { position: relative; display: inline-block; padding-bottom: 6px; }
.section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s cubic-bezier(.32,.72,0,1) .1s;
}
.reveal.on .section-head h2::after,
.section-head.reveal.on h2::after { transform: scaleX(1); }

/* buttons press like buttons */
.btn { transition: transform .12s, box-shadow .16s, background .16s, border-color .16s, filter .16s; }
.btn-gold:hover { filter: saturate(1.08); }
.btn-ghost:hover { transform: translateY(-1px); }

/* the eyebrow rule grows with the brush */
.eyebrow::before { transition: width .5s cubic-bezier(.32,.72,0,1); }
.section-head:hover .eyebrow::before { width: 34px; }

/* faq rows warm up */
.faq details { transition: background .16s ease; border-radius: 0; }
.faq details:hover { background: var(--accent-softer); }
.faq summary { padding: 0 6px; }

@media (prefers-reduced-motion: reduce) {
  .card:hover, .chips a:hover, .btn-ghost:hover { transform: none; }
  .card::before, .section-head h2::after { transition: none; }
}

/* ── the theme + brush controls sit in the bar ── */

header.site .bar-end .pbx-controls { margin: 0 2px; }
@media (max-width: 560px) {
  header.site .bar-end .pbx-controls .lbl { display: none; }
}
