/* ==========================================================================
   SonikBox — "Rack Panel" design system
   ========================================================================== */

:root {
  --orange: #ff5500;
  --orange-dim: #b33c00;
  --bg: #08080a;
  --panel: #111115;
  --panel-raised: #17171c;
  --border: #2a2a30;
  --border-dim: #1f2937;
  --text: #ffffff;
  --text-dim: #9ca3af;
  --screw: #45454e;
  --nav-height: 72px;
  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

/* Grid items default to a content-based auto min-width, which lets long
   unbreakable labels blow out narrow tracks. Force them to respect the
   track instead. */
.hero-grid > *,
.hubs-grid > *,
.estimator-grid > *,
.module-grid > *,
.hub-toggle > * {
  min-width: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }
}

/* Section anchor offset so the sticky nav never overlaps content ---------- */
section[id],
#top {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0;
  text-transform: uppercase;
  line-height: 1.05;
}

p {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Rack-panel surface: screw heads at all four corners --------------------- */
.rack-panel {
  position: relative;
  background-color: var(--panel);
  border: 1px solid var(--border);
  background-image:
    radial-gradient(circle at 35% 35%, #55555f, #232328 70%),
    radial-gradient(circle at 35% 35%, #55555f, #232328 70%),
    radial-gradient(circle at 35% 35%, #55555f, #232328 70%),
    radial-gradient(circle at 35% 35%, #55555f, #232328 70%);
  background-repeat: no-repeat;
  background-size: 7px 7px;
  background-position:
    10px 10px,
    calc(100% - 10px) 10px,
    10px calc(100% - 10px),
    calc(100% - 10px) calc(100% - 10px);
}

/* LED status dot ------------------------------------------------------------ */
.led {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 5px 1px rgba(255, 85, 0, 0.85);
  flex-shrink: 0;
}

.led--idle {
  background: #4a4a52;
  box-shadow: none;
}

/* VU-meter bar flourish ----------------------------------------------------- */
.vu-meter {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.vu-meter span {
  display: block;
  width: 3px;
  background: var(--orange);
}

.vu-meter span:nth-child(1) { height: 40%; opacity: 0.5; }
.vu-meter span:nth-child(2) { height: 65%; opacity: 0.7; }
.vu-meter span:nth-child(3) { height: 100%; }
.vu-meter span:nth-child(4) { height: 55%; opacity: 0.6; }

/* Buttons -------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 0;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 22px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--orange);
  color: #08080a;
  border-color: var(--orange);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #ff6b1f;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--orange);
  color: var(--orange);
}

.btn-block {
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(8, 8, 10, 0.96);
  border-bottom: 1px solid var(--border-dim);
  backdrop-filter: none;
}

.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.logo::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--orange);
  flex-shrink: 0;
}

.logo .white { color: var(--text); }
.logo .orange { color: var(--orange); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--orange);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta {
  padding: 10px 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-panel {
  display: none;
}

@media (max-width: 767px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-cta {
    padding: 8px 12px;
    font-size: 11px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }

  .logo {
    font-size: 16px;
  }

  .nav-actions {
    gap: 8px;
  }

  .nav-toggle {
    width: 34px;
    height: 34px;
  }

  .nav-panel {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-dim);
    z-index: 99;
  }

  .nav-panel.is-open {
    display: block;
  }

  .nav-panel .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
  }

  .nav-panel .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-dim);
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--border-dim);
}

@media (min-width: 1024px) {
  .hero {
    padding: 88px 0 96px;
  }
}

.hero-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
    gap: 56px;
    align-items: center;
  }
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hero h1 {
  font-size: clamp(34px, 6.5vw, 58px);
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--orange);
  display: block;
}

.hero-body {
  font-size: 16px;
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-photo-panel {
  padding: 10px;
}

.hero-photo-frame {
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-caption {
  padding: 16px 6px 6px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.hero-photo-caption .hero-photo-title {
  font-family: var(--font-display);
  color: var(--text);
  text-transform: uppercase;
  font-size: 15px;
  line-height: 1.2;
  margin: 6px 0 8px;
}

.hero-photo-caption .eyebrow {
  margin-bottom: 4px;
}

.hero-photo-caption p {
  font-size: 13px;
  color: var(--text-dim);
}

/* ==========================================================================
   Section shared
   ========================================================================== */

.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-dim);
}

@media (min-width: 1024px) {
  .section {
    padding: 96px 0;
  }
}

.section-head {
  margin-bottom: 40px;
  max-width: 70ch;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 16px;
}

.section-head p {
  font-size: 16px;
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.section-head-row .section-head {
  margin-bottom: 0;
}

/* ==========================================================================
   Hubs
   ========================================================================== */

.hubs-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 1024px) {
  .hubs-grid {
    grid-template-columns: 5fr 7fr;
    align-items: start;
  }
}

.hubs-copy p {
  margin-bottom: 28px;
  font-size: 16px;
}

.hub-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hub-card {
  padding: 18px 20px;
}

.hub-card-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hub-card p {
  font-size: 14px;
}

.hub-photo-frame {
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

@media (min-width: 1024px) {
  .hub-photo-frame {
    aspect-ratio: 5 / 6;
  }
}

.hub-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Gear specs / modules
   ========================================================================== */

.module-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .module-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.module-card {
  padding: 24px;
}

.module-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-dim);
}

.module-card-head h3 {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.module-rows {
  display: flex;
  flex-direction: column;
}

.module-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-dim);
  font-size: 13px;
}

.module-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.module-row dt {
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.module-row dd {
  margin: 0;
  color: var(--text);
  text-align: right;
  font-weight: 500;
}

/* ==========================================================================
   Estimator
   ========================================================================== */

.estimator-panel {
  padding: 28px;
}

@media (min-width: 768px) {
  .estimator-panel {
    padding: 40px;
  }
}

.estimator-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 1024px) {
  .estimator-grid {
    grid-template-columns: 1fr 380px;
    gap: 48px;
  }
}

.field-group {
  margin-bottom: 28px;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.hub-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hub-toggle button {
  background: var(--panel-raised);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.hub-toggle button[aria-pressed="true"] {
  border-color: var(--orange);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--orange);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

input[type="range"] {
  flex: 1;
  appearance: none;
  height: 4px;
  background: var(--border);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--orange);
  border: 2px solid #08080a;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--orange);
  border: 2px solid #08080a;
  border-radius: 0;
  cursor: pointer;
}

.range-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--orange);
  min-width: 6ch;
  text-align: right;
}

select {
  width: 100%;
  background: var(--panel-raised);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  border-radius: 0;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 15px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.addons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.addon-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dim);
}

.addon-option input {
  margin-top: 3px;
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.addon-option .addon-name {
  color: var(--text);
  font-weight: 500;
}

.summary-panel {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: calc(var(--nav-height) + 20px);
}

.summary-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-dim);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
  color: var(--text-dim);
}

.summary-total {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.summary-total .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.summary-total .value {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--orange);
}

.estimator-submit {
  margin-top: 20px;
}

/* Mobile sticky mini-total bar — mirrors .summary-panel's live total below
   the breakpoint where the grid collapses and the summary panel stops
   staying in view while the form is being adjusted. */
.mobile-total-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-left: none;
  border-right: none;
  border-bottom: none;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}

.mobile-total-bar.is-visible {
  display: flex;
}

.mobile-total-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.mobile-total-value {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--orange);
}

@media (min-width: 1024px) {
  .mobile-total-bar {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  #estimator {
    padding-bottom: 76px;
  }
}

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  padding: 64px 0;
}

.cta-module {
  max-width: 640px;
  margin: 0 auto;
  padding: 44px 32px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(255, 85, 0, 0.12), 0 0 40px rgba(255, 85, 0, 0.08);
}

.cta-module .eyebrow {
  justify-content: center;
}

.cta-module h2 {
  font-size: clamp(26px, 4vw, 34px);
  margin-bottom: 16px;
}

.cta-module p {
  font-size: 15px;
  max-width: 46ch;
  margin: 0 auto 28px;
}

.cta-address {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-decoration: none;
}

.cta-address:hover {
  color: var(--orange);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 40px 0;
  text-align: center;
}

.site-footer h2 {
  font-size: 13px;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.site-footer p {
  font-size: 12px;
  color: var(--text-dim);
  max-width: 60ch;
  margin: 0 auto;
}

.site-footer .footer-contact {
  margin-top: 16px;
}

.site-footer .copyright {
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-dim);
}

/* ==========================================================================
   Print stylesheet — "Print Studio Rider"
   ========================================================================== */

.print-only {
  display: none;
}

@media print {
  .site-nav,
  .hero,
  #hubs,
  #estimator,
  .cta-band,
  .site-footer {
    display: none !important;
  }

  #specs {
    padding: 0;
    border: none;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  #specs .no-print {
    display: none !important;
  }

  #specs .print-only {
    display: block;
  }

  #specs .print-subtitle {
    font-size: 12px;
    color: #555;
    margin-bottom: 24px;
    font-weight: normal;
  }

  .module-card,
  .rack-panel {
    background: #ffffff !important;
    background-image: none !important;
    border: 1px solid #999 !important;
    box-shadow: none !important;
  }

  .module-card-head {
    border-bottom-color: #999;
  }

  .module-row {
    border-bottom-color: #ccc;
  }

  .module-row dt {
    color: #444;
  }

  .module-row dd {
    color: #000;
  }

  .eyebrow, h2, h3 {
    color: #000 !important;
  }

  .section-head p {
    color: #333;
  }
}
