/* ── Voltage Foundry Modular — site styles ───────────────────────────────────
   A single dark "foundry" theme: cast-iron surfaces, molten-orange accent.
   Intentionally not theme-switching — the dark look is the brand.
--------------------------------------------------------------------------- */

:root {
  --bg: #0d0f12;
  --bg-2: #14171c;
  --surface: #191d24;
  --surface-2: #202631;
  --line: #2a313d;
  --text: #e7ebf0;
  --muted: #9aa4b2;
  --faint: #6b7480;
  --molten: #ff6a2b;
  --molten-2: #ffb347;
  --ember: #e8452b;
  --steel: #6ea8ff;
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1140px;
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono:
    "SFMono-Regular", ui-monospace, "Cascadia Code", Consolas,
    "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(
      1100px 500px at 78% -8%,
      rgba(255, 106, 43, 0.14),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 8% 4%,
      rgba(110, 168, 255, 0.08),
      transparent 55%
    ),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--molten-2);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 15, 18, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 0 10px rgba(255, 106, 43, 0.35));
}
.brand-name {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.62rem;
  line-height: 1;
}
.brand-sub {
  color: var(--molten);
  margin-left: 6px;
  font-weight: 700;
}
.site-nav {
  display: flex;
  gap: 26px;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}
.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 84px 0 60px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--molten);
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  margin: 0 0 20px;
}
.lead {
  font-size: 1.16rem;
  color: var(--muted);
  max-width: 44ch;
  margin: 0 0 30px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-art {
  position: relative;
}
.hero-art img {
  width: 100%;
  /* border-radius: var(--radius); */
  /* border: 1px solid var(--line); */
  /* box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 106, 43, 0.08); */
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.12s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  color: #1a0e06;
  background: linear-gradient(135deg, var(--molten-2), var(--molten));
  box-shadow: 0 10px 26px rgba(255, 106, 43, 0.28);
}
.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(255, 106, 43, 0.4);
}
.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}
.btn-ghost:hover {
  border-color: var(--molten);
}

/* ── Pillars ────────────────────────────────────────────────────────────── */
.pillars {
  padding: 26px 0 40px;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pillar {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 1.4rem;
  background: rgba(255, 106, 43, 0.12);
  color: var(--molten-2);
  border: 1px solid rgba(255, 106, 43, 0.25);
  margin-bottom: 16px;
}
.pillar h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}
.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ── Section heads ──────────────────────────────────────────────────────── */
.section-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 40px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  margin: 0 0 10px;
}
.section-head p {
  color: var(--muted);
  margin: 0;
}
section > .wrap {
  padding-top: 46px;
  padding-bottom: 46px;
}
.catalog {
  border-top: 1px solid var(--line);
}

/* ── Catalog cards ──────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}
.card {
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.14s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  border-color: rgba(255, 106, 43, 0.5);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}
.card-panel {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(
      400px 200px at 50% 0%,
      rgba(255, 106, 43, 0.1),
      transparent 70%
    ),
    repeating-linear-gradient(45deg, #10131828 0 10px, #0c0e1200 10px 20px),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.card-panel img {
  max-height: 240px;
  width: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
}
.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.card-head h3 {
  margin: 0;
  font-size: 1.2rem;
}
.card-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 999px;
}
.tag-spec {
  color: var(--steel);
  border-color: rgba(110, 168, 255, 0.3);
}
.chip {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}
.chip-series {
  color: var(--molten-2);
  background: rgba(255, 106, 43, 0.12);
  border: 1px solid rgba(255, 106, 43, 0.28);
}
/* Modules with no VCV Rack version (`vcv: false` in data/modules.yml). */
.chip-hw {
  color: var(--steel);
  background: rgba(110, 168, 255, 0.1);
  border: 1px solid rgba(110, 168, 255, 0.3);
}
.card-cta {
  color: var(--molten-2);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ── Get section ────────────────────────────────────────────────────────── */
.get {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.get > .wrap {
  padding-top: 40px;
  padding-bottom: 56px;
}
.get-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 0;
}
.get-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0 0 14px;
}
.get-copy p {
  color: var(--muted);
  margin: 0 0 24px;
}
.get-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.get-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}
.get-card pre {
  background: #0a0c0f;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  margin: 0 0 12px;
}
.get-card code {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: #d6e2f0;
}
.get-note {
  font-size: 0.84rem;
  color: var(--faint);
  margin: 0;
}

/* Sliding VCV ↔ Hardware switcher */
.get-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 34px;
}
.get-tab {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 9px 20px;
  border-radius: 999px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}
.get-tab:hover {
  color: var(--text);
  border-color: var(--molten);
}
.get-tab.is-active {
  color: #1a0e06;
  background: linear-gradient(135deg, var(--molten-2), var(--molten));
  border-color: transparent;
}
.get-viewport {
  overflow: hidden;
}
.get-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.6, 0.02, 0.2, 1);
}
.get-slide {
  flex: 0 0 100%;
  min-width: 0;
}
.get-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}
.get-dot {
  cursor: pointer;
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}
.get-dot:hover {
  border-color: var(--molten);
}
.get-dot.is-active {
  background: var(--molten);
  border-color: var(--molten);
  transform: scale(1.15);
}
@media (prefers-reduced-motion: reduce) {
  .get-track {
    transition: none;
  }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  margin-top: 20px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 20px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-brand .brand-mark {
  width: 44px;
  height: 44px;
}
.footer-brand strong {
  display: block;
}
.footer-brand span {
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}
.footer-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.footer-legal {
  padding: 14px 0 30px;
  border-top: 1px solid var(--line);
}
.footer-legal span {
  color: var(--faint);
  font-size: 0.82rem;
}

/* ── Module page ────────────────────────────────────────────────────────── */
.module {
  padding: 40px 0 20px;
}
.crumbs {
  margin: 0 0 24px;
}
.crumbs a {
  color: var(--muted);
  font-weight: 600;
}
.module-header {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: center;
  padding: 30px;
  margin-bottom: 40px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.module-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background:
    radial-gradient(
      300px 200px at 50% 0%,
      rgba(255, 106, 43, 0.12),
      transparent 70%
    ),
    var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.module-panel img {
  max-height: 300px;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55));
}

/* Hover magnifier — see static/js/panel-zoom.js.
   Hovering the panel opens a large zoom pane floating over the page; a marker
   on the panel itself shows which slice of it the pane is displaying. */
.module-panel[data-zoom] {
  position: relative;
  /* clips the marker's spread shadow to the panel box */
  overflow: hidden;
  cursor: crosshair;
}
.panel-zoom-hint {
  margin: 10px 0 0;
  text-align: center;
  color: var(--faint);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}
.module-panel-wrap:hover .panel-zoom-hint {
  color: var(--muted);
}
.panel-zoom-marker {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  border: 1px solid rgba(255, 106, 43, 0.9);
  border-radius: 3px;
  background: rgba(255, 106, 43, 0.14);
  box-shadow: 0 0 0 9999px rgba(13, 15, 18, 0.45);
}
.panel-zoom-pane {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg);
  background-repeat: no-repeat;
  box-shadow:
    0 0 0 1px rgba(255, 106, 43, 0.3),
    0 24px 60px rgba(0, 0, 0, 0.7);
  image-rendering: -webkit-optimize-contrast;
}
.panel-zoom-marker.is-on,
.panel-zoom-pane.is-on {
  opacity: 1;
}
@media (hover: none), (pointer: coarse) {
  .module-panel[data-zoom] {
    cursor: default;
  }
  .panel-zoom-hint {
    display: none;
  }
}
.module-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.module-title h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin: 0;
}
.module-tagline {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 16px;
}
.module-note {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-left: 3px solid rgba(110, 168, 255, 0.45);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.module-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Rendered manual content */
.module-manual {
  max-width: 820px;
  margin: 0 auto;
}
.module-manual > h1:first-child {
  margin-top: 0;
}
.module-manual h1,
.module-manual h2 {
  margin-top: 2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--line);
}
.module-manual h3 {
  margin-top: 1.6em;
}
.module-manual h1 {
  font-size: 1.9rem;
}
.module-manual h2 {
  font-size: 1.5rem;
}
.module-manual h3 {
  font-size: 1.2rem;
}
.module-manual p,
.module-manual li {
  color: #cfd6df;
}
.module-manual a {
  color: var(--molten-2);
}
.module-manual img {
  display: block;
  margin: 20px auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #0a0c0f;
}
.module-manual code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
}
.module-manual pre {
  background: #0a0c0f;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
}
.module-manual pre code {
  background: none;
  border: none;
  padding: 0;
}
.module-manual blockquote {
  margin: 20px 0;
  padding: 4px 18px;
  color: var(--muted);
  border-left: 3px solid var(--molten);
}
.module-manual hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}
.module-manual table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  display: block;
  overflow-x: auto;
}
.module-manual th,
.module-manual td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
}
.module-manual th {
  background: var(--surface-2);
}
.module-manual ul,
.module-manual ol {
  padding-left: 1.4em;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
    max-width: 340px;
  }
  .pillars-grid {
    grid-template-columns: 1fr;
  }
  .get-inner {
    grid-template-columns: 1fr;
  }
  .module-header {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .module-panel-wrap {
    max-width: 260px;
    margin: 0 auto;
  }
  .module-title,
  .card-tags,
  .module-links {
    justify-content: center;
  }
}
@media (max-width: 520px) {
  .site-nav {
    gap: 16px;
  }
  .site-nav a:nth-child(2) {
    display: none;
  }
  .hero {
    padding: 54px 0 40px;
  }
}

.icon {
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url(https://url.of.svg/....svg);
  mask-image: url(https://url.of.svg/....svg);
  background-color: #f7f4e1; /* Or any color of your choice. */
}
