/* ============ THE MODERN MUSIC COMPANY ============ */

:root {
  --bg: #0a0a0b;
  --fg: #f2efe8;
  --accent: #d5ff3f;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* fixed color underlay — morphs between beats */
.underlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  transition: background-color .8s var(--ease-out);
  z-index: -2;
}

/* film grain */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 40;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain-shift 1.2s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: clamp(1rem, 2.5vw, 1.75rem) clamp(1rem, 3vw, 2.5rem);
  mix-blend-mode: difference;
  color: #fff;
}
.wordmark {
  font-weight: 900;
  font-stretch: 110%;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: inherit;
  text-decoration: none;
}
.tm { font-size: .55em; vertical-align: super; font-weight: 700; }
.topbar-right {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
}

/* ---------- beats ---------- */
.beat {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5rem, 12vh, 8rem) clamp(1rem, 3vw, 2.5rem);
  color: var(--fg);
  transition: color .8s var(--ease-out);
}

/* block type — edge-to-edge lines */
.block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  font-weight: 900;
  font-stretch: 115%;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: .88;
}
.line {
  display: block;
  /* no-JS fallback: wrapping lines at a safe size */
  font-size: clamp(2.5rem, 11vw, 10rem);
  transform-origin: left bottom;
}
.js .line {
  white-space: nowrap; /* JS fit-text sizes each line edge-to-edge */
}
.accent-line { color: var(--accent); transition: color .8s var(--ease-out); }
.dim-line { color: color-mix(in srgb, currentColor 48%, transparent); }

/* hero footer strip */
.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: clamp(1.5rem, 4vh, 3rem);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.6;
}
.scroll-cue { display: inline-flex; gap: .35em; align-items: center; }
.cue-arrow { display: inline-block; animation: cue 1.6s var(--ease-out) infinite; }
@keyframes cue {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(.35em); opacity: .4; }
}

/* ---------- kicker ---------- */
.kicker {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .18em;
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
  opacity: .55;
}

/* ---------- manifesto ---------- */
.beat-manifesto { justify-content: center; }
.manifesto {
  font-size: clamp(1.6rem, 4.2vw, 3.6rem);
  font-weight: 700;
  font-stretch: 105%;
  letter-spacing: -0.02em;
  line-height: 1.12;
  max-width: 20em;
  text-wrap: balance;
}
.manifesto .ch { opacity: .18; transition: opacity .25s linear; }
.manifesto .ch.on { opacity: 1; }

/* ---------- index rows ---------- */
.index-list { list-style: none; width: 100%; }
.index-row {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(.5rem, 1.5vh, 1rem) 0;
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  font-weight: 900;
  font-stretch: 115%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  cursor: default;
}
.index-row:last-child { border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.idx {
  font-size: clamp(.75rem, 1.2vw, 1rem);
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: .1em;
  opacity: .45;
  min-width: 2.5em;
}
.row-word {
  font-size: clamp(3rem, 9.5vw, 9rem);
  line-height: .95;
  transition: color .35s var(--ease-out), transform .45s var(--ease-out);
}
.index-row:hover .row-word {
  color: var(--accent);
  transform: translateX(clamp(.5rem, 2vw, 2rem));
}

/* ---------- contact ---------- */
.beat-contact { justify-content: flex-end; gap: clamp(2rem, 6vh, 4rem); }
.contact-link {
  display: block;
  width: 100%;
  font-size: 11vw;
  font-weight: 900;
  font-stretch: 115%;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: .9;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: color .35s var(--ease-out);
}
.contact-link:hover { color: var(--accent); }
.up { display: inline-block; transition: transform .35s var(--ease-out); }
.contact-link:hover .up { transform: translate(.06em, -.06em); }

/* marquee */
.marquee {
  overflow: hidden;
  margin-left: calc(clamp(1rem, 3vw, 2.5rem) * -1);
  margin-right: calc(clamp(1rem, 3vw, 2.5rem) * -1);
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  padding: .6em 0;
}
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .16em;
  animation: marquee 24s linear infinite;
  opacity: .6;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.foot {
  display: flex;
  justify-content: space-between;
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .14em;
  opacity: .5;
}

/* ---------- entrance reveals (JS-gated) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  transition:
    opacity .7s var(--ease-out),
    transform .7s var(--ease-out),
    filter .7s var(--ease-out);
}
.js [data-reveal].in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .cue-arrow { animation: none; }
  .marquee-track { animation: none; }
  .js [data-reveal] {
    opacity: 1; transform: none; filter: none; transition: none;
  }
  .manifesto .ch { opacity: 1; transition: none; }
  .underlay, .beat { transition: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .foot { flex-direction: column; gap: .5rem; }
  .row-word { font-size: clamp(2.4rem, 13vw, 4rem); }
}
