/* Variant picker (assets/js/variant-picker.js) + OLED colour tint for the device illustration. */

/* Tint: the OLED canvas draws white pixels on black. A multiply layer over the canvas turns
   white into --tint and leaves black black, so any colour or split (two-tone) works.
   The layer sits on the canvas area (inside the screen's 10px padding). */
.device[data-tint] .screen::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  background: var(--tint, #fff); mix-blend-mode: multiply; border-radius: 2px;
  transition: background .35s var(--ease);
}
.device[data-tint] canvas { filter: drop-shadow(0 0 1.5px rgb(255 255 255 / .9)) drop-shadow(0 0 5px rgb(255 255 255 / .45)); }
.device[data-tint] .screen { box-shadow: inset 0 0 0 1px #1d1d20, 0 0 22px -6px var(--glow, transparent); transition: box-shadow .35s var(--ease); }

/* Gen 1 monitor case (SVG front view). The screen box sits on the OLED's visible area,
   21.7 x 10.9 mm centred 1 mm below the middle, in the SVG's 50 x 47 mm viewBox. */
.device.monitor {
  width: min(330px, 74vw); aspect-ratio: 50 / 47; padding: 0; border-radius: 0;
  background: none; box-shadow: none; filter: drop-shadow(0 22px 26px rgb(70 81 31 / .28));
}
.device.monitor::before { content: none; }
.device.monitor .case { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.device.monitor .screen {
  position: absolute; left: 28.3%; top: 37.34%; width: 43.4%; height: 23.19%;
  padding: 0; border-radius: 0; background: #000;
}
.device.monitor canvas { width: 100%; height: 100%; }
.device.monitor[data-tint] .screen::after { inset: 0; border-radius: 0; }
.device.monitor .ripple { inset: 0 0 6% 0; border-radius: 11.5%; }

/* layout of the "choose your screen colour" section */
.variant { padding: 104px 0; border-bottom: 1px solid var(--line); }
.variant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.variant .stage { display: grid; justify-items: center; padding: 30px 0; }
.variant-name { font-size: clamp(24px, 3vw, 32px); margin: 8px 0 4px; }
.variant-price { font-size: 18px; margin: 0 0 6px; }
.variant-state { font-family: var(--mono); font-size: 13px; color: var(--warn); margin: 0 0 22px; }
.variant-state::before { content: "● "; }
.variant-state[data-status="confirmed"] { color: var(--olive); }

/* picker */
.vp-legend { font-size: 15px; color: var(--text-dim); margin: 0 0 12px; }
.vp-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.vp-swatch {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 6px;
  font: inherit; font-size: 15px; color: var(--text); background: var(--bg-raised);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.vp-swatch:hover { border-color: var(--text-dim); }
.vp-swatch[aria-checked="true"] { border-color: var(--olive-dark); box-shadow: 0 0 0 2px var(--olive-dark); }
.vp-swatch:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.vp-dot { width: 34px; height: 34px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .18); }

@media (max-width: 860px) {
  .variant { padding: 72px 0; }
  .variant-grid { grid-template-columns: 1fr; gap: 12px; }
  .variant .stage { order: -1; padding: 30px 0 0; }
  .variant .device { width: min(260px, 66vw); }
}
@media (prefers-reduced-motion: reduce) {
  .device[data-tint] .screen::after, .device[data-tint] .screen, .vp-swatch { transition: none; }
}
