/*
 * Melodixs website - "console" template
 *
 * A browser with a toolbox, drawn as a mixing console at night: tools are
 * channel strips, sections sit on a timeline grid, labels are engraved caps.
 *
 * Brand colours: the five hex values in :root below are the ONLY colour
 * inputs. setup_converters.ps1 swaps them for the brand's palette; every
 * other colour is mixed from them.
 *
 * Fonts are Windows system faces on purpose (the product is Windows-only and
 * the site makes no third-party requests): Bahnschrift for display, Segoe UI
 * for text, Cascadia / Consolas for labels.
 */

:root {
  --ink: #1b1440;
  --primary: #7c4dff;
  --accent: #ff5fa2;
  --warm: #ffb84d;
  --paper: #f3f0ff;

  --ink-2: color-mix(in srgb, var(--ink) 86%, white);
  --ink-3: color-mix(in srgb, var(--ink) 74%, white);
  --line: color-mix(in srgb, var(--paper) 13%, transparent);
  --line-strong: color-mix(in srgb, var(--paper) 26%, transparent);
  --text: color-mix(in srgb, var(--paper) 92%, var(--primary));
  --text-dim: color-mix(in srgb, var(--paper) 62%, var(--ink));
  --signal: linear-gradient(90deg, var(--primary), var(--accent) 58%, var(--warm));
  --signal-up: linear-gradient(0deg, var(--primary), var(--accent) 62%, var(--warm));

  --display: Bahnschrift, "DIN Alternate", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;

  --wrap: 1520px;
  --gutter: clamp(18px, 4.5vw, 72px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  overflow-x: hidden;
}
/* Timeline grid behind everything, fading out down the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 78% -8%, color-mix(in srgb, var(--primary) 34%, transparent), transparent 70%),
    radial-gradient(700px 420px at 4% 18%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 88px);
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%);
  pointer-events: none;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; font-stretch: 82%; line-height: 1.02; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--ink); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* Engraved label, used everywhere a console would have silk-screened text. */
.label {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.label b { color: var(--warm); font-weight: 500; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { height: 26px; width: auto; }
.brand span { font: 600 23px/1 var(--display); font-stretch: 88%; letter-spacing: 0.01em; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 14px;
  border-radius: var(--radius);
  transition: color .2s, background .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--line); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: var(--radius); width: 44px; height: 40px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; margin: 4px auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 13px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 17px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s;
}
.btn:hover { border-color: var(--text); transform: translateY(-2px); }
.btn-solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-solid:hover { background: #fff; }
.btn i { width: 18px; height: 2px; background: currentColor; position: relative; }
.btn i::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 2px solid; border-right: 2px solid; transform: rotate(45deg); }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.hero h1 {
  font-size: clamp(54px, 8.2vw, 148px);
  font-stretch: 76%;
  font-weight: 700;
  line-height: 0.9;
  text-transform: uppercase;
  margin: 26px 0 28px;
}
.hero h1 em { font-style: normal; background: var(--signal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: clamp(18px, 1.7vw, 21px); color: var(--text-dim); max-width: 31em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 34px; }
.chips li { display: inline-flex; align-items: center; gap: 9px; }
.chips li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 12px var(--warm); }

.hero-copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- the rack: one channel strip per tool ---------- */
.rack {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--ink-2), color-mix(in srgb, var(--ink) 92%, black));
  box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--primary) 70%, transparent), inset 0 1px 0 var(--line-strong);
  padding: 18px;
  animation: rise .8s .2s cubic-bezier(.2,.7,.2,1) both;
}
.readout {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: baseline;
  background: color-mix(in srgb, var(--ink) 70%, black);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 18px;
  min-height: 92px;
}
.readout .label { grid-column: 1 / -1; }
.readout-no { font: 600 34px/1 var(--display); font-stretch: 76%; color: var(--warm); }
.readout-name { font: 600 30px/1 var(--display); font-stretch: 82%; text-transform: uppercase; }
.readout-text { grid-column: 1 / -1; color: var(--text-dim); font-size: 15px; min-height: 1.6em; }
.strips { display: grid; grid-template-columns: repeat(var(--n, 11), minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.strip {
  appearance: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
  display: grid; grid-template-rows: clamp(190px, 15vw, 260px) auto; gap: 10px;
  background: none;
}
.meter {
  position: relative; align-self: stretch;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 7%, transparent);
  overflow: hidden;
}
.meter::after {
  content: ""; position: absolute; inset: auto 0 0 0;
  height: var(--level, 50%);
  border-radius: 999px;
  background: var(--signal-up);
  background-size: 100% clamp(190px, 15vw, 260px); background-position: bottom;
  opacity: .5;
  transition: height .5s cubic-bezier(.2,.8,.2,1), opacity .3s;
  animation: breathe 3.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.31s);
}
.strip:hover .meter::after, .strip[aria-pressed="true"] .meter::after { opacity: 1; height: 100%; animation: none; }
@keyframes breathe { 50% { transform: translateY(9%); } }
.strip-name {
  writing-mode: vertical-rl; transform: rotate(180deg);
  justify-self: center;
  font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim);
  height: 118px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
}
.strip:hover .strip-name, .strip[aria-pressed="true"] .strip-name { color: var(--text); }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 128px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { font-size: clamp(38px, 5.4vw, 76px); text-transform: uppercase; font-stretch: 78%; margin-top: 18px; }
.section-head p { color: var(--text-dim); font-size: 18px; max-width: 30em; }

/* tracklist */
.tracks { border-top: 1px solid var(--line-strong); }
.track {
  display: grid; grid-template-columns: 64px minmax(0, 0.8fr) minmax(0, 1.4fr) auto; gap: 20px; align-items: center;
  padding: 22px 8px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding .25s, background .25s;
}
.track::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--signal-up); transition: width .25s; }
.track:hover { background: color-mix(in srgb, var(--paper) 4%, transparent); padding-left: 22px; }
.track:hover::before { width: 4px; }
.track-no { font: 500 13px/1 var(--mono); color: var(--warm); letter-spacing: .1em; }
.track h3 { font-size: clamp(22px, 2.4vw, 32px); text-transform: uppercase; font-stretch: 84%; }
.track p { color: var(--text-dim); font-size: 16px; }
.track .label { border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 12px; white-space: nowrap; }

/* signal chain (how it works) */
.chain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.chain li { position: relative; padding: 34px 32px 8px 0; border-top: 2px solid var(--line-strong); counter-increment: step; }
.chain li::before {
  content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--warm);
}
.chain li:first-child { border-image: var(--signal) 1; }
.chain h3 { font-size: 30px; text-transform: uppercase; margin: 14px 0 12px; }
.chain p { color: var(--text-dim); }
.chain .label::before { content: "Step " counter(step, decimal-leading-zero) " / "; color: var(--warm); }

/* commitments */
.pledges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pledge { background: var(--ink); padding: clamp(24px, 3vw, 40px); display: grid; gap: 14px; align-content: start; }
.pledge h3 { font-size: 28px; text-transform: uppercase; }
.pledge p { color: var(--text-dim); }
.vu { display: flex; gap: 4px; align-items: flex-end; height: 28px; }
.vu i { width: 6px; border-radius: 3px; background: var(--signal-up); }
.vu i:nth-child(1) { height: 40%; } .vu i:nth-child(2) { height: 75%; } .vu i:nth-child(3) { height: 100%; } .vu i:nth-child(4) { height: 60%; } .vu i:nth-child(5) { height: 30%; }

/* closing band */
.outro { position: relative; overflow: hidden; text-align: left; }
.outro h2 { font-size: clamp(44px, 7.4vw, 108px); text-transform: uppercase; font-stretch: 76%; max-width: 12em; }
.outro .hero-actions { margin-top: 40px; }
.outro-bars { position: absolute; right: -2%; bottom: 0; display: flex; gap: 12px; align-items: flex-end; height: 78%; opacity: .2; pointer-events: none; }
.outro-bars i { width: clamp(14px, 2.4vw, 34px); border-radius: 999px 999px 0 0; background: var(--signal-up); }

/* ---------- inner pages ---------- */
.page-hero { padding: clamp(48px, 7vw, 92px) 0 clamp(32px, 4vw, 56px); }
.page-hero h1, .page-title { font-size: clamp(44px, 7vw, 96px); text-transform: uppercase; font-stretch: 76%; margin-top: 18px; }
.page-hero p, .page-subtitle { color: var(--text-dim); font-size: 19px; margin-top: 20px; max-width: 34em; }
.prose { max-width: 46em; display: grid; gap: 18px; color: var(--text-dim); font-size: 18px; }
.prose strong { color: var(--text); font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.card { border: 1px solid var(--line-strong); border-radius: 10px; padding: 28px; background: var(--ink-2); }
.card h3 { font-size: 24px; text-transform: uppercase; margin-bottom: 18px; }
.facts { display: grid; gap: 14px; }
.facts div { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.facts div:last-child { border: 0; padding: 0; }
.facts dd { margin: 0; }
.facts a { color: var(--warm); }

/* FAQ */
.faq-group { margin-bottom: 56px; }
.faq-group > .label { display: block; margin-bottom: 18px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line-strong); }
.faq summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  padding: 22px 4px;
  font: 600 clamp(20px, 2.2vw, 27px)/1.15 var(--display); font-stretch: 86%; text-transform: uppercase;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 28px/1 var(--mono); color: var(--warm); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 4px 26px; color: var(--text-dim); max-width: 44em; display: grid; gap: 12px; }
.faq .answer ol, .faq .answer ul { display: grid; gap: 6px; padding-left: 22px; }
.faq .answer ol { list-style: decimal; } .faq .answer ul { list-style: disc; }
.faq .answer strong { color: var(--text); }

/* contact form */
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 9px; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text);
  background: color-mix(in srgb, var(--ink) 70%, black);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 14px 16px; width: 100%;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--warm); }
.form-note { font-size: 14px; color: var(--text-dim); }

/* uninstall steps */
.steps { display: grid; gap: 28px; counter-reset: step; }
.step { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 56px); align-items: center; padding-top: 28px; border-top: 1px solid var(--line); counter-increment: step; }
.step .label::before { content: "Step " counter(step, decimal-leading-zero) " / "; color: var(--warm); }
.step h3 { font-size: 30px; text-transform: uppercase; margin: 14px 0 12px; }
.step p { color: var(--text-dim); }
.step strong { color: var(--text); }
.step img { border-radius: 8px; border: 1px solid var(--line-strong); width: 100%; height: auto; background: var(--paper); }

/* legal pages (markup shared with the default template) */
.legal-content .container { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(28px, 5vw, 72px); align-items: start; padding-bottom: 96px; }
.page-hero .container { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.legal-text { display: grid; gap: 40px; color: var(--text-dim); max-width: 46em; }
.legal-section { display: grid; gap: 14px; scroll-margin-top: 96px; }
.legal-section h2 { font-size: 30px; text-transform: uppercase; color: var(--text); padding-top: 22px; border-top: 1px solid var(--line-strong); }
.legal-section h3 { font-size: 21px; color: var(--text); font-stretch: 90%; margin-top: 8px; }
.legal-section h4 { font: 600 16px/1.3 var(--body); color: var(--text); }
.legal-section ul { list-style: disc; padding-left: 22px; display: grid; gap: 7px; }
.legal-section a, .contact-block a { color: var(--warm); }
.legal-section strong { color: var(--text); }
.contact-block { border: 1px solid var(--line-strong); border-radius: 8px; padding: 20px; background: var(--ink-2); }
.legal-sidebar { order: 2; position: sticky; top: 96px; }
.legal-nav, .sticky-nav { display: grid; gap: 2px; }
.legal-sidebar h4 { font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; }
.legal-sidebar a { display: block; text-decoration: none; color: var(--text-dim); font-size: 14px; padding: 7px 10px; border-left: 2px solid var(--line); }
.legal-sidebar a:hover { color: var(--text); border-color: var(--warm); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line-strong); padding: 64px 0 36px; background: color-mix(in srgb, var(--ink) 80%, black); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.foot .brand { margin-bottom: 16px; }
.foot p { color: var(--text-dim); font-size: 15px; max-width: 24em; }
.foot h4 { font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; }
.foot li { margin-bottom: 9px; }
.foot li a { text-decoration: none; font-size: 15px; }
.foot li a:hover { color: var(--warm); }
.foot-base { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--line); }

/* reveal on scroll (only when JS has marked the page ready) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .section-head, .split, .step { grid-template-columns: minmax(0, 1fr); }
  .legal-content .container { grid-template-columns: minmax(0, 1fr); }
  .legal-sidebar { display: none; }
  .chain { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .track { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .track p { grid-column: 2 / -1; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; background: var(--ink); border-bottom: 1px solid var(--line-strong); padding: 10px var(--gutter) 18px; }
  .nav.open { display: flex; }
  .nav a { padding: 16px 6px; }
  .nav-toggle { display: block; }
  .strip { grid-template-rows: 130px; }
  .strip-name { display: none; }
  .strips { gap: 5px; }
  .pledges { grid-template-columns: minmax(0, 1fr); }
  .track .label { display: none; }
  .track { grid-template-columns: 40px minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .outro-bars { opacity: .12; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
