/* =============================================================
   Philipp Hülsenbeck — Uxile
   style.css
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500&family=Space+Mono:wght@400;700&family=EB+Garamond:ital,wght@0,400;0,700;1,400;1,700&display=swap');

@font-face {
  font-family: 'ASModule2';
  src: url('FONTS/ASModule2VF.woff2') format('woff2'),
       url('FONTS/ASModule2VF.ttf') format('truetype');
  font-weight: 100 900;
}

@font-face {
  font-family: 'ASModule4';
  src: url('FONTS/ASModule4VF.woff2') format('woff2'),
       url('FONTS/ASModule4VF.ttf') format('truetype');
  font-weight: 100 900;
}

@font-face {
  font-family: 'ASModule5';
  src: url('FONTS/ASModule5VF.woff2') format('woff2'),
       url('FONTS/ASModule5VF.ttf') format('truetype');
  font-weight: 100 900;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --c-bg:        #f3f3f1;
  --c-fg:        #0c0c0b;
  --c-dim:       rgba(12, 12, 11, 0.4);
  --c-rule:      rgba(12, 12, 11, 0.15);

  --f-sans:      'Space Grotesk', system-ui, -apple-system, sans-serif;
  --f-mono:      'Space Mono', 'Courier New', monospace;

  --nav-size:    clamp(1.3rem, 2vw, 2rem);
  --header-size: 1.05rem;

  --panel-w:     280px;

  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --dur:         500ms;
}

/* ── Base ────────────────────────────────────────────────────── */
html, body { height: 100%; overflow: hidden; }

body {
  background-color: var(--c-bg);
  color: var(--c-fg);
  font-family: var(--f-sans);
}

/* ── Content area (scrollable right panel) ───────────────────── */
.content-area {
  position: fixed;
  z-index: 3;
  overflow-y: scroll;
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
  display: none;
  pointer-events: none;
}

.content-area.is-visible {
  display: block;
  pointer-events: auto;
}

.content-area::-webkit-scrollbar { display: none; }
.content-area { scrollbar-width: none; -ms-overflow-style: none; }

/* ── About text panel ───────────────────────────────────────── */
.about-text {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--c-fg);
}

.about-text p + p {
  margin-top: 1.2em;
}

.about-text em {
  white-space: nowrap;
}

.contact-header-wrap {
  overflow: hidden;
  height: 25vh; /* fallback; JS sizes this flush with the Constellations underline */
  padding-bottom: 0.7em;
  border-bottom: 1px solid rgba(12,12,11,0.35);
  margin-bottom: 0.6em;
}

.contact-header-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0;
}
.contact-links {
  display: flex;
  align-items: baseline;
}
.contact-links > * + * {
  margin-left: 0.6em;
  padding-left: 0.6em;
  border-left: 1px solid rgba(12,12,11,0.35);
}

.contact-email-link {
  color: inherit;
  text-decoration: none;
}
.contact-email-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.contact-imprint {
  margin-top: 0;
}

.contact-imprint-trigger {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.contact-imprint-trigger:hover {
  font-style: italic;
}

.contact-imprint-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 400ms ease;
}
.contact-imprint-body.is-open {
  grid-template-rows: 1fr;
}

.contact-imprint-inner {
  min-height: 0;
  overflow: hidden;
  padding-top: 0;
  transition: padding-top 400ms ease;
}
.contact-imprint-body.is-open .contact-imprint-inner {
  padding-top: 1em;
}

.contact-imprint-heading {
  font-style: italic;
  margin-top: 1.2em;
}

/* ── Releases ─────────────────────────────────────────── */
.releases-wrap {
  position: relative;
  /* width + height refined by JS for exact viewport fit */
}

.releases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* JS overrides with px values */
  gap: 2px;
  width: 100%;
  /* no explicit height — rows size from item aspect-ratio until JS runs */
}

.releases-detail {
  display: grid;
  gap: 2px;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease;
}
.releases-detail.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.releases-grid-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1; /* square until JS sets explicit row heights */
}
.releases-grid-item--top {
  grid-column: span 2;
}
.releases-grid-item--sm {
  cursor: pointer;
}

.releases-grid-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.releases-grid-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7em 1em;
  background: rgba(0,0,0,0.42);
  opacity: 0;
  transition: opacity 300ms ease;
}
.releases-grid-item:hover .releases-grid-overlay {
  opacity: 1;
}

.releases-grid-label {
  display: block;
  text-align: center;
  margin: 0;
  padding: 0;
}

.releases-grid-title,
.releases-grid-sep,
.releases-grid-artist,
.releases-grid-amp {
  display: block;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: #f3f3f1;
  line-height: 1.3;
}
.releases-grid-sep,
.releases-grid-amp {
  font-style: normal;
}

/* one-line mode applied by JS when content fits */
.releases-grid-label.is-inline {
  white-space: nowrap;
}
.releases-grid-label.is-inline .releases-grid-title,
.releases-grid-label.is-inline .releases-grid-sep,
.releases-grid-label.is-inline .releases-grid-artist,
.releases-grid-label.is-inline .releases-grid-amp {
  display: inline;
}
.releases-grid-label.is-inline .releases-grid-sep {
  margin: 0 0.25em;
}

.releases-grid-item--top .releases-grid-title,
.releases-grid-item--top .releases-grid-sep,
.releases-grid-item--top .releases-grid-artist,
.releases-grid-item--top .releases-grid-amp {
  font-size: 1.05rem;
}

/* ── Releases detail ──────────────────────────────────── */
.releases-detail-left {
  grid-column: span 2;
  background: var(--c-bg);
  padding: 0 1.4em 1em 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
}

.releases-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-style: normal;
  color: var(--c-fg);
  background: none;
  border: none;
  padding: 0.15em 0.45em 0.2em 0.45em;
  margin-left: -0.45em;
  cursor: pointer;
  margin-bottom: 1.2em;
  transition: background 180ms ease, color 180ms ease;
  flex-shrink: 0;
}
.releases-detail-back:hover {
  background: #000;
  color: var(--c-bg);
}

.releases-detail-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 0.3em solid transparent;
  border-bottom: 0.3em solid transparent;
  border-right: 0.48em solid currentColor;
  vertical-align: middle;
  flex-shrink: 0;
}

.releases-detail-text {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--c-fg);
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.releases-detail-text::-webkit-scrollbar {
  display: none;
}

.releases-detail-text a {
  color: var(--c-fg);
  text-decoration: none;
}
.releases-detail-text a:hover {
  font-style: italic;
  text-decoration: underline;
}

.releases-detail-cover {
  grid-column: span 2;
  overflow: hidden;
  background: #111;
}
.releases-detail-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.releases-detail-img {
  overflow: hidden;
}
.releases-detail-img--1 { grid-column: span 2; }
.releases-detail-img--2 { grid-column: span 2; }
.releases-detail.no-inlay1 .releases-detail-left { grid-row: span 2; overflow-y: auto; }
.releases-detail.no-inlay1 .releases-detail-img--1 { display: none; }
.releases-detail-img img,
.releases-detail-img video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.releases-detail-img-split {
  display: flex;
  gap: 2px;
}
.releases-detail-img-split img {
  flex: 1;
  width: 0;
  height: 100%;
  object-fit: cover;
}

.section-label {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1em;
  font-weight: 400;
  font-style: italic;
}

/* ── Production list ─────────────────────────────────────── */
.production-list {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  column-gap: 2em;
  border-bottom: 1px solid rgba(12,12,11,0.35);
}

.production-item {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  border-top: 1px solid rgba(12,12,11,0.35);
  align-items: baseline;
  padding: 0.55em 0;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--header-size);
  white-space: nowrap;
}

.production-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-item span:last-child {
  grid-column: 4;
  justify-self: end;
}

/* ── Other Listening ─────────────────────────────────────── */
.other-listening-wrap {
  margin-top: 1.3em;
  margin-bottom: 1.3em;
  /* width matched to releases-wrap by JS */
}

.other-listening-label {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--header-size);
  font-style: normal;
  letter-spacing: 0.01em;
  color: var(--c-fg);
  margin: 0 0 1.3em;
  padding: 0.5em 0;
  border-top: 1px solid rgba(12,12,11,0.35);
  border-bottom: 1px solid rgba(12,12,11,0.35);
}

.other-listening-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.other-listening-item {
  aspect-ratio: 1;
  overflow: hidden;
}

.other-listening-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 300ms ease;
}

.other-listening-item:hover img {
  filter: grayscale(0%) contrast(1) brightness(1);
}

/* ── Composition list ────────────────────────────────────── */
.composition-list {
  border-bottom: 1px solid rgba(12,12,11,0.35);
}

.composition-gif {
  display: block;
  width: 100%;
  object-fit: fill;
  margin-top: 0.6em;
  /* height set by JS */
}

.composition-item {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 2em;
  border-top: 1px solid rgba(12,12,11,0.35);
  padding: 0.55em 0;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--header-size);
}

.composition-title {
  grid-column: 1;
  align-self: baseline;
}

.composition-year {
  grid-column: 2;
  align-self: baseline;
}

.composition-detail {
  grid-column: 1 / -1;
  padding-top: 0.1em;
  display: flex;
  justify-content: space-between;
  column-gap: 2em;
}

/* ── Constellation accordion ─────────────────────────────── */
#constellationsText {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.constellation-list {
  flex: none;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(12,12,11,0.35);
  position: relative;
}

.constellation-header-img {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}
body:has(#constellationsText .constellation-item:nth-child(1) .constellation-trigger:hover) .constellation-header-img--unguarded,
body:has(#constellationsText .constellation-item:nth-child(2) .constellation-trigger:hover) .constellation-header-img--spydergum,
body:has(#constellationsText .constellation-item:nth-child(3) .constellation-trigger:hover) .constellation-header-img--nest,
body:has(#constellationsText .constellation-item:nth-child(4) .constellation-trigger:hover) .constellation-header-img--amplify {
  opacity: 1;
}

.constellation-items-wrap {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.constellation-item {
  flex: 1 1 0;
  min-height: 0;
  overflow: visible;
  border-top: 1px solid rgba(12,12,11,0.35);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.constellation-item.is-open {
  flex: 0 0 auto;
  justify-content: flex-start;
}

.constellation-trigger {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--header-size);
  font-style: normal;
  font-weight: 400;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: baseline;
  padding: 0.55em 36%;
  align-self: flex-start;
  position: relative;
  isolation: isolate;
  width: 100%;
  box-sizing: border-box;
  transition: transform 450ms cubic-bezier(0.4,0,0.2,1);
}
.constellation-items-wrap:has(.constellation-item.is-open) .constellation-trigger {
  transform: translateX(36%);
  grid-template-columns: var(--widest-name, 7em) auto var(--widest-sub, 14em);
  justify-content: end;
}
.constellation-items-wrap:has(.constellation-item.is-open) .constellation-trigger .constellation-trigger-sub {
  justify-self: end;
}
.constellation-items-wrap .constellation-item.is-open .constellation-trigger {
  transform: translateX(-36%);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: normal;
}
.constellation-items-wrap .constellation-item.is-open .constellation-trigger .constellation-trigger-sub {
  justify-self: start;
}
.constellation-trigger::before {
  content: '';
  position: absolute;
  inset: 0 18%;
  background: transparent;
  z-index: -1;
}
.constellation-trigger:hover::before {
  background: var(--c-fg);
}
.constellation-trigger:hover {
  color: var(--c-bg);
}
.constellation-trigger-name {
  justify-self: start;
  white-space: nowrap;
}
.constellation-trigger-divider {
  padding: 0 2.5em 0 1em;
  opacity: 0.8;
}
.constellation-trigger-sub {
  justify-self: start;
  text-align: left;
  white-space: nowrap;
}


.constellation-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 500ms cubic-bezier(0.4,0,0.2,1);
}

.constellation-item.is-open .constellation-body {
  grid-template-rows: 1fr;
}

.constellation-body-inner {
  min-height: 0;
}

.constellation-more {
  display: block;
  text-align: right;
  margin-top: 0.6em;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: inherit;
  color: inherit;
  text-decoration: none;
}

.constellation-more:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.constellation-body-inner > p:first-of-type {
  margin-top: 0.4em;
}

.constellation-body-inner > p:last-of-type {
  margin-bottom: 0.9em;
}

/* ── Hover photo ─────────────────────────────────────────────── */
.bg-layer {
  position: fixed;
  z-index: 3;
  display: none;
  pointer-events: none;
}

.bg-layer.is-visible { display: block; }

.about-initial {
  position: fixed;
  z-index: 4;
  pointer-events: none;
  display: none;
  mix-blend-mode: multiply;
}

.about-initial--inv {
  filter: invert(1);
  mix-blend-mode: screen;
}

.about-initial.is-visible { display: block; }

.bg-layer.is-full {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
}

.bg-photo {
  height: 100%;
  width: auto;
  display: block;
}

/* ── Constellations GIF ──────────────────────────────────────── */
.hover-gif {
  position: fixed;
  z-index: 6;
  pointer-events: none;
  display: none;
}

body.nav-open .hover-gif { display: none !important; }

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.6rem 2.2rem 1.6rem;
}

.header-identity {
  display: flex;
  align-items: baseline;
  gap: 1.8rem;
  margin-left: 2rem;
}

.header-name {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--header-size);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.01em;
  color: var(--c-fg);
  transition: color var(--dur) var(--ease);
}

.header-alias {
  font-family: 'ASModule2', var(--f-mono);
  font-size: calc(var(--header-size) * 1.15);
  font-weight: 100;
  font-variation-settings: 'DENS' 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-fg);
  opacity: 0.78;
  position: absolute;
  /* JS positions left edge; visual right edge sets --nav-side-w */
  transform: rotate(-90deg);
  transform-origin: right center;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}

.header-alias-note {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--c-fg);
  opacity: 1;
  position: absolute;
  white-space: nowrap;
  pointer-events: none;
  transform: rotate(-90deg);
  transform-origin: right center;
}

.header-tagline {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--header-size);
  font-style: normal;
  font-weight: 400;
  color: var(--c-fg);
  letter-spacing: 0.01em;
  white-space: nowrap;
  /* switched to position:fixed by JS after landing */
}

.header-contact {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--header-size);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--c-fg);
  margin-right: 2rem;
  transition: color var(--dur) var(--ease), opacity 200ms ease;
}

.header-contact:hover { color: var(--c-fg); font-style: italic; }


/* ── Main layout ─────────────────────────────────────────────── */
.site-main {
  position: relative;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
}

/* ── Navigation ──────────────────────────────────────────────── */
.nav-center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  z-index: 20;
  pointer-events: auto;
}

.nav-col { padding: 0 4rem; }

.nav-col:first-child { text-align: right; transform: translateY(0.2em); }

.nav-list { list-style: none; }

.nav-list li { line-height: 1; }

.nav-list li + li { margin-top: 2.8em; }

.nav-list a {
  display: block;
  font-family: 'ASModule5', var(--f-sans);
  font-size: var(--nav-size);
  font-weight: 100;
  font-variation-settings: 'wght' 20;
  line-height: 1.22;
  text-decoration: none;
  color: var(--c-fg);
  padding: 0.03em 0;
  transition: color var(--dur) var(--ease), opacity 160ms ease;
  cursor: pointer;
  white-space: nowrap;
}

.nav-list a:hover {
  font-style: italic;
}

.nav-list a:hover .nav-annotation {
  font-style: normal;
}

.has-annotation {
  position: relative;
  width: fit-content;
}

.nav-annotation {
  position: absolute;
  left: 100%;
  top: -5px;
  margin-left: 0.3rem;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--c-fg);
  opacity: 1;
  letter-spacing: 0.01em;
  line-height: 1.5;
  white-space: nowrap;
}

.nav-list a.is-active {
  opacity: 1 !important;
  /* underline is the morphed #morphLine */
}

/* Morphing line */
.morph-line {
  position: fixed;
  background-color: rgba(12, 12, 11, 0.35);
  pointer-events: none;
  z-index: 25;
  opacity: 0;
}

/* Vertical divider */
.nav-divider {
  width: 1px;
  align-self: stretch;
  background-color: rgba(12, 12, 11, 0.35);
  flex-shrink: 0;
  min-height: 55vh;
  transition: background-color var(--dur) var(--ease);
}


/* ── Navigation: side panel state ────────────────────────────── */
.nav-center.is-side {
  left: 0;
  top: 0;
  transform: none;
  flex-direction: column;
  justify-content: center;
  width: var(--nav-side-w, var(--panel-w));
  height: 100vh;
  padding: 5.5rem 0 2.4rem;
  gap: 0;
}

.nav-center.is-side .nav-col {
  padding: 0;
  width: 100%;
  text-align: right;
}

.nav-center.is-side .nav-col ~ .nav-col {
  margin-top: 0;
}

.nav-center.is-side .nav-col ~ .nav-col .nav-list > li:first-child {
  margin-top: 2.8em;
}

.nav-center.is-side .nav-divider {
  display: none;
}

.nav-center.is-side .nav-label { display: none; }
.nav-center.is-side .nav-annotation { display: none; }
.nav-center.is-side .has-annotation { display: block; width: auto; }


/* ── Landing animation ───────────────────────────────────── */
#landingAnim {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  pointer-events: none;
}

#landingSlide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 1;
}

#landingText {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.landing-identity {
  display: flex;
  align-items: baseline;
  gap: 1.8rem;
}

.landing-name,
.landing-tagline {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--header-size);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--c-fg);
}

.landing-tagline {
  margin-left: 1.8rem;
}
