/* ==========================================================================
   Manu Med — manumed.fm
   Rules taken from the reference sweep (ladygaga.com, theweeknd.com,
   beyonce.com), applied to his own art direction:
     · black canvas, warm off-white text, one gold accent
     · full-bleed media; type sits on the image, pinned to the edges
     · lists are typographic tables — no cards, no radii, no shadows
     · one primary action per section
     · prose is banned; words are labels
   ========================================================================== */

/* --- the era accent ------------------------------------------------------
   The page travels as he does. It opens in the world of the suit — black,
   antique gold, Madrid at dusk, which is Una Mujer and En La Inquietud — and
   arrives at the neon of Touch The Sky, which is the direction he says the
   music is heading.
   Registered with @property so the colours interpolate instead of snapping;
   plain custom properties are not animatable. */

@property --accent {
  syntax: '<color>';
  inherits: true;
  initial-value: #c8a96a;
}
@property --accent-hi {
  syntax: '<color>';
  inherits: true;
  initial-value: #e4d2a4;
}

:root {
  --ink:      #000;
  --paper:    #f2efe9;

  --gold:     #c8a96a;
  --gold-hi:  #e4d2a4;
  --neon:     #ff4bb0;
  --neon-hi:  #46dcff;

  /* --accent / --accent-hi are not declared here on purpose: the @property
     initial-value above is already the starting gold, and one source for it is
     enough. (A declaration here would not have broken the travel — CSS
     animations outrank normal author declarations. An earlier comment claimed
     otherwise; that diagnosis was wrong.)
     Everything reads --accent, never --gold, so a new era is one pair of
     values rather than a repaint. */

  --dim:      rgb(242 239 233 / .52);
  --dimmer:   rgb(242 239 233 / .30);
  --hair:     rgb(242 239 233 / .14);

  --display:  "Playfair Display", "Times New Roman", serif;
  --ui:       "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;

  --gut:      clamp(1.25rem, 4vw, 4rem);
  --rhythm:   clamp(5rem, 14vh, 11rem);

  --ease:     cubic-bezier(.22, .61, .36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: 5rem;
  /* proximity, not mandatory: only the clip's anchors declare a snap position,
     so the rest of the page scrolls normally and this cannot fight it. */
  scroll-snap-type: y proximity;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ui);
  font-size: clamp(.9rem, .35vw + .82rem, 1rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
h1, h2, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

/* Class selectors that set `display` beat the UA rule for [hidden], which
   silently breaks the attribute. Put it back. */
[hidden] { display: none !important; }

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

.skip {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 50%;
  translate: -50% -110%;
  z-index: 99;
  padding: .7rem 1.2rem;
  background: var(--paper);
  color: var(--ink);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: translate .2s var(--ease);
}
.skip:focus { translate: -50% 0; }

/* --- shared atoms ------------------------------------------------------- */

.eyebrow,
.section-h,
.bar__nav,
.bar__cta,
.btn,
.track__date,
.track__kind,
.track__go,
.platforms,
.foot {
  font-family: var(--ui);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.section-h {
  color: var(--dimmer);
  padding-inline: var(--gut);
  margin-block-end: clamp(2rem, 5vh, 3.5rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding-inline: 1.9rem;
  border: 1px solid var(--paper);
  background: none;
  color: var(--paper);
  font: inherit;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease);
}
.btn--solid { background: var(--paper); color: var(--ink); }
.btn--solid:hover,
.btn--solid:focus-visible { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn--ghost { border-color: var(--hair); color: var(--dim); }
.btn--ghost:hover,
.btn--ghost:focus-visible { border-color: var(--paper); color: var(--paper); }

/* --- top bar ------------------------------------------------------------ */

.bar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem var(--gut);
  transition: background-color .35s var(--ease), backdrop-filter .35s var(--ease);
}
.bar.is-stuck {
  background: rgb(0 0 0 / .78);
  backdrop-filter: blur(14px) saturate(140%);
}

.bar__mark {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: .02em;
}

.bar__nav {
  display: flex;
  gap: clamp(1rem, 2.2vw, 2.2rem);
  justify-content: center;
  color: var(--dim);
}
.bar__nav a { transition: color .2s var(--ease); }
.bar__nav a:hover { color: var(--paper); }

.bar__cta {
  justify-self: end;
  color: var(--accent);
  transition: color .2s var(--ease);
}
.bar__cta:hover { color: var(--accent-hi); }

@media (max-width: 46rem) {
  .bar { grid-template-columns: 1fr auto; }
  .bar__nav { display: none; }
}

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

.hero {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 100svh;
  padding: var(--gut);
  padding-block-end: clamp(3rem, 8vh, 6rem);
  overflow: clip;
}

.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* Bottom-weighted scrim: keeps the type legible without flattening the photo. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgb(0 0 0 / .82) 0%, rgb(0 0 0 / .20) 46%, rgb(0 0 0 / .34) 100%);
}

.eyebrow { color: var(--accent); margin-block-end: 1rem; }

.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.4rem, 13vw, 11rem);
  line-height: .86;
  letter-spacing: -.02em;
  text-transform: none;
}
.hero__title span {
  display: block;
  padding-inline-start: clamp(1.5rem, 8vw, 7rem);
  font-style: italic;
  color: var(--accent);
}

/* The wide hero sources are the mirrored banners: he stands on both sides and
   the centre corridor is empty, so the type belongs in the middle. On the
   portrait source he is centred instead, and the type sits low over the
   cobblestones. Two different images, two different layouts. */
@media (min-width: 48rem) {
  .hero {
    align-content: center;
    justify-items: center;
    text-align: center;
  }
  .hero__title span { padding-inline-start: 0; }
  .hero__actions { justify-content: center; }
  .hero::after {
    background:
      radial-gradient(ellipse at center, rgb(0 0 0 / .62) 0%, rgb(0 0 0 / .30) 45%, rgb(0 0 0 / .55) 100%);
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-block-start: clamp(1.8rem, 4vh, 3rem);
}

/* Pinned to the corner, Beyoncé-style micro-type. */
.hero__meta {
  position: absolute;
  inset-block-end: var(--gut);
  inset-inline-end: var(--gut);
  display: flex;
  gap: .6rem;
  color: var(--dimmer);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.hero__meta i { font-style: normal; color: var(--accent); }

@media (max-width: 46rem) {
  .hero__meta { position: static; margin-block-start: 2rem; }
}

/* --- releases ----------------------------------------------------------- */

.releases { padding-block: var(--rhythm); }

.track {
  display: grid;
  /* 7rem and not the 5rem this held while every row read "2026": a full date at
     this letter-spacing needs about 5.2rem and would have wrapped. */
  grid-template-columns: 7rem 1fr auto auto;
  align-items: baseline;
  gap: clamp(.8rem, 3vw, 2.5rem);
  padding: clamp(1.1rem, 2.4vh, 1.7rem) var(--gut);
  border-block-start: 1px solid var(--hair);
  transition: background-color .3s var(--ease);
}
.track:last-child { border-block-end: 1px solid var(--hair); }
.track:hover { background: rgb(242 239 233 / .035); }

.track__date { color: var(--dimmer); white-space: nowrap; }

/* The tag carries the accent because it is the only thing on the page that
   explains why this row sits above an older one. Dimmed like the rest of the
   line, it would read as decoration and the order would look like a bug. */
.track__tag { color: var(--accent); }

.track__name {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.6vw, 2.9rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.01em;
  text-transform: none;
  transition: color .3s var(--ease);
}
.track:hover .track__name { color: var(--accent-hi); }

.track__kind { color: var(--dimmer); }

.track__go {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--accent);
  white-space: nowrap;
}
.track__go i { transition: translate .25s var(--ease); }
.track__go:hover i { translate: .3rem 0; }

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(2rem, 5vh, 3.5rem) var(--gut) 0;
  color: var(--dim);
}
.platforms a { border-block-end: 1px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease); }
.platforms a:hover { color: var(--paper); border-color: var(--accent); }

@media (max-width: 46rem) {
  .track {
    grid-template-columns: 1fr auto;
    row-gap: .35rem;
  }
  .track__date { grid-column: 1; }
  .track__kind { grid-column: 2; text-align: end; }
  .track__name { grid-column: 1 / -1; }
  .track__go   { grid-column: 1 / -1; margin-block-start: .3rem; }
}

/* --- clip --------------------------------------------------------------- */

/* Sticky stage, three snap anchors. Scroll settles you on one cover at a time
   and clip.js eases between them, so a small scroll gives a full transition
   instead of a partial slide that tracks your finger.
   The negative margin pulls the anchors up over the stage's own space, so the
   whole section is three viewports tall rather than four. */
.clip {
  position: relative;
  padding-block: var(--rhythm) 0;
}

.clip__stage {
  position: sticky;
  inset-block-start: 0;
  height: 100svh;
  margin-block-end: -100svh;
  background: #000;
  overflow: clip;
}

.clip__beat {
  height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.clip__canvas,
.clip__video { width: 100%; height: 100%; }
.clip__video { object-fit: cover; background: #000; }

.clip__toggle,
.clip__optin {
  position: absolute;
  inset-block-end: clamp(1rem, 3vw, 2.2rem);
  min-width: 10rem;
}
.clip__toggle { inset-inline-start: clamp(1rem, 3vw, 2.2rem); }
.clip__optin  { inset-inline-end: clamp(1rem, 3vw, 2.2rem); }


/* --- the one sentence --------------------------------------------------- */

.creed {
  margin: clamp(3rem, 8vh, 5.5rem) 0 0;
  padding-inline: var(--gut);
}
.creed p {
  max-width: 22ch;
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.01em;
  color: var(--dim);
}

/* --- visuals ------------------------------------------------------------ */

.visuals { padding-block: var(--rhythm); }

/* Square frames, because three of the four items are release artwork at 1:1.
   Cropping those to portrait would clip the titles at the sides. */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 28rem);
  gap: clamp(.5rem, 1.4vw, 1.1rem);
  padding-inline: var(--gut);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }

.shot { scroll-snap-align: center; }
.shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: saturate(.92) contrast(1.04);
  transition: filter .5s var(--ease);
}
.shot img:hover { filter: saturate(1) contrast(1); }

/* --- live --------------------------------------------------------------- */

.live {
  padding-block: var(--rhythm);
  padding-inline: var(--gut);
  text-align: center;
}
.live .section-h { padding-inline: 0; }

.live__none {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-style: italic;
  line-height: 1.05;
  color: var(--dimmer);
}
.live__hint {
  max-width: 32ch;
  margin: 1.5rem auto clamp(1.8rem, 4vh, 2.8rem);
  color: var(--dim);
}

/* --- list --------------------------------------------------------------- */

.list {
  padding-block: var(--rhythm);
  padding-inline: var(--gut);
  border-block-start: 1px solid var(--hair);
}
.list .section-h { padding-inline: 0; }

.list__pitch {
  max-width: 34ch;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3.4vw, 2.4rem);
  line-height: 1.2;
}

.signup { margin-block-start: clamp(2rem, 5vh, 3rem); max-width: 34rem; }
.signup__label {
  display: block;
  margin-block-end: .7rem;
  color: var(--dimmer);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.signup__row { display: flex; flex-wrap: wrap; gap: .7rem; }

.signup__input {
  flex: 1 1 14rem;
  min-height: 3rem;
  padding: 0 0 .4rem;
  border: 0;
  border-block-end: 1px solid var(--hair);
  background: none;
  color: var(--paper);
  font: inherit;
  transition: border-color .25s var(--ease);
}
.signup__input::placeholder { color: var(--dimmer); }
.signup__input:focus { outline: 0; border-color: var(--accent); }

.signup__note { min-height: 1.4em; margin-block-start: .9rem; font-size: .8rem; color: var(--dim); }
.signup__note[data-state="err"] { color: #e0a0a0; }
.signup__note[data-state="ok"]  { color: var(--accent-hi); }

/* The honeypot. Moved off-screen rather than display:none, because a bot that
   is worth stopping checks for display:none and skips the field. */
.signup__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem clamp(1rem, 4vw, 3rem);
  justify-content: space-between;
  align-items: baseline;
  padding: clamp(2.5rem, 6vh, 4rem) var(--gut);
  border-block-start: 1px solid var(--hair);
  color: var(--dimmer);
  font-size: .62rem;
  letter-spacing: .2em;
}
.foot a { transition: color .2s var(--ease); }
.foot a:hover { color: var(--paper); }
.foot__social { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.foot__legal  { display: flex; gap: clamp(1rem, 3vw, 2rem); }

/* --- placeholder state -------------------------------------------------- */

/* Any link still waiting on a real smartlink is visibly inert rather than
   silently broken. Remove data-needs-link once the URL is in. */
[data-needs-link] {
  color: var(--dimmer);
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Missing artwork reads as an intentional slot, not a broken image. */
img:not([src]), img[src=""] { visibility: hidden; }

/* --- era travel --------------------------------------------------------- */

/* Driven by scroll position, not by a timer, so it is the reader who moves him
   forward. No JavaScript: where scroll-driven animation is unsupported the
   accent simply stays gold, which is the current campaign anyway.

   The music does support this travel, but only the second measurement could
   see it. Essentia's DSP heuristics said otherwise — all three tracks scored
   intensity 0 and their danceability spread was 0.048, ordered backwards — and
   that reading was recorded here as fact until the pretrained models were run.

   The models separate them clearly, and in this order. See
   assets/data/audio-mood.json:

     En La Inquietud   valence 4.60  arousal 4.83  sad 0.792  danceable 0.486
     Una Mujer         valence 5.22  arousal 5.48  party 0.682
     Touch The Sky     valence 4.88  arousal 5.50  party 0.807  danceable 0.999

   Spreads of 0.663 on party and 0.669 on arousal, against 0.048 before. Gold to
   neon runs from the sad, least danceable track to the most club-facing one,
   which is the order this animation already had.

   The lesson is not that the earlier conclusion was careless but that a crude
   instrument returning a flat result is not evidence of a flat world. */

@keyframes era-travel {
  from { --accent: #c8a96a; --accent-hi: #e4d2a4; }
  to   { --accent: #ff4bb0; --accent-hi: #46dcff; }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    :root {
      animation: era-travel 1s linear both;
      animation-timeline: scroll(root block);
    }
  }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
