/* ==========================================================
   Sille — tarihi atmosfer teması
   Parşömen, kerpiç, terakota ve eskitilmiş altın tonları
   ========================================================== */

:root {
    --bg: #f4ecdc;
    --bg-alt: #ebe0c9;
    --surface: #fbf6ea;
    --text: #3b2a1a;
    --text-muted: #6b5640;
    --accent: #a4442a;          /* terakota */
    --accent-strong: #7a2e1c;
    --gold: #b8893b;            /* eskitilmiş altın */
    --olive: #5e6b3a;
    --border: #d8c7a6;
    --shadow: 0 1px 2px rgba(59, 42, 26, .08), 0 8px 24px rgba(59, 42, 26, .10);
    --header-bg: rgba(244, 236, 220, .92);
    --hero-overlay: linear-gradient(180deg, rgba(30, 20, 12, .35) 0%, rgba(30, 20, 12, .75) 100%);
    --on-dark: #f8f0de;
    --input-bg: #fffdf7;
    --success: #4d6b2e;
    --error: #a12a1c;

    --font-display: "Cinzel", "Times New Roman", serif;
    --font-body: "Lora", Georgia, serif;
    --radius: 6px;
    --container: 1180px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #1a1612;
        --bg-alt: #221c17;
        --surface: #29221b;
        --text: #ede3cf;
        --text-muted: #b9a88c;
        --accent: #e09a5f;
        --accent-strong: #f0b77f;
        --gold: #d4a65a;
        --olive: #a6b47a;
        --border: #43372b;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
        --header-bg: rgba(26, 22, 18, .92);
        --input-bg: #1f1915;
        --success: #a6c27a;
        --error: #f08a78;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #1a1612;
    --bg-alt: #221c17;
    --surface: #29221b;
    --text: #ede3cf;
    --text-muted: #b9a88c;
    --accent: #e09a5f;
    --accent-strong: #f0b77f;
    --gold: #d4a65a;
    --olive: #a6b47a;
    --border: #43372b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --header-bg: rgba(26, 22, 18, .92);
    --input-bg: #1f1915;
    --success: #a6c27a;
    --error: #f08a78;
    color-scheme: dark;
}

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

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

body {
    margin: 0;
    background-color: var(--bg);
    /* hafif kâğıt dokusu */
    background-image:
        radial-gradient(circle at 20% 10%, rgba(184, 137, 59, .06), transparent 40%),
        radial-gradient(circle at 80% 60%, rgba(164, 68, 42, .04), transparent 45%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    transition: background-color .3s, color .3s;
}

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.25;
    letter-spacing: .02em;
    margin: 0 0 .6em;
    color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

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

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .container { padding: 0 28px; } }

.skip-link {
    position: absolute; left: -999px; top: 8px; z-index: 1000;
    background: var(--accent); color: #fff; padding: 8px 14px; border-radius: var(--radius);
}
.skip-link:focus { left: 8px; }

.eyebrow {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: .8rem;
    color: var(--gold);
    margin-bottom: .5em;
}

.lead { font-size: 1.2rem; color: var(--text-muted); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { width: 36px; height: 36px; fill: none; stroke: var(--accent); stroke-width: 2; }
.brand-mark circle { fill: var(--gold); stroke: none; }
.brand-text { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1; letter-spacing: .08em; }
.brand-text small { display: block; font-size: .62rem; letter-spacing: .35em; color: var(--text-muted); margin-top: 4px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
    display: block; padding: 8px 10px; border-radius: var(--radius);
    font-family: var(--font-display); font-size: .82rem; letter-spacing: .04em;
    text-decoration: none; color: var(--text); white-space: nowrap;
}
.main-nav a:hover { background: var(--bg-alt); color: var(--accent); }
.main-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }

.header-actions { display: flex; align-items: center; gap: 6px; }

.theme-toggle, .nav-toggle {
    width: 42px; height: 42px; display: grid; place-items: center;
    border: 1px solid var(--border); border-radius: 50%;
    background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle { display: none; gap: 4px; align-content: center; justify-items: center; border-radius: var(--radius); }
.nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1100px) {
    .nav-toggle { display: grid; }
    .main-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--bg); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        display: none;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; padding: 8px 16px 16px; gap: 0; }
    .main-nav a { padding: 12px 8px; font-size: .95rem; border-bottom: 1px solid var(--border); border-radius: 0; }
    .main-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); padding-left: 14px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: min(88vh, 760px);
    display: flex; align-items: flex-end;
    color: var(--on-dark);
    background: var(--hero-overlay), url('../img/sille-panorama.jpg') center / cover no-repeat;
    padding: 120px 0 72px;
}
.hero h1 { color: var(--on-dark); font-size: clamp(2.6rem, 8vw, 5.5rem); margin-bottom: .2em; text-shadow: 0 2px 16px rgba(0, 0, 0, .4); }
.hero .eyebrow { color: #e8c27e; }
.hero .lead { color: #f1e6cf; max-width: 640px; font-size: clamp(1.05rem, 2.2vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-credit { position: absolute; right: 12px; bottom: 8px; font-size: .72rem; color: rgba(255, 255, 255, .75); }
.hero-credit a { color: inherit; }

.page-hero {
    position: relative; color: var(--on-dark);
    background: var(--hero-overlay), var(--hero-img) center / cover no-repeat;
    padding: 96px 0 56px;
}
.page-hero h1 { color: var(--on-dark); text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.page-hero .eyebrow { color: #e8c27e; }
.page-hero .lead { color: #f1e6cf; max-width: 720px; margin: 0; }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--radius);
    font-family: var(--font-display); font-size: .9rem; letter-spacing: .06em;
    text-decoration: none; border: 1px solid transparent; cursor: pointer;
    transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent-strong); color: #fff8ec; }
.btn-primary:hover { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn-primary { background: var(--accent); color: #1a1612; }
:root[data-theme="dark"] .btn-primary:hover { background: var(--accent-strong); color: #1a1612; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn-primary { background: var(--accent); color: #1a1612; }
    :root:not([data-theme="light"]) .btn-primary:hover { background: var(--accent-strong); color: #1a1612; }
}
.btn-ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: var(--bg); }

/* ---------- Bölümler ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { color: var(--text-muted); }

.ornament { display: flex; justify-content: center; margin: 8px 0 16px; }
.ornament svg { stroke: var(--gold); fill: none; stroke-width: 1.5; }
.ornament svg circle { fill: var(--gold); stroke: none; }

.prose { max-width: 760px; }
.prose-center { margin-inline: auto; }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) {
    .split { grid-template-columns: 1fr 1fr; }
    .split.reverse > :first-child { order: 2; }
}

/* ---------- Figür ---------- */
.figure { margin: 0; }
.figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }
.figure.tall img { aspect-ratio: 3 / 4; }
.figure figcaption { font-size: .88rem; color: var(--text-muted); margin-top: 8px; font-style: italic; }
.figure figcaption small { display: block; font-style: normal; font-size: .75rem; opacity: .85; }
.figure figcaption a { color: inherit; }

/* çerçeveli görsel: tarihi bir tablo havası */
.framed img { border: 6px solid var(--surface); outline: 1px solid var(--gold); outline-offset: -12px; }

/* ---------- Kartlar ---------- */
.cards { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
    transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); }
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .4em; }
.card-body p { color: var(--text-muted); font-size: .98rem; }
.card-body .more { margin-top: auto; font-family: var(--font-display); font-size: .85rem; letter-spacing: .05em; text-decoration: none; }
.card a.stretched { color: inherit; text-decoration: none; }
.card-meta { font-size: .8rem; color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-family: var(--font-display); margin-bottom: .3em; }
.card-credit { font-size: .72rem; color: var(--text-muted); padding: 6px 22px 0; }
.card-credit a { color: inherit; }

/* simge kartları (görselsiz) */
.icon-card { padding: 28px 24px; text-align: left; }
.icon-card .icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center; margin-bottom: 14px;
    background: var(--bg-alt); border: 1px solid var(--gold);
}
.icon-card .icon svg { width: 28px; height: 28px; stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- İstatistikler ---------- */
.facts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 32px; }
.fact { text-align: center; padding: 20px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.fact strong { display: block; font-family: var(--font-display); font-size: 1.8rem; color: var(--accent); }
.fact span { font-size: .9rem; color: var(--text-muted); }

/* ---------- Zaman çizelgesi ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--gold), var(--accent)); }
.timeline li { position: relative; padding: 0 0 36px 48px; }
.timeline li::before {
    content: ""; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px;
    background: var(--bg); border: 3px solid var(--accent); transform: rotate(45deg);
}
.timeline .era { font-family: var(--font-display); color: var(--gold); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }
.timeline h3 { margin: .2em 0 .4em; }
@media (min-width: 860px) {
    .timeline::before { left: 50%; margin-left: -1px; }
    .timeline li { width: 50%; padding: 0 48px 40px 0; text-align: right; }
    .timeline li::before { left: auto; right: -8px; }
    .timeline li:nth-child(even) { margin-left: 50%; padding: 0 0 40px 48px; text-align: left; }
    .timeline li:nth-child(even)::before { right: auto; left: -8px; }
}

/* ---------- Bilgi kutusu ---------- */
.note {
    border-left: 4px solid var(--gold); background: var(--surface);
    padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0;
    font-size: .95rem;
}
.note strong { color: var(--accent); }

.list-check { list-style: none; padding: 0; margin: 0 0 1.2em; }
.list-check li { position: relative; padding-left: 28px; margin-bottom: .5em; }
.list-check li::before { content: "◆"; position: absolute; left: 0; color: var(--gold); font-size: .8rem; top: .25em; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-family: var(--font-display); font-size: .85rem; letter-spacing: .05em; background: var(--bg-alt); }

/* ---------- Harita ---------- */
.map { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); aspect-ratio: 16 / 10; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Galeri ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 32px; }
.filters button {
    padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--text); font-family: var(--font-display); font-size: .82rem; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.gallery-item { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-alt); }
.gallery-item button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 10px;
    background: linear-gradient(transparent, rgba(20, 12, 6, .8)); color: #f8f0de; font-size: .85rem; pointer-events: none;
}
.gallery-item[hidden] { display: none; }

.lightbox {
    position: fixed; inset: 0; z-index: 500; background: rgba(15, 10, 6, .94);
    display: none; align-items: center; justify-content: center; padding: 56px 16px;
}
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 1200px; width: 100%; text-align: center; color: #f1e6cf; }
.lightbox img { max-height: 76vh; width: auto; margin: 0 auto; border-radius: 4px; }
.lightbox figcaption { margin-top: 12px; font-size: .95rem; }
.lightbox figcaption small { display: block; opacity: .75; font-size: .78rem; }
.lightbox figcaption a { color: inherit; }
.lightbox button {
    position: absolute; width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .4); color: #fff;
    font-size: 1.5rem; cursor: pointer; display: grid; place-items: center;
}
.lightbox .lb-close { top: 12px; right: 12px; }
.lightbox .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Form ---------- */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-family: var(--font-display); font-size: .85rem; letter-spacing: .04em; margin-bottom: 6px; }
.field input, .field textarea, .field select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--input-bg); color: var(--text); font: inherit; font-size: 1rem;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.field .hint { font-size: .8rem; color: var(--text-muted); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius); display: none; }
.form-status.show { display: block; }
.form-status.ok { border: 1px solid var(--success); color: var(--success); }
.form-status.err { border: 1px solid var(--error); color: var(--error); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Footer ---------- */
.site-footer { background: #241a12; color: #d9cbb0; padding: 56px 0 24px; margin-top: 0; border-top: 4px solid var(--gold); }
.site-footer a { color: #e8c27e; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #f3d9a5; }
.site-footer h2 { color: #f1e6cf; font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-brand { font-family: var(--font-display); font-size: 1.8rem; color: #f1e6cf; margin-bottom: .3em; }
.footer-grid { display: grid; gap: 32px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(217, 203, 176, .2); font-size: .82rem; opacity: .85; }
.footer-bottom p { margin: 0 0 .4em; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
