/* =========================================================
   saenart — Bengisu Özbey
   Müze/galeri hissi · Material 3 prensipleri · koyu tonlar
   Palet 1: Mum Işığı (gotik salon, obsidyen & mum altını)
   Palet 2: Sepya Plan (mürekkep kahvesi & parşömen)
   ========================================================= */

:root,
[data-palette="1"] {
  --bg: #0c0b0a;
  --surface: #141210;
  --surface-2: #1c1916;
  --surface-3: #25211d;
  --text: #ede4d3;
  --text-2: #b8ad99;
  --text-3: #8c8270;
  --accent: #d1a55a;
  --accent-strong: #e8c07a;
  --on-accent: #1d1305;
  --accent-soft: rgba(209, 165, 90, 0.14);
  --line: rgba(237, 228, 211, 0.10);
  --line-2: rgba(237, 228, 211, 0.20);
  --scrim: rgba(6, 5, 4, 0.9);
  --glow: rgba(232, 170, 80, 0.10);
}

[data-palette="2"] {
  --bg: #17110b;
  --surface: #1f1810;
  --surface-2: #281f15;
  --surface-3: #33281b;
  --text: #ecdcbf;
  --text-2: #c2ad8a;
  --text-3: #95815f;
  --accent: #c49358;
  --accent-strong: #dcae72;
  --on-accent: #1e1408;
  --accent-soft: rgba(196, 147, 88, 0.15);
  --line: rgba(236, 220, 191, 0.12);
  --line-2: rgba(236, 220, 191, 0.24);
  --scrim: rgba(14, 10, 6, 0.92);
  --glow: rgba(196, 147, 88, 0.08);
}

:root {
  color-scheme: dark;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-caps: "Cinzel", "Cormorant Garamond", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 28px;
  --ease: cubic-bezier(0.2, 0, 0, 1);          /* M3 emphasized */
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1); /* M3 emphasized decelerate */
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
  transition: background-color .6s var(--ease), color .6s var(--ease);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
  font-size: 22px;
  line-height: 1;
  user-select: none;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.display {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}
h2.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin: 12px 0 0;
}
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); max-width: 62ch; }
.muted { color: var(--text-2); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(40px, 6vw, 72px); }
.section__index { font-family: var(--font-display); font-style: italic; font-size: 20px; color: var(--text-3); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  pointer-events: all;
}
.no-intro .loader { display: none; }
.loader__panel {
  position: absolute; left: 0; right: 0; height: 50.5%;
  background: var(--bg);
  transition: transform 1.2s var(--ease);
}
.loader__panel--top { top: 0; }
.loader__panel--bottom { bottom: 0; }
.loader__inner {
  position: relative; text-align: center; padding: 0 16px;
  transition: opacity .5s var(--ease), transform .8s var(--ease);
}
.loader__eyebrow { display: block; opacity: 0; animation: fadeIn .8s .1s var(--ease) forwards; }
.loader__name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(44px, 10vw, 128px);
  line-height: 1.05;
  margin: 18px 0 22px;
  white-space: nowrap;
}
.loader__name .ch {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(0.35em);
  animation: letterIn 1.1s var(--ease-out) forwards;
  animation-delay: calc(0.35s + var(--i) * 0.065s);
}
.loader__line {
  display: block; height: 1px; width: min(520px, 70vw); margin: 0 auto;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  animation: lineGrow 1.6s .5s var(--ease) forwards;
}
.loader__meta {
  display: flex; justify-content: space-between; gap: 24px;
  width: min(520px, 70vw); margin: 14px auto 0;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--text-3);
  opacity: 0; animation: fadeIn .8s 1s var(--ease) forwards;
}
.loader__count { font-variant-numeric: tabular-nums; color: var(--text-2); }

.loader.is-done .loader__inner { opacity: 0; transform: translateY(-16px); }
.loader.is-done .loader__panel--top { transform: translateY(-101%); transition-delay: .25s; }
.loader.is-done .loader__panel--bottom { transform: translateY(101%); transition-delay: .25s; }
.loader.is-done { pointer-events: none; }
.is-loading body { overflow: hidden; }

@keyframes letterIn { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes lineGrow { to { transform: scaleX(1); } }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- Top app bar (M3) ---------- */
.appbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 72px; padding: 0 var(--gutter);
  transition: background-color .4s var(--ease), border-color .4s var(--ease), height .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.appbar.is-scrolled {
  height: 64px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display); font-size: 20px; font-style: italic;
}
.brand__text { font-family: var(--font-display); font-size: 22px; letter-spacing: .02em; }

.nav { display: flex; gap: 4px; }
.nav a {
  position: relative; overflow: hidden;
  text-decoration: none; font-size: 14px; letter-spacing: .04em;
  color: var(--text-2);
  padding: 8px 16px; border-radius: 999px;
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.nav a[aria-current="page"] { color: var(--on-accent); background: var(--accent); }
.appbar__actions { display: flex; align-items: center; gap: 4px; }

.icon-btn {
  position: relative; overflow: hidden;
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: transparent; color: var(--text); border: 0; cursor: pointer;
  transition: background-color .25s var(--ease);
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.icon-btn:focus-visible, .btn:focus-visible, .nav a:focus-visible, .room:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.palette-badge {
  position: absolute; top: 6px; right: 6px;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  font-size: 10px; line-height: 16px; font-weight: 600;
  background: var(--accent); color: var(--on-accent);
}
.menu-btn { display: none; }

@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; gap: 0;
    padding: 12px var(--gutter) 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .35s var(--ease), opacity .35s var(--ease);
  }
  .nav a { border-radius: var(--r-md); padding: 14px 16px; font-size: 16px; }
  .nav-open .nav { transform: none; opacity: 1; pointer-events: auto; }
  .nav-open .appbar { background: var(--surface); }
}

/* ---------- Buttons (M3) ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font: 500 14px/1 var(--font-body); letter-spacing: .06em;
  text-decoration: none; cursor: pointer; border: 0;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn .material-symbols-outlined { font-size: 20px; }
.btn--filled { background: var(--accent); color: var(--on-accent); }
.btn--filled:hover { background: var(--accent-strong); }
.btn--outlined { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn--outlined:hover { border-color: var(--accent); color: var(--accent); }
.btn--tonal { background: var(--accent-soft); color: var(--accent); }
.btn--tonal:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }

.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .18;
  transform: scale(0); animation: ripple .6s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 140px 0 clamp(48px, 8vw, 96px);
  overflow: hidden;
}
.hero__plan {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: var(--text); opacity: .16;
  pointer-events: none;
}
.hero__plan .draw {
  fill: none; stroke: currentColor; stroke-width: 1;
  stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000);
}
.is-ready .hero__plan .draw { animation: draw 3.6s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 1s); }
.hero__plan .accent { stroke: var(--accent); opacity: .9; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__grid {
  position: relative; width: 100%;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px;
}
.hero__title { font-size: clamp(58px, 12vw, 176px); }
.hero__title em { font-style: italic; color: var(--accent); }
.hero__sub { margin: 28px 0 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.plaque {
  width: 280px; padding: 24px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 13px; line-height: 1.6; color: var(--text-2);
}
.plaque strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--text); margin-bottom: 6px; }
.plaque hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: 1px; height: 56px; background: var(--line-2); overflow: hidden;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: var(--accent); animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .plaque { width: 100%; }
  .scroll-cue { display: none; }
}

/* Hero entrance after loader */
.hero [data-enter] { opacity: 0; transform: translateY(24px); }
.is-ready .hero [data-enter] {
  opacity: 1; transform: none;
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(.15s + var(--d, 0) * .12s);
}

/* ---------- Rooms (salonlar) — M3 cards ---------- */
.rooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.room {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 440px; padding: 32px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), transform .5s var(--ease);
}
.room:hover { background: var(--surface-2); border-color: var(--line-2); transform: translateY(-4px); }
.room__num { font-family: var(--font-display); font-style: italic; font-size: 96px; line-height: 1; color: var(--accent); opacity: .85; }
.room__title { font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1.1; margin: 8px 0 12px; }
.room__desc { color: var(--text-2); font-size: 15px; margin: 0; }
.room__go {
  margin-top: 28px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.room__go .material-symbols-outlined { transition: transform .35s var(--ease); }
.room:hover .room__go .material-symbols-outlined { transform: translateX(6px); }

@media (max-width: 960px) { .rooms { grid-template-columns: 1fr; } .room { min-height: 300px; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about__quote {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1.25; margin: 0;
  padding-left: 24px; border-left: 1px solid var(--accent);
}
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-top: 40px; }
.fact { background: var(--bg); padding: 22px; }
.fact b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 34px; color: var(--accent); line-height: 1.1; }
.fact span { font-size: 13px; color: var(--text-2); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .facts { grid-template-columns: 1fr; } }

/* ---------- Exhibitions ---------- */
.exhibits { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.exhibit {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: baseline;
  padding: 28px 8px; border-bottom: 1px solid var(--line);
  transition: background-color .3s var(--ease), padding .4s var(--ease);
}
.exhibit:hover { background: var(--surface); padding-left: 20px; }
.exhibit__year { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--text-3); }
.exhibit__name { font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); font-weight: 400; line-height: 1.15; }
.exhibit__place { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
@media (max-width: 640px) { .exhibit { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact__mail {
  display: inline-block; margin: 28px 0 36px;
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(30px, 6vw, 80px); line-height: 1.1;
  text-decoration: none; word-break: break-word;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 1px no-repeat;
  transition: background-size .6s var(--ease), color .3s var(--ease);
}
.contact__mail:hover { background-size: 100% 1px; color: var(--accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 13px; color: var(--text-3); }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding: 180px 0 clamp(56px, 8vw, 96px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero__title { font-size: clamp(52px, 9vw, 128px); margin-top: 16px; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2);
}
.chip .material-symbols-outlined { font-size: 18px; color: var(--accent); }

/* ---------- Thesis (tez) ---------- */
.thesis { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px, 6vw, 96px); padding: clamp(56px, 8vw, 112px) 0; }
.toc { position: sticky; top: 104px; align-self: start; }
.toc__label { margin-bottom: 16px; display: block; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 8px 0 8px 18px; margin-left: -1px;
  border-left: 1px solid transparent;
  text-decoration: none; font-size: 14px; color: var(--text-3);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); }

.chapter { padding-bottom: clamp(64px, 9vw, 120px); scroll-margin-top: 96px; }
.chapter + .chapter { padding-top: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); }
.chapter__num { font-family: var(--font-display); font-style: italic; font-size: 20px; color: var(--accent); }
.chapter__title { font-family: var(--font-display); font-weight: 300; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; margin: 8px 0 28px; }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 1.3em; color: var(--text-2); }
.prose p:first-of-type::first-letter {
  float: left; font-family: var(--font-display); font-size: 4.4em; line-height: .85;
  padding: 6px 12px 0 0; color: var(--accent);
}

@media (max-width: 960px) {
  .thesis { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ol { display: flex; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .toc a { white-space: nowrap; padding: 10px 14px; border-left: 0; border-bottom: 1px solid transparent; margin: 0 0 -1px; }
  .toc a.is-active { border-bottom-color: var(--accent); }
}

/* Plates (müze çerçeveli görseller) */
.plates { display: grid; gap: 28px; margin: 48px 0 8px; }
.plates--2 { grid-template-columns: repeat(2, 1fr); }
.plates--wide .plate__frame { aspect-ratio: 16 / 9; }
@media (max-width: 720px) { .plates--2 { grid-template-columns: 1fr; } }

.plate { margin: 0; }
.plate__frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(10px, 1.6vw, 18px);
}
.plate__frame img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 2px;
  cursor: zoom-in;
  transition: transform 1.2s var(--ease);
}
.plate__frame:hover img { transform: scale(1.03); }
.plate__frame:empty::after {
  content: attr(data-label);
  position: absolute; inset: clamp(10px, 1.6vw, 18px);
  display: grid; place-items: center;
  border: 1px dashed var(--line-2); border-radius: 2px;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--text-3);
}
.plate figcaption {
  display: flex; gap: 14px; margin-top: 14px;
  font-size: 13px; line-height: 1.55; color: var(--text-2);
}
.plate figcaption b { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 15px; color: var(--accent); white-space: nowrap; }

/* ---------- Book (kitap) ---------- */
.book-banner {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  aspect-ratio: 21 / 8; background: var(--surface);
  margin-top: clamp(40px, 6vw, 72px);
}
.book-banner img, .book-banner canvas { width: 100%; height: 100%; object-fit: cover; }
.book-banner:empty::after {
  content: "Kitap banner'ı — PDF'ten alınacak";
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--text-3);
}

.reader { padding: clamp(56px, 8vw, 112px) 0; }
.reader__stage {
  position: relative;
  display: flex; justify-content: center; align-items: center; gap: 2px;
  min-height: 60vh; padding: clamp(16px, 3vw, 40px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
}
.reader__stage canvas {
  max-width: 100%; height: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
  background: #fff;
  transition: opacity .45s var(--ease), transform .6s var(--ease);
}
.reader__stage.is-turning canvas { opacity: 0; transform: translateX(var(--dir, 24px)); }
.reader__empty { text-align: center; color: var(--text-3); font-size: 14px; max-width: 42ch; }
.reader__empty .material-symbols-outlined { font-size: 44px; color: var(--accent); display: block; margin: 0 auto 12px; }
.reader__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px;
}
.reader__nav { display: flex; align-items: center; gap: 8px; }
.reader__count { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--text-2); min-width: 92px; text-align: center; }
.icon-btn--outlined { border: 1px solid var(--line-2); }
.icon-btn[disabled] { opacity: .35; cursor: default; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 64px 16px 24px;
  background: var(--scrim);
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-height: 82vh; width: auto; border-radius: 2px; transform: scale(.96); transition: transform .5s var(--ease-out); }
.lightbox.is-open img { transform: none; }
.lightbox__cap { margin-top: 14px; font-size: 13px; color: var(--text-2); text-align: center; max-width: 70ch; }
.lightbox__close { position: absolute; top: 16px; right: 16px; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal], .hero [data-enter] { opacity: 1; transform: none; }
  .hero__plan .draw { stroke-dashoffset: 0; }
}

/* =========================================================
   SÆN eklentileri — atmosfer, mühür, eser galerileri, kitap
   ========================================================= */

/* Mum ışığı atmosferi */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 78% 8%, var(--glow), transparent 70%),
    radial-gradient(50vw 50vh at 10% 95%, var(--glow), transparent 70%);
}
/* Sepya planda kâğıt dokusu */
[data-palette="2"] body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .8 0 0 0 0 .6 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* SÆN mührü (göz sembolü) */
.sigil { display: block; color: var(--accent); }
.sigil path, .sigil ellipse { fill: none; stroke: currentColor; stroke-linecap: round; }
.loader .sigil { width: 64px; height: auto; margin: 0 auto 8px; }
.loader .sigil path, .loader .sigil ellipse {
  stroke-dasharray: 900; stroke-dashoffset: 900;
  animation: draw 2s .1s var(--ease) forwards;
}
.loader .sigil ellipse { animation-delay: .9s; }
.loader__name .ch:nth-child(1) { margin-left: 0; }
.brand__mark { border: 0; width: 26px; height: 36px; }
.brand__mark .sigil { width: 100%; height: 100%; }
.brand__text { font-family: var(--font-caps); font-size: 15px; letter-spacing: .32em; }
.brand__text small { display: block; font-family: var(--font-body); font-size: 10px; letter-spacing: .24em; color: var(--text-3); text-transform: uppercase; line-height: 1.2; }

/* Hero görseli (kapak) */
.hero__art {
  position: absolute; right: -6vw; top: 50%; transform: translateY(-50%);
  width: min(62vw, 820px); aspect-ratio: 1; pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  opacity: 0; transition: opacity 2.4s var(--ease) .4s;
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
.is-ready .hero__art { opacity: .5; }
[data-palette="2"] .hero__art img { filter: sepia(.55) contrast(1.05); }
@media (max-width: 860px) { .hero__art { width: 120vw; right: -40vw; top: 34%; } }

/* Oda kartlarında arka plan görseli */
.room__bg {
  position: absolute; inset: 0; z-index: 0; opacity: .22;
  background-size: cover; background-position: center;
  transition: opacity .6s var(--ease), transform 1.4s var(--ease);
}
.room:hover .room__bg { opacity: .36; transform: scale(1.04); }
.room::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, transparent 20%, var(--surface) 92%); }
.room > *:not(.room__bg) { position: relative; z-index: 1; }

/* Eser galerisi (müze duvarı) */
.works { columns: 3 280px; column-gap: 28px; }
.work { break-inside: avoid; margin: 0 0 40px; }
.work .plate__frame { aspect-ratio: auto; }
.work .plate__frame img { height: auto; }
.work__label { margin-top: 14px; padding-left: 14px; border-left: 1px solid var(--accent); }
.work__label b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 21px; line-height: 1.25; color: var(--text); }
.work__label span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }

/* Kitap metin blokları */
.manifesto { display: grid; grid-template-columns: 220px 1fr; gap: clamp(28px, 6vw, 96px); }
.manifesto__label { position: sticky; top: 104px; align-self: start; }
.manifesto__label .display { font-family: var(--font-caps); font-size: 13px; letter-spacing: .4em; color: var(--accent); }
.manifesto__label .muted { font-family: var(--font-display); font-style: italic; font-size: 22px; margin-top: 8px; }
.manifesto .prose p { color: var(--text); font-family: var(--font-display); font-size: clamp(20px, 2vw, 25px); line-height: 1.6; font-weight: 300; }
.manifesto .prose p:first-of-type::first-letter { font-size: 3.6em; }
.invocation { font-family: var(--font-display); font-style: italic; font-size: clamp(26px, 3vw, 38px); line-height: 1.5; color: var(--accent); margin: 1.2em 0 0; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); }
.duo h3 { font-family: var(--font-caps); font-weight: 400; font-size: 14px; letter-spacing: .4em; color: var(--accent); margin: 0 0 16px; }
.duo p { margin: 0; color: var(--text-2); font-family: var(--font-display); font-size: 21px; line-height: 1.6; }
@media (max-width: 860px) { .manifesto, .duo { grid-template-columns: 1fr; } .manifesto__label { position: static; } }

.interlude { text-align: center; padding: clamp(96px, 16vw, 200px) 0; }
.interlude__series { font-family: var(--font-caps); font-size: clamp(44px, 9vw, 120px); letter-spacing: .3em; font-weight: 400; margin: 0; padding-left: .3em; }
.interlude__quote { font-family: var(--font-display); font-style: italic; font-size: clamp(20px, 2.4vw, 28px); color: var(--text-2); margin: 20px 0 0; }

.book-banner--cover { aspect-ratio: 21 / 9; }
.book-banner--cover img { object-position: center 38%; }

/* Tez: tam genişlik plaka */
.plates--hero { margin: 0 0 56px; }
.plates--hero .plate__frame { aspect-ratio: 16 / 9; }

@media (prefers-reduced-motion: reduce) {
  .loader .sigil path, .loader .sigil ellipse { stroke-dashoffset: 0; }
  .hero__art { opacity: .5; }
}

/* Eserler kırpılmasın: tez plakalarında tablo tamamen görünür */
.chapter .plate__frame { background: var(--surface); }
.chapter .plate__frame img { object-fit: contain; }
.plates--2 { align-items: start; }

/* Kapak görseli künye kartıyla çakışmasın */
.hero__art { top: 50%; right: -6vw; width: min(52vw, 700px); }
@media (max-width: 860px) { .hero__art { width: 120vw; right: -40vw; top: 30%; } }

/* Grid çocukları içerikleri yüzünden genişlemesin (mobil taşma) */
.thesis > *, .manifesto > *, .duo > *, .about > *, .hero__grid > * { min-width: 0; }

/* ---------- Kitap sayfası düzeltmeleri ---------- */
/* Anker bağlantıları sabit üst barın altında kalmasın */
[id] { scroll-margin-top: 88px; }

/* Galeri: sütun (columns) yerine satır sıralı grid — I, II, III… soldan sağa */
.works {
  columns: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 48px 28px;
  align-items: start;
}
.work { margin: 0; }
.work .plate__frame { aspect-ratio: 4 / 5; }
.work .plate__frame img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 640px) {
  .work--wide { grid-column: span 2; }
  .work--wide .plate__frame { aspect-ratio: 16 / 7; }
}

/* Kapak banner'ı: kare kapak kesilmeden, kenarları karanlığa eriyerek */
.book-banner--cover { background: #0a0a0a; aspect-ratio: 21 / 9; }
.book-banner--cover img {
  width: auto; height: 100%; margin: 0 auto; object-fit: contain;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
@media (max-width: 640px) { .book-banner--cover { aspect-ratio: 1; } }

/* Ara başlık bölümleri ile galeriler arasında fazla boşluk olmasın */
.interlude { padding: clamp(72px, 11vw, 140px) 0 clamp(40px, 6vw, 72px); }

/* Okuyucu: sayfalar sahneden taşmasın */
.reader__stage { flex-wrap: nowrap; }
.reader__stage canvas { flex: 0 0 auto; }
.reader__stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* =========================================================
   Galeri: 3 sütun, büyük kartlar
   ========================================================= */
.works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 32px; }
.work .plate__frame { padding: clamp(12px, 1.4vw, 20px); }
.work__label b { font-size: clamp(20px, 1.8vw, 25px); }
.work__label span { font-size: 13px; }
@media (max-width: 960px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 24px; } }
@media (max-width: 560px) {
  .works { grid-template-columns: 1fr; }
  .work--wide { grid-column: auto; }
  .work--wide .plate__frame { aspect-ratio: 16 / 9; }
}

/* =========================================================
   Okuyucu v2 — ekranı dolduran sahne, çapraz geçiş, tam ekran
   ========================================================= */
.reader__frame {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.reader__stage {
  position: relative; display: block;
  height: clamp(420px, calc(100svh - 64px - 74px - 32px), 1600px);
  min-height: 0; padding: 14px;
  background: transparent; border: 0; border-radius: 0; overflow: hidden;
}
.reader__stage:focus { outline: none; }
.reader__stage:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.reader__stage canvas { max-width: none; transition: none; }

.reader__leaf {
  position: absolute; inset: 14px;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; transform: translateX(var(--from, 0));
  transition: opacity .45s var(--ease), transform .5s var(--ease);
  will-change: opacity, transform;
}
.reader__leaf.is-in { opacity: 1; transform: none; }
.reader__leaf.is-out { opacity: 0; transition: opacity .3s var(--ease) .3s; }
.reader__leaf canvas {
  display: block; flex: none; background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.reader__leaf canvas + canvas { box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 10px 0 18px -12px rgba(0, 0, 0, .8); }

.reader__empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.reader__empty[hidden] { display: none; }

.reader__zone {
  position: absolute; top: 0; bottom: 0; z-index: 2; width: 16%;
  display: flex; align-items: center; padding: 0 14px;
  background: transparent; border: 0; cursor: pointer; color: var(--text);
  opacity: 0; transition: opacity .3s var(--ease);
}
.reader__zone--prev { left: 0; justify-content: flex-start; }
.reader__zone--next { right: 0; justify-content: flex-end; }
.reader__zone .material-symbols-outlined {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--line-2);
}
.reader__frame:hover .reader__zone:not(:disabled) { opacity: 1; }
.reader__zone:disabled { pointer-events: none; }
@media (hover: none) { .reader__zone { opacity: 0 !important; } }

.reader__bar {
  margin: 0; padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.reader__hint { font-size: 13px; }
.reader__fs { height: 44px; padding: 0 18px; }
@media (max-width: 640px) {
  .reader__hint { display: none; }
  .reader__fs-label { display: none; }
  .reader__fs { width: 44px; padding: 0; justify-content: center; }
  .reader__stage { height: clamp(380px, calc(100svh - 64px - 70px - 24px), 900px); padding: 8px; }
  .reader__leaf { inset: 8px; }
}

/* Tam ekran (native) ve iOS yedeği (.is-full) — ayrı kurallar:
   gruplanırsa, bir seçiciyi tanımayan tarayıcı tüm kuralı yok sayar */
.reader__frame.is-full {
  position: fixed; inset: 0; z-index: 300;
  width: 100vw; height: 100vh; height: 100dvh;
  border: 0; border-radius: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.reader__frame.is-full .reader__stage { flex: 1 1 auto; height: auto; }
.reader__frame.is-full .reader__bar { background: var(--bg); }
.reader__frame:fullscreen {
  width: 100vw; height: 100vh;
  border: 0; border-radius: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.reader__frame:fullscreen .reader__stage { flex: 1 1 auto; height: auto; }
.reader__frame:fullscreen .reader__bar { background: var(--bg); }
.reader__frame::backdrop { background: var(--bg); }
.reader-lock body { overflow: hidden; }
.reader__frame.is-full .reader__stage:focus-visible,
.reader__frame:fullscreen .reader__stage:focus-visible { outline: none; }

/* =========================================================
   Tez kartları: ortak ölçü, görsel kartı tamamen doldurur
   - İkili kartlar: hepsi 4:5 (dikey tablolara uygun)
   - Tam genişlik kartlar: hepsi 16:10
   - object-fit: cover → boşluk kalmaz; tıklayınca tablonun tamamı açılır
   ========================================================= */
.chapter .plate__frame {
  padding: 8px;
  background: var(--surface-2);
}
.chapter .plates--2 .plate__frame { aspect-ratio: 4 / 5; }
.chapter .plates--hero .plate__frame { aspect-ratio: 16 / 10; }
.chapter .plate__frame img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.chapter .plates--2 { gap: 28px; }
@media (max-width: 720px) {
  .chapter .plates--2 .plate__frame { aspect-ratio: 4 / 5; }
  .chapter .plates--hero .plate__frame { aspect-ratio: 4 / 5; }
}

/* =========================================================
   Kitap galerileri: tezle aynı — ortak ölçü, görsel kartı doldurur
   ========================================================= */
.works .work .plate__frame {
  aspect-ratio: 4 / 5;
  padding: 8px;
  background: var(--surface-2);
}
.works .work .plate__frame img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}

/* =========================================================
   Dil seçimi (TR / EN / RU)
   ========================================================= */
.i18n-wait body { visibility: hidden; }           /* çeviri uygulanana kadar Türkçe görünmesin */
html[lang="tr"] .lang-note { display: none; }

.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; margin-right: 6px;
  border: 1px solid var(--line-2); border-radius: 999px;
}
.lang-switch button {
  position: relative; overflow: hidden;
  min-width: 34px; height: 30px; padding: 0 8px;
  font: 400 11px/1 var(--font-body); letter-spacing: .14em;
  color: var(--text-2); background: transparent;
  border: 0; border-radius: 999px; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.lang-switch button:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.lang-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) {
  .lang-switch { margin-right: 2px; padding: 2px; }
  .lang-switch button { min-width: 28px; height: 28px; padding: 0 5px; font-size: 10px; letter-spacing: .08em; }
  .brand__text small { display: none; }
}

/* =========================================================
   Daha ince tipografi — aynı font aileleri, hafif ağırlıklar
   ========================================================= */
body { font-weight: 300; }
.lead, .prose p, .room__desc, .plate figcaption, .fact span, .muted { font-weight: 300; }
.nav a, .btn, .chip, .eyebrow, .room__go, .exhibit__place, .work__label span, .reader__count, .loader__meta { font-weight: 400; }
.room__title, .exhibit__name, .work__label b, .plaque strong, .fact b, .duo p,
.about__quote, .contact__mail, .interlude__quote, .manifesto__label .muted { font-weight: 300; }
.hero__title, .page-hero__title, .section-title, .chapter__title, .loader__name { font-weight: 300; }
.hero__title em { letter-spacing: .02em; }
.brand__text, .manifesto__label .display, .duo h3, .interlude__series { font-weight: 400; }
/* Cinzel Kiril harfi içermez: Rusçada büyük harf başlıklar Cormorant ile */
html[lang="ru"] .brand__text, html[lang="ru"] .manifesto__label .display, html[lang="ru"] .duo h3,
html[lang="ru"] .interlude__series { font-family: "Cormorant Garamond", serif; font-weight: 400; }

/* Masaüstü: SÆN logosu (top 46%, right 6vw, width min(52vw, 700px)) ve altında künye kartı.
   --S : logo görselinin boyu (kare). "SÆN" yazısının alt çizgisi görselin ~%87'sinde.
   Kart logonun ekseninde ortalı, yazının 16px altında. */
@media (min-width: 1100px) {
  .hero {
    --S: min(52vw, 700px);
    --plaqueR: calc(6vw + var(--S) / 2 - 140px);          /* kart (280px) logo ekseninde */
    /* Kart bölümün içinde kalsın: 0.46H + 0.37S + 16 + 232 + 32 ≤ H */
    min-height: max(100svh, calc((0.37 * var(--S) + 280px) / 0.54));
  }
  .hero__grid { position: static; }
  .hero__art {
    top: 46%;
    right: 6vw;
    width: min(52vw, 700px);
    transform: translateY(-50%);
    -webkit-mask-image: radial-gradient(closest-side, #000 80%, transparent 100%);
            mask-image: radial-gradient(closest-side, #000 80%, transparent 100%);
  }
  .is-ready .hero__art { opacity: .6; }
  .plaque {
    position: absolute;
    right: var(--plaqueR);
    top: calc(46% + 0.37 * var(--S) + 16px);              /* 46% − S/2 + 0.87·S + 16px */
  }
  /* Giriş paragrafı kartın soluna kadar */
  .hero__sub {
    max-width: min(62ch, calc(100vw - var(--plaqueR) - 280px - 48px
                              - (max((100vw - var(--max)) / 2, 0px) + var(--gutter))));
  }
}
