/* Öykü's photographs are overwhelmingly dark-dominant — low-key portraits, stage work under
   coloured light, black-and-white film. There is no light theme on purpose: a white ground turns
   the split-lit portraits into black rectangles with a hard edge. */

:root {
  --bg: #0b0b0c;
  --ink: #edede9;
  --ink-2: #a3a39e;
  --ink-3: #7d7d78;
  --rule: #242427;

  --display: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: Newsreader, Georgia, "Times New Roman", serif;

  --pad: clamp(18px, 4vw, 56px);
  --gutter: 2px;
  --masthead: 62px;
}

@view-transition { navigation: auto; }

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 12px; top: 12px; z-index: 60;
  background: var(--ink); color: var(--bg); padding: 10px 14px;
}

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

/* ---------- masthead ---------- */

.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: var(--masthead);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: linear-gradient(to bottom, rgba(11, 11, 12, 0.92), rgba(11, 11, 12, 0));
  pointer-events: none;
}

.masthead > * { pointer-events: auto; }

.wordmark {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.index-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.index-toggle__rules { display: grid; gap: 4px; width: 22px; }
.index-toggle__rules i {
  display: block; height: 1px; background: currentColor;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s;
}
.index-toggle__rules i:nth-child(2) { width: 70%; }
[aria-expanded="true"] .index-toggle__rules i:nth-child(1) { transform: translateY(5px) rotate(11deg); }
[aria-expanded="true"] .index-toggle__rules i:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .index-toggle__rules i:nth-child(3) { transform: translateY(-5px) rotate(-11deg); }

/* ---------- index overlay ---------- */

/* Opaque base: without it the mosaic behind bleeds through and competes with the list. */
.index { position: fixed; inset: 0; z-index: 25; background: var(--bg); }
.index[hidden] { display: none; }

.index__backdrop {
  position: absolute;
  inset: 0;
  background: var(--bg) center / cover no-repeat;
  opacity: 0;
  filter: grayscale(0.4) brightness(0.34);
  transition: opacity 0.55s ease, background-image 0s;
}
.index.is-previewing .index__backdrop { opacity: 0.55; }

.index__list {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--masthead) var(--pad) var(--pad);
  overflow-y: auto;
  background: linear-gradient(to right, rgba(11, 11, 12, 0.86), rgba(11, 11, 12, 0.62));
}

.index__row {
  display: grid;
  grid-template-columns: 3.2em 1fr auto;
  align-items: baseline;
  gap: 0 clamp(12px, 3vw, 40px);
  padding: clamp(6px, 1.1vh, 14px) 0;
  border-top: 1px solid var(--rule);
  font-size: clamp(21px, 4.1vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink-2);
  transition: color 0.25s ease;
}
.index__row:last-child { border-bottom: 1px solid var(--rule); }
.index__row:hover,
.index__row:focus-visible { color: var(--ink); }

.index__row em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
}
.index__row small { font-size: 12px; letter-spacing: 0.14em; color: var(--ink-2); }
.index__row--minor { font-size: clamp(16px, 2.2vw, 24px); }

/* ---------- opening ---------- */

.opening {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px clamp(16px, 3vw, 40px);
  align-items: end;
  padding: clamp(120px, 21vh, 260px) var(--pad) clamp(48px, 9vh, 120px);
}

.opening__name {
  grid-column: 1 / span 8;
  margin: 0;
  font-size: clamp(38px, 8.6vw, 122px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

/* With no statement the name is the only thing on the screen, so it gets the full measure and
   more air beneath it. */
.opening--bare { padding-bottom: clamp(64px, 12vh, 150px); }
.opening--bare .opening__name { grid-column: 1 / -1; }

.opening__statement {
  grid-column: 9 / span 4;
  font-family: var(--serif);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.68;
  color: var(--ink-2);
  padding-bottom: 0.7em;
}
.opening__statement p { margin: 0 0 0.9em; }
.opening__statement p:last-child { margin-bottom: 0; }

/* ---------- mosaic ---------- */

.mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(280px, 52vh, 620px);
  gap: var(--gutter);
  padding: 0 0 clamp(60px, 10vh, 130px);
}

/* Two tall bands then a shorter one, cycling: the page gets a rhythm instead of a uniform stack
   of boxes, and it still works when a hidden section changes the row count. */
.mosaic {
  grid-auto-rows:
    clamp(280px, 52vh, 620px)
    clamp(280px, 52vh, 620px)
    clamp(210px, 36vh, 440px);
}

.tile {
  grid-column: span var(--span);
  position: relative;
  overflow: hidden;
  background: #141416 var(--lqip) center / cover no-repeat;
  isolation: isolate;
}

.tile__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease, transform 1.2s cubic-bezier(0.2, 0, 0, 1), filter 0.6s ease;
  filter: brightness(0.86);
}
.tile__img.is-loaded { opacity: 1; }
.tile:hover .tile__img,
.tile:focus-visible .tile__img { transform: scale(1.035); filter: brightness(1); }

.tile__label {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 2.4vw, 28px);
  /* The scrim has to survive a bright frame: the pale pavement in the film street picture and
     the lit theatre shot both wash out a lighter gradient. */
  background: linear-gradient(to top, rgba(6, 6, 7, 0.9) 0%, rgba(6, 6, 7, 0.55) 45%, rgba(6, 6, 7, 0) 100%);
  padding-top: clamp(48px, 8vw, 90px);
}

.tile__meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: clamp(15px, 1.7vw, 22px);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.tile__meta em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.62);
}
.tile__count {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.tile--empty {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 2.4vw, 26px);
  border: 1px solid var(--rule);
  background: none;
}

@media (max-width: 800px) {
  .opening { padding-top: clamp(96px, 16vh, 160px); }
  .opening__name { grid-column: 1 / -1; }
  .opening__statement { grid-column: 1 / -1; }
  .mosaic { grid-template-rows: none; grid-auto-rows: clamp(220px, 40vh, 380px); }
  .tile { grid-column: 1 / -1; }
}

/* ---------- section pages ---------- */

.hero {
  position: relative;
  height: clamp(300px, 64vh, 760px);
  background: #141416 var(--lqip) center / cover no-repeat;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 11, 12, 0.5) 0%, rgba(11, 11, 12, 0) 32%, rgba(11, 11, 12, 0.72) 100%);
}
.hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
  filter: brightness(0.9);
}
.hero__img.is-loaded { opacity: 1; }

.section-head {
  padding: clamp(28px, 5vh, 64px) var(--pad) clamp(26px, 4vh, 54px);
}

.section-head__meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 12px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.section-head__meta em { font-style: normal; color: var(--ink-3); }

.section-head__title {
  margin: 0;
  font-size: clamp(34px, 7vw, 96px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.section-head__hidden {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-left: 2px solid var(--rule);
  padding-left: 12px;
}

.lede {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink-2);
  max-width: 52ch;
  margin-top: 20px;
}

.prose {
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.66;
  max-width: 56ch;
  color: var(--ink-2);
  padding: 0 var(--pad) clamp(80px, 14vh, 160px);
}
.prose p { margin: 0 0 1em; }

.contact { display: flex; gap: 24px; font-family: var(--display); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 36px; }
.contact a { color: var(--ink); }

/* ---------- image stream ---------- */

.stream {
  display: flex;
  flex-direction: column;
  gap: clamp(34px, 7vw, 92px);
  padding: clamp(10px, 2vh, 28px) var(--pad) clamp(60px, 10vh, 130px);
}

.frame { margin: 0; }

.frame__open {
  display: block;
  width: min(100%, calc(84vh * var(--ratio)));
  aspect-ratio: var(--ratio);
  margin: 0 auto;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: #141416 var(--lqip) center / cover no-repeat;
}
.frame__open picture { display: block; height: 100%; }

.frame__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.frame__img.is-loaded { opacity: 1; }

figcaption {
  max-width: min(100%, calc(84vh * var(--ratio)));
  margin: 12px auto 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

/* ---------- walk between sections ---------- */

.walk {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pad);
  border-top: 1px solid var(--rule);
  padding: clamp(28px, 5vh, 60px) var(--pad) clamp(48px, 8vh, 100px);
}

.walk__link { display: grid; gap: 8px; color: var(--ink-2); transition: color 0.25s ease; }
.walk__link:hover { color: var(--ink); }
.walk__link--next { text-align: right; }
.walk__link small { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }
.walk__link span { font-size: clamp(20px, 3.4vw, 42px); font-weight: 500; letter-spacing: -0.03em; }

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

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  border-top: 1px solid var(--rule);
  padding: 26px var(--pad) 44px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer a:hover { color: var(--ink); }

.empty {
  border: 1px dashed var(--rule);
  margin: 0 var(--pad) 90px;
  padding: 64px 24px;
  text-align: center;
  color: var(--ink-2);
}
.empty p { margin: 0; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #070708;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
}
.lightbox[hidden] { display: none; }

.lightbox__stage {
  margin: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox__stage img { max-width: 100%; max-height: 86vh; width: auto; height: auto; display: block; }
.lightbox__stage figcaption { color: var(--ink-2); margin: 0; text-align: center; }

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  padding: 16px 20px;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.lightbox button:hover { opacity: 1; }
.lightbox__close { top: 6px; right: 8px; }
.lightbox__prev { left: 2px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 2px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .tile:hover .tile__img { transform: none; }
}
