/* ============================================================
   SHADOWS — Deniz Çağlarcan
   Visual music page. Dark, lyrical, alpha-cutout figures flank
   the prose. Vanilla CSS, mobile-first.
============================================================ */

:root {
  --bg:        #050505;
  --bg-soft:   #0c0a08;
  --ink:       #ededeb;
  --ink-dim:   #8a8580;
  --gold:      #d6b269;
  --gold-soft: #b08a3a;
  --line:      rgba(214, 178, 105, 0.18);

  --max:       1200px;
  --gutter:    clamp(20px, 5vw, 64px);

  --serif:     "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans:      -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --display:   -apple-system, "SF Pro Display", "Inter Display", "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body { cursor: default; }

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: #000; }

.skip {
  position: absolute; left: -9999px; top: -9999px;
}
.skip:focus { left: 16px; top: 16px; padding: 8px 12px; background: var(--gold); color: #000; z-index: 999; }

/* ============================================================
   HERO
============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.hero__video {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  /* Source segment (8:01–9:11) is already low-key/monochrome — lift a touch
     so it doesn't crush to mud under the veil. */
  filter: brightness(0.82) contrast(1.08) saturate(1.05);
  transition: opacity 2.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero__video.is-ready { opacity: 1; }

.hero__video-player {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width:  max(100vw, 177.78vh);
  height: max(56.25vw, 100vh);
  object-fit: cover;
  background: #000;
  z-index: 0;
}

.hero__veil {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    linear-gradient(rgba(0,0,0,0.05), rgba(0,0,0,0.05)),
    radial-gradient(ellipse at center, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.85) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 30%, transparent 70%, var(--bg) 100%);
  pointer-events: none;
}

.hero__copy {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 var(--gutter) 140px;
  pointer-events: none;
}
.hero__copy a,
.hero__copy button { pointer-events: auto; }

.hero__title-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.hero__title-video {
  /* Hidden until real media loads, so the empty <video> default box
     (intrinsic 2:1) never reserves blank space before Deniz's title
     card exists. JS adds .is-loaded on loadedmetadata. */
  display: none;
  width: clamp(320px, 78vw, 1200px);
  height: auto;
  margin: 0 auto;
  pointer-events: none;
  transition: opacity 1.4s ease;
}
.hero__title-video.is-loaded { display: block; }
.hero__title-video.is-done { opacity: 0; }

.hero__tag {
  display: inline-block;
  margin: 1.6em auto 0;
  max-width: 60ch;
  font-size: clamp(14px, 1.4vw, 17px);
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: none;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.9),
    0 0 26px rgba(0, 0, 0, 0.65),
    0 2px 14px rgba(0, 0, 0, 0.7);
}

.hero__sound {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 2em;
  padding: 12px 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, rgba(0,0,0,0.9) 60%, transparent 100%);
          mask-image: radial-gradient(ellipse at center, #000 35%, rgba(0,0,0,0.9) 60%, transparent 100%);
  transition: border-color 0.4s, background 0.4s, color 0.4s;
}
.hero__sound:hover,
.hero__sound.is-on {
  border-color: var(--gold);
  background: rgba(214,178,105,0.08);
  color: var(--gold);
}
.hero__sound.is-on .dot { animation: none; }
.hero__sound .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 var(--gold);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(214,178,105,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(214,178,105,0); }
  100% { box-shadow: 0 0 0 0 rgba(214,178,105,0); }
}

.hero__scroll {
  /* Centered via auto margins, NOT translateX(-50%): this element is [data-fade],
     and the reveal helper sets `transform: translateY()/none`, which would clobber
     a centering transform and shove "Scroll" ~32px right of center. */
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  margin-inline: auto;
  width: max-content;
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0.7;
}
.hero__scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 36px;
  margin: 10px auto 0;
  background: var(--ink-dim);
  animation: scrollLine 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.3); opacity: 0.3; }
  50%      { transform: scaleY(1);   opacity: 0.9; }
}

/* Audio control — bottom-right of hero */
.hero__audio {
  position: absolute;
  bottom: 26px;
  right: clamp(20px, 3vw, 40px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  pointer-events: auto;
}
.hero__audio-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s, transform 0.2s;
}
.hero__audio-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(214, 178, 105, 0.08);
}
.hero__audio-btn:active { transform: scale(0.94); }
.hero__audio-icon { width: 14px; height: 14px; display: block; }
.hero__audio-icon--off { display: none; }
.hero__audio.is-muted .hero__audio-icon--on  { display: none; }
.hero__audio.is-muted .hero__audio-icon--off { display: block; }
.hero__audio.is-muted .hero__audio-slider__fill  { background: var(--ink-dim); }
.hero__audio.is-muted .hero__audio-slider__thumb { background: var(--ink-dim); }

.hero__audio-slider {
  position: relative;
  width: 84px;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  outline: none;
}
.hero__audio-slider__track,
.hero__audio-slider__fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero__audio-slider__track { width: 100%; background: var(--line); }
.hero__audio-slider__fill  {
  background: var(--gold);
  width: 0%;
  transition: width 0.08s linear, background 0.3s;
}
.hero__audio-slider__thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none;
  transition: left 0.08s linear, transform 0.22s ease, background 0.3s;
}
.hero__audio-slider:hover .hero__audio-slider__thumb,
.hero__audio-slider:focus-visible .hero__audio-slider__thumb {
  transform: translate(-50%, -50%) scale(1.5);
}

.hero__fs-btn { margin-left: 4px; }
.hero__fs-icon--exit { display: none; }
.hero__fs-btn.is-fs .hero__fs-icon--enter { display: none; }
.hero__fs-btn.is-fs .hero__fs-icon--exit  { display: block; }

@media (max-width: 520px) {
  .hero__audio { bottom: 18px; right: 16px; gap: 10px; }
  .hero__audio-slider { width: 60px; }
}

/* Reveal helpers */
[data-fade] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-fade].is-revealed { opacity: 1; transform: none; }
.hero__tag.is-revealed   { transition-delay: 0.55s; }
.hero__sound.is-revealed { transition-delay: 0.75s; }
.hero__scroll.is-revealed{ transition-delay: 1.0s;  }

/* ============================================================
   PROSE SECTIONS — Program Note / Compositional Process
============================================================ */
.prose {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 14vh, 180px) var(--gutter);
  background: var(--bg);
}
.prose--alt { background: var(--bg-soft); }

.prose__inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}

/* Full-width figure backdrop: the figure is enlarged and anchored to its side, the
   particles span the whole width behind the prose; a veil keeps the centre readable. */
.prose__figbg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.92;
}
.prose__figbg video {
  position: absolute;
  top: 22%;          /* sits a little lower than the section top */
  width: 280%;       /* ~2.5x: figure large, particles trail across the screen */
  height: auto;
  max-width: none;
}
.prose__figbg--right video { right: -5%; }              /* red: on the right, nudged further right */
/* purple: pushed to the left edge so the figure touches (and slightly passes) the
   page border like the red man; slightly smaller; raised to span the text height. */
.prose__figbg--left  video { left: -19%; width: 396%; top: 5%; }
.prose__figbg-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 64% at 50% 47%,
      rgba(5, 5, 5, 0.78) 0%, rgba(5, 5, 5, 0.50) 55%, rgba(5, 5, 5, 0) 100%),
    linear-gradient(to bottom,
      var(--bg) 0%, rgba(5, 5, 5, 0) 14%, rgba(5, 5, 5, 0) 86%, var(--bg) 100%);
}
@media (max-width: 980px) {
  .prose__figbg, .prose__figbg-veil { display: none; }   /* keep mobile light + readable */
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 2em;
}

.prose p {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.45;
  letter-spacing: -0.005em;
  margin: 0 0 1.2em;
  color: var(--ink);
}
.prose .lede {
  font-weight: 300;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1.6em;
}
.prose em { color: var(--gold); font-style: italic; }

.tool {
  position: relative;
  padding: 0 0.05em;
  background: linear-gradient(transparent 70%, rgba(214,178,105,0.18) 70%);
  transition: background 0.4s;
  cursor: default;
}
.tool:hover { background: linear-gradient(transparent 0%, rgba(214,178,105,0.28) 100%); }

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ------------------------------------------------------------
   FLANKING ALPHA FIGURES — Shadow Collection cutouts
   Sit at the edge of each prose section, opposite sides.
   Slide-in + fade-in once the section is in view.
------------------------------------------------------------ */
.prose__figure {
  position: absolute;
  top: clamp(60px, 10vh, 160px);
  z-index: 1;
  width: clamp(220px, 26vw, 420px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 2s ease, transform 2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.prose__figure--right {
  right: clamp(0px, 2vw, 60px);
  transform: translateX(60px);
}
.prose__figure--left {
  left: clamp(0px, 2vw, 60px);
  transform: translateX(-60px);
}
.prose__figure.is-revealed {
  opacity: 0.92;
  transform: translateX(0);
}

@media (max-width: 980px) {
  .prose__figure { display: none; }
}

/* ============================================================
   FOOTER
============================================================ */
.foot {
  padding: 60px var(--gutter) 80px;
  background: var(--bg);
  border-top: 1px solid rgba(255,255,255,0.04);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}
.foot p { margin: 0.4em 0; }
.foot em { color: var(--ink); font-style: italic; }
.foot__back a {
  color: var(--ink-dim);
  transition: color 0.3s;
}
.foot__back a:hover { color: var(--gold); }

/* ============================================================
   INSTALLATION VIEWS — gallery documentation (YouTube embeds)
============================================================ */
.views {
  padding: clamp(70px, 13vh, 160px) var(--gutter);
  background: var(--bg);
}
.views__inner {
  max-width: 980px;
  margin: 0 auto;
}
.views__lede {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink-dim);
  max-width: 720px;
  margin: 0 0 clamp(36px, 5vw, 64px);
}
.views__lede em { color: var(--gold); font-style: italic; }

.views__item { margin: 0 0 clamp(36px, 5vw, 64px); }
.views__item:last-child { margin-bottom: 0; }

.views__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  overflow: hidden;
}
/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
  .views__frame { height: 0; padding-bottom: 56.25%; }
}
.views__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.views__item figcaption {
  margin-top: 1em;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ============================================================
   AWARDS & SELECTED SHOWINGS  (.press — shared pattern)
============================================================ */
.press {
  padding: clamp(60px, 12vh, 140px) var(--gutter);
  background: var(--bg-soft);
}
.press__inner { max-width: 760px; margin: 0 auto; }
.press__list  { list-style: none; margin: 0; padding: 0; }
.press__list li {
  display: flex;
  align-items: baseline;
  gap: 1.5em;
  padding: 0.9em 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.press__list li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.press__year {
  flex-shrink: 0;
  width: 4em;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.85em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.press__venue { flex: 1; }
.press__venue strong { color: var(--gold); font-weight: 500; }
.press__venue em {
  font-style: normal;
  color: var(--ink-dim);
  font-size: 0.82em;
  letter-spacing: 0.04em;
}
.eyebrow--spaced { margin-top: 3.5em; }

/* ============================================================
   THE SHADOW COLLECTION + EXHIBITIONS — galleries
============================================================ */
.collection { padding: clamp(70px, 13vh, 160px) var(--gutter); background: var(--bg); }
.collection__inner { max-width: 1100px; margin: 0 auto; position: relative; }
.exhibit { padding: clamp(70px, 13vh, 160px) var(--gutter); background: var(--bg-soft); }
.exhibit__inner { max-width: 1100px; margin: 0 auto; }

.collection__lede,
.exhibit__lede {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(18px, 2.1vw, 24px); line-height: 1.45; letter-spacing: -0.005em;
  color: var(--ink-dim); max-width: 720px; margin: 0 0 clamp(36px, 5vw, 60px);
}
.collection__lede em, .exhibit__lede em { color: var(--gold); font-style: italic; }
.collection__credit {
  position: relative;
  z-index: 1;
  margin-top: clamp(24px, 4vw, 40px);
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim);
}
.collection__credit em { color: var(--ink); font-style: italic; text-transform: none; letter-spacing: 0; }

/* Masonry galleries via CSS columns (respects mixed aspect ratios) */
.gallery { columns: 2; column-gap: clamp(12px, 1.6vw, 20px); }
.gallery--paintings { columns: 3; position: relative; z-index: 1; }   /* figures in front of the rengarenk band */
@media (max-width: 900px) { .gallery--paintings { columns: 2; } }
@media (max-width: 560px) { .gallery, .gallery--paintings { columns: 1; } }
.gallery__item { break-inside: avoid; margin: 0 0 clamp(12px, 1.6vw, 20px); }
.gallery__item img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line); background: #000;
  cursor: zoom-in;
  transition: filter 0.4s ease;
}
.gallery__item img:hover { filter: brightness(1.08); }
/* Figure cutouts: transparent PNGs, no frame, lifted off the page */
.gallery__item--cutout img {
  border: 0;
  background: transparent;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.6));
}
.gallery__item--cutout img:hover { filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.6)) brightness(1.06); }
.gallery__item figcaption,
.posters__item figcaption {
  margin-top: 0.8em;
  font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.08em;
  color: var(--ink-dim); line-height: 1.4;
}

/* Festival posters: two portrait images */
.posters {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 3vw, 40px);
  max-width: 820px; margin: clamp(30px, 5vw, 56px) auto 0;
}
@media (max-width: 560px) { .posters { grid-template-columns: 1fr; max-width: 360px; } }
.posters__item { margin: 0; }
.posters__item img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line); cursor: zoom-in;
  transition: filter 0.4s ease;
}
.posters__item img:hover { filter: brightness(1.06); }
.posters__item figcaption { text-align: center; text-wrap: balance; }  /* balance lines so the year never orphans onto its own line */

/* Kosovo-a / Loft Art bottom alignment: NOT done in CSS. The masonry gap was
   8.5% of the Kosovo image height (measured at 1280px), so the trim is baked into
   the asset itself: ex-kosovo-a.jpg is cropped to 1200x1464 (full master kept as
   ex-kosovo-a-full.jpg). Since the masonry gap scales with column width, the baked
   crop keeps both image bottoms + captions aligned across desktop widths. To re-tune:
   crop ex-kosovo-a-full.jpg to a new height and bump the ?v= cache-bust. */

/* ============================================================
   COLLECTION FEATURE — red Kirmizi figure over the rengarenk triptych
============================================================ */
/* rengarenk band sits BEHIND the figures, big, with its main (FR) figure centred under
   the mor + multi cutouts and beside the Kirmizi figure. Positioned within collection__inner. */
.collection__feature {
  position: absolute;
  top: calc(56% + 2cm - 141px);  /* moved 1cm lower; minus half the added height (scales from centre) */
  left: -152%;            /* width 436% → band centre still ~66% (between mor & multi) */
  width: 436%;            /* 10% bigger than the 396% step */
  z-index: 0;
  pointer-events: none;
}
.collection__feature-bg {
  position: relative;
  width: 100%;
  display: flex;
  aspect-ratio: 16 / 3;
  opacity: 0.92;
}
.collection__feature-bg video {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* the painted red figure, in front, anchored left, at its original gallery size
   (it sets the feature height) */
.collection__feature-fig {
  position: relative;
  display: block;
  width: clamp(260px, 32%, 360px);
  height: auto;
  margin-left: clamp(0px, 6%, 90px);
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.6));
}
@media (max-width: 700px) { .collection__feature-fig { width: 56%; } }

/* ============================================================
   LIGHTBOX
============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  display: none; align-items: center; justify-content: center;
  padding: clamp(20px, 5vw, 72px);
  background: rgba(2, 2, 2, 0.94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.4s ease;
}
.lightbox.is-open { display: flex; opacity: 1; }
.lightbox__img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lightbox__close {
  position: absolute; top: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px);
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  font-size: 26px; line-height: 1; cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.lightbox__close:hover { border-color: var(--gold); color: var(--gold); background: rgba(214, 178, 105, 0.08); }

/* ============================================================
   REDUCED MOTION
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-fade], [data-reveal] { opacity: 1 !important; transform: none !important; }
  .prose__figure { opacity: 0.92 !important; transform: none !important; }
}
