/* ==========================================================================
   Moonart · tek stil dosyası
   Modernist tasarım sistemi tokenları üzerine kurulu, mobile-first responsive.
   ========================================================================== */

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-divider: #201e1d;
  --color-accent: #ec3013;
  --color-accent-600: #d02a10;
  --color-accent-700: #a8220d;
  --color-neutral-200: #dcdad9;
  --color-neutral-300: #c9c6c4;
  --color-neutral-500: #8d8886;
  --color-neutral-600: #726d6b;
  --color-neutral-700: #5a5553;
  --color-neutral-800: #403c3a;

  --font-heading: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, sans-serif;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 40px;

  --page: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --rule: 2px;
}

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
  text-wrap: pretty;
}
h1 { font-size: clamp(34px, 7vw, 56px); line-height: 1.02; }
h2 { font-size: clamp(24px, 4.4vw, 34px); line-height: 1.08; }
h3 { font-size: clamp(19px, 3vw, 24px); }
h4 { font-size: 17px; }
h6 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: var(--space-2);
}
p { margin: 0 0 var(--space-3); }

a { color: var(--color-accent-700); text-decoration: none; }
a:hover { color: var(--color-accent); }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
::selection { background: rgba(236, 48, 19, 0.22); }

.wrap { max-width: var(--page); margin: 0 auto; padding-inline: var(--gutter); }
.rule-top { border-top: var(--rule) solid var(--color-divider); }
.hr { border: 0; border-top: var(--rule) solid var(--color-divider); margin: var(--space-6) 0; }
.muted { color: var(--color-neutral-700); }
.small { font-size: 13px; }
.kicker { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent-700); }
.mono-num { font-family: var(--font-heading); font-weight: 800; }
.grayscale img, .grayscale { filter: none; }

/* ---------- üst bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-bg);
  border-bottom: var(--rule) solid var(--color-divider);
}
.topbar-inner {
  max-width: var(--page); margin: 0 auto;
  padding: var(--space-3) var(--gutter);
  display: flex; align-items: center; gap: var(--space-4);
}
.brand {
  font-family: var(--font-heading); font-weight: 800; font-size: 20px;
  letter-spacing: 0.06em; color: var(--color-text); margin-right: auto;
}
.nav-links { display: flex; gap: var(--space-6); align-items: center; }
.nav-links a {
  color: var(--color-text); font-size: 14px; padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a[aria-current="page"] { color: var(--color-accent-700); border-bottom-color: var(--color-accent); }
.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  background: none; border: var(--rule) solid var(--color-divider);
  color: var(--color-text); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- hero: ay fotoğrafı ---------- */

.hero {
  position: relative;
  border-bottom: var(--rule) solid var(--color-divider);
  background: #0c0c0e;
  color: #f4f2ee;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center;
  opacity: 0.85;
  z-index: -2;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,10,0.35) 0%, rgba(8,8,10,0.78) 70%, rgba(8,8,10,0.92) 100%);
  z-index: -1;
}
.hero-inner {
  max-width: var(--page); margin: 0 auto;
  padding: clamp(56px, 14vw, 132px) var(--gutter) clamp(32px, 7vw, 72px);
  display: grid; gap: var(--space-6);
}
.hero h1 { color: #fff; max-width: 22ch; }
.hero p { color: #d8d4cd; font-size: clamp(15px, 2.2vw, 18px); max-width: 46ch; }
.hero .kicker { color: #f0b8ad; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.28);
  padding-top: var(--space-4); margin-top: var(--space-2);
}
.hero-stats div { min-width: 88px; }
.hero-stats .mono-num { font-size: 26px; color: #fff; }
.hero-stats small { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #b9b4ac; }

/* ---------- butonlar / etiketler ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 12px 18px; border: var(--rule) solid transparent;
  cursor: pointer; text-align: left; min-height: 44px;
  white-space: nowrap; flex-shrink: 0;
  transition: background-color .12s ease, color .12s ease;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-600); color: #fff; }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { background: transparent; color: var(--color-text); border-color: var(--color-divider); }
.btn-secondary:hover { background: var(--color-neutral-200); color: var(--color-text); }
.btn-ghost { background: none; color: var(--color-accent-700); padding-inline: 0; }
.btn-light { background: #fff; color: var(--color-text); }
.btn-block { width: 100%; justify-content: flex-start; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.tag {
  display: inline-block; font-size: 11px; letter-spacing: 0.06em;
  padding: 5px 10px; border: 1px solid var(--color-neutral-300);
  color: var(--color-neutral-800); background: transparent;
  white-space: nowrap; cursor: pointer; font-family: inherit;
}
a.tag:hover { border-color: var(--color-accent); color: var(--color-accent-700); }
.tag.is-active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.tag-static { cursor: default; background: var(--color-surface); }

/* ---------- bölüm başlığı ---------- */

.section { padding: clamp(40px, 7vw, 72px) 0; }
.section-head {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  justify-content: space-between; align-items: baseline;
  border-top: var(--rule) solid var(--color-divider);
  padding-top: var(--space-3); margin-bottom: var(--space-6);
}
.section-head h2 { margin: 0; }
.section-head a { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- ızgaralar ---------- */

.grid { display: grid; gap: var(--space-6); }
.grid-works { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); align-items: start; }
@media (min-width: 900px) {
  .grid-works .work.is-landscape { grid-column: span 2; }
}
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.split { display: grid; gap: clamp(24px, 5vw, 56px); grid-template-columns: 1fr; }

/* ---------- eser kartı ---------- */

.work { display: block; color: inherit; }
/* pasparta: gorsel hicbir zaman kirpilmaz, dikey/yatay ayni cercevede oturur */
.work-figure {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--color-neutral-200);
  display: grid; place-items: center;
  padding: clamp(12px, 2.4vw, 26px);
  transition: background 0.2s ease;
}
.work-figure img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(32, 30, 29, 0.22));
}
.work:hover .work-figure { background: var(--color-neutral-300); }
/* JS ile isaretlenen yon: yatay eserler daha genis, dikey eserler daha uzun cerceve alir */
.work-figure[data-orient="landscape"] { aspect-ratio: 4 / 3; }
.work-figure[data-orient="portrait"] { aspect-ratio: 4 / 5; }
.work-figure[data-orient="square"] { aspect-ratio: 1 / 1; }
.grid-works .work-figure[data-orient="landscape"] img { max-height: 100%; }
.work-figure figcaption {
  position: absolute; left: 8px; top: 8px; background: var(--color-bg);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px;
}
.work-body { border-top: 1px solid var(--color-divider); padding-top: var(--space-2); margin-top: var(--space-2); }
.work-title { font-family: var(--font-heading); font-weight: 800; font-size: 16px; }
.work-meta { font-size: 12px; color: var(--color-neutral-700); }
.work-desc { font-size: 12.5px; color: var(--color-neutral-800); margin: var(--space-2) 0 0; }
.work-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--space-2); }

/* ---------- filtre çubuğu ---------- */

.filters {
  position: sticky; top: 61px; z-index: 30;
  background: var(--color-bg);
  border-top: var(--rule) solid var(--color-divider);
  border-bottom: var(--rule) solid var(--color-divider);
  max-width: 100vw; overflow: hidden;
}
.filters-inner {
  max-width: var(--page); margin: 0 auto;
  padding: var(--space-3) var(--gutter);
  display: grid; gap: var(--space-3);
  min-width: 0;
}
.filter-row { display: flex; gap: var(--space-3); align-items: flex-start; min-width: 0; }
.filter-label {
  flex: 0 0 auto; width: 72px; font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-neutral-700); padding-top: 8px;
}
.chips {
  display: flex; gap: var(--space-2); flex-wrap: wrap; flex: 1; min-width: 0;
}

/* kategori şeridi: tek satır, yatay kaydırmalı, sayfayı genişletmez */
.cats-scroll {
  flex: 1 1 auto; min-width: 0; max-width: 100%;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 20px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 20px), transparent 100%);
}
.cats-scroll::-webkit-scrollbar { height: 0; }
.cats {
  display: inline-flex; flex-wrap: wrap; width: auto; gap: 6px;
  border: 0; padding: 2px 0;
}
.cats a {
  padding: 9px 14px; font-size: 13px; line-height: 1;
  color: var(--color-neutral-800);
  background: var(--color-surface);
  border: 1px solid transparent;
  white-space: nowrap; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.cats a:hover { background: var(--color-neutral-200); color: var(--color-text); border-color: var(--color-neutral-300); }
.cats a .small { font-size: 11px; opacity: .65; }
.cats a.is-active {
  background: var(--color-accent); border-color: var(--color-accent);
  color: #fff; font-weight: 600;
}
.cats a.is-active .small { color: #fff; opacity: .8; }

/* ---------- tablo ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
table.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-neutral-700); border-bottom: var(--rule) solid var(--color-divider);
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
}
table.table td { border-bottom: 1px solid var(--color-neutral-300); padding: var(--space-3) var(--space-3) var(--space-3) 0; vertical-align: top; }

/* ---------- form ---------- */

.field { display: grid; gap: 6px; margin-bottom: var(--space-4); }
.field label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700); }
.input, select.input, textarea.input {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--color-text);
  background: #fff; border: 1px solid var(--color-divider); border-radius: 0;
  padding: 12px; min-height: 44px;
}
textarea.input { min-height: 140px; resize: vertical; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--color-divider); }
.seg label {
  padding: 10px 14px; font-size: 13px; cursor: pointer;
  border-right: 1px solid var(--color-neutral-300); min-height: 44px;
  display: inline-flex; align-items: center; gap: 6px;
}
.seg label:last-child { border-right: 0; }
.seg input { accent-color: var(--color-accent); }
.notice { border: var(--rule) solid var(--color-divider); padding: var(--space-4); margin-bottom: var(--space-5); }
.notice-ok { border-color: var(--color-accent); }
.errors { color: var(--color-accent-700); font-size: 14px; margin: 0; padding-left: 18px; }

/* ---------- poster / vurgu ---------- */

.poster { background: var(--color-accent); color: #fff; }
.poster .wrap { padding-block: clamp(40px, 8vw, 72px); }
.poster h2 { color: #fff; font-size: clamp(28px, 5.4vw, 48px); max-width: 26ch; }
.poster a.btn-light:hover { background: var(--color-surface); }
.poster .meta { display: flex; flex-wrap: wrap; gap: var(--space-6); font-size: 14px; margin-bottom: var(--space-5); }

/* ---------- yazı kartı ---------- */

.card { display: block; color: inherit; background: var(--color-surface); padding: var(--space-5); }
.card:hover { background: var(--color-neutral-200); }
.card-kicker { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-700); }
.card-title { font-family: var(--font-heading); font-weight: 800; font-size: 19px; margin: var(--space-2) 0; }
.card-body { font-size: 14px; color: var(--color-neutral-800); margin: 0; }
.card-meta { font-size: 12px; color: var(--color-neutral-700); margin-top: var(--space-3); }

/* ---------- eser detay ---------- */

.detail-media { display: grid; gap: var(--space-2); }
/* sahne sabit oranlı: yatay görsel üstte/altta boşluk bırakır, dikey görsel yüksekliği doldurur */
.detail-media .main {
  position: relative; background: var(--color-neutral-200); overflow: hidden;
  display: grid; place-items: center;
  aspect-ratio: 1 / 1; max-height: 76vh;
  padding: clamp(14px, 3vw, 40px);
}
.detail-media .main img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(32, 30, 29, 0.28));
}
@media (max-width: 720px) {
  .detail-media .main { aspect-ratio: 4 / 5; padding: 12px; }
}

/* büyüteç */
.zoom-btn {
  position: absolute; top: var(--space-3); right: var(--space-3);
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-bg); color: var(--color-text);
  border: var(--rule) solid var(--color-divider);
}
.zoom-btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

.detail-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: var(--space-2); }
.detail-thumbs img {
  aspect-ratio: 1 / 1; object-fit: contain; width: 100%;
  background: var(--color-neutral-200); padding: 5px;
}
.thumb-btn {
  padding: 0; border: 2px solid transparent; background: none; cursor: pointer;
  display: block; line-height: 0;
}
.thumb-btn:hover { border-color: var(--color-neutral-500); }
.thumb-btn.is-active { border-color: var(--color-accent); }

/* tam ekran görsel gezgini */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(12, 12, 14, 0.94);
  padding: clamp(12px, 3vw, 32px);
  grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--space-3);
  max-height: 100dvh; overflow: hidden;
}
.lightbox[open], .lightbox.is-open { display: grid; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); color: #f0ece4; }
.lightbox-stage {
  position: relative; min-height: 0; min-width: 0; overflow: hidden;
}
.lightbox-stage img {
  position: absolute; inset: 0; margin: auto;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
}
.lightbox-caption { color: #b9b4ac; font-size: 13px; text-align: left; }
.lb-btn {
  min-width: 44px; min-height: 44px; padding: 10px 14px; cursor: pointer;
  background: transparent; color: #f0ece4; border: 1px solid rgba(255,255,255,0.4);
  font-family: var(--font-body); font-size: 14px;
}
.lb-btn:hover { background: rgba(255,255,255,0.12); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.lb-prev { left: 0; }
.lb-next { right: 0; }
.lb-strip { display: flex; gap: 6px; overflow-x: auto; padding-top: 4px; flex: 0 0 auto; }
.lb-strip button { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; line-height: 0; flex: 0 0 auto; }
.lb-strip button.is-active { border-color: var(--color-accent); }
.lb-strip img { width: 64px; height: 64px; object-fit: contain; background: rgba(255,255,255,0.08); padding: 4px; }
body.lb-open { overflow: hidden; }
.spec { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec td { padding: 9px 0; border-bottom: 1px solid var(--color-neutral-300); }
.spec td:first-child { color: var(--color-neutral-700); width: 42%; }
.buybox { background: var(--color-surface); padding: var(--space-4); }
.share { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* ---------- sayfalama ---------- */

.pager { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-7); border-top: var(--rule) solid var(--color-divider); padding-top: var(--space-4); }
.pager a, .pager span {
  min-width: 44px; min-height: 44px; padding: 10px 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-divider); color: var(--color-text); font-size: 14px;
}
.pager .is-active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

/* ---------- alt bilgi ---------- */

.footer { border-top: var(--rule) solid var(--color-divider); background: var(--color-surface); }
.footer-grid {
  display: grid; gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding-block: clamp(32px, 6vw, 56px);
}
.footer-col { display: grid; gap: 6px; font-size: 13px; align-content: start; }
.footer-col a { color: var(--color-text); }
.footer-col a:hover { color: var(--color-accent-700); }
.footer-legal {
  font-size: 11px; color: var(--color-neutral-600); padding-bottom: var(--space-6);
  display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
}
.footer-legal a { color: var(--color-neutral-700); letter-spacing: 0.06em; }
.footer-legal a:hover { color: var(--color-accent-700); }
.brand-gap { display: inline-block; width: 0.42em; }
.brand-sub {
  font-family: 'Archivo Narrow', var(--font-heading);
  font-weight: 600; font-size: 0.82em; letter-spacing: 0.1em;
  color: var(--color-neutral-600);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 720px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-7-5 { grid-template-columns: 7fr 5fr; }
  .split-5-7 { grid-template-columns: 5fr 7fr; }
  .split-8-4 { grid-template-columns: 8fr 4fr; }
  .split-4-8 { grid-template-columns: 4fr 8fr; }
  .split-3-9 { grid-template-columns: 3fr 9fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .topbar-inner { flex-wrap: wrap; }
  .nav-links {
    display: none; order: 3; width: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    border-top: var(--rule) solid var(--color-divider);
    margin-top: var(--space-3);
  }
  .topbar.is-open .nav-links { display: flex; }
  .nav-links a {
    padding: 14px 0; border-bottom: 1px solid var(--color-neutral-300);
    font-size: 16px; min-height: 44px; display: flex; align-items: center;
  }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--color-neutral-300); }
  .filters { top: 57px; }
  .filter-row { flex-direction: column; gap: var(--space-2); }
  .filter-label { width: auto; padding-top: 0; }
  /* mobilde kategoriler tek satırda kaydırılır, sayfayı genişletmez */
  .cats { display: inline-flex; flex-wrap: nowrap; }
  .cats a { padding: 12px 16px; font-size: 14px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .chips .btn-ghost { padding-inline: 8px; }
}

@media (max-width: 600px) {
  .grid-works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
  .grid-works .work.is-landscape { grid-column: 1 / -1; }
  .work-figure { padding: 10px; }
  .work-desc { display: none; }
  .detail-thumbs { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .lb-nav { top: auto; bottom: 8px; transform: none; }
  .lb-strip img { width: 52px; height: 52px; }
  .hero-stats { gap: var(--space-4); }
  .btn { width: 100%; justify-content: flex-start; }
  .btn-row .btn { width: auto; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .grid-works { grid-template-columns: 1fr; }
  .work-desc { display: block; }
}

@media print {
  .topbar, .filters, .pager, .nav-toggle { display: none; }
  body { background: #fff; }
}
