/* K Instruments — site styles. Palette mirrors SoundDeck's UI. */
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b0e14;
  --bg-2: #11151d;
  --panel: #161b24;
  --line: #242b37;
  --text: #e8ecf3;
  --muted: #9aa4b5;
  --dim: #6b7587;
  --blue: #4d8dff;
  --green: #2ecc71;
  --amber: #f5a524;
  --red: #e5484d;
  --purple: #a77bff;
  --cyan: #2fc7d6;
  --radius: 14px;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 20, .82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -.01em; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: .95rem; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--panel); text-decoration: none; }
@media (max-width: 640px) {
  .site-header .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .nav a { padding: 6px 10px; font-size: .9rem; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 1rem;
  border: 1px solid var(--line); color: var(--text); background: var(--panel);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { text-decoration: none; border-color: #36404f; transform: translateY(-1px); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: #6aa0ff; border-color: #6aa0ff; }
.btn-go { background: var(--green); border-color: var(--green); color: #07140c; }
.btn-go:hover { background: #45d985; border-color: #45d985; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge-green { color: var(--green); border-color: rgba(46, 204, 113, .4); background: rgba(46, 204, 113, .08); }
.badge-amber { color: var(--amber); border-color: rgba(245, 165, 36, .4); background: rgba(245, 165, 36, .08); }
.badge-blue { color: var(--blue); border-color: rgba(77, 141, 255, .4); background: rgba(77, 141, 255, .08); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Hero */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 900px; height: 900px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(77, 141, 255, .16), transparent 70%);
}
.hero .wrap { position: relative; }
.hero-mark { width: 88px; height: 88px; margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--blue); margin-bottom: 14px; }

/* Waveform strip (decorative) */
.wave { display: flex; align-items: center; gap: 5px; height: 42px; margin: 34px 0 0; }
.wave span { width: 5px; border-radius: 2px; background: linear-gradient(var(--blue), var(--purple)); opacity: .75; }
@media (prefers-reduced-motion: no-preference) {
  .wave span { animation: bar 1.6s ease-in-out infinite; transform-origin: center; }
  .wave span:nth-child(3n) { animation-delay: -.4s; }
  .wave span:nth-child(3n+1) { animation-delay: -.9s; }
  .wave span:nth-child(4n) { animation-delay: -1.2s; }
  @keyframes bar { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
}

/* Sections */
section { padding: 72px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 36px; max-width: 46em; }

/* Product grid */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
a.card:hover { text-decoration: none; border-color: #3a4556; transform: translateY(-2px); }
.card .thumb { margin: -24px -24px 20px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: #0e1219; border-bottom: 1px solid var(--line); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.card p { color: var(--muted); font-size: .97rem; }
.card .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.card .more { margin-top: auto; color: var(--blue); font-weight: 600; font-size: .95rem; }
.thumb-placeholder { display: grid; place-items: center; height: 100%; background: radial-gradient(circle at 30% 30%, rgba(167, 123, 255, .22), transparent 60%), radial-gradient(circle at 75% 70%, rgba(77, 141, 255, .2), transparent 55%), #0e1219; }
.thumb-placeholder .wave { margin: 0; }

/* Product page */
.product-hero { padding: 72px 0 40px; }
.product-hero .head { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.product-hero .head img { width: 72px; height: 72px; border-radius: 16px; }
.product-hero .head h1 { margin: 0; }
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #0e1219; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02); }
.shot-hero { margin-top: 44px; }
.media { position: relative; aspect-ratio: 16 / 9; }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
figure { margin: 0; }
figcaption { color: var(--dim); font-size: .88rem; margin-top: 10px; }

.feature { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; padding: 48px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature.flip > :first-child { order: 2; }
.feature ul { padding-left: 1.1em; color: var(--muted); margin: 0; }
.feature li { margin: .35em 0; }
.feature li strong { color: var(--text); font-weight: 600; }
.feature .tag { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature.flip > :first-child { order: 0; }
}

.specs { width: 100%; border-collapse: collapse; font-size: .97rem; }
.specs th, .specs td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { color: var(--muted); font-weight: 600; width: 34%; padding-right: 16px; }

.cta { background: linear-gradient(135deg, rgba(77, 141, 255, .12), rgba(167, 123, 255, .08)); border: 1px solid var(--line); border-radius: 20px; padding: 40px; }
.cta h2 { margin-bottom: .3em; }

/* Changelog */
.changelog { list-style: none; padding: 0; margin: 0; }
.changelog li { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.changelog li:first-child { border-top: 0; }
.changelog .ver { font-weight: 700; }
.changelog .ver small { display: block; color: var(--dim); font-weight: 400; font-size: .85rem; }
.changelog p { color: var(--muted); margin: 0; }
@media (max-width: 600px) { .changelog li { grid-template-columns: 1fr; gap: 6px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { font-size: .88rem; padding: 6px 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; color: var(--muted); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: .9rem; }
.steps strong { color: var(--text); }

code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; background: var(--panel); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--dim); font-size: .92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
