:root {
  --bg: #05060a;
  --bg-raised: #0d1018;
  --border: #1c2130;
  --text: #e8ebf2;
  --text-muted: #8b93a7;
  --accent: #2f7bff;
  --accent-glow: rgba(47, 123, 255, 0.45);
  --radius: 14px;
  --max: 1080px;
  --font: system-ui, -apple-system, Avenir, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 { line-height: 1.15; margin: 0; }

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(5, 6, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 6px;
  font-size: 14px;
}

.nav-links { display: flex; gap: 24px; font-size: 14px; white-space: nowrap; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

.nav-links a[aria-current="page"] { color: var(--text); }

.nav-links .nav-github { color: var(--text); }

/* Hero */

.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 24px 64px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 520px;
  background: radial-gradient(ellipse 50% 60% at 50% 20%, var(--accent-glow), transparent 70%);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

.hero-icon {
  width: 128px;
  height: 128px;
  filter: drop-shadow(0 0 40px var(--accent-glow));
}

/* The app's own loader look: the wordmark with a light sweeping across it */
/* Read by search engines and screen readers, not shown */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wordmark {
  margin-top: 20px;
  font-size: clamp(44px, 9vw, 88px);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  background: linear-gradient(90deg, #5a6275 35%, #ffffff 50%, #5a6275 65%) 0 0 / 250% 100% no-repeat;
  background-color: #5a6275;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sweep 3s ease-in-out infinite;
}

@keyframes sweep {
  from { background-position: 100% 0; }
  70%, to { background-position: 0% 0; }
}

.hero-tagline {
  margin: 12px 0 0;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 500;
}

.hero-sub {
  max-width: 600px;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 17px;
}

.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.btn:hover { border-color: #39425a; transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover { border-color: var(--accent); box-shadow: 0 0 36px var(--accent-glow); }

/* LED bars */

.rig {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-raised), var(--bg));
}

.bar {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: 6px;
  background: #15181f;
  box-shadow: inset 0 0 0 1px #222734;
}

.dot {
  aspect-ratio: 1;
  border-radius: 3px;
  background: #1d212b;
  transition: background-color 60ms linear, box-shadow 60ms linear;
}

.rig-caption {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.rig-caption span { color: var(--text); }

/* Screenshots, in a macOS-like window */

.window {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #222;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(47, 123, 255, 0.12);
}

.window img { display: block; width: 100%; height: auto; }

.window-bar {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  background: #2a2a2a;
  border-bottom: 1px solid #191919;
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #4a4a4a;
}


/* Tour: a screenshot and its text, side by side */

.tour { display: grid; gap: 160px; }

.tour-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}

.tour-row-reverse { grid-template-columns: 1fr 1.4fr; }

.tour-row-reverse .tour-text { order: -1; }

/* A narrow window's screenshot: tall, kept to the width of the real window */
.window-narrow { max-width: 300px; justify-self: center; }

.tour .tour-text h2 { text-align: left; }

.tour-text p { margin: 16px 0 0; color: var(--text-muted); }

.tour-text em { color: var(--text); font-style: normal; }

/* Sections */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px 24px;
}

.section h2 {
  font-size: clamp(26px, 4vw, 36px);
  text-align: center;
}

.section-lead {
  max-width: 620px;
  margin: 16px auto 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 17px;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 880px;
  margin: 48px auto 0;
}

.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.feature-wide {
  grid-column: 1 / -1;
  border-color: rgba(47, 123, 255, 0.5);
  background: linear-gradient(120deg, rgba(47, 123, 255, 0.14), var(--bg-raised) 60%);
}

.feature-wide p { max-width: 720px; }

.feature a { color: var(--accent); text-decoration: none; font-weight: 500; }

.feature a:hover { text-decoration: underline; }

.feature h3 { font-size: 18px; }

.feature p { margin: 10px 0 0; color: var(--text-muted); font-size: 15px; }

.feature em { color: var(--text); font-style: normal; }

/* Steps */

.steps {
  list-style: none;
  padding: 0;
  margin: 48px auto 0;
  max-width: 720px;
  display: grid;
  gap: 12px;
}

.steps li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.step-num {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 18px var(--accent-glow);
}

.steps h3 { font-size: 18px; }

.steps p { margin: 4px 0 0; color: var(--text-muted); font-size: 15px; }

/* Hardware */

.hardware {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.hardware h2 { text-align: left; }

.checklist {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  color: var(--text-muted);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.checklist strong { color: var(--text); font-weight: 600; }

.signal {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.signal-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raised);
  font-size: 14px;
  letter-spacing: 1px;
}

.signal-node-main {
  padding: 10px 22px 10px 12px;
  border-color: var(--accent);
  box-shadow: 0 0 28px var(--accent-glow);
  font-weight: 600;
}

.signal-wire {
  width: 2px;
  height: 32px;
  background: linear-gradient(var(--accent), transparent);
  background-size: 100% 200%;
  animation: flow 1.6s linear infinite;
}

@keyframes flow {
  from { background-position: 0 100%; }
  to { background-position: 0 -100%; }
}

.checklist a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.checklist a:hover { color: var(--accent); }

/* The only DMX interface supported for now, and a way to ask for another */
.hardware-note {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 14px 16px 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.hardware-note p { margin: 0; color: var(--text-muted); font-size: 14px; }

.btn-small { flex: none; padding: 8px 14px; font-size: 13px; }

/* The Open DMX USB, as it looks: a blue aluminium case with white markings, the USB cable in at one end, the XLR
   plug out at the other */
.dmx-device { display: flex; flex-direction: column; align-items: center; text-decoration: none; }

/* The USB-B plug and its cable's sleeve */
.dmx-device-usb {
  width: 18px;
  height: 14px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #1b1b1f, #3a3a40 45%, #1b1b1f);
}

.dmx-device-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 116px;
  height: 168px;
  padding: 10px 8px;
  box-sizing: border-box;
  border-radius: 5px;
  background: linear-gradient(90deg, #2a2a74, #3c3c99 10%, #3a3a93 85%, #30307e 92%, #26266a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.3), 0 14px 30px rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  transition: transform 0.2s;
}

.dmx-device:hover .dmx-device-body { transform: translateY(-2px); }

.dmx-device-end { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }

/* The markings along the case, read from the top down */
.dmx-device-face { display: flex; align-items: center; gap: 4px; }
.dmx-device-face > * { writing-mode: vertical-rl; white-space: nowrap; }

.dmx-device-small { font-size: 5px; line-height: 1.5; font-weight: 700; letter-spacing: 0.04em; text-align: center; opacity: 0.95; }

.dmx-device-label {
  padding: 3px 1px;
  border-radius: 1px;
  background: #fff;
  color: #3a3a93;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.dmx-device-brand { font-size: 27px; font-weight: 300; letter-spacing: 0.16em; line-height: 1; }

/* The XLR plug: a metal sleeve, its five pins seen through it */
.dmx-device-xlr {
  display: flex;
  justify-content: center;
  gap: 3px;
  width: 40px;
  height: 18px;
  padding-top: 5px;
  box-sizing: border-box;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #6f7584, #d6dae2 45%, #7d8392);
}

.dmx-device-xlr i { width: 3px; height: 6px; border-radius: 1px; background: #3a3f4a; }

/* Guide pages (e.g. /mainstage) */

.guide {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 80px;
}

.guide-head { text-align: center; }

.guide-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-head h1 { font-size: clamp(32px, 5vw, 48px); }

.guide-section { margin-top: 64px; }

.guide-section h2 { font-size: clamp(22px, 3vw, 28px); }

.guide-section > p { margin: 14px 0 0; color: var(--text-muted); }

.guide em { color: var(--text); font-style: normal; }

.guide .steps { margin-top: 24px; max-width: none; }

.midi-table {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 1px;
  margin: 24px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
}

.midi-table dt, .midi-table dd {
  margin: 0;
  padding: 14px 18px;
  background: var(--bg-raised);
}

.midi-table dt { font-weight: 600; }

.midi-table dd { color: var(--text-muted); font-size: 15px; }

/* Screenshots in a guide's steps */
.shot {
  margin: 14px 0 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.shot img { display: block; width: 100%; height: auto; }

.shot-narrow { max-width: 300px; }

.shot-medium { max-width: 440px; }

/* A screenshot still to be taken */
.shot-placeholder {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 16px;
  border: 1px dashed #5a6275;
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
  text-align: center;
}

.substeps {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 15px;
}

.substeps li { padding: 0; gap: 0; border: 0; background: none; display: list-item; margin-top: 4px; }

.guide .steps a { color: var(--accent); }

/* Why we made Strobe */

/* The band's photo on stage, large, next to the text; above it on narrower screens */

.story-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: 1080px;
  margin: 48px auto 0;
}

.story-photo {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 0 80px rgba(40, 200, 160, 0.14), 0 0 140px rgba(47, 123, 255, 0.12);
}

.story-text {
  font-size: 17px;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .story-body {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 620px;
  }
}

.story-text p { margin: 0 0 16px; }

.story-text .story-signature {
  margin: 24px 0 0;
  color: var(--text);
}

.story-signature a { color: var(--accent); }

/* CTA & footer */

.cta {
  margin-bottom: 40px;
  border-top: 1px solid var(--border);
}

.footer {
  padding: 32px 24px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.footer p { margin: 4px 0; }

/* Cues demo: a copy of Strobe's buttons, their settings and a stage, in the app's own look
   (src/renderer/App.scss, DmxButton.scss, DetailsPanel.scss in the app), acting out a cue's editing.
   Driven by script.js */

.demo-app {
  position: relative;
  display: grid;
  gap: 22px;
  padding: 22px 14px 14px;
  background: #222;
  color: #ddd;
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  text-align: left;
}

.demo-section {
  position: relative;
  border: 2px solid #161616;
  border-radius: 5px;
  padding: 22px 14px 14px;
}

.demo-section-title {
  position: absolute;
  top: -10px;
  left: 20px;
  padding: 2px 10px;
  border-radius: 5px;
  background: #161616;
  color: #666;
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.demo-buttons {
  position: relative;
  display: flex;
  gap: 14px;
  min-height: 210px;
}

.demo-pads {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, 76px);
  grid-auto-rows: 76px;
  gap: 14px 10px;
  align-content: start;
}

.demo-pad {
  position: relative;
  padding: 0;
  border: 2px solid #444;
  border-radius: 5px;
  background: #222;
  transition: border-color 0.1s ease;
}

.demo-pad.active { border-color: #999; }

/* Lit while its effect plays */
.demo-pad .playing-light {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 10px;
  height: 5px;
  border-radius: 2px;
  background: #000;
  box-shadow: 0 0 4px #ffffff22;
}

.demo-pad.active .playing-light { background: #ffffff44; }
.demo-pad.playing .playing-light { background: #fff; box-shadow: 0 0 6px #fff; }

.demo-pad .midi-key {
  position: absolute;
  bottom: 5px;
  left: 5px;
  width: 30px;
  height: 15px;
  border: 1px solid #ffffff22;
  border-radius: 3px;
  color: #ffffff33;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
}

/* One dot per light on stage, in the cue's color for those it drives */
.demo-pad .color-symbols {
  position: absolute;
  right: 4px;
  bottom: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-pad .color-symbol {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #000000aa;
}

/* The glowing line from the selected cue to its settings (SelectionLink in the app, without its sparks) */
.demo-selection-link {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.demo-selection-link path { fill: none; stroke-linecap: round; stroke-linejoin: round; }

.demo-selection-link .glow,
.demo-selection-link .core {
  stroke: var(--link-color);
  stroke-dasharray: 1;
  animation: demo-link-draw 0.3s ease-out both;
  transition: stroke 0.25s ease;
}

.demo-selection-link .glow { stroke-width: 7; opacity: 0.7; filter: blur(4px); }
.demo-selection-link .core { stroke-width: 2; filter: drop-shadow(0 0 2px var(--link-color)); }

.demo-selection-link .end {
  fill: #fff;
  filter: drop-shadow(0 0 3px var(--link-color)) drop-shadow(0 0 8px var(--link-color));
  transform-box: fill-box;
  transform-origin: center;
  animation: demo-link-pop 0.25s 0.25s ease-out both;
}

@keyframes demo-link-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes demo-link-pop { 0% { transform: scale(0); } 70% { transform: scale(1.6); } 100% { transform: scale(1); } }

/* The selected cue's settings, or a placeholder */
.demo-details {
  flex: none;
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 5px;
  background: #161616;
  box-sizing: border-box;
}

.demo-details.placeholder {
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff22;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.demo-details > * { animation: demo-details-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.demo-details > :nth-child(2) { animation-delay: 45ms; }
.demo-details > :nth-child(3) { animation-delay: 90ms; }
.demo-details > :nth-child(4) { animation-delay: 135ms; }

@keyframes demo-details-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

.demo-field-label {
  display: block;
  margin-bottom: 4px;
  color: #ffffff33;
  font-size: 10px;
  line-height: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.demo-details select,
.demo-details input[type=text] {
  width: 100%;
  height: 22px;
  box-sizing: border-box;
  border: 1px solid #555;
  border-radius: 3px;
  background: #2b2b2b;
  color: #ddd;
  font: inherit;
  font-size: 12px;
}

/* The color, a swatch as in the app */
.demo-color {
  height: 19px;
  border: 1px solid #858585;
  border-radius: 2px;
  box-sizing: border-box;
  transition: background-color 0.25s ease;
}

.demo-signal {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  background: #333;
  color: #ccc;
  font-size: 11px;
}

/* The stage: the lights seen from the audience, each casting a beam */
.demo-stage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 32px 10px 0;
  background: radial-gradient(ellipse at 50% 120%, #2a2a2a, #161616 70%);
  border-radius: 3px;
  overflow: hidden;
}

.demo-fixture { position: relative; }

/* While a cue is edited: the cells it drives outlined, and a "Link all" over each light */
.demo-link-pill {
  position: absolute;
  top: -20px;
  left: 50%;
  translate: -50% 0;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ffffff0a;
  color: #ffffff4d;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.demo-stage.assigning .demo-link-pill { opacity: 1; }

.demo-cell { transition: outline-color 0.2s ease; outline: 1px solid transparent; outline-offset: 1px; }

.demo-stage.assigning .demo-cell.linked { outline-color: rgba(255, 255, 255, 0.8); }

.demo-beam {
  height: 70px;
  margin: 0 -10%;
  background: linear-gradient(to bottom, var(--beam, #fff), transparent);
  clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%);
  filter: blur(6px);
  opacity: 0;
  mix-blend-mode: screen;
}

.demo-light {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  padding: 4px;
  border-radius: 3px;
  background: #111;
  box-shadow: inset 0 0 0 1px #2a2a2a;
}

.demo-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #1d1d1d;
}

/* A control's popup: the effects' menu, or the palette standing for the color picker */
.demo-popup {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  padding: 4px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2c2c2c;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: demo-popup 0.15s ease-out both;
}

@keyframes demo-popup {
  from { opacity: 0; translate: 0 -4px; }
  to { opacity: 1; translate: 0 0; }
}

.demo-menu-item {
  position: relative;
  padding: 3px 8px 3px 18px;
  border-radius: 4px;
  color: #ddd;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}

.demo-menu-item.current::before { content: '✓'; position: absolute; left: 9px; font-size: 10px; }
.demo-menu-item.hover { background: var(--accent); color: #fff; }

.demo-palette {
  display: grid;
  grid-template-columns: repeat(6, 18px);
  gap: 5px;
  padding: 6px;
  min-width: 0 !important;
}

.demo-swatch {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px #00000055;
}

.demo-swatch.hover { outline: 2px solid #fff; outline-offset: 1px; }

/* The pointer doing the clicks, and the ring of each click */
.demo-pointer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  opacity: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  transition: transform 0.7s cubic-bezier(0.45, 0, 0.25, 1), opacity 0.3s ease;
}

.demo-click {
  position: absolute;
  top: -14px;
  left: -14px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  animation: demo-click 0.45s ease-out forwards;
}

@keyframes demo-click {
  from { scale: 0.3; opacity: 1; }
  to { scale: 1.2; opacity: 0; }
}

@media (max-width: 600px) {
  .demo-buttons { flex-direction: column; min-height: 0; }
  .demo-details { width: 100%; }
  .demo-details.placeholder { min-height: 60px; }
  .demo-pads { grid-template-columns: repeat(auto-fill, 64px); grid-auto-rows: 64px; }
  .demo-stage { gap: 10px; }
}

/* Recording demo: Strobe's transport, its timeline and a few buttons, in the app's own look
   (App.scss, SmallButton.scss, TrackEditorCanvasDrawer.ts in the app), acting out a recording and its playback.
   Driven by script.js; its sections, pads, stage and pointer are the cues demo's */

.record-demo .demo-app { gap: 20px; padding-top: 0; }

/* The top bar, its transport centered: Record, Play / Pause, Back to Start */
.rec-commands {
  display: flex;
  justify-content: center;
  margin: 0 -14px;
  padding: 9px;
  background: #222;
  box-shadow: 0 0 6px #000;
}

.rec-transport {
  display: flex;
  border-radius: 20px;
  background: #2b2b2b;
}

.rec-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  transition: transform 0.2s;
}

.rec-button svg { height: 24px; fill: #ffffff66; filter: drop-shadow(2px 2px 2px #000); transition: fill 0.15s; }
.rec-button.active svg { fill: rgb(114, 203, 63); }
.rec-record svg { fill: #de3c2a88; }
.rec-record.active svg { fill: #de3c2a; filter: drop-shadow(0 0 5px #de3c2a); }
.rec-button.pressed { transform: scale(0.9); }

.rec-pause-icon, .rec-play.active .rec-play-icon { display: none; }
.rec-play.active .rec-pause-icon { display: block; }

.rec-timeline {
  display: block;
  width: 100%;
  height: 100px;
  border-left: 3px solid #111;
}

/* The buttons and the stage side by side */
.rec-bottom {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
}

.rec-pads { grid-template-columns: repeat(2, 60px); grid-auto-rows: 60px; gap: 10px; }
.rec-pads .demo-pad .midi-key { width: 26px; font-size: 9px; }
.record-demo .demo-stage { padding-top: 24px; gap: 12px; }
.record-demo .demo-beam { height: 56px; }

/* The MIDI keyboard under the window, the cues played on it */
.synth {
  position: relative;
  width: 86%;
  margin: -6px auto 0;
  padding: 10px 14px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #1a1d26, #0d1018);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.synth-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.synth-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #de3c2a;
  opacity: 0.3;
  transition: opacity 0.2s, box-shadow 0.2s;
}

.record-demo-wrap:has(.record-caption.recording) .synth-led { opacity: 1; box-shadow: 0 0 6px #de3c2a; }

.synth-keys {
  --black: 4.2%;
  position: relative;
  display: flex;
  height: 64px;
}

.synth-key {
  position: relative;
  flex: 1;
  margin-right: 2px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, #cfd3dc, #f4f5f8 30%);
  box-shadow: inset 0 -4px 0 #b9bdc8;
  transition: transform 0.06s, box-shadow 0.06s, background 0.06s;
  transform-origin: top;
}

.synth-key:last-child { margin-right: 0; }

.synth-key.black {
  position: absolute;
  top: 0;
  z-index: 1;
  width: var(--black);
  height: 60%;
  margin: 0;
  background: linear-gradient(180deg, #2a2d35, #111317);
  box-shadow: inset 0 -3px 0 #000;
}

/* The keys that play a cue: a dot in its color */
.synth-dot {
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--cue);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.synth-key.black .synth-dot { bottom: 6px; }

.synth-key.down {
  transform: scaleY(0.97);
  background: linear-gradient(180deg, #b9bdc8, #e2e4ea 40%);
  box-shadow: inset 0 -1px 0 #b9bdc8, 0 0 18px var(--cue);
}

.synth-key.black.down { background: linear-gradient(180deg, #1c1e24, #2a2d35); box-shadow: inset 0 -1px 0 #000, 0 0 18px var(--cue); }

.record-caption { display: flex; align-items: center; justify-content: center; gap: 8px; }

.record-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5a6275;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.record-caption.recording .record-light { background: #de3c2a; box-shadow: 0 0 8px #de3c2a; animation: driven-pulse 1s ease-in-out infinite; }
.record-caption.playing .record-light { background: rgb(114, 203, 63); box-shadow: 0 0 8px rgb(114, 203, 63); }

@keyframes driven-pulse { 50% { opacity: 0.35; } }

@media (max-width: 600px) {
  .rec-bottom { grid-template-columns: 1fr; }
  .rec-pads { grid-template-columns: repeat(4, 56px); grid-auto-rows: 56px; justify-content: center; }
  .rec-timeline { height: 80px; }
  .synth { width: 100%; padding: 8px 10px 10px; }
  .synth-keys { height: 48px; }
}

/* MainStage demo: a screen with Strobe in a narrow window (NarrowBar.scss in the app) next to a sketch of MainStage,
   MainStage driving Strobe. Laid out at 980 x 560, scaled to its width by script.js */

.tour-wide { display: grid; gap: 40px; }

.tour-wide .tour-text { max-width: 720px; margin: 0 auto; text-align: center; }
.tour .tour-wide .tour-text h2 { text-align: center; }
.tour-text a { color: var(--accent); text-decoration: none; font-weight: 500; white-space: nowrap; }
.tour-text a:hover { text-decoration: underline; }

.stage-demo { position: relative; overflow: hidden; border-radius: 16px; }

.stage-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 980px;
  height: 560px;
  transform-origin: 0 0;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* Split View: the two windows side by side, each the screen's whole height */
.stage-screen .window { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; border-radius: 0; box-shadow: none; }

.stage-screen .window-bar { position: relative; padding: 8px 10px; }
.stage-screen .window-bar span { width: 10px; height: 10px; }

.stage-screen .window-bar b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9a9a9a;
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
}

/* Strobe, narrow */
.stage-strobe { left: 0; width: 376px; border-radius: 15px 0 0 15px; }

.stage-strobe .demo-app { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 0 10px 12px; }
.stage-strobe .demo-section:last-child { flex: 1; display: flex; flex-direction: column; }
.stage-strobe .demo-section:last-child .demo-stage { flex: 1; }
.stage-strobe .demo-section { padding: 16px 10px 10px; }

.ns-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -10px;
  padding: 8px 10px;
  background: #222;
  box-shadow: 0 0 6px #000;
}

.ns-picker, .ns-status {
  height: 26px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 13px;
  background: #1b1b1b;
}

.ns-picker { flex: 1; min-width: 0; color: #666; transition: background-color 0.3s; }
.ns-picker.changed { background: #3a3a3a; }
.ns-program { font-size: 9px; font-weight: 600; letter-spacing: 0.05em; color: #666; }
.ns-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; font-size: 12px; font-weight: 600; }
.ns-bpm { font-size: 10px; color: #888; white-space: nowrap; }

.ns-transport { transition: box-shadow 0.3s; }
.ns-transport .rec-button { width: 24px; height: 26px; }
.ns-transport .rec-button svg { height: 19px; }
/* Played by MainStage: the transport greyed, in a green glow */
.ns-transport.driven { box-shadow: 0 0 0 1px rgba(114, 203, 63, 0.5), 0 0 8px rgba(114, 203, 63, 0.35); }
.ns-transport.driven .rec-button svg { fill: #00000044; filter: none; }
.ns-transport.driven .ns-play.active svg { fill: rgba(114, 203, 63, 0.5); }

.ns-status { gap: 8px; font-size: 9px; font-weight: 600; letter-spacing: 0.05em; color: #999; }
.ns-status span { display: flex; align-items: center; gap: 4px; }
.ns-status i { width: 6px; height: 6px; border-radius: 50%; background: #8fdf61; box-shadow: 0 0 6px #8fdf6188; }
.ns-dmx i { background: #8fdf61; }
.ns-midi i.flash { animation: ns-flash 0.35s ease-out; }

@keyframes ns-flash { from { background: #fff; box-shadow: 0 0 10px #fff; } }

.ns-timeline { display: block; width: 100%; height: 64px; border-left: 3px solid #111; }

.ns-pads { grid-template-columns: repeat(4, 58px); grid-auto-rows: 58px; gap: 10px; }
.ns-pads .demo-pad .midi-key { width: 24px; font-size: 9px; }
.stage-strobe .demo-stage { padding-top: 20px; gap: 12px; }
.stage-strobe .demo-beam { height: 150px; }

/* The MIDI wire from MainStage to Strobe: barely there, lit where a message runs, its name riding with it */
.stage-wire { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; overflow: visible; pointer-events: none; }

.stage-wire .wire { fill: none; stroke: rgba(143, 223, 97, 0.14); stroke-width: 1.5; stroke-dasharray: 2 5; stroke-linecap: round; }

.stage-wire .pulse { fill: none; stroke: #8fdf61; stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 4px #8fdf61) drop-shadow(0 0 10px #8fdf61); }

.stage-wire .tick { fill: #8fdf61; filter: drop-shadow(0 0 4px #8fdf61); }

.stage-wire .label rect { fill: #0b0d14; stroke: #8fdf61; stroke-width: 1; }
.stage-wire .label text { fill: #8fdf61; font: 600 11px system-ui, -apple-system, Helvetica, Arial, sans-serif; }

/* MainStage, a sketch: its transport and display, the concert's patches, the patch's channel strips */
.stage-mainstage { left: 382px; right: 0; border-radius: 0 15px 15px 0; }

.ms-app { flex: 1; display: flex; flex-direction: column; background: #1c1d20; color: #cfd2d8; font-family: system-ui, -apple-system, Helvetica, Arial, sans-serif; }

.ms-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #34363b, #2a2c30);
  border-bottom: 1px solid #111;
}

.ms-transport { display: flex; gap: 6px; }

.ms-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border-radius: 6px;
  background: #45484f;
  box-shadow: inset 0 1px 0 #ffffff14, 0 1px 2px #0008;
  transition: background-color 0.15s, transform 0.1s;
}

.ms-button svg { width: 16px; height: 16px; fill: #d6d8dd; }
.ms-play.active { background: #3a8f3f; }
.ms-play.active svg { fill: #fff; }
.ms-button.pressed { transform: scale(0.92); }

.ms-lcd {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  background: linear-gradient(180deg, #121820, #1a222c);
  box-shadow: inset 0 1px 3px #000c;
  color: #a8d4ff;
  font-variant-numeric: tabular-nums;
}

.ms-patch-number { font-size: 11px; color: #6f8fb0; }
.ms-patch-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.ms-counter { font: 600 15px ui-monospace, Menlo, monospace; }
.ms-tempo { font-size: 11px; color: #6f8fb0; }

.ms-body { flex: 1; display: grid; grid-template-columns: 170px 1fr; }

.ms-patches { padding: 10px 8px; background: #232428; border-right: 1px solid #111; }

.ms-patches-title {
  margin: 0 6px 8px;
  color: #7c8089;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ms-patch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 12px;
  transition: background-color 0.15s;
}

.ms-patch .n { width: 18px; color: #7c8089; font-size: 10px; text-align: right; }
.ms-patch.selected { background: #2f6fd6; color: #fff; }
.ms-patch.selected .n { color: #cfe0ff; }

.ms-main { padding: 18px; }

.ms-strips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; height: 100%; }

.ms-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  border-radius: 8px;
  background: #26282c;
  box-shadow: inset 0 0 0 1px #34363b;
}

.ms-strip-name { font-size: 11px; font-weight: 600; color: #b9bcc4; white-space: nowrap; }
.ms-strip-out { margin-top: -6px; font-size: 9px; color: #7c8089; white-space: nowrap; }

.ms-strip-meters { flex: 1; display: flex; gap: 4px; min-height: 170px; }

.ms-meter { position: relative; width: 8px; border-radius: 2px; background: #111; overflow: hidden; }

.ms-meter i {
  position: absolute;
  inset: auto 0 0;
  height: 0;
  background: linear-gradient(0deg, #3ad400 0 65%, #e6d200 80%, #ff5a3a);
  background-size: 100% 170px;
  background-position: bottom;
  transition: height 0.08s linear;
}

/* The DMX strip, the one that talks to Strobe */
.ms-strip.dmx { box-shadow: inset 0 0 0 1px rgba(143, 223, 97, 0.5); }
.ms-strip.dmx .ms-strip-name { color: #8fdf61; }
.ms-strip.dmx .ms-strip-out { color: #8fdf61aa; }
.ms-sends { margin: 6px 0 0; padding: 0; list-style: none; display: grid; align-content: center; gap: 12px; text-align: center; color: #8fdf61cc; font-size: 10px; line-height: 1.3; }
.ms-midi-light { width: 10px; height: 10px; border-radius: 50%; background: #2a3a24; }
.ms-midi-light.flash { animation: ns-flash 0.35s ease-out; }

.ms-knob { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #5d6068, #2c2e33); box-shadow: 0 1px 2px #000a; }

/* The pointer, scaled with the screen */
.stage-screen .demo-pointer { z-index: 5; }

/* The 3D stage: the app's Scene section, its canvas drawn by scene3d.js */
.scene-app { position: relative; padding: 22px 14px 14px; background: #222; }

.scene-app .demo-section-title {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 30px;
  padding: 2px 10px;
  border-radius: 5px;
  background: #161616;
  color: #666;
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.scene-canvas {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 2px solid #161616;
  border-radius: 5px;
  background: #222;
}

.scene-canvas img, .scene-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-canvas canvas { opacity: 0; transition: opacity 0.6s ease; }
.scene-canvas.drawn canvas { opacity: 1; }

/* Blocks fading in as they scroll into view, once (script.js); only once the script has hidden them */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.revealed { opacity: 1; transform: none; }

/* Small screens */

@media (max-width: 860px) {
  .nav-links .nav-section { display: none; }
  .hardware { grid-template-columns: 1fr; }
  .hardware h2 { text-align: center; }
  .tour { gap: 104px; }
  .tour-row, .tour-row-reverse { grid-template-columns: 1fr; gap: 24px; }
  .tour-row-reverse .tour-text { order: 0; }
}

@media (max-width: 600px) {
  .nav { padding: 12px 16px; }
  .nav-long { display: none; }
  .hero { padding: 64px 16px 48px; }
  .section { padding: 80px 16px; }
  .features { grid-template-columns: 1fr; }
  .rig { grid-template-columns: 1fr 1fr; padding: 16px; gap: 12px; }
  .guide { padding: 48px 16px 56px; }
  .midi-table { grid-template-columns: 1fr; }
  .midi-table dt { padding-bottom: 0; }
  .midi-table dd { padding-top: 4px; }
  .hardware-note { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo-selection-link .glow, .demo-selection-link .core, .demo-selection-link .end { animation: none; }
  .wordmark { animation: none; color: #c3c8d4; }
  .signal-wire { animation: none; }
  .record-caption.recording .record-light { animation: none; }
}
