/* ==========================================================================
   KVA INSTRUMENTS | MAIN STYLESHEET
   Hand-built design system. Dark-first, technical, grid-paper.
   Fonts: Space Grotesk (display + body), IBM Plex Mono (technical).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* color: dark-first, 60/30/10. 60% near-black, 30% surface, 10% amber */
  --bg-0: #0c0d0a;
  --bg-1: #12130e;
  --bg-2: #191a13;
  --bg-3: #212218;
  --ink: #ece7dc;
  --ink-dim: #9b968a;
  --ink-faint: #6d695f;
  --line: rgba(236, 231, 220, 0.10);
  --line-strong: rgba(236, 231, 220, 0.22);
  --accent: #ffb03a;
  --accent-hot: #ff5c33;
  --accent-dim: rgba(255, 176, 58, 0.13);
  --accent-ghost: rgba(255, 176, 58, 0.05);
  --ok: #9be87a;
  --danger: #ff6a5c;

  /* type */
  --font-body: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-hero: clamp(2.9rem, 8.2vw, 6.8rem);
  --fs-display: clamp(2.2rem, 5.4vw, 4.2rem);
  --fs-h2: clamp(1.7rem, 3.4vw, 2.6rem);
  --fs-h3: clamp(1.25rem, 2.2vw, 1.6rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;
  --fs-mono: 0.78rem;

  /* space (4px base) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  /* shape + motion */
  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.6, 0, 0.2, 1);
  --t-fast: 140ms;
  --t-med: 260ms;
  --t-slow: 520ms;

  --header-h: 64px;
  --content-w: 1240px;
  --grid-gap: clamp(16px, 2.4vw, 28px);
}

/* light theme (default is dark; toggle flips this) */
:root[data-theme="light"] {
  --bg-0: #f1eee5;
  --bg-1: #e9e5d9;
  --bg-2: #e1dccb;
  --bg-3: #d8d2bd;
  --ink: #17180f;
  --ink-dim: #5a564a;
  --ink-faint: #8b8677;
  --line: rgba(23, 24, 15, 0.13);
  --line-strong: rgba(23, 24, 15, 0.3);
  --accent: #b36700;
  --accent-hot: #c23a10;
  --accent-dim: rgba(179, 103, 0, 0.12);
  --accent-ghost: rgba(179, 103, 0, 0.05);
}

/* --------------------------------------------------------------------------
   2. RESET + BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-0);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--t-med) var(--ease-snap), color var(--t-med) var(--ease-snap);
}

/* the grid-paper backdrop: faint technical graph lines, fixed */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 0%, transparent 78%);
  opacity: 0.55;
}

img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul[class], ol[class] { list-style: none; }
::selection { background: var(--accent); color: #17130a; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* page transitions (View Transitions API) */
@view-transition { navigation: auto; }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes vt-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-10px); } }
::view-transition-old(root) { animation: vt-out 220ms var(--ease-snap) both; }
::view-transition-new(root) { animation: vt-in 320ms var(--ease-out) 80ms both; }

/* --------------------------------------------------------------------------
   3. UTILITIES + LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.wrap { width: min(var(--content-w), 100% - clamp(32px, 6vw, 72px)); margin-inline: auto; }
.wrap-wide { width: min(1480px, 100% - clamp(24px, 4vw, 56px)); margin-inline: auto; }

.section { padding-block: clamp(72px, 11vw, 148px); position: relative; z-index: 1; }
.section-tight { padding-block: clamp(48px, 7vw, 96px); position: relative; z-index: 1; }

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* eyebrow: numbered technical label "01 / ..." */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.eyebrow .eyebrow-i { color: var(--ink-faint); font-weight: 400; }

.h-display {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
.h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.55; color: var(--ink-dim); max-width: 56ch; }
.body-copy { color: var(--ink-dim); max-width: 62ch; }
.dim { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   4. HEADER + NAV
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background var(--t-med) var(--ease-snap), border-color var(--t-med), backdrop-filter var(--t-med);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg-0) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  width: min(var(--content-w), 100% - clamp(32px, 6vw, 72px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--s5);
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; }
.logo-mark {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #17130a;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: -0.04em;
  transition: transform var(--t-fast) var(--ease-out);
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.logo-text { font-size: 1.05rem; }
.logo-text b { color: var(--accent); }

.nav { display: flex; align-items: center; gap: var(--s5); margin-left: auto; }
.nav a:not(.btn) {
  position: relative;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-dim);
  padding: 6px 2px;
  transition: color var(--t-fast);
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-med) var(--ease-out);
}
.nav a:not(.btn):hover, .nav a[aria-current="page"]:not(.btn) { color: var(--ink); }
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]:not(.btn)::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* theme toggle */
.theme-toggle {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--ink-dim);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

/* mobile menu */
.menu-btn {
  display: none;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  position: relative;
}
.menu-btn span, .menu-btn::before, .menu-btn::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--t-med) var(--ease-out), opacity var(--t-fast);
}
.menu-btn::before { top: 14px; }
.menu-btn span { top: 19px; }
.menu-btn::after { top: 24px; }
body.menu-open .menu-btn::before { transform: translateY(5px) rotate(45deg); }
body.menu-open .menu-btn span { opacity: 0; }
body.menu-open .menu-btn::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: color-mix(in srgb, var(--bg-1) 96%, transparent);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    padding: var(--s4) clamp(20px, 5vw, 40px) var(--s7);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--t-med) var(--ease-out), opacity var(--t-med), visibility 0s linear var(--t-med);
  }
  body.menu-open .nav { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  body.menu-open { overflow: hidden; }
  .nav a { font-size: 1.35rem; font-weight: 600; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .nav-cta { margin-top: var(--s5); }
}

/* --------------------------------------------------------------------------
   5. BUTTONS + BADGES
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast),
              color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  will-change: transform;
}
.btn-primary { background: var(--accent); color: #17130a; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px var(--accent); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-ghost); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 0.72rem; }
.btn[disabled], .btn.is-busy { opacity: 0.55; pointer-events: none; }
.btn.is-busy::after {
  content: "";
  width: 12px; height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* arrow link with sliding arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.link-arrow svg { transition: transform var(--t-med) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(5px); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: led 2.2s ease-in-out infinite; }
@keyframes led { 0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--ok); } 50% { opacity: 0.45; box-shadow: none; } }
.badge.is-accent { color: var(--accent); border-color: var(--accent); }
.badge.is-hot .dot { background: var(--accent-hot); }

/* corner-bracket frame, the signature card treatment */
.frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-1);
  transition: border-color var(--t-med), transform var(--t-med) var(--ease-out), background var(--t-med);
}
.frame::before, .frame::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0;
  transition: opacity var(--t-med), transform var(--t-med) var(--ease-out);
  pointer-events: none;
}
.frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 2px 0 0 0; transform: translate(-4px, -4px); }
.frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 2px 0; transform: translate(4px, 4px); }
.frame:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.frame:hover::before, .frame:hover::after { opacity: 1; transform: translate(0, 0); }

/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--header-h) + clamp(48px, 9vh, 110px)) 0 clamp(48px, 7vh, 90px);
  overflow: hidden;
}
#hero-scope {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.9;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 18% 30%, var(--accent-ghost), transparent 65%),
    radial-gradient(ellipse 50% 60% at 85% 75%, rgba(255, 92, 51, 0.06), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: var(--s7);
  align-items: end;
}
.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .line-2 { display: inline-block; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s6);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}
.hero-meta div { display: flex; flex-direction: column; gap: 2px; }
.hero-meta dt, .hero-meta .k { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.hero-meta .v { font-family: var(--font-mono); font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.hero-aside { display: flex; flex-direction: column; gap: var(--s4); }
.hero-note { font-size: var(--fs-small); color: var(--ink-dim); border-left: 2px solid var(--accent); padding-left: var(--s4); }
.scroll-hint {
  position: absolute;
  right: 0;
  bottom: clamp(48px, 7vh, 90px);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  writing-mode: vertical-rl;
}
.scroll-hint::after { content: ""; width: 1px; height: 56px; background: linear-gradient(var(--accent), transparent); animation: drip 1.8s var(--ease-snap) infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* --------------------------------------------------------------------------
   7. CSS INSTRUMENT PANELS (product "renders" drawn in CSS/SVG)
   -------------------------------------------------------------------------- */
.panel {
  position: relative;
  aspect-ratio: 4 / 2.6;
  border-radius: var(--r-md);
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 30% 0%, var(--bg-3), var(--bg-1) 70%);
  border: 1px solid var(--line);
  isolation: isolate;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(236,231,220,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236,231,220,0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.panel .panel-plate {
  position: absolute;
  inset: 10% 6%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(10px, 2vw, 18px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.panel .panel-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.panel .panel-label { font-family: var(--font-mono); font-size: clamp(0.5rem, 1vw, 0.62rem); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.panel .knob-row { display: flex; gap: clamp(8px, 1.6vw, 14px); }
.knob {
  width: clamp(26px, 4.2vw, 40px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 220deg, var(--bg-3), var(--bg-1) 40%, var(--bg-3) 75%, var(--bg-1));
  border: 1px solid var(--line-strong);
  position: relative;
  flex-shrink: 0;
}
.knob::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.knob::before {
  content: "";
  position: absolute;
  top: 6%; left: 50%;
  width: 2px; height: 34%;
  background: var(--accent);
  transform: translateX(-50%);
  border-radius: 2px;
}
.knob[data-level="2"]::before { height: 46%; top: 4%; }
.knob.is-lit::before { background: var(--accent-hot); }
.panel .fader-row { display: flex; gap: clamp(6px, 1.2vw, 10px); align-items: flex-end; }
.fader { flex: 1; height: clamp(30px, 5vw, 44px); position: relative; }
.fader::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: var(--line-strong); }
.fader::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 8px;
  background: var(--ink);
  border-radius: 2px;
  bottom: var(--f, 40%);
  transition: bottom 0.5s var(--ease-out);
}
.panel .keybed { height: clamp(22px, 3.4vw, 34px); display: flex; gap: 2px; margin-top: 8px; }
.panel .keybed i { flex: 1; background: var(--ink); border-radius: 1px; opacity: 0.92; }
.panel .keybed i.b { background: var(--bg-0); opacity: 1; width: 58%; flex: 0 0 auto; margin-inline: -12%; }
.panel .leds { display: flex; gap: 5px; align-items: center; }
.panel .leds i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.panel .leds i.on { background: var(--accent); box-shadow: 0 0 7px var(--accent); }
.panel .leds i.on.hot { background: var(--accent-hot); box-shadow: 0 0 7px var(--accent-hot); }
.panel .leds i.blink { animation: led 1.1s steps(1) infinite; background: var(--accent); }

/* pulse ring used behind panels on hover */
.panel::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--accent-ghost) 40deg, transparent 80deg);
  opacity: 0;
  transition: opacity var(--t-slow);
  z-index: -1;
}
.panel:hover::after { opacity: 1; animation: sweep 2.4s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }


/* --------------------------------------------------------------------------
   8. SECTION HEADS + STATS
   -------------------------------------------------------------------------- */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s5);
  margin-bottom: clamp(36px, 5vw, 64px);
  flex-wrap: wrap;
}
.sec-head .h2 { max-width: 22ch; }

.statbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}
.stat {
  padding: clamp(28px, 4vw, 48px) clamp(16px, 2vw, 28px);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat:first-child { border-left: 0; }
.stat .num {
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat .num .unit { color: var(--accent); font-size: 0.6em; vertical-align: 0.18em; }
.stat .lbl { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
@media (max-width: 760px) {
  .statbar { grid-template-columns: repeat(2, 1fr); }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(odd) { border-left: 0; }
}

/* --------------------------------------------------------------------------
   9. BENTO GRIDS
   -------------------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--grid-gap);
}
.bento .cell { padding: clamp(20px, 2.6vw, 32px); display: flex; flex-direction: column; gap: var(--s4); min-height: 200px; }
.bento .cell.span-2 { grid-column: span 2; }
.bento .cell.span-3 { grid-column: span 3; }
.bento .cell.span-4 { grid-column: span 4; }
.bento .cell.span-6 { grid-column: span 6; }
.bento .cell.span-row { grid-row: span 2; }
.bento .cell-media { padding: 0; overflow: hidden; position: relative; }
.bento .cell-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.bento .cell-media:hover img { transform: scale(1.05); }
.bento .cell-media .img-cap {
  position: absolute;
  left: 12px; bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg-0) 80%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.bento .cell-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.12em;
}
.bento .cell p { font-size: var(--fs-small); color: var(--ink-dim); }
.bento .cell .h3 { margin-top: auto; }
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .cell.span-2, .bento .cell.span-3, .bento .cell.span-4 { grid-column: span 1; }
  .bento .cell.span-6 { grid-column: span 2; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .bento .cell.span-6 { grid-column: span 1; }
}

/* --------------------------------------------------------------------------
   10. PRODUCT CARDS + FILTERS
   -------------------------------------------------------------------------- */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: clamp(28px, 4vw, 44px);
}
.filter-btn {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.filter-btn:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.filter-btn[aria-pressed="true"] { background: var(--accent); color: #17130a; border-color: var(--accent); }
.filter-btn .n { opacity: 0.55; margin-left: 4px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}
.product-card { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.product-card .panel { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); aspect-ratio: 4/2.7; }
.product-card .pc-body { padding: clamp(16px, 2vw, 22px); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card .pc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.product-card .pc-type { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.product-card .h3 { transition: color var(--t-fast); }
.product-card:hover .h3 { color: var(--accent); }
.product-card .pc-price { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.product-card .pc-desc { font-size: var(--fs-small); color: var(--ink-dim); flex: 1; }
.product-card .pc-foot { display: flex; justify-content: space-between; align-items: center; padding-top: var(--s3); border-top: 1px solid var(--line); }
.product-card .pc-avail { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.product-card .pc-avail .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.product-card .pc-avail.soon .dot { background: var(--accent-hot); animation: led 2s infinite; }
.product-card.is-hidden { display: none; }
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .product-grid { grid-template-columns: 1fr; } }

/* product detail layout */
.pd-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.pd-hero .panel { aspect-ratio: 4/3.2; }
.pd-facts { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0; }
.pd-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-top: var(--s5); }
.pd-price { font-family: var(--font-mono); font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; }
.pd-price small { font-size: 0.55em; color: var(--ink-faint); font-weight: 500; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table th, .spec-table td { text-align: left; padding: 13px 8px; vertical-align: top; }
.spec-table th { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); width: 42%; }
.spec-table td { font-size: var(--fs-small); color: var(--ink); }
/* animated spec bars */
.specbar { display: grid; gap: 14px; }
.specbar .row { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.specbar .row .lbl { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.specbar .row .val { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.specbar .track { grid-column: 1 / -1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; position: relative; }
.specbar .track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v, 50%);
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out);
}
.specbar.is-in .track i { transform: scaleX(1); }
@media (max-width: 880px) { .pd-hero { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   11. TIMELINE, TEAM, FAQ, FORMS
   -------------------------------------------------------------------------- */
.timeline { position: relative; padding-left: clamp(24px, 4vw, 48px); }
.timeline::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); }
.tl-item { position: relative; padding-bottom: clamp(28px, 4vw, 44px); }
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(24px, 4vw, 48px) - 4px);
  top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 2px solid var(--accent);
}
.tl-item .tl-year { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--accent); letter-spacing: 0.1em; }
.tl-item h3 { margin: 6px 0 8px; }
.tl-item p { color: var(--ink-dim); font-size: var(--fs-small); max-width: 58ch; }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); }
.team-card { padding: clamp(18px, 2.4vw, 26px); display: flex; flex-direction: column; gap: 8px; }
.team-card .tc-role { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.team-card .tc-bio { font-size: var(--fs-small); color: var(--ink-dim); }
@media (max-width: 860px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }

/* FAQ accordion */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  padding: 20px 4px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
  transition: color var(--t-fast);
}
.faq-q:hover { color: var(--accent); }
.faq-q .fx {
  flex-shrink: 0;
  width: 26px; height: 26px;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.faq-q .fx::before, .faq-q .fx::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform var(--t-med) var(--ease-out);
}
.faq-q .fx::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[data-open="true"] .fx::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-item[data-open="true"] .fx::before { transform: translate(-50%, -50%) rotate(180deg); }
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--t-slow) var(--ease-out), padding var(--t-slow) var(--ease-out);
  padding-inline: 4px;
}
.faq-a p { color: var(--ink-dim); font-size: var(--fs-small); max-width: 68ch; }
.faq-item[data-open="true"] .faq-a { padding-bottom: 22px; }

/* forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s5); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); }
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  font-size: var(--fs-body);
  color: var(--ink);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.field.is-error input, .field.is-error select, .field.is-error textarea { border-color: var(--danger); }
.field .err { font-size: 0.78rem; color: var(--danger); display: none; }
.field.is-error .err { display: block; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.form-note { font-size: 0.8rem; color: var(--ink-faint); }
.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid var(--ok);
  border-radius: var(--r-sm);
  color: var(--ok);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
}
.form-success.is-visible { display: flex; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   12. SEQUENCER DEMO (KORE-4)
   -------------------------------------------------------------------------- */
.seq {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-1);
  padding: clamp(16px, 2.4vw, 28px);
  display: grid;
  gap: var(--s4);
}
.seq-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.seq-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); }
.seq-transport { display: flex; align-items: center; gap: var(--s3); }
.seq-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.seq-cell {
  aspect-ratio: 1.6;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  cursor: pointer;
  position: relative;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.seq-cell:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.seq-cell.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px -2px var(--accent); }
.seq-cell.playing { outline: 2px solid var(--ink); outline-offset: 2px; }
.seq-bpm { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--ink-dim); }
.seq-bpm input { width: 90px; accent-color: var(--accent); }
.seq-hint { font-size: 0.78rem; color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   13. MARQUEE + QUOTE + CTA
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  position: relative;
  z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}
.marquee-track span i { font-style: normal; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

.quote { max-width: 880px; margin-inline: auto; text-align: center; }
.quote blockquote { font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; }
.quote blockquote::before { content: "\201C"; color: var(--accent); }
.quote blockquote::after { content: "\201D"; color: var(--accent); }
.quote figcaption { margin-top: var(--s5); font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }

.cta-band {
  position: relative;
  z-index: 1;
  border-block: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 50% 120%, var(--accent-dim), transparent 70%),
    var(--bg-1);
  padding-block: clamp(64px, 9vw, 120px);
  text-align: center;
}
.cta-band h2 { font-size: var(--fs-display); }

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--bg-0);
  padding: clamp(48px, 7vw, 88px) 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: var(--s7); margin-bottom: var(--s8); }
.footer-brand p { color: var(--ink-dim); font-size: var(--fs-small); max-width: 34ch; margin-top: var(--s3); }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--s4); }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: var(--ink-dim); font-size: var(--fs-small); transition: color var(--t-fast); position: relative; }
.footer-col a:hover { color: var(--accent); }
.footer-col address { font-style: normal; color: var(--ink-dim); font-size: var(--fs-small); line-height: 1.7; }
.newsletter { display: flex; gap: 8px; margin-top: var(--s3); }
.newsletter input {
  flex: 1;
  min-width: 0;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: var(--fs-small);
  color: var(--ink);
}
.newsletter input:focus { outline: none; border-color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.footer-bottom .fb-links { display: flex; gap: var(--s4); }
.footer-bottom a:hover { color: var(--accent); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s6); } }

/* --------------------------------------------------------------------------
   15. LIGHTBOX
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(6, 7, 4, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med), visibility 0s linear var(--t-med);
  cursor: zoom-out;
  padding: clamp(16px, 4vw, 48px);
}
.lightbox.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.lightbox img { max-width: min(1100px, 100%); max-height: 88vh; border-radius: var(--r-md); border: 1px solid var(--line-strong); }
.lightbox figcaption {
  position: absolute;
  bottom: 20px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* --------------------------------------------------------------------------
   16. MOTION: reveals + scroll-driven animation
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    transition-delay: var(--d, 0ms);
  }
  [data-reveal].is-in { opacity: 1; transform: none; }
  [data-reveal="fade"] { transform: none; }
  [data-reveal="left"] { transform: translateX(-30px); }
  [data-reveal="right"] { transform: translateX(30px); }
  [data-reveal="scale"] { transform: scale(0.94); }

  /* native CSS scroll-driven where supported: hero content drift + big number rise */
  @supports (animation-timeline: view()) {
    .drift { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
    @keyframes drift { from { transform: translateY(46px); opacity: 0.25; } to { transform: translateY(0); opacity: 1; } }
    .zoom-img img { animation: zoom-in linear both; animation-timeline: view(); animation-range: entry 0% cover 55%; }
    @keyframes zoom-in { from { transform: scale(1.14); } to { transform: scale(1); } }
  }

  .hero h1 .line-2 { animation: rise-in 0.9s var(--ease-out) 0.15s both; }
  @keyframes rise-in { from { transform: translateY(0.9em); opacity: 0; } to { transform: none; opacity: 1; } }
  .hero .hero-meta, .hero .hero-actions, .hero .hero-aside { animation: fade-up 0.8s var(--ease-out) both; }
  .hero .hero-meta { animation-delay: 0.4s; }
  .hero .hero-actions { animation-delay: 0.5s; }
  .hero .hero-aside { animation-delay: 0.65s; }
  @keyframes fade-up { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

  .knob { transition: transform 0.2s var(--ease-out); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   17. PROGRESS BAR + PRINT + MISC
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  z-index: 110;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
}
@media print {
  .site-header, .site-footer, .marquee, .scroll-progress, .lightbox { display: none; }
  body { background: #fff; color: #000; }
}
.mt-1 { margin-top: var(--s3); } .mt-2 { margin-top: var(--s5); } .mt-3 { margin-top: var(--s7); }
.center { text-align: center; }
