/* ─────────────────────────────────────────────────────────────
   MJ Audio — static site
   Tokens from the design handoff. Fluid layout, no fixed breakpoints
   except the mobile fallbacks noted inline.
   ───────────────────────────────────────────────────────────── */

:root {
  --paper: #F2F1ED;
  --ink: #111111;
  --stage: #0E0E0D;
  --accent: #FF4F1F;
  --card: #E6E4DE;
  --line: #d9d7d0;
  --line-2: #cfcdc6;
  --row-hover: #E9E7E1;
  --text-2: #4a4945;
  --text-3: #2a2a28;
  --muted: #6b6a65;
  --muted-2: #8a8983;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad-x: clamp(20px, 4vw, 56px);
  --gap-grid: clamp(12px, 1.5vw, 20px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
input, textarea, button { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

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

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.accent { color: var(--accent); }

.eyebrow {
  font: 500 12px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.label {
  font: 400 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.h2 {
  margin: 0;
  font-weight: 700;
  font-stretch: 72%;
  font-size: clamp(48px, 7vw, 104px);
  line-height: .88;
  letter-spacing: -.03em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border: 0;
  border-radius: 999px;
  font: 600 13px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}
.btn--accent { background: var(--accent); color: var(--stage); }
.btn--accent:hover { background: #fff; color: var(--stage); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--accent); color: var(--stage); }

/* Header ──────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 14, 13, .86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header__inner {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header__logo { display: flex; align-items: center; }
.header__logo img { height: 40px; width: auto; display: block; }
.nav {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  font: 500 13px/1 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a { color: #fff; transition: color .2s; }
.nav a:hover { color: var(--accent); }

@media (max-width: 480px) {
  .header__logo img { height: 30px; }
  .nav { gap: 12px; font-size: 11px; }
}

/* Hero ────────────────────────────────────────────── */
.hero { background: var(--stage); color: #fff; }
.hero__inner {
  padding-top: clamp(56px, 9vw, 128px);
  padding-bottom: clamp(32px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}
.hero__title {
  margin: 0;
  font-weight: 700;
  font-stretch: 72%;
  font-size: clamp(56px, 10.5vw, 168px);
  line-height: .86;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero__tags {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: 400 12px/1.5 var(--mono);
  color: rgba(255, 255, 255, .6);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: .04em;
}
@media (max-width: 640px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__tags { text-align: left; }
}
.hero__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  max-height: 100vh;
  overflow: hidden;
  background: var(--stage);
}
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* About ───────────────────────────────────────────── */
.about { background: var(--paper); }
.about__inner {
  padding-top: clamp(72px, 10vw, 144px);
  padding-bottom: clamp(72px, 10vw, 144px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about__side { display: flex; flex-direction: column; gap: 20px; }
.about__logo { width: 112px; height: auto; display: block; }
.about__text {
  grid-column: span 2;
  margin: 0;
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.22;
  letter-spacing: -.015em;
  text-wrap: pretty;
  max-width: 26em;
}
@media (max-width: 720px) {
  .about__text { grid-column: auto; }
}

/* Categories ──────────────────────────────────────── */
.categories { background: var(--paper); border-top: 1px solid var(--line); }
.categories .container {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(72px, 9vw, 120px);
}
.categories__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.categories__total {
  font: 400 12px/1 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.catlist { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.catrow {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: clamp(14px, 1.8vw, 22px) 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  transition: padding .25s ease, color .2s;
}
.catrow:hover { color: var(--accent); padding-left: 16px; }
.catrow__num, .catrow__count {
  font: 400 13px/1 var(--mono);
  color: var(--muted-2);
}
.catrow__count { white-space: nowrap; }
.catrow__name {
  font-weight: 600;
  font-stretch: 80%;
  font-size: clamp(36px, 6vw, 88px);
  line-height: .95;
  letter-spacing: -.03em;
  text-transform: uppercase;
}
@media (max-width: 480px) {
  .catrow { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; }
}

/* Featured ────────────────────────────────────────── */
.featured { background: var(--stage); color: #fff; }
.featured__inner {
  padding-top: clamp(72px, 10vw, 144px);
  padding-bottom: clamp(72px, 10vw, 144px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.featured__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #1b1b1a;
  overflow: hidden;
}
.featured__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured__body { display: flex; flex-direction: column; gap: 28px; }
.featured__body .h2 { font-size: clamp(48px, 7vw, 112px); }
.featured__sub {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .72);
}
.featured__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.featured__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.featured__row-model { font: 500 15px/1 var(--mono); }
.featured__row-cat {
  font: 400 13px/1 var(--mono);
  color: rgba(255, 255, 255, .55);
  text-transform: uppercase;
}
.featured__body .btn { align-self: flex-start; }

/* Tiles ───────────────────────────────────────────── */
.tiles { background: var(--paper); }
.tiles__inner {
  padding-top: clamp(20px, 4vw, 56px);
  padding-bottom: clamp(20px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: var(--gap-grid);
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--line);
  color: #fff;
}
.tile:hover { color: #fff; }
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.tile:hover img { transform: scale(1.03); }
.tile__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 28px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  pointer-events: none;
}
.tile__title {
  font-weight: 700;
  font-stretch: 72%;
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
}
.tile__cta {
  font: 500 12px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Products ────────────────────────────────────────── */
.products { background: var(--paper); scroll-margin-top: 60px; }
.products .container {
  padding-top: clamp(72px, 9vw, 128px);
  padding-bottom: clamp(72px, 9vw, 128px);
}
.products__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 40px;
}
.products__title { display: flex; flex-direction: column; gap: 20px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 500 12px/1 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .15s, color .15s;
}
.chip:hover { background: var(--row-hover); }
.chip.is-active { background: var(--ink); color: var(--paper); }
.segmented {
  display: flex;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.segmented__btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 500 12px/1 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .15s, color .15s;
}
.segmented__btn.is-active { background: var(--ink); color: var(--paper); }

/* Catalog — grid */
.catalog--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--gap-grid);
}
@media (max-width: 560px) {
  .catalog--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: opacity .2s;
  text-align: left;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.card:hover { opacity: .78; }
.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--card);
  overflow: hidden;
}
.card__media img,
.thumb img,
.modal__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  display: block;
}
.card__cat {
  position: absolute;
  top: 12px;
  left: 12px;
  font: 500 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}
.card__meta { display: flex; flex-direction: column; gap: 6px; }
.card__model { font: 500 14px/1 var(--mono); color: var(--ink); }
.card__name { font-size: 16px; line-height: 1.3; color: var(--text-2); text-wrap: pretty; }
@media (max-width: 560px) {
  .card__cat { font-size: 10px; top: 10px; left: 10px; }
  .card__model { font-size: 13px; }
  .card__name { font-size: 14px; }
}

/* Catalog — list */
.catalog--list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}
.row {
  display: grid;
  grid-template-columns: 72px minmax(120px, 200px) minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  text-align: left;
  border-left: 0; border-right: 0; border-top: 0;
  background: transparent;
  color: inherit;
  width: 100%;
  transition: background .15s;
}
.row:hover { background: var(--row-hover); }
.thumb {
  width: 72px;
  height: 72px;
  background: var(--card);
  position: relative;
  overflow: hidden;
}
.row__model { font: 500 14px/1.2 var(--mono); }
.row__name { font-size: 17px; line-height: 1.3; color: var(--text-2); }
.row__cat {
  font: 400 12px/1 var(--mono);
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .row {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas: "thumb model" "thumb name" "thumb cat";
    gap: 4px 16px;
    align-items: start;
  }
  .thumb { grid-area: thumb; width: 56px; height: 56px; }
  .row__model { grid-area: model; }
  .row__name { grid-area: name; font-size: 15px; }
  .row__cat { grid-area: cat; font-size: 11px; margin-top: 2px; }
}

/* Gallery ─────────────────────────────────────────── */
.gallery { background: var(--paper); }
.gallery__inner {
  padding-bottom: clamp(72px, 9vw, 128px);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: clamp(280px, 32vw, 480px);
  gap: var(--gap-grid);
}
.gallery__item { position: relative; overflow: hidden; background: var(--line); }
.gallery__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery__stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: var(--gap-grid);
}
@media (max-width: 760px) {
  .gallery__inner {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .gallery__item { aspect-ratio: 16 / 9; }
  .gallery__stack { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .gallery__stack .gallery__item { aspect-ratio: 1 / 1; }
}

/* Contact ─────────────────────────────────────────── */
.contact { background: var(--stage); color: #fff; }
.contact__inner {
  padding-top: clamp(72px, 10vw, 144px);
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(48px, 6vw, 96px);
}
.contact__info { display: flex; flex-direction: column; gap: 32px; }
.contact__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .8);
}
.contact__detail { display: flex; flex-direction: column; gap: 8px; }
.contact__detail .label { color: rgba(255, 255, 255, .5); }
.contact__detail a { color: #fff; }
.contact__detail a:hover { color: var(--accent); }

.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: end;
}
.form__fields { display: flex; flex-direction: column; gap: 8px; }
.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 24px;
}
.field {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .25);
  border-radius: 0;
  color: #fff;
  padding: 18px 0;
  font-size: 18px;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.field::placeholder { color: rgba(255, 255, 255, .45); }
.field:focus { border-bottom-color: var(--accent); }
.field.is-invalid { border-bottom-color: #ff3b3b; }
textarea.field { resize: vertical; min-height: 0; }
.form__submit { margin-top: 24px; align-self: flex-start; padding: 16px 28px; }
.form__thanks {
  margin: 0;
  padding: 32px 0;
  font-size: 28px;
  line-height: 1.2;
  border-bottom: 1px solid rgba(255, 255, 255, .25);
}

.footer {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font: 400 12px/1 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  border-top: 1px solid rgba(255, 255, 255, .1);
}

/* Modal ───────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(14, 14, 13, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 40px);
}
.modal[hidden] { display: none; }
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 1120px;
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  color: var(--ink);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1 var(--mono);
  transition: background .15s, color .15s;
}
.modal__close:hover { background: var(--ink); color: var(--paper); }
.modal__media {
  position: relative;
  background: var(--card);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__media-empty { font: 500 14px/1 var(--mono); color: var(--muted-2); }
.modal__body {
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.modal__heading { display: flex; flex-direction: column; gap: 10px; }
.modal__model {
  margin: 0;
  font-weight: 700;
  font-stretch: 72%;
  font-size: clamp(40px, 5vw, 72px);
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.modal__name { font-size: 20px; line-height: 1.3; color: var(--text-2); }
.modal__desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-3);
  text-wrap: pretty;
  max-width: 36em;
}
.specs { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.specs:empty { display: none; }
.spec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
  line-height: 1.4;
}
.spec__k {
  font: 400 12px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
}
.spec__v { color: var(--ink); }
.spec--single { grid-template-columns: 1fr; }
.specs__empty {
  font: 400 12px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.modal__body .btn { align-self: flex-start; margin-top: 8px; }
@media (max-width: 640px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal__panel { max-height: 100%; height: 100%; }
  .modal__media { aspect-ratio: 4 / 3; }
  .modal__close { position: fixed; top: 12px; right: 12px; }
}
