/* Section 3 — the Artist EQ console.
 *
 * Written by hand for the same reason as the header and the hero: the
 * Tailwind build is checked in, and this needs exact values. The console
 * is CSS over native controls, not an image - it reflows instead of
 * scaling to mush, and the range inputs keep their keyboard behaviour.
 *
 * Materials: dark machined metal, a brushed fader cap, shallow engraved
 * marks, one warm lamp per channel. Nothing is scratched, dusty or
 * artificially aged - the instrument is meant to read as expensive and
 * in use, not as salvage.
 */

.sbeq {
  --eq-brass: #C9A86A;
  --eq-brass-lit: #E0C48C;
  --eq-ivory: #F2EEE6;
  --eq-muted: #A29A8C;
  --eq-surface: #131211;
  --eq-plate: #191715;
  --eq-line: rgb(242 238 230 / 0.10);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0C0B0A;
  padding: clamp(48px, 7vw, 96px) 0;
}

/* The room, used as a frame. Its centre was painted out of the file, so
   the console sits in a real hole rather than on top of a picture of a
   console. */
.sbeq-room {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
}
.sbeq-room img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.85;
}
@media (max-width: 900px) {
  /* On a phone the gear would sit behind the controls. Keep a hint of it
     at the edges and let the console own the middle. */
  .sbeq-room img { opacity: 0.35; object-position: 50% 30%; }
}

/* The section runs the full width of the page so its own near-black is
   the ground rather than a dark card on white. The console keeps the
   measurements it was approved at: this max-width and padding reproduce
   the reading column it used to sit inside, so only what is behind it
   changed. */
.sbeq-inner {
  position: relative;
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 clamp(40px, 6.2vw, 80px);
  /* A column at every width so the analyzer strip, the console and the
     preset rail can trade places between phone and desktop with `order`
     instead of duplicated markup. The gap replaces the per-block
     margins the blocks used to carry. */
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --- heading ------------------------------------------------------------ */
/* The heading now sits at the foot of the channel column rather than
   full width above the console, so it loses the centring and the display
   size: 62px type in a 66%-wide column would shout over the controls it
   is meant to introduce. `margin-top: auto` pushes the whole block —
   heading, note and buttons — to the bottom of the column, which is the
   space the six faders leave. */
.sbeq-head {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--eq-line);
  text-align: left;
  max-width: 62ch;
}
.sbeq-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--eq-brass);
}
.sbeq-title {
  margin: 10px 0 0;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--eq-ivory);
}
.sbeq-support { margin: 10px 0 0; font-size: clamp(14px, 1.05vw, 16px); color: #DED8CD; }
.sbeq-instruction { margin: 8px 0 0; font-size: 13px; color: var(--eq-muted); }

/* --- console ------------------------------------------------------------ */
.sbeq-console {
  display: grid;
  grid-template-columns: minmax(0, 66fr) minmax(0, 34fr);
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 1023px) { .sbeq-console { grid-template-columns: 1fr; } }

/* A column, so the button row can be pinned to its foot. */
.sbeq-channels-wrap { display: flex; flex-direction: column; }

.sbeq-channels-wrap,
.sbeq-output {
  border: 1px solid var(--eq-line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.03), rgb(0 0 0 / 0.06)),
    var(--eq-plate);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.45), inset 0 1px 0 rgb(255 255 255 / 0.04);
  padding: 16px clamp(12px, 1.6vw, 22px) 20px;
}

.sbeq-panel-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eq-muted);
}

/* --- channels ----------------------------------------------------------- */
.sbeq-channels {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 900px) { .sbeq-channels { grid-template-columns: 1fr; gap: 12px; } }

.sbeq-channel {
  --lit: 0.75;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 12px;
  border: 1px solid var(--eq-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #1B1917, #141312);
}
.sbeq-ch-icon { color: var(--eq-brass); }
.sbeq-ch-icon svg { width: 18px; height: 18px; display: block; }
.sbeq-ch-name {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #D9D3C8;
}
/* One warm lamp per channel, brightness tied to the value - never a glow
   for its own sake. */
.sbeq-lamp {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: rgb(201 168 106 / calc(0.25 + var(--lit) * 0.75));
  box-shadow: 0 0 calc(2px + var(--lit) * 7px) rgb(201 168 106 / calc(var(--lit) * 0.55));
}

.sbeq-fader { position: relative; display: flex; align-items: center; justify-content: center; }

/* Engraved scale beside the travel. Three marks, not fifteen: the number
   under the fader is the readout, these are just orientation. */
.sbeq-scale {
  position: absolute;
  left: 6px; top: 4px; bottom: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 8.5px;
  font-style: normal;
  color: rgb(242 238 230 / 0.3);
}
.sbeq-scale i { font-style: normal; }

/* The upright fader: a native range rotated, so arrow keys, Home/End,
   page keys, touch and the screen reader all behave as they should. */
.sbeq-range {
  -webkit-appearance: none;
  appearance: none;
  width: 190px;
  height: 26px;
  margin: 82px 0;                 /* the rotation's footprint */
  transform: rotate(-90deg);
  background: transparent;
  cursor: pointer;
}
.sbeq-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, #0B0A09, #17150F);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.9), inset 0 -1px 0 rgb(255 255 255 / 0.05);
}
.sbeq-range::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, #0B0A09, #17150F);
}
/* The cap: brushed metal with a machined ridge, no gloss. */
.sbeq-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 40px;
  margin-top: -17px;
  border-radius: 3px;
  border: 1px solid #0A0908;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.10) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #D8D2C6 0%, #8C8579 45%, #C6BFB2 55%, #6E685E 100%);
  box-shadow: 0 3px 8px rgb(0 0 0 / 0.6);
}
.sbeq-range::-moz-range-thumb {
  width: 22px;
  height: 40px;
  border-radius: 3px;
  border: 1px solid #0A0908;
  background: linear-gradient(180deg, #D8D2C6 0%, #8C8579 45%, #C6BFB2 55%, #6E685E 100%);
  box-shadow: 0 3px 8px rgb(0 0 0 / 0.6);
}
.sbeq-range:focus-visible {
  outline: 2px solid var(--eq-brass);
  outline-offset: 6px;
  border-radius: 4px;
}

.sbeq-value {
  min-width: 54px;
  padding: 4px 0;
  border: 1px solid var(--eq-line);
  border-radius: 4px;
  background: #0D0C0B;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--eq-brass-lit);
}

/* The channel meaning. Visible on wide screens, available to screen
   readers everywhere, never crowding the controls on a phone. */
.sbeq-ch-desc {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
  color: var(--eq-muted);
}
@media (max-width: 1279px) and (min-width: 901px) {
  .sbeq-ch-desc {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* --- phone: horizontal channel cards ------------------------------------ */
@media (max-width: 900px) {
  .sbeq-channel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "icon name value"
      "fader fader fader"
      "desc desc desc";
    align-items: center;
    gap: 8px 10px;
    padding: 14px;
    text-align: left;
  }
  .sbeq-ch-icon { grid-area: icon; }
  .sbeq-ch-name { grid-area: name; font-size: 12px; }
  .sbeq-lamp { position: absolute; top: 16px; right: 74px; }
  .sbeq-value { grid-area: value; min-width: 56px; }
  .sbeq-fader { grid-area: fader; }
  .sbeq-ch-desc { grid-area: desc; text-align: left; font-size: 11px; }
  .sbeq-scale { display: none; }
  .sbeq-range {
    width: 100%;
    height: 44px;                  /* a real thumb target */
    margin: 0;
    transform: none;
  }
}

/* --- system output: the analyzer strip ----------------------------------- */
/* Runs the full width of the console instead of hiding inside the fader
   column: on hardware the output display is the widest thing on the
   face, and here it is the section's opening visual on desktop. The
   canvas is the live strip; the server-drawn SVG underneath is the
   no-JavaScript fallback and is hidden the moment the script takes
   over (`is-live`). */
.sbeq-trace {
  padding: 12px 14px 12px;
  border: 1px solid var(--eq-line);
  border-radius: 8px;
  background: #100F0E;
  box-shadow: inset 0 1px 8px rgb(0 0 0 / 0.5);
}
.sbeq-analyzer {
  display: none;
  width: 100%;
  height: clamp(120px, 15vw, 180px);
  margin-top: 10px;
}
.sbeq-trace.is-live .sbeq-analyzer { display: block; }
.sbeq-trace.is-live svg { display: none; }
.sbeq-trace svg { display: block; width: 100%; height: 78px; margin-top: 10px; }
#sbeq-trace-line { transition: none; }
@media (max-width: 900px) {
  .sbeq-analyzer { height: 110px; }
}

/* --- output panel -------------------------------------------------------- */
.sbeq-output { display: flex; flex-direction: column; gap: 16px; }
.sbeq-out-block + .sbeq-out-block { border-top: 1px solid var(--eq-line); padding-top: 16px; }

.sbeq-score-row { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sbeq-score {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--eq-brass-lit);
}
.sbeq-score-max { margin-left: 4px; font-size: 15px; color: var(--eq-muted); }
.sbeq-band { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--eq-ivory); }
.sbeq-dial { width: 64px; height: 64px; flex: 0 0 auto; }
#sbeq-dial-arc { transition: stroke-dashoffset 260ms ease; }
.sbeq-score-note { margin: 10px 0 0; font-size: 10.5px; line-height: 1.5; color: var(--eq-muted); }

.sbeq-lane {
  margin-top: 10px;
  display: block;
  padding: 12px 14px;
  border: 1px solid rgb(201 168 106 / 0.35);
  border-radius: 8px;
  background: rgb(201 168 106 / 0.07);
  text-decoration: none;
}
.sbeq-lane:hover { background: rgb(201 168 106 / 0.13); }
.sbeq-lane-name { display: block; font-size: 13px; font-weight: 800; color: var(--eq-brass-lit); }
.sbeq-lane-why { display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.5; color: #CFC8BC; }

.sbeq-modules { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
/* Rows, not links: the plan CTA carries the click. */
.sbeq-module {
  display: block;
  padding: 9px 11px;
  border: 1px solid var(--eq-line);
  border-radius: 6px;
  background: #100F0E;
  text-decoration: none;
}
.sbeq-module-name { display: block; font-size: 12.5px; font-weight: 700; color: var(--eq-ivory); }
.sbeq-module-note { display: block; margin-top: 2px; font-size: 10.5px; line-height: 1.45; color: var(--eq-muted); }

.sbeq-actions { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 7px; }
.sbeq-actions li { color: var(--eq-muted); }
.sbeq-action {
  font-size: 12px;
  line-height: 1.45;
  color: #DED8CD;
  text-decoration: none;
}
.sbeq-setup { margin: 12px 0 0; font-size: 11px; color: var(--eq-muted); }
.sbeq-setup strong { color: var(--eq-ivory); }
.sbeq-setup-note { color: var(--eq-muted); }

/* --- presets and CTAs ---------------------------------------------------- */
.sbeq-presets-wrap {
  border: 1px solid var(--eq-line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.03), rgb(0 0 0 / 0.06)), var(--eq-plate);
  padding: 16px clamp(12px, 1.6vw, 22px) 18px;
}
.sbeq-presets {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 900px) { .sbeq-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sbeq-preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid var(--eq-line);
  border-radius: 6px;
  background: #100F0E;
  color: #D5CEC2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}
.sbeq-preset svg { width: 15px; height: 15px; flex: 0 0 auto; opacity: 0.8; }
.sbeq-preset:hover { border-color: rgb(201 168 106 / 0.4); color: var(--eq-ivory); }
.sbeq-preset[aria-pressed="true"] {
  border-color: rgb(201 168 106 / 0.7);
  background: rgb(201 168 106 / 0.12);
  color: var(--eq-brass-lit);
}

/* The two buttons sit under the System output trace, at the foot of the
   channel column. `margin-top: auto` inside a column-flex wrapper drops
   them to the bottom, so they fill the space the six faders leave rather
   than floating right under the trace with a gap below. */
.sbeq-ctas {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* No order overrides at any width: presets, analyzer strip, console —
   the DOM order — is the visual order everywhere, so keyboard focus
   follows the visible sequence (the Aug 22 audit's finding 6; the old
   desktop reorder put the preset chips last on screen but first in the
   tab order). */
/* On wide screens the analyzer breaks out of the console's measure and
   bridges the desk, the way a master display spans real hardware. A flex
   item may exceed its parent when told to; the section clips at its own
   full-bleed edge, so nothing can push the page sideways. */
@media (min-width: 1024px) {
  .sbeq-trace {
    align-self: center;
    width: min(100vw - 64px, 1400px);
  }
}
.sbeq-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 2px;
  background: var(--eq-brass);
  color: #14120E;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.sbeq-cta:hover { background: var(--eq-brass-lit); }
.sbeq-reset {
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid rgb(201 168 106 / 0.45);
  border-radius: 2px;
  background: transparent;
  color: var(--eq-brass);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.sbeq-reset:hover { background: rgb(201 168 106 / 0.1); }

@media (max-width: 640px) {
  .sbeq-ctas { display: grid; grid-template-columns: 1fr; }
  .sbeq-cta, .sbeq-reset { width: 100%; }
}

.sbeq a:focus-visible,
.sbeq button:focus-visible {
  outline: 2px solid var(--eq-brass);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .sbeq *, .sbeq *::before, .sbeq *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
