/* ============================================================
   LOOK MUSIC — arrangement view
   Warm near-black studio · bone text · one brass accent
   Bricolage Grotesque (display) · Instrument Sans (body) · Martian Mono (data)
   ============================================================ */

:root {
  color-scheme: dark;
  --ink:        #0A0A0A;
  --panel:      #131313;
  --panel-lift: #1B1B1B;
  --line:       #262626;
  --bone:       #E8E8E8;
  --dust:       #A9A9A9;
  --brass:      #E8342A;
  --brass-hi:   #F04A41;
  --brass-deep: #6E211C;
  --clay:       #E8342A;

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 4px;
  --transport-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ink) !important;
}

body {
  margin: 0;
  background: var(--ink) !important;
  color: var(--bone);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--transport-h);
}

a { color: inherit; }

::selection { background: var(--brass); color: #fff; }

.mono {
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 0.94rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 30;
  background: var(--brass); color: #fff;
  padding: 0.5rem 1rem; border-radius: var(--radius);
}

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

section[id] { scroll-margin-top: 1.5rem; }

/* ---------- header ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--pad);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.wordmark-mark {
  width: 9px;
  height: 22px;
  background: var(--brass);
  border-radius: 1px;
  box-shadow: 5px 0 0 var(--brass-deep), 10px 0 0 var(--line);
  margin-right: 20px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.75rem);
  font-size: 0.94rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--dust);
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--bone); }

.nav-cta {
  background: var(--brass);
  color: #fff !important;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 500;
}
.nav-cta:hover { background: var(--brass-hi); }

/* ---------- hero ---------- */

.hero {
  padding: clamp(3rem, 8vw, 5.5rem) var(--pad) clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.eyebrow {
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 1.1rem;
}

.hero h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 7.5vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 0 0 1.1rem;
  max-width: 14ch;
}

.hero .lede {
  color: var(--dust);
  max-width: 46ch;
  margin: 0 0 2.25rem;
  font-size: 1.05rem;
}
.hero .lede strong { color: var(--bone); font-weight: 500; }

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-wave {
  position: absolute;
  right: calc(-1 * var(--pad));
  bottom: -8px;
  width: min(48vw, 560px);
  height: 120px;
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 860px) { .hero-wave { display: none; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font: inherit;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--bone);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { border-color: var(--dust); background: var(--panel-lift); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brass);
  border-color: var(--brass);
  color: #fff;
}
.btn-primary:hover { background: var(--brass-hi); border-color: var(--brass-hi); }

.btn .icon-play { width: 10px; height: 11px; }

/* ---------- sections ---------- */

.section {
  padding: clamp(2.75rem, 6vw, 4.5rem) var(--pad);
}
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
  flex-wrap: wrap;
}

.section-head h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  margin: 0;
}

.section-head .mono { color: var(--dust); }

/* ---------- genre filter ---------- */

.filter-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tag-btn {
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 0.94rem;
  letter-spacing: 0;
  color: var(--dust);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tag-btn:hover { color: var(--bone); border-color: var(--dust); }
.tag-btn[aria-pressed="true"] { color: var(--brass); border-color: var(--brass-deep); }

/* ---------- clip rows (the signature) ---------- */

.clips {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.clip {
  display: grid;
  grid-template-columns: 46px minmax(170px, 1.1fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.5rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.9rem 1.1rem;
  transition: background 0.15s ease, border-left-color 0.15s ease;
}

.clip:hover { background: var(--panel-lift); }
.clip.is-playing { border-left-color: var(--brass); background: var(--panel-lift); }

.clip-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--bone);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.clip-play:hover,
.clip.is-playing .clip-play {
  background: var(--brass);
  color: var(--ink);
  border-color: var(--brass);
}

.icon-play {
  display: block;
  width: 12px;
  height: 13px;
  background: currentColor;
  clip-path: polygon(10% 0, 100% 50%, 10% 100%);
  transform: translateX(1px);
}

.icon-pause {
  display: block;
  width: 11px;
  height: 12px;
  border-left: 3.5px solid currentColor;
  border-right: 3.5px solid currentColor;
}

.icon-x {
  display: block;
  width: 12px;
  height: 12px;
  position: relative;
}
.icon-x::before,
.icon-x::after {
  content: "";
  position: absolute;
  inset: 5px 0;
  border-top: 2px solid currentColor;
}
.icon-x::before { transform: rotate(45deg); }
.icon-x::after  { transform: rotate(-45deg); }

.clip-meta { min-width: 0; }

.clip-title {
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: block;
}

.clip-specs {
  color: var(--dust);
  margin-top: 0.3rem;
  display: block;
}

.clip-blurb {
  display: none;
  color: var(--dust);
  font-size: 0.94rem;
  margin-top: 0.4rem;
  line-height: 1.5;
}
.clip.is-playing .clip-blurb { display: block; }

.clip-wave {
  position: relative;
  height: 46px;
  cursor: pointer;
  min-width: 0;
  border-radius: 2px;
}
.clip-wave canvas { display: block; width: 100%; height: 100%; }

.clip-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.clip-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 0.94rem;
  color: var(--dust);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.16rem 0.42rem;
  white-space: nowrap;
}

.buy {
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 0.94rem;
  font-weight: 500;
  color: #fff;
  background: var(--brass);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.buy:hover { background: var(--brass-hi); }

.buy-free {
  background: transparent;
  color: var(--brass);
  border: 1px solid var(--brass-deep);
}
.buy-free:hover { background: var(--panel-lift); }

.clips-empty {
  color: var(--dust);
  padding: 2rem 0;
}
.clips-empty a { color: var(--brass); }

/* clip row on small screens: buy button stays visible top-right */
@media (max-width: 760px) {
  .clip {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-areas:
      "play meta side"
      "wave wave wave";
    row-gap: 0.8rem;
  }
  .clip-play { grid-area: play; }
  .clip-meta { grid-area: meta; }
  .clip-side { grid-area: side; align-items: flex-end; justify-content: flex-start; }
  .clip-wave { grid-area: wave; height: 40px; }
  .clip-tags { display: none; }
}

/* ---------- licence table ---------- */

.spec-table {
  border-top: 1px solid var(--line);
  margin: 0 0 1.75rem;
  max-width: 640px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.spec-row dt { color: var(--dust); margin: 0; flex-shrink: 0; }
.spec-row dd { margin: 0; text-align: right; max-width: 34ch; }

.section-note {
  color: var(--dust);
  max-width: 48ch;
  font-size: 0.94rem;
}
.section-note a { color: var(--brass); }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem var(--pad) 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.foot-brand {
  display: flex;
  align-items: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-wrap: wrap;
  gap: 0.25rem 0;
}

.foot-note {
  font-family: "Instrument Sans", sans-serif;
  font-weight: 400;
  color: var(--dust);
  font-size: 0.94rem;
  letter-spacing: 0;
  margin-left: 0.75rem;
}

.foot-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.94rem;
}
.foot-nav a { color: var(--dust); text-decoration: none; }
.foot-nav a:hover { color: var(--bone); }

.foot-legal { color: var(--dust); font-size: 0.94rem; margin: 0; }

/* ---------- transport ---------- */

.transport {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--transport-h);
  padding: 0.75rem var(--pad);
  background: var(--panel);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.transport-toggle,
.transport-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.transport-toggle { background: var(--brass); color: var(--ink); border-color: var(--brass); }
.transport-toggle:hover { background: var(--brass-hi); }
.transport-close { background: transparent; color: var(--dust); }
.transport-close:hover { color: var(--bone); }

.transport-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex-shrink: 0;
  max-width: 28vw;
}

.transport-title {
  font-weight: 500;
  font-size: 0.94rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.transport-spec { color: var(--dust); }

.transport-scrub {
  position: relative;
  flex: 1;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  min-width: 60px;
}
.transport-scrub::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}

.transport-played {
  position: relative;
  display: block;
  height: 4px;
  width: 0;
  background: var(--brass);
  border-radius: 2px;
  z-index: 1;
}

.transport-time { color: var(--dust); flex-shrink: 0; }

@media (max-width: 620px) {
  .transport { gap: 0.75rem; }
  .transport-meta { max-width: 38vw; }
  .transport-time { display: none; }
}

/* ---------- language switcher ---------- */

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 0.94rem;
  color: var(--dust);
  background: transparent;
  border: 0;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.lang-switch button + button { border-inline-start: 1px solid var(--line); }
.lang-switch button:hover { color: var(--bone); }
.lang-switch button[aria-pressed="true"] {
  color: #fff;
  background: var(--brass);
}

/* ---------- Arabic / RTL ---------- */

html[lang="ar"] body,
html[lang="ar"] .hero h1,
html[lang="ar"] .section-head h2,
html[lang="ar"] .wordmark,
html[lang="ar"] .foot-brand,
html[lang="ar"] .btn,
html[lang="ar"] .clip-title,
html[lang="ar"] .clip-blurb {
  font-family: "IBM Plex Sans Arabic", "Instrument Sans", system-ui, sans-serif;
}

html[lang="ar"] .hero h1 {
  letter-spacing: 0;
  line-height: 1.15;
  font-weight: 700;
}
html[lang="ar"] .section-head h2,
html[lang="ar"] .wordmark,
html[lang="ar"] .foot-brand {
  letter-spacing: 0;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; }

[dir="rtl"] .wordmark-mark { margin-right: 0; margin-left: 20px; }
[dir="rtl"] .clip {
  border-left: 1px solid var(--line);
  border-right: 3px solid var(--brass-deep);
  border-radius: var(--radius) 0 0 var(--radius);
}
[dir="rtl"] .clip.is-playing { border-right-color: var(--brass); border-left-color: var(--line); }
[dir="rtl"] .clip-side { align-items: flex-start; }
[dir="rtl"] .clip-tags { justify-content: flex-start; }
[dir="rtl"] .icon-play { transform: translateX(-1px) scaleX(-1); }
[dir="rtl"] .spec-row dd { text-align: left; }
[dir="rtl"] .transport-played { margin-inline-start: auto; }

/* Keep BPM/time/prices readable left-to-right inside RTL layout */
[dir="rtl"] .mono,
[dir="rtl"] .transport-time,
[dir="rtl"] .buy {
  direction: ltr;
  unicode-bidi: isolate;
}


/* ---------- brand: red play, gold groove ---------- */

.clip-play:hover,
.clip.is-playing .clip-play {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
}

.transport-toggle {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
}
.transport-toggle:hover { background: #F04A41; }

.btn-primary .icon-play { background: currentColor; }

.wordmark-tri {
  display: inline-block;
  width: 0; height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--clay);
  margin: 0 6px 0 4px;
  transform: translateY(1px);
}
[dir="rtl"] .wordmark-tri {
  border-left: 0;
  border-right: 11px solid var(--clay);
  margin: 0 4px 0 6px;
}

.wordmark-sub {
  display: block;
  font-family: "Instrument Sans", sans-serif;
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  color: var(--dust);
  margin-top: 1px;
}

.hero-rings {
  position: absolute;
  right: calc(-1 * var(--pad) - 60px);
  top: -80px;
  width: 380px;
  height: 380px;
  opacity: 0.55;
  pointer-events: none;
}
[dir="rtl"] .hero-rings { right: auto; left: calc(-1 * var(--pad) - 60px); }
@media (max-width: 860px) {
  .hero-rings { width: 240px; height: 240px; top: -60px; right: -80px; opacity: 0.35; }
  [dir="rtl"] .hero-rings { right: auto; left: -80px; }
}

/* ---------- motion ---------- */

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