:root {
  --wall: #0e2b29;
  --wall-deep: #081c1b;
  --cream: #f3f4e4;
  --ink: #1d1b15;
  --gold: #cda756;
  --gold-soft: #e6cd88;
  --gold-deep: #7a5c1e;
  --teal: #5fd6c3;
  --muted: rgba(243, 244, 228, .64);
  --line: rgba(243, 244, 228, .16);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* koyu petrol yeşili galeri duvarı: şubenin turkuaz doğramalarından; üstünde ince bir gren */
  background-color: var(--wall);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .22 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, p, figure, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }

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

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ---------- Üst çubuk ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px clamp(20px, 5vw, 56px) 30px;
  background: linear-gradient(to bottom, rgba(8, 28, 27, .97) 0%, rgba(8, 28, 27, .9) 52%, rgba(8, 28, 27, 0) 100%);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }

.nav__brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}
.wordmark {
  font-family: "Montserrat", var(--sans);
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  letter-spacing: .015em;
  color: var(--cream);
}
.nav__brand span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1;
  color: var(--gold-soft);
}

.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color .2s;
}
.nav__links a:hover { color: var(--cream); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--cream);
  white-space: nowrap;
}
.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.status.is-open i { background: var(--teal); box-shadow: 0 0 0 4px rgba(95, 214, 195, .2); }
.status.is-closed i { background: #b5654a; }
.status--inline { color: var(--muted); }

/* ---------- Puzzle sahneleri ---------- */

.scene {
  --seal: 1;   /* 0 → parçalar, 1 → bütün resim + çerçeve */
  --info: 1;   /* etiket görünürlüğü */
  --hero: 0;   /* açılış yazısı görünürlüğü */
  --fill: 1;   /* yerine oturan parça oranı */
  position: relative;
}
.js .scene { height: 250svh; }
.js .scene--hero { height: 300svh; }
.js .scene--reel { height: 220svh; }

.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: auto minmax(0, 360px);
  justify-content: center;
  align-items: center;
  gap: clamp(36px, 7vw, 110px);
  padding: 96px clamp(20px, 5vw, 56px) 48px;
  /* sahnenin ortasına düşen yumuşak ışık */
  background: radial-gradient(ellipse 62% 58% at 50% 48%, rgba(70, 150, 138, .2), rgba(70, 150, 138, 0) 72%);
}
.js .stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: clip;
}
.scene--flip .stage { grid-template-columns: minmax(0, 360px) auto; }
.scene--flip .work { order: 2; }

.board {
  position: relative;
  height: min(72svh, 740px);
  aspect-ratio: var(--ar);
}
.scene--reel .board { height: min(62svh, 560px); }

/* puzzle tablası: parçaların oturacağı boş yuva */
.board::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(3, 14, 13, .42);
  box-shadow: inset 0 0 0 1px rgba(243, 244, 228, .12), inset 0 0 60px rgba(0, 0, 0, .35);
}
.scene--hero .board::before { opacity: calc(1 - var(--hero)); }

.pieces { position: absolute; inset: 0; z-index: 1; }

.piece {
  position: absolute;
  will-change: transform;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .5));
}
.piece i {
  position: absolute;
  inset: 0;
  display: block;
  background-repeat: no-repeat;
}

.board__full {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.js .board__full { opacity: var(--seal); }

/* altın çerçeve: puzzle tamamlanınca resmin etrafına oturur */
.board__frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: var(--seal);
  transform: scale(calc(1.035 - .035 * var(--seal)));
  box-shadow:
    0 0 0 2px #3b2b0d,
    0 0 0 5px var(--gold-soft),
    0 0 0 13px #b58a36,
    0 0 0 15px var(--gold-deep),
    0 0 0 16px var(--gold-soft),
    0 34px 70px 4px rgba(0, 0, 0, .6);
}

.board__link { position: absolute; inset: 0; z-index: 4; display: none; }
.scene.is-done .board__link, html:not(.js) .board__link { display: block; }

/* ---------- Müze etiketi ---------- */

.placard {
  padding: 26px 28px 22px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 18px 40px -12px rgba(0, 0, 0, .65);
  opacity: var(--info);
  transform: translateY(calc((1 - var(--info)) * 22px));
}
.placard__no {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a6a25;
}
.placard__no span { color: rgba(29, 27, 21, .4); }
.placard h2 {
  margin-top: 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.1vw, 42px);
  line-height: 1.05;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.placard__where {
  margin-top: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: rgba(29, 27, 21, .62);
}
.placard__text {
  margin-top: 16px;
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(29, 27, 21, .84);
  text-wrap: pretty;
}

.tally {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(29, 27, 21, .14);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(29, 27, 21, .6);
  font-variant-numeric: tabular-nums;
}
.tally b { font-weight: 500; color: var(--ink); }
.tally__bar {
  flex: 1;
  height: 2px;
  background: rgba(29, 27, 21, .14);
}
.tally__bar i {
  display: block;
  height: 100%;
  background: #8a6a25;
  transform-origin: left;
  transform: scaleX(var(--fill));
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.tags li {
  padding: 3px 9px;
  border: 1px solid rgba(29, 27, 21, .2);
  border-radius: 999px;
  font-size: 12.5px;
  color: rgba(29, 27, 21, .74);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 11px 18px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  border-radius: 2px;
  transition: background .2s;
}
.btn:hover { background: #0f6f66; }

/* ---------- Açılış ---------- */

.hero {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 90px 20px 40px;
  text-align: center;
  pointer-events: none;
  opacity: var(--hero);
  transform: translateY(calc((1 - var(--hero)) * -36px));
}
html:not(.js) .hero { position: static; grid-column: 1 / -1; opacity: 1; transform: none; padding: 0 0 40px; }

.hero__inner { padding: 8px 12px; }
.hero h1 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(92px, 19vw, 250px);
  line-height: .92;
  letter-spacing: -.035em;
  color: var(--cream);
  text-shadow: 0 2px 40px rgba(0, 0, 0, .45);
}
.hero__lede {
  max-width: 30ch;
  margin: 22px auto 0;
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--muted);
  text-wrap: balance;
}
.hero__cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.hero__cue span {
  order: 2;
  width: 1px;
  height: 38px;
  background: linear-gradient(var(--gold-soft), transparent);
  transform-origin: top;
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(.35); opacity: .5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Ziyaret ---------- */

.visit {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(90px, 14vw, 170px) clamp(20px, 5vw, 56px) clamp(70px, 9vw, 120px);
}
.visit h2 {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 6.6vw, 88px);
  line-height: 1;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.visit__list { margin-top: clamp(44px, 6vw, 76px); border-top: 1px solid var(--line); }
.visit__list > div {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: baseline;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.visit dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.visit dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 28px;
}
.visit__big {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.visit dd a {
  font-size: 15px;
  color: var(--cream);
  text-decoration-color: var(--gold);
  text-underline-offset: 5px;
  white-space: nowrap;
}
.visit dd a:hover { color: var(--gold-soft); }
.visit dd a.visit__big {
  font-size: clamp(24px, 3vw, 36px);
  text-decoration: none;
}
.visit__big--text {
  font-style: normal;
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.3;
}
.visit__note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--muted);
}

/* ---------- Alt bilgi ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 30px clamp(20px, 5vw, 56px) 44px;
  background: var(--wall-deep);
  font-size: 13.5px;
  color: var(--muted);
}
.foot .wordmark { font-size: 18px; }
.foot__credit { margin-left: auto; font-family: var(--mono); font-size: 11.5px; }

/* ---------- Dar ekran ---------- */

@media (max-width: 820px) {
  .nav { gap: 16px; padding-top: 14px; }
  .nav__links { display: none; }

  .stage,
  .scene--flip .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    justify-items: center;
    gap: 30px;
    padding: 76px 20px 20px;
  }
  .scene--flip .work { order: 0; }
  .board { height: min(50svh, 520px); }
  .scene--reel .board { height: min(40svh, 420px); }

  .board__frame {
    box-shadow:
      0 0 0 1px #3b2b0d,
      0 0 0 3px var(--gold-soft),
      0 0 0 8px #b58a36,
      0 0 0 9px var(--gold-deep),
      0 0 0 10px var(--gold-soft),
      0 22px 44px 2px rgba(0, 0, 0, .6);
  }

  .placard { width: 100%; max-width: 420px; padding: 16px 18px 14px; }
  .placard h2 { margin-top: 6px; font-size: 26px; }
  .placard__where { display: none; }
  .placard__text { margin-top: 8px; font-size: 14.5px; line-height: 1.45; }
  .tally { margin-top: 12px; padding-top: 10px; }
  .tags { display: none; }
  .btn { margin-top: 12px; padding: 9px 14px; }

  .visit__list > div { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .foot__credit { margin-left: 0; }
}

@media (max-width: 820px) and (max-height: 640px) {
  .board { height: 44svh; }
  .placard__text { display: none; }
}

/* ---------- Azaltılmış hareket: resimler birleşmiş hâlde, sabitleme yok ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .scene, .js .scene--hero, .js .scene--reel { height: auto; }
  .js .stage { position: relative; height: auto; overflow: visible; }
  .js .hero { position: static; grid-column: 1 / -1; opacity: 1; transform: none; padding: 20px 0 30px; }
  .hero__cue { display: none; }
  .scene.is-done .pieces { display: none; }
}
