:root {
  --bg-ivory: #FDFBF7;
  --panel-cream: #F4F2EA;
  --machine-vanilla: #EFECE1;
  --accent-orange: #F96B1E;
  --accent-olive: #8DAA91;
  --accent-blue: #3478C8;
  --text-charcoal: #2A2A2A;
  --text-muted: #7A7873;
  --border-color: #DCD9CD;
  --shadow-soft: 0 4px 12px rgba(0,0,0,0.04);
  --shadow-inset: inset 0 2px 8px rgba(0,0,0,0.1);

  --font-serif: 'Playfair Display', serif;
  --font-sans: 'DM Sans', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --pad-x: 48px;
  --pad-y: 100px;
}

* { box-sizing: border-box; }

body {
  margin: 0; padding: 0;
  background-color: var(--bg-ivory);
  color: var(--text-charcoal);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* GLOBAL TYPOGRAPHY & BUTTONS */
h1, h2, h3 { font-family: var(--font-sans); color: var(--text-charcoal); }

.btn-primary {
  background: var(--accent-orange); color: #fff; border-radius: 4px;
  padding: 16px 32px; font-size: 13px; font-weight: 700; font-family: var(--font-sans);
  display: inline-flex; align-items: center; gap: 12px; letter-spacing: 0.05em;
  transition: transform 0.3s ease;
}
.btn-primary:hover { transform: translateY(-2px); }

/* HEADER */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px var(--pad-x); border-bottom: 1px solid var(--border-color);
}
.logo-text { font-family: var(--font-sans); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.logo-bars { display: flex; gap: 4px; margin-top: 4px; }
.logo-bars span { width: 24px; height: 4px; border-radius: 2px; }
.bar-olive { background-color: var(--accent-olive); }
.bar-orange { background-color: var(--accent-orange); }
.bar-blue { background-color: var(--accent-blue); }

.main-nav { display: flex; gap: 40px; font-size: 13px; font-weight: 600; font-family: var(--font-sans); color: var(--text-muted); letter-spacing: 0.05em; }
.main-nav a:hover { color: var(--text-charcoal); }

.header-actions { display: flex; gap: 16px; align-items: center; }
.cart-btn { border: 1px solid var(--border-color); border-radius: 24px; padding: 10px 20px; font-size: 12px; font-weight: 700; font-family: var(--font-sans); display: flex; align-items: center; gap: 8px; }
.cart-count { background: var(--text-charcoal); color: #fff; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; }
.signin-btn { font-size: 12px; font-weight: 700; font-family: var(--font-sans); color: var(--text-charcoal); }

/* HERO SECTION */
.hero {
  display: flex;
  background: var(--panel-cream);
  border-bottom: 1px solid var(--border-color);
}
.hero-left {
  flex: 0 0 40%;
  padding: var(--pad-y) var(--pad-x);
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1px solid var(--border-color);
}
.hero-right {
  flex: 0 0 60%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-product-img {
  width: 100%; height: 100%; object-fit: contain; object-position: center;
}

.eyebrow { color: var(--accent-orange); font-size: 11px; font-weight: 700; font-family: var(--font-sans); letter-spacing: 0.1em; margin-bottom: 24px; }
.hero h1 { font-size: 72px; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 24px 0; }
.hero h1 .serif { font-family: var(--font-serif); font-weight: 500; font-style: italic; font-size: 80px; }
.hero-desc { color: var(--text-muted); font-size: 16px; line-height: 1.6; max-width: 460px; margin-bottom: 40px; }

.hero-buttons { display: flex; gap: 24px; align-items: center; margin-bottom: 64px; }
.btn-demo { font-size: 13px; font-weight: 700; font-family: var(--font-sans); color: var(--text-muted); display: inline-flex; align-items: center; gap: 8px; transition: color 0.3s; }
.btn-demo:hover { color: var(--text-charcoal); }
.play-icon { width: 36px; height: 36px; border: 1px solid var(--border-color); border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: var(--text-charcoal); }

/* NOW PLAYING UI (CSS Component) */
.now-playing-ui {
  background: var(--machine-vanilla);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.np-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.np-label { font-size: 10px; font-weight: 700; font-family: var(--font-mono); color: var(--text-muted); letter-spacing: 0.1em; }
.np-track { font-size: 14px; font-weight: 500; font-family: var(--font-sans); }
.np-controls { display: flex; align-items: center; gap: 16px; }
.ui-play-btn { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid var(--border-color); box-shadow: 0 2px 4px rgba(0,0,0,0.05); font-size: 10px; display: grid; place-items: center; }
.np-progress { flex: 1; position: relative; height: 6px; }
.np-track-line { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #E0DDD0; border-radius: 3px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
.np-fill { position: absolute; top: 0; left: 0; bottom: 0; background: var(--accent-orange); border-radius: 3px; }
.np-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* FEATURED MACHINES */
.featured-machines { padding: var(--pad-y) var(--pad-x); border-bottom: 1px solid var(--border-color); }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 48px; }
.section-header h2 { font-size: 15px; letter-spacing: 0.1em; font-weight: 700; margin: 0; }
.view-all { font-size: 12px; font-weight: 700; font-family: var(--font-sans); color: var(--text-muted); }

.machines-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.product-card { display: flex; flex-direction: column; gap: 24px; transition: transform 0.4s ease; }
.product-card:hover { transform: scale(1.02); }
.product-img-wrapper {
  background: var(--panel-cream);
  border-radius: 8px;
  position: relative;
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-img-wrapper img { width: 90%; height: 90%; object-fit: contain; }
.ui-badge { position: absolute; top: 16px; left: 16px; color: #fff; font-size: 10px; font-weight: 700; font-family: var(--font-sans); padding: 4px 10px; border-radius: 4px; letter-spacing: 0.05em; }
.badge-orange { background: var(--accent-orange); }
.badge-olive { background: var(--accent-olive); }

.product-info h3 { font-size: 16px; font-weight: 700; margin: 0 0 12px 0; }
.product-info p { font-size: 14px; color: var(--text-muted); line-height: 1.5; margin: 0 0 24px 0; }
.product-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-color); padding-top: 16px; }
.price { font-size: 15px; font-weight: 700; font-family: var(--font-mono); }
.arrow-btn { width: 32px; height: 32px; border: 1px solid var(--border-color); border-radius: 50%; display: grid; place-items: center; font-size: 14px; color: var(--text-charcoal); }

/* SOUND LAB UI */
.sound-lab { background: var(--panel-cream); padding: var(--pad-y) var(--pad-x); border-bottom: 1px solid var(--border-color); }
.section-header-inline { display: flex; align-items: baseline; gap: 24px; margin-bottom: 48px; }
.section-header-inline h2 { font-size: 15px; letter-spacing: 0.1em; font-weight: 700; margin: 0; }
.section-header-inline .tagline { font-size: 14px; color: var(--text-muted); }

.lab-hardware-console {
  background: var(--machine-vanilla);
  border: 1px solid #D5D1C1;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.05), inset 0 2px 0 rgba(255,255,255,0.7);
  display: flex; flex-direction: column; gap: 40px;
}
.module-label { font-family: var(--font-sans); font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.1em; margin-bottom: 12px; text-transform: uppercase; }

/* Top Row Displays */
.console-displays { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.screen {
  background: #1A1A1A; border-radius: 6px; height: 140px;
  box-shadow: var(--shadow-inset); position: relative; overflow: hidden;
  border: 2px solid #C4C1B3;
}
.screen::after { /* Scanlines */
  content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 3px 100%; pointer-events: none;
}
.analyzer-bars { display: flex; align-items: flex-end; gap: 4px; padding: 16px; height: 100%; }
.analyzer-bar { flex: 1; background: var(--accent-blue); border-radius: 2px 2px 0 0; transition: height 0.1s; }
.wave-svg { width: 100%; height: 100%; }
.wave-path { fill: none; stroke: var(--accent-orange); stroke-width: 2; transition: d 0.1s; }

/* VU Meters */
.vu-meters-container { display: flex; gap: 16px; height: 140px; }
.vu-meter {
  flex: 1; background: #E8E5D5; border: 2px solid #C4C1B3; border-radius: 6px;
  position: relative; overflow: hidden; box-shadow: inset 0 4px 8px rgba(0,0,0,0.05);
}
.vu-bg {
  position: absolute; top: 10%; left: 10%; right: 10%; height: 60%;
  border-radius: 50% 50% 0 0; border-top: 4px solid var(--text-charcoal);
}
.vu-bg::after { /* Red zone */
  content:''; position: absolute; right: -2px; top: -4px; width: 30%; height: 100%;
  border-top: 4px solid var(--accent-orange); border-radius: 0 50% 0 0;
}
.vu-needle {
  position: absolute; bottom: -10%; left: 50%; width: 2px; height: 80%;
  background: var(--text-charcoal); transform-origin: bottom center;
  transform: translateX(-50%) rotate(-45deg); transition: transform 0.1s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Middle Controls */
.console-controls { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr 1fr; gap: 32px; border-top: 1px solid #D5D1C1; padding-top: 32px; }
.knobs-row { display: flex; gap: 32px; align-items: flex-end; }
.knob-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.knob {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #F0EDE2, #D8D4C4);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
  position: relative; cursor: pointer; border: 1px solid #C4C1B3;
  transform: rotate(-135deg); /* Default 0 pos */
}
.large-knob { width: 72px; height: 72px; }
.knob-indicator {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 12px; background: var(--text-charcoal); border-radius: 2px;
}
.knob-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); font-weight: 700; }

.switches-col { display: flex; flex-direction: column; gap: 12px; }
.toggle-switch {
  background: #E8E5D5; border: 1px solid #C4C1B3; border-radius: 4px;
  padding: 8px 16px; font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  color: var(--text-muted); box-shadow: 0 2px 4px rgba(0,0,0,0.05); transition: all 0.2s;
}
.toggle-switch.active { background: var(--text-charcoal); color: #fff; box-shadow: inset 0 2px 4px rgba(0,0,0,0.5); }

.tape-ui { display: flex; gap: 24px; align-items: center; }
.mini-cassette { width: 100px; height: 60px; background: #D5D1C1; border-radius: 6px; display: flex; justify-content: center; align-items: center; gap: 16px; border: 2px solid #C4C1B3; }
.reel { width: 24px; height: 24px; border-radius: 50%; border: 3px dashed var(--text-charcoal); animation: spin 4s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.preset-buttons { display: flex; flex-direction: column; gap: 8px; }
.preset-btn {
  text-align: left; padding: 10px 16px; background: #E8E5D5; border: 1px solid #C4C1B3;
  border-radius: 4px; font-family: var(--font-sans); font-size: 11px; font-weight: 700; color: var(--text-charcoal);
  display: flex; justify-content: space-between; align-items: center;
}
.preset-btn::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #C4C1B3; }
.preset-btn.active::after { background: var(--accent-orange); box-shadow: 0 0 6px var(--accent-orange); }

/* ARCHIVE */
.archive { padding: var(--pad-y) var(--pad-x); background: var(--panel-cream); border-bottom: 1px solid var(--border-color); }
.header-left { display: flex; align-items: baseline; gap: 24px; }
.archive-timeline { display: flex; flex-direction: column; border-top: 1px solid var(--border-color); margin-top: 48px; }
.archive-item {
  display: grid; grid-template-columns: 120px 1fr 160px; gap: 40px; align-items: center;
  padding: 40px 0; border-bottom: 1px solid var(--border-color);
}
.archive-num { font-family: var(--font-serif); font-size: 72px; font-style: italic; font-weight: 500; line-height: 1; }
.orange-text { color: var(--accent-orange); } .olive-text { color: var(--accent-olive); } .blue-text { color: var(--accent-blue); }
.micro-title { font-size: 11px; font-weight: 700; font-family: var(--font-sans); letter-spacing: 0.1em; color: var(--text-muted); margin: 0 0 12px 0; }
.archive-content .desc { font-size: 16px; line-height: 1.6; margin: 0; color: var(--text-charcoal); }
.archive-img-wrapper { width: 160px; aspect-ratio: 4/3; background: #EFECE1; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 16px; }
.archive-img-wrapper img { width: 100%; height: 100%; object-fit: contain; }

/* LISTENING ROOM */
.listening-room { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border-color); }
.room-content { padding: var(--pad-y) var(--pad-x); display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--border-color); }
.room-content h2 { font-size: 15px; letter-spacing: 0.1em; font-weight: 700; margin: 0 0 16px 0; }
.room-content .tagline { margin: 0 0 40px 0; font-size: 16px; color: var(--text-muted); }
.shop-room-btn { border: 1px solid var(--border-color); border-radius: 4px; padding: 12px 24px; font-size: 12px; font-weight: 700; font-family: var(--font-sans); color: var(--text-charcoal); align-self: flex-start; margin-bottom: 64px; }
.room-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 20px; font-size: 14px; font-weight: 700; font-family: var(--font-sans); color: var(--text-muted); }
.room-list li { display: flex; align-items: center; gap: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.orange-dot { background: var(--accent-orange); } .olive-dot { background: var(--accent-olive); }
.room-image { width: 100%; height: 100%; overflow: hidden; }
.room-image img { width: 100%; height: 100%; object-fit: cover; }

/* JOURNAL & ABOUT PAGES */
.journal-post a { transition: color 0.3s, border-color 0.3s; }
.journal-post:hover a { color: var(--accent-orange); border-color: var(--accent-orange); }
.journal-post img { transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.journal-post:hover img { transform: scale(1.05); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  :root { --pad-x: 24px; --pad-y: 64px; }
  
  .site-header { flex-wrap: wrap; justify-content: center; gap: 20px; padding-top: 32px; padding-bottom: 32px; }
  .main-nav { flex-wrap: wrap; justify-content: center; gap: 16px; font-size: 11px; }
  .header-actions { width: 100%; justify-content: center; }

  .hero { flex-direction: column; }
  .hero-left { border-right: none; border-bottom: 1px solid var(--border-color); }
  .hero h1 { font-size: 56px; } .hero h1 .serif { font-size: 64px; }
  
  .machines-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 24px; }
  .product-card { flex: 0 0 300px; scroll-snap-align: start; }
  
  .console-displays { grid-template-columns: 1fr; }
  .console-controls { grid-template-columns: 1fr 1fr; gap: 40px; }
  
  .archive-item { grid-template-columns: 80px 1fr; }
  .archive-img-wrapper { display: none; }
  
  .listening-room { grid-template-columns: 1fr; }
  .room-image { height: 400px; }
}
