/* Gesture Synth Weld — main stylesheet
   Dark "hardware instrument" aesthetic: warm near-black, paper text, amber + mint accents. */

:root {
  --ink: #131210;
  --ink-2: #1b1a16;
  --panel: #201e19;
  --panel-2: #27241d;
  --line: #38342a;
  --line-soft: #2b2820;
  --paper: #f2e9d4;
  --paper-dim: #c9c0aa;
  --muted: #948e7d;
  --amber: #f2b13d;
  --amber-soft: #ffd479;
  --mint: #6fe8cd;
  --coral: #ff6a4d;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* subtle grid + grain texture, CSS only */
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(242, 177, 61, 0.07), transparent 60%),
    repeating-linear-gradient(0deg, rgba(242, 233, 212, 0.016) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(90deg, rgba(242, 233, 212, 0.016) 0 1px, transparent 1px 56px);
}

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-soft); text-decoration: underline; }

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

.mono { font-family: var(--font-mono); }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(19, 18, 16, 0.88);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper);
}
.brand:hover { color: var(--amber); text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid var(--amber);
  border-radius: 6px; display: inline-flex; align-items: flex-end; justify-content: center;
  gap: 2px; padding: 4px;
}
.brand-mark i { display: block; width: 3px; background: var(--amber); border-radius: 1px; }
.brand-mark i:nth-child(1) { height: 6px; }
.brand-mark i:nth-child(2) { height: 12px; background: var(--mint); }
.brand-mark i:nth-child(3) { height: 8px; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); padding: 7px 12px; border-radius: 6px;
}
.main-nav a:hover { color: var(--paper); background: var(--panel); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--amber); }

/* ---------- breadcrumb ---------- */
.breadcrumb {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); padding: 18px 0 0;
}
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb [aria-current] { color: var(--paper-dim); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: start; }
.kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--mint); display: block; margin-bottom: 14px;
}
h1 {
  font-size: clamp(40px, 5.4vw, 64px); line-height: 1.04; font-weight: 800;
  letter-spacing: -0.02em; margin: 0 0 20px;
}
h1 .accent { color: var(--amber); }
.lede { font-size: 19px; color: var(--paper-dim); max-width: 34em; margin: 0 0 26px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.btn {
  display: inline-block; font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 14px 24px;
  border-radius: 8px; border: 1px solid var(--amber); cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: #1a150a; }
.btn-primary:hover { background: var(--amber-soft); color: #1a150a; }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.spec-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid var(--line-soft); margin: 0; padding: 0;
}
.spec-list > div { padding: 14px 14px 4px 0; }
.spec-list dt {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.spec-list dd { margin: 0; font-size: 15px; color: var(--paper); }

/* ---------- instrument panel ---------- */
.instrument {
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.instrument-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
}
.instrument-head .unit { color: var(--mint); }
.instrument-body { padding: 16px; }

.play-field {
  position: relative; height: 240px; border: 1px solid var(--line); border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, rgba(242, 233, 212, 0.05) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(242, 233, 212, 0.05) 0 1px, transparent 1px 24px),
    var(--ink);
  touch-action: none; cursor: crosshair; overflow: hidden; user-select: none;
}
.play-field .field-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; font-family: var(--font-mono); font-size: 12px; line-height: 1.8;
  letter-spacing: 0.08em; color: var(--muted); padding: 0 24px; pointer-events: none;
}
.field-cursor {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--amber); background: rgba(242, 177, 61, 0.25);
  transform: translate(-50%, -50%); pointer-events: none; display: none;
  box-shadow: 0 0 18px rgba(242, 177, 61, 0.55);
}
.field-cursor.cursor-b { border-color: var(--mint); background: rgba(111, 232, 205, 0.22); box-shadow: 0 0 18px rgba(111, 232, 205, 0.5); }
.field-cursor.on { background: var(--amber); }
.field-cursor.cursor-b.on { background: var(--mint); }

/* guided-mode target marker: a glowing vertical zone on the pitch field */
.target-marker {
  position: absolute; top: 0; bottom: 0; width: 8%; left: 0; display: none;
  pointer-events: none; border-radius: 4px;
  background: linear-gradient(180deg, rgba(242, 177, 61, 0.22), rgba(242, 177, 61, 0.08));
  border-left: 2px solid var(--amber); border-right: 2px solid var(--amber);
  box-shadow: 0 0 24px rgba(242, 177, 61, 0.35) inset;
  animation: target-pulse 1.6s ease-in-out infinite;
}
.target-marker.active { display: block; }
.target-marker.hit {
  animation: none;
  background: linear-gradient(180deg, rgba(111, 232, 205, 0.4), rgba(111, 232, 205, 0.15));
  border-color: var(--mint);
  box-shadow: 0 0 30px rgba(111, 232, 205, 0.5) inset;
}
@keyframes target-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.45; }
}

/* guided-mode bar under the play field */
.guided-bar {
  display: none; margin-top: 12px; padding: 12px; border: 1px solid var(--amber);
  border-radius: 10px; background: rgba(242, 177, 61, 0.06);
}
.guided-bar.active { display: block; }
.guided-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.guided-row:last-child { margin-bottom: 0; }
.guided-status-row { justify-content: space-between; }
.guided-target { font-family: var(--font-mono); font-size: 15px; color: var(--paper-dim); }
.guided-target b { color: var(--amber); font-size: 19px; text-shadow: 0 0 14px rgba(242, 177, 61, 0.5); }
.guided-progress { font-size: 12.5px; color: var(--muted); letter-spacing: 0.1em; }
.guided-track {
  height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin: 8px 0;
}
.guided-bar-fill {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--amber), var(--mint));
  transition: width 0.25s ease;
}
.guided-actions .chip { font-size: 11px; }

.cam-wrap { position: relative; display: none; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #000; }
.cam-wrap.active { display: block; }
.cam-wrap video { display: block; width: 100%; height: auto; transform: scaleX(-1); }
.cam-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cam-tag {
  position: absolute; top: 8px; left: 8px; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--mint);
  background: rgba(0, 0, 0, 0.55); padding: 3px 8px; border-radius: 4px;
}

.note-display {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 14px 0 10px; min-height: 46px;
}
.note-display .notes {
  font-family: var(--font-mono); font-size: 34px; font-weight: 600; color: var(--amber);
  text-shadow: 0 0 22px rgba(242, 177, 61, 0.45); letter-spacing: 0.04em;
}
.note-display .notes .voice-b { color: var(--mint); text-shadow: 0 0 22px rgba(111, 232, 205, 0.4); }
.note-display .notes .idle { color: var(--muted); text-shadow: none; font-size: 18px; }
.filter-readout { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.filter-readout b { color: var(--paper); font-weight: 600; }

.meter-row { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.level-meter {
  display: flex; align-items: flex-end; gap: 3px; height: 34px; flex: 1;
}
.level-meter .bar {
  flex: 1; background: var(--panel-2); border-radius: 2px; height: 8%;
  transition: height 0.06s linear, background 0.06s linear;
}
.level-meter .bar.lit { background: var(--amber); }
.level-meter .bar.lit.hot { background: var(--coral); }
.vol-ctl { display: flex; align-items: center; gap: 10px; flex: 1; }
.vol-ctl label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.ctl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.ctl-block label, .ctl-block .ctl-label {
  display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--font-mono); font-size: 11.5px; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: transparent; color: var(--paper-dim);
  cursor: pointer; letter-spacing: 0.04em;
}
.chip:hover { border-color: var(--amber); color: var(--amber); }
.chip[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #1a150a; font-weight: 600; }
select.ctl-select {
  width: 100%; font-family: var(--font-mono); font-size: 12.5px; padding: 8px 10px;
  border-radius: 6px; border: 1px solid var(--line); background: var(--ink-2); color: var(--paper);
}
input[type="range"] { accent-color: var(--amber); width: 100%; }

.transport { display: flex; flex-wrap: wrap; gap: 8px; }
.transport .btn { padding: 11px 16px; font-size: 12px; flex: 1 1 auto; text-align: center; }
.transport .btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.status-line {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
  letter-spacing: 0.06em; margin-top: 10px; min-height: 18px;
}
.status-line.error { color: var(--coral); }
.status-line.ok { color: var(--mint); }

.rec-result { margin-top: 12px; display: none; }
.rec-result.active { display: block; }
.rec-result video { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #000; }
.rec-result a { font-family: var(--font-mono); font-size: 12px; display: inline-block; margin-top: 6px; }

/* gesture guide overlay */
.guide-overlay {
  position: absolute; inset: 0; z-index: 5; display: none;
  background: rgba(19, 18, 16, 0.92); border-radius: 10px; padding: 18px; overflow: auto;
}
.guide-overlay.active { display: block; }
.guide-overlay .guide-title { margin: 0 0 10px; font-size: 15px; color: var(--amber); font-family: var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.guide-overlay table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; }
.guide-overlay td { padding: 5px 6px; border-bottom: 1px solid var(--line-soft); color: var(--paper-dim); }
.guide-overlay td:first-child { color: var(--amber); white-space: nowrap; }
.guide-close {
  position: absolute; top: 10px; right: 10px; background: none; border: 1px solid var(--line);
  color: var(--paper); border-radius: 6px; font-family: var(--font-mono); font-size: 11px;
  padding: 5px 9px; cursor: pointer;
}

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  overflow: hidden; padding: 13px 0; background: var(--ink-2);
}
.marquee-track {
  display: flex; gap: 44px; width: max-content; white-space: nowrap;
  animation: marquee 28s linear infinite;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
}
.marquee-track b { color: var(--amber); font-weight: 600; }
.marquee-track .sep { color: var(--mint); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 72px 0; border-bottom: 1px solid var(--line-soft); }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 36px; }
.section-num {
  font-family: var(--font-mono); font-size: 13px; color: var(--coral); letter-spacing: 0.1em;
}
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; font-weight: 800; letter-spacing: -0.015em; margin: 0; }
h2 .accent { color: var(--amber); }
.section-sub { color: var(--paper-dim); max-width: 46em; margin: -18px 0 34px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; padding: 24px;
}
.card:hover { border-color: var(--line); }
.card .card-num {
  font-family: var(--font-mono); font-size: 12px; color: var(--mint); letter-spacing: 0.16em;
  display: block; margin-bottom: 12px;
}
.card h3 { margin: 0 0 10px; font-size: 19px; font-weight: 700; }
.card p { margin: 0; color: var(--paper-dim); font-size: 15.5px; }
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--paper-dim); font-size: 15px; }
.card li { margin-bottom: 6px; }

/* gesture map visualization */
.map-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center; }
.map-viz {
  border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); padding: 14px;
}
.map-viz svg { display: block; width: 100%; height: auto; }
.map-list { margin: 0; padding: 0; }
.map-list > div { border-top: 1px solid var(--line-soft); padding: 16px 0; }
.map-list dt {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 6px;
}
.map-list dd { margin: 0; color: var(--paper-dim); font-size: 15.5px; }

.privacy-panel {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--mint);
  border-radius: 12px; padding: 30px;
}
.privacy-panel p { color: var(--paper-dim); }
.privacy-panel ul { color: var(--paper-dim); padding-left: 20px; }
.privacy-panel li { margin-bottom: 8px; }
.privacy-panel b { color: var(--paper); }

/* FAQ */
.faq details {
  border-top: 1px solid var(--line-soft); padding: 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 4px; font-size: 17.5px; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-mono); color: var(--amber); font-size: 20px; flex: 0 0 auto;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 4px 20px; color: var(--paper-dim); max-width: 56em; }

/* closing CTA */
.closing { text-align: center; padding: 84px 0; }
.closing h2 { margin-bottom: 16px; }
.closing p { color: var(--paper-dim); max-width: 40em; margin: 0 auto 28px; }

/* ---------- inner pages ---------- */
.page-main { padding: 24px 0 72px; }
.page-main h1 { font-size: clamp(34px, 4.4vw, 50px); }
.prose { max-width: 46em; }
.prose h2 { font-size: 26px; margin: 44px 0 14px; }
.prose h3 { font-size: 19px; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--paper-dim); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose b { color: var(--paper); }
.byline {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  letter-spacing: 0.06em; margin: 14px 0 30px;
}
.byline b { color: var(--paper-dim); font-weight: 500; }

/* contact form */
.contact-form { max-width: 34em; margin-top: 8px; }
.contact-form label {
  display: block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin: 18px 0 6px;
}
.contact-form input, .contact-form textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  color: var(--paper); font-family: var(--font-display); font-size: 16px; padding: 12px 14px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--amber); }
.contact-form button { margin-top: 20px; }
.form-note { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 14px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 44px 0 34px; background: var(--ink-2); }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.footer-nav { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-nav h2 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 12px;
}
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { color: var(--paper-dim); font-size: 14.5px; }
.footer-nav a:hover { color: var(--amber); }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em;
}
.social-links { display: flex; gap: 14px; }
.social-links a { color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.social-links a:hover { color: var(--mint); }

/* scroll to top */
#scroll-to-top {
  position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--amber);
  font-size: 19px; cursor: pointer; display: none; z-index: 99; line-height: 1;
}
#scroll-to-top:hover { border-color: var(--amber); background: var(--panel-2); }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .map-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .spec-list { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 38px; }
}
@media (max-width: 560px) {
  .ctl-grid { grid-template-columns: 1fr; }
  .note-display .notes { font-size: 27px; }
  .section { padding: 52px 0; }
  .footer-grid { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}
