/* Saat Tarih: tüm renkler tek merkezden (token) gelir. Açık: "kâğıt", koyu: "gece". */
:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #efebe2;
  --text: #1b1f27;
  --muted: #565c68;
  --border: #d6cfbf;
  --accent: #9a3f00;
  --accent-ink: #ffffff;
  --accent-soft: #f6e5d6;
  --focus: #1a5fd0;
  --ok: #176b3a;
  --ok-bg: #e2f3e8;
  --err: #a31d1d;
  --err-bg: #fbe7e7;
  --shadow: 0 1px 2px rgb(27 31 39 / 0.06), 0 8px 24px rgb(27 31 39 / 0.06);
  --radius: 14px;
  --maxw: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #11141a;
    --surface: #1a1e26;
    --surface-2: #232834;
    --text: #eef0f4;
    --muted: #a5acb9;
    --border: #343b49;
    --accent: #f2a65a;
    --accent-ink: #11141a;
    --accent-soft: #3a2b1d;
    --focus: #7db2ff;
    --ok: #7fd9a1;
    --ok-bg: #16301f;
    --err: #ff9d9d;
    --err-bg: #3a1a1a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11141a;
  --surface: #1a1e26;
  --surface-2: #232834;
  --text: #eef0f4;
  --muted: #a5acb9;
  --border: #343b49;
  --accent: #f2a65a;
  --accent-ink: #11141a;
  --accent-soft: #3a2b1d;
  --focus: #7db2ff;
  --ok: #7fd9a1;
  --ok-bg: #16301f;
  --err: #ff9d9d;
  --err-bg: #3a1a1a;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
}

/* Temaya göre görünen/gizlenen parçalar (tema simgesi, Bumba rozeti). */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-light { display: none; }
  :root:not([data-theme="light"]) .only-dark { display: inline-block; }
}
:root[data-theme="dark"] .only-light { display: none; }
:root[data-theme="dark"] .only-dark { display: inline-block; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.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;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.6rem 1rem; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1rem; }

/* Başlık */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding-block: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; margin-right: auto; }
.brand svg { width: 2rem; height: 2rem; color: var(--accent); }
.nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; padding: 0.45rem 0.75rem; border-radius: 999px; font-weight: 500; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.tools { display: flex; align-items: center; gap: 0.4rem; }
.icon-btn, .lang-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.7rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.icon-btn:hover, .lang-link:hover { background: var(--surface-2); }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }

/* Genel bölümler */
.section { padding-block: 2.5rem; }
.section + .section { border-top: 1px solid var(--border); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }
.meta { color: var(--muted); font-size: 0.95rem; }
.crumbs { margin: 1.25rem 0 0; font-size: 0.95rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 0.4rem; }
.crumbs a { color: var(--muted); }

/* Saat kartı */
.hero { padding-block: 2rem 1rem; }
.clock-card {
  display: grid; gap: 1.5rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.25rem, 4vw, 2.5rem); box-shadow: var(--shadow); margin-top: 1.5rem;
}
@media (min-width: 52rem) { .clock-card { grid-template-columns: 1fr auto; } }
.tz-label { margin: 0; color: var(--muted); font-weight: 600; }
.clock {
  display: block; font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15;
  font-size: clamp(2.9rem, 13.5vw, 7rem); min-height: 1.15em; margin: 0.25rem 0;
}
.date { font-size: clamp(1.2rem, 3.4vw, 1.75rem); font-weight: 600; margin: 0 0 1rem; min-height: 1.6em; }
.controls { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.toggle {
  min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.toggle[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.analog { width: min(15rem, 60vw); height: auto; justify-self: center; color: var(--text); }
.analog .face { fill: var(--surface-2); stroke: var(--border); stroke-width: 2; }
.analog .tick { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.analog .tick-major { stroke: var(--text); stroke-width: 3.5; }
.analog .hand { stroke: var(--text); stroke-linecap: round; }
.analog .hand-sec { stroke: var(--accent); stroke-width: 2; }
.analog .pin { fill: var(--accent); }

/* Bilgi kartları */
.facts { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin: 0; padding: 0; list-style: none; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.fact dt { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.25rem; }
.fact dd { margin: 0; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fact progress { width: 100%; height: 0.75rem; margin-top: 0.4rem; accent-color: var(--accent); }
.fact .note { display: block; font-size: 0.9rem; font-weight: 400; color: var(--muted); }

/* Şehir kartları ve tablo */
.city-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); list-style: none; margin: 0 0 1rem; padding: 0; }
.city-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.city-card a { display: block; padding: 1rem 1.1rem; color: var(--text); text-decoration: none; border-radius: var(--radius); height: 100%; }
.city-card a:hover { background: var(--surface-2); }
.city-card .city-name { font-weight: 600; display: block; }
.city-card .city-time { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; display: block; min-height: 1.3em; }
.city-card .city-diff { color: var(--muted); font-size: 0.9rem; display: block; min-height: 1.4em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 34rem; }
caption { text-align: left; padding: 0.9rem 1rem; color: var(--muted); font-size: 0.95rem; }
th, td { text-align: left; padding: 0.75rem 1rem; border-top: 1px solid var(--border); }
thead th { background: var(--surface-2); font-size: 0.95rem; }
td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
tbody th { font-weight: 600; }
tbody th a { color: var(--text); }

/* SSS */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; }
.faq summary { cursor: pointer; padding: 1rem 1.1rem; font-weight: 600; list-style-position: inside; min-height: 2.75rem; }
.faq details p { padding: 0 1.1rem 1rem; margin: 0; color: var(--muted); }
.faq details[open] summary { padding-bottom: 0.5rem; }

/* Metin sayfaları */
.prose { max-width: 46rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.6rem; }
.prose h2 { margin-top: 2rem; }

/* E-posta listesi formu */
.list-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; max-width: 40rem; }
.list-box h2 { font-size: 1.3rem; }
.field { display: grid; gap: 0.35rem; margin-bottom: 0.9rem; }
.field label { font-weight: 600; }
input[type="email"], input[type="search"] {
  width: 100%; min-height: 2.9rem; padding: 0 0.9rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--muted); border-radius: 10px;
}
.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 1rem; font-size: 0.95rem; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; flex: none; accent-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: 0 1.4rem;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.bot-tuzagi { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { display: none; padding: 0.8rem 1rem; border-radius: 10px; margin: 0 0 1rem; font-weight: 600; }
.form-msg:target, .form-msg.is-shown { display: block; }
.form-msg.ok { background: var(--ok-bg); color: var(--ok); }
.form-msg.err { background: var(--err-bg); color: var(--err); }

/* Arama penceresi */
dialog.search {
  width: min(40rem, calc(100vw - 2rem)); max-height: 80vh; margin: 8vh auto auto; padding: 0;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
dialog.search::backdrop { background: rgb(10 12 16 / 0.55); }
.search-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.9rem; border-bottom: 1px solid var(--border); }
.search-head input { flex: 1; }
.search-body { padding: 0.5rem 0.9rem 0.9rem; max-height: 55vh; overflow-y: auto; }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-results a { display: block; padding: 0.65rem 0.75rem; border-radius: 10px; text-decoration: none; color: var(--text); }
.search-results a[aria-selected="true"], .search-results a:hover { background: var(--accent-soft); }
.search-results .r-title { font-weight: 600; display: block; }
.search-results .r-desc { color: var(--muted); font-size: 0.92rem; display: block; }
.search-status { color: var(--muted); font-size: 0.92rem; margin: 0.6rem 0.25rem; }

/* Alt bilgi */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); padding-block: 2rem; margin-top: 2rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.footer-nav { display: flex; gap: 0.5rem 1.25rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-nav a { color: var(--text); }
.footer-sign { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin-top: 1.25rem; color: var(--muted); font-size: 0.95rem; }
.footer-sign p { margin: 0; }
.rozet { display: inline-block; line-height: 0; }
.rozet img { height: 28px; width: auto; }

/* Hata sayfaları */
.center-page { text-align: center; padding-block: 4rem; }
.center-page .lead { margin-inline: auto; }
.center-page + .center-page { border-top: 1px solid var(--border); }

@media print { .site-header, .site-footer, dialog, .controls { display: none !important; } }
