/* ==========================================================================
   Halikarnassos — halicarnassus.online
   Tasarım sistemi: "Liman kitabesi" yönü — SANAT-YONU.md §2'deki 12 kanonik
   renk + kontrast-sozlesmesi.md'nin ölçtüğü ek roller (bronze/yellow).
   Gerekçe: docs/site-tasarim-calistay.md (zeus deposu).

   Kontrast ölçümü WCAG bağıl parlaklığıyla yapıldı (luma DEĞİL), tüm rakamlar
   çalıştay belgesinde listeleniyor. Bu dosyadaki her metin/zemin çifti o
   ölçümlerden seçildi — göz kararıyla renk eklenmemeli.
   ========================================================================== */

:root {
  /* --- 12 kanonik renk (SANAT-YONU.md §2), isimler orijinal belgeyle aynı --- */
  --koyunbaba: #5C6B52;   /* 1 - yeşil andezit, koyu yüzey */
  --prokonnesos: #EDE6D3; /* 2 - mermer beyazı, parşömen zemin */
  --leleg: #A79C82;       /* 3 - Leleg taşı, belde kartı zemini */
  --kiremit: #B25C34;     /* 4 - kavrulmuş kiremit */
  --ege-derin: #1D6B8C;   /* 5 - derin deniz, bağlantı rengi */
  --ege-turkuaz: #4FA9AE; /* 6 - sığ koy */
  --zeytin: #55684A;      /* 7 - kızılçam/zeytin yeşili */
  --sinnabar: #A83A2A;    /* 8 - sinnabar kırmızısı, birincil buton */
  --azurit: #24507E;      /* 9 - azurit mavisi, ikincil buton */
  --bronz: #9A7B3F;        /* 10 - bronz */
  --safran: #C98A2E;      /* 11 - safran/kehribar */
  --kuru-toprak: #C7B99A; /* 12 - kayalık toprak, alternatif bant zemini */

  /* --- kontrast-sozlesmesi.md'nin ek font rolleri (aynı isimlerle) --- */
  --font-bronze: #8C3C1E;  /* parşömen üstü vurgu — 6.06:1 ölçüldü */
  --font-yellow: #F0C470;  /* koyu panel üstü vurgu — sadece BÜYÜK metin */

  /* --- gövde metni renkleri --- */
  --ink: #081220;          /* parşömen üstü gövde metni — 15.08:1 */
  --cream: var(--prokonnesos); /* koyu yüzey üstü gövde metni — 4.58:1 */

  /* --- türetilmiş koyu yüzey: Koyunbaba'nın koyulaştırılmış tonu ---
     Neden türetilmiş: ham #5C6B52 metinle 4.58:1'de sınırda kalıyor ve
     fotoğraf üstü levha için daha güçlü bir kontrast payı gerekiyordu.
     Kontrast-sözleşmesi'nin bronze/yellow'u nasıl türettiyse aynı mantık:
     aynı renk ailesi, sadece değer (value) kaydırıldı. Ölçüm: 8.29:1. */
  --koyunbaba-koyu: #3A4335;

  --radius: 6px;
  --shadow-soft: 0 2px 10px rgba(8, 18, 32, 0.18);
  --shadow-plaque: 0 8px 30px rgba(8, 18, 32, 0.45);

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --maxw: 1180px;
}

/* --- reset --- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--prokonnesos);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--ege-derin); }
a:hover { color: var(--azurit); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--koyunbaba-koyu);
  color: var(--cream); padding: 10px 16px; z-index: 200; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* --- nav --- */
.site-nav {
  background: var(--koyunbaba-koyu);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--bronz);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.brand:hover { color: var(--font-yellow); }
.brand svg { flex: none; }
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--cream);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: .95rem;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(237, 230, 211, 0.14);
  color: var(--font-yellow);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--cream);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 1rem;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--koyunbaba-koyu);
    flex-direction: column;
    padding: 8px 20px 16px;
    border-bottom: 2px solid var(--bronz);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 8px; }
}

/* --- hero --- */
.hero {
  position: relative;
  background: #223 center/cover no-repeat;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  color: var(--cream);
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,18,32,0) 40%, rgba(8,18,32,.55) 100%);
}
.hero-plaque {
  position: relative;
  margin: 0 auto 48px;
  max-width: 640px;
  background: var(--koyunbaba-koyu);
  border: 2px solid var(--bronz);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow-plaque);
}
.hero-kicker {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--font-yellow);
  font-weight: 700;
  margin-bottom: 10px;
}
.hero-plaque h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--cream);
  margin-bottom: 12px;
}
.hero-plaque p {
  color: var(--cream);
  font-size: 1rem;
  margin-bottom: 20px;
  max-width: 54ch;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- buttons --- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: .98rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--sinnabar);
  color: var(--prokonnesos);
}
.btn-primary:hover { background: #8f3123; color: var(--prokonnesos); }
.btn-ghost {
  background: transparent;
  border-color: var(--cream);
  color: var(--cream);
}
.btn-ghost:hover { background: rgba(237,230,211,.14); color: var(--font-yellow); }
.btn-secondary {
  background: var(--azurit);
  color: var(--prokonnesos);
}
.btn-secondary:hover { background: #1c3f66; color: var(--prokonnesos); }
.btn[disabled], .btn.is-disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-block { display: block; width: 100%; }

/* --- sections --- */
.section { padding: 64px 0; }
.section-alt { background: var(--kuru-toprak); }
.section-dark {
  background: var(--koyunbaba-koyu);
  color: var(--cream);
}
.section-dark h2, .section-dark h3 { color: var(--cream); }
.section-head { max-width: 68ch; margin: 0 0 36px; }
.section-head h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.eyebrow {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--font-bronze);
  margin-bottom: 8px;
}
.section-dark .eyebrow { color: var(--font-yellow); }

.lede { font-size: 1.08rem; }

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature-list li {
  background: var(--prokonnesos);
  border: 1px solid rgba(140, 60, 30, .25);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.feature-list .glyph {
  flex: none;
  width: 28px; height: 28px;
  color: var(--font-bronze);
}

/* --- belde cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.belde-card {
  background: var(--leleg);
  color: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
.belde-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.belde-card .belde-noimg {
  width: 100%;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--leleg), #8f8368);
  color: var(--prokonnesos);
  font-family: var(--serif);
  font-size: 2.4rem;
}
.belde-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.belde-body h3 { font-size: 1.15rem; margin-bottom: 4px; }
.belde-alt { font-size: .85rem; color: #3f3a2c; margin-bottom: 10px; font-style: italic; }
.belde-body p { margin: 0; font-size: .95rem; flex: 1; }

/* --- yarımada haritası (gerçek koordinatlardan işaretlenmiş) --- */
.map-figure { margin: 0; }
.map-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(8,18,32,.15);
  line-height: 0;
}
.map-wrap img { width: 100%; display: block; }
.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pin-label {
  background: var(--koyunbaba-koyu);
  color: var(--cream);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 4px;
  box-shadow: 0 2px 6px rgba(8,18,32,.4);
}
.pin-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--azurit);
  border: 2px solid var(--prokonnesos);
  box-shadow: 0 1px 3px rgba(8,18,32,.5);
}
.map-pin--capital .pin-label { background: var(--sinnabar); }
.map-pin--capital .pin-dot { background: var(--sinnabar); width: 14px; height: 14px; }

/* --- bölüm zaman çizelgesi (kampanyanın kendi Türkçe metinleri) --- */
.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.episode-card {
  background: var(--prokonnesos);
  border: 1px solid rgba(140,60,30,.25);
  border-radius: var(--radius);
  padding: 20px 18px;
}
.episode-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--font-bronze);
  color: var(--prokonnesos);
  font-family: var(--serif);
  font-weight: 700;
  margin-bottom: 12px;
}
.episode-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.episode-card p { font-size: .92rem; margin: 0; font-style: italic; }

/* --- footer --- */
.site-footer {
  background: var(--koyunbaba-koyu);
  color: var(--cream);
  padding: 40px 0 28px;
  font-size: .9rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 20px;
}
.footer-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; gap: 18px; flex-wrap: wrap;
}
.footer-links a { color: var(--cream); }
.footer-links a:hover { color: var(--font-yellow); }
.footer-legal {
  border-top: 1px solid rgba(237,230,211,.2);
  padding-top: 16px;
  color: #cfc9b6;
  font-size: .82rem;
  max-width: 80ch;
}
.footer-legal strong { color: var(--cream); }

/* --- indir page --- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  align-items: stretch;
}
.plan-card {
  background: var(--prokonnesos);
  border: 2px solid var(--leleg);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.plan-card.plan-public { border-color: var(--sinnabar); }
.plan-card.plan-restricted { border-color: var(--azurit); background: var(--kuru-toprak); }
.plan-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.plan-public .plan-tag { background: var(--sinnabar); color: var(--prokonnesos); }
.plan-restricted .plan-tag { background: var(--azurit); color: var(--prokonnesos); }
.plan-card h3 { margin-bottom: 8px; }
.plan-card p { font-size: .95rem; }
.plan-meta {
  font-size: .85rem;
  color: #3f3a2c;
  margin: 12px 0 18px;
  display: grid;
  gap: 4px;
}
.plan-meta code {
  background: rgba(8,18,32,.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .82rem;
  word-break: break-all;
}
.plan-card .btn { margin-top: auto; }
.plan-status {
  font-size: .85rem;
  margin-top: 10px;
  color: #3f3a2c;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 16px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  min-height: 34px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--font-bronze);
  color: var(--prokonnesos);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
}
.steps code {
  background: rgba(8,18,32,.06);
  padding: 1px 6px;
  border-radius: 4px;
}

.note-box {
  background: var(--prokonnesos);
  border-left: 4px solid var(--font-bronze);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .92rem;
  margin-top: 18px;
}

/* --- varliklar page --- */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-chip {
  border: 1px solid var(--leleg);
  background: var(--prokonnesos);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .88rem;
  cursor: pointer;
}
.filter-chip[aria-pressed="true"] {
  background: var(--font-bronze);
  border-color: var(--font-bronze);
  color: var(--prokonnesos);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.gallery-item {
  background: var(--prokonnesos);
  border: 1px solid rgba(8,18,32,.12);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.gallery-item .thumb-wrap {
  aspect-ratio: 4/3;
  background: var(--leleg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item .meta { padding: 8px 10px; }
.gallery-item .meta .name { font-size: .88rem; font-weight: 700; }
.gallery-item .meta .cat { font-size: .76rem; color: #3f3a2c; }

.gallery-state {
  padding: 40px 20px;
  text-align: center;
  color: #3f3a2c;
  background: var(--kuru-toprak);
  border-radius: var(--radius);
}

.lightbox {
  position: fixed; inset: 0;
  background: rgba(8,18,32,.86);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  max-width: min(1000px, 92vw);
  max-height: 90vh;
  background: var(--koyunbaba-koyu);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lightbox-inner img {
  max-height: 72vh;
  width: 100%;
  object-fit: contain;
  background: #111;
}
.lightbox-caption {
  color: var(--cream);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: .9rem;
}
.lightbox-close {
  position: absolute;
  top: 18px; right: 22px;
  background: var(--koyunbaba-koyu);
  color: var(--cream);
  border: 1px solid var(--cream);
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* --- page header (indir/varliklar) --- */
.page-header {
  background: var(--koyunbaba-koyu);
  color: var(--cream);
  padding: 48px 0 40px;
}
.page-header h1 { color: var(--cream); }
.page-header p { color: var(--cream); max-width: 68ch; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 44px 0; }
  .hero { min-height: 62vh; }
}
