/* sof'a & serho — strict black & white */
:root {
  --black: #000;
  --white: #fff;
  --silver: #bdbdbd;
  --grey: #7d7d7d;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --sp: 0;   /* hero scroll progress 0..1, set by JS */
  --p: 0.5;  /* portrait mix 0 = sof'a, 1 = serho */
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--black); color: var(--white); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video, canvas, picture { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--white); outline-offset: 6px; }

/* film grain over everything */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 50;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-size: 180px 180px;
  animation: grain 0.7s steps(1) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  14% { transform: translate(-3%, 2%); }
  28% { transform: translate(4%, -3%); }
  42% { transform: translate(-2%, 5%); }
  57% { transform: translate(5%, 1%); }
  71% { transform: translate(-4%, -4%); }
  85% { transform: translate(2%, 3%); }
}

/* language switch */
.lang {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: var(--gutter);
  z-index: 40;
  display: flex;
  gap: 4px;
  font-size: 0.9375rem;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}
.lang a {
  padding: 8px 6px;
  color: var(--silver);
  opacity: 0.7;
  text-decoration: none;
  transition: color 0.2s;
}
.lang a:hover, .lang a[aria-current="page"] { color: var(--white); opacity: 1; }
.lang a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: calc(1 - var(--sp) * 0.5);
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  opacity: calc(var(--sp) * 0.45);
  pointer-events: none;
}
main, .foot { position: relative; z-index: 1; }
.hero-bg {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(36px) brightness(0.5) contrast(1.2);
}
.hero-video {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: auto;
  aspect-ratio: 9 / 16;
  max-width: none;
  object-fit: cover;
  transform: translateX(-50%) scale(calc(1 + var(--sp) * 0.08));
  filter: grayscale(1) contrast(1.08) blur(calc(var(--sp) * 14px));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.7));
  pointer-events: none;
}
@media (max-aspect-ratio: 4/5) {
  .hero-bg { display: none; }
  .hero-video {
    left: 0;
    width: 100%;
    transform: scale(calc(1 + var(--sp) * 0.08));
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* the name: a double exposure in type */
.title {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  font: italic 400 clamp(4.25rem, 15vw, 14rem) / 0.8 var(--serif);
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
  color: var(--white);
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
@media (max-width: 760px) {
  .title { font-size: 22vw; }
  .w1 { top: 13%; }
  .w2 { bottom: 11%; }
}
.word { position: absolute; display: block; white-space: nowrap; }
.w1 {
  left: var(--gutter);
  top: 15%;
  transform: translateX(calc(var(--sp) * -14vw));
  filter: blur(calc(var(--sp) * 10px));
}
.w2 {
  right: var(--gutter);
  bottom: 13%;
  transform: translateX(calc(var(--sp) * 14vw));
  filter: blur(calc(var(--sp) * 10px));
}
.word-in { position: relative; display: block; }
.ghost {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0.32;
  filter: blur(4px);
  will-change: transform;
}
.ghost[data-k^="-"] { opacity: 0.18; filter: blur(9px); }
.txt { position: relative; display: block; }
.amp {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 1.15em;
  font-weight: 400;
  transform: translate(-50%, -54%) scale(calc(1 - var(--sp) * 0.4));
  opacity: calc(1 - var(--sp) * 1.4);
  mix-blend-mode: difference;
  text-shadow: none;
}
.amp-in { display: block; }

/* load: one orchestrated moment, the two names come into focus and the & arrives last */
.js .word-in, .js .amp-in { opacity: 0; }
.is-ready .w1 .word-in { animation: focus-l 2.2s cubic-bezier(0.2, 0.7, 0.1, 1) 0.15s both; }
.is-ready .w2 .word-in { animation: focus-r 2.2s cubic-bezier(0.2, 0.7, 0.1, 1) 0.35s both; }
.is-ready .amp-in { animation: amp-in 1.6s cubic-bezier(0.2, 0.7, 0.1, 1) 1.4s both; }
@keyframes focus-l {
  from { opacity: 0; filter: blur(28px); transform: translateX(22vw); letter-spacing: 0.25em; }
  to { opacity: 1; filter: blur(0); transform: none; letter-spacing: -0.025em; }
}
@keyframes focus-r {
  from { opacity: 0; filter: blur(28px); transform: translateX(-22vw); letter-spacing: 0.25em; }
  to { opacity: 1; filter: blur(0); transform: none; letter-spacing: -0.025em; }
}
@keyframes amp-in {
  from { opacity: 0; filter: blur(20px); transform: scale(1.6) rotate(-8deg); }
  to { opacity: 1; filter: blur(0); transform: none; }
}

/* ---------- mix: drag the & ---------- */
.mix {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "n1 stage n2" ". hint .";
  align-items: center;
  column-gap: clamp(16px, 4vw, 64px);
  padding: clamp(96px, 18vh, 200px) var(--gutter) clamp(72px, 12vh, 140px);
}
.mix-name {
  font: italic 400 clamp(2.5rem, 7vw, 6.5rem) / 1 var(--serif);
  letter-spacing: -0.02em;
  transition: none;
}
.n1 {
  grid-area: n1;
  justify-self: end;
  opacity: calc(1.25 - var(--p));
  filter: blur(calc(max(0, var(--p) - 0.5) * 12px));
}
.n2 {
  grid-area: n2;
  justify-self: start;
  opacity: calc(0.25 + var(--p));
  filter: blur(calc(max(0, 0.5 - var(--p)) * 12px));
}
.mix-stage {
  grid-area: stage;
  position: relative;
  width: min(520px, 42vw);
  aspect-ratio: 4 / 5;
  background: #000;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.mix-stage picture, .mix-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.mix-a { filter: blur(calc(max(0, var(--p) - 0.5) * 6px)); }
.mix-b { opacity: var(--p); filter: blur(calc(max(0, 0.5 - var(--p)) * 6px)); }
.mix-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -28px;
  height: 1px;
  background: var(--grey);
}
.mix-amp {
  position: absolute;
  left: calc(var(--p) * 100%);
  top: 0;
  transform: translate(-50%, -58%);
  font: italic 400 clamp(4rem, 7vw, 6rem) / 1 var(--serif);
  color: var(--white);
  text-shadow: 0 0 24px #000;
  pointer-events: none;
}
.mix-stage:focus-visible { outline-offset: 10px; }
.mix-hint {
  grid-area: hint;
  margin: 72px 0 0;
  text-align: center;
  color: var(--grey);
  font-size: 0.9375rem;
}

@media (max-width: 760px) {
  .mix {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "n1 n2" "stage stage" "hint hint";
    row-gap: 20px;
  }
  .n1 { justify-self: start; }
  .n2 { justify-self: end; }
  .mix-stage { width: 100%; justify-self: center; }
  .mix-hint { margin-top: 56px; }
}

/* ---------- release ---------- */
.release {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(64px, 12vh, 140px) var(--gutter) clamp(120px, 22vh, 240px);
  text-align: center;
}
.section-title {
  margin: 0 0 20px;
  font: 300 clamp(2rem, 5vw, 3.75rem) / 1.05 var(--sans);
  letter-spacing: -0.035em;
}
.lead {
  max-width: 30ch;
  margin: 0 auto;
  color: var(--silver);
  font-weight: 300;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
}
.ig-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  margin: 40px 0 0;
}
.ig-links a {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--grey);
  transition: text-decoration-color 0.2s;
}
.ig-links a:hover { text-decoration-color: var(--white); }

.releases {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
  justify-content: center;
  gap: 40px;
}
.release-card { display: grid; gap: 10px; text-decoration: none; text-align: left; }
.release-card img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1); }
.release-name { font: 400 1.375rem/1.2 var(--sans); letter-spacing: -0.02em; }
.release-cta { color: var(--grey); }
.release-card:hover .release-cta { color: var(--white); }

/* ---------- footer ---------- */
.foot {
  padding: 0 var(--gutter) max(40px, env(safe-area-inset-bottom));
  text-align: center;
}
.foot-names {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.25em;
  font: italic 400 clamp(3rem, 11vw, 9rem) / 1 var(--serif);
  letter-spacing: -0.025em;
}
.foot-names a { text-decoration: none; transition: opacity 0.3s, filter 0.3s; }
.foot-names:hover a:not(:hover) { opacity: 0.35; filter: blur(3px); }
.foot-amp { color: var(--grey); }
.foot-meta { margin: 8px 0 0; color: var(--silver); }
.foot-copy { margin: 56px 0 0; color: var(--grey); font-size: 0.875rem; }

/* ---------- release (smart link) page ---------- */
.rel-body { min-height: 100svh; }
.rel-bg {
  position: fixed;
  inset: -10%;
  background: center / cover no-repeat;
  filter: grayscale(1) blur(48px) brightness(0.35);
}
.rel {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  padding: max(56px, 8vh) var(--gutter) 64px;
  text-align: center;
}
.rel-cover { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; filter: grayscale(1); }
.rel-title { margin: 32px 0 4px; font: 300 clamp(2rem, 8vw, 2.75rem) / 1.05 var(--sans); letter-spacing: -0.035em; }
.rel-artist { margin: 0; color: var(--silver); }
.rel-artist a { text-decoration: none; }
.rel-listen { margin: 40px 0 12px; color: var(--silver); font-size: 0.9375rem; }
.rel-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.rel-links a {
  display: block;
  padding: 18px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.rel-links a:hover { background: var(--white); color: var(--black); }

/* ---------- root language picker (no-JS fallback) ---------- */
.root-body { display: grid; place-items: center; min-height: 100svh; }
.root-pick { text-align: center; }
.root-name { font: italic 400 3rem/1 var(--serif); margin: 0 0 16px; }
.root-pick .lang { position: static; justify-content: center; mix-blend-mode: normal; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .js .word-in, .js .amp-in { opacity: 1; }
  .is-ready .w1 .word-in, .is-ready .w2 .word-in, .is-ready .amp-in { animation: none; }
}
