/**
 * TUBANS stil dosyası (bütün sayfalar).
 * Renkler ve yazı tipleri :root değişkenlerinde; kömür zemin, kırık beyaz yazı, tek vurgu rengi zinober.
 * Yazı tipleri siteyle birlikte barındırılır (Google Fonts'a istek gitmez).
 */

/* ---------- yazı tipleri: Latin ve Türkçe harfleri içeren Latin genişletilmiş alt kümeler ---------- */

@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 500;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 500;
  src: url("../fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- renkler, yazı tipleri, ölçüler ---------- */
:root {
  --bg: #1C1A18;
  --bg-2: #24211F;
  --bg-3: #2C2926;
  --line: #3A3632;
  --line-2: #2E2A27;
  --ink: #F2EEE8;
  --text: #D6D0C7;
  --muted: #A39E96;
  --dim: #918B82;
  --dot: #4C4843;
  --accent: #FF4F2B;
  --sans: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 3vw, 32px);
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 800; font-stretch: 68%; line-height: 0.9; letter-spacing: -0.01em; }
p { margin: 0; }

/* Ekranda görünmez, ekran okuyucu okur (.hp: botlar için gizli tuzak alan). */
.visually-hidden, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* "Tüm ülkelere geç" bağlantısı: yalnızca klavyeyle odaklanınca görünür. */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; font-family: var(--mono); font-size: 14px; }
.skip:focus { top: 12px; }
.fine { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--dim); }
.lead { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 640px; }

/* ---------- üst çubuk ve dil seçimi ---------- */
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 10px var(--gutter); border-bottom: 1px solid var(--line-2); }
.brand, .brand-sm { font-weight: 800; font-stretch: 75%; color: var(--ink); text-decoration: none; }
.brand { font-size: 24px; min-height: 44px; display: inline-flex; align-items: center; }
.brand span, .brand-sm span { color: var(--accent); }
.lang { display: flex; gap: 2px; font-family: var(--mono); font-size: 14px; }
.lang a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; }
.lang a[aria-current] { background: var(--ink); color: var(--bg); }
.lang a:not([aria-current]):hover { color: var(--ink); }

/* ---------- düğmeler ve form alanları ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--accent); background: var(--accent); color: var(--bg); font: 700 16px/1 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.linklike:hover { color: var(--ink); }
.field-label { display: block; font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 18px 0 8px; }
.input { width: 100%; min-height: 48px; padding: 0 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 0; color: var(--ink); font: 16px/1.4 var(--sans); }
textarea.input { padding: 12px 14px; resize: vertical; min-height: 120px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.input::placeholder { color: var(--dim); }
.input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

/* ---------- kaydırmalı anlatı: duraklar ve istatistikler ---------- */
.story { position: relative; }
.story-steps { padding: 0 var(--gutter); }
.step { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 48px 0; max-width: 520px; }
.step-count { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hero-title { font-size: clamp(56px, 7vw, 108px); }
.step-title { font-size: clamp(44px, 5vw, 76px); }
.step-total { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.step-total .num { font-weight: 800; font-stretch: 70%; font-size: 56px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.step-total .share { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.step-text { font-size: 18px; line-height: 1.6; color: var(--text); }
.step .btn { align-self: flex-start; }
.stats { margin: 8px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.stat { display: flex; flex-direction: column-reverse; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.stat dt { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.stat dd { margin: 0; font-weight: 800; font-stretch: 70%; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-top dd { color: var(--accent); }
.stat .suffix { font-size: 0.55em; color: var(--muted); }
.scroll-hint { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.js .scroll-hint svg { animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- harita: çerçeve, katmanlar, etiketler, bilgi kartı, lejant, ilerleme çizgisi ---------- */
.story-map { display: flex; flex-direction: column; gap: 14px; }
.map { position: relative; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.map-frame { position: relative; width: 100%; aspect-ratio: 240 / 106; overflow: hidden; touch-action: pan-y; cursor: crosshair; }
.map-frame.is-dragging { cursor: grabbing; }
.map-stage { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 1.1s var(--ease); will-change: transform; }
.map-svg, .map-svg svg { width: 100%; height: 100%; }
.no-js .map-frame { display: none; }

.atlas .dots { fill: none; stroke-linecap: round; }
.atlas .dots-none { stroke: var(--dot); stroke-width: 0.42; }
.atlas .dots-b0 { stroke: var(--accent); stroke-opacity: 0.28; stroke-width: 0.44; }
.atlas .dots-b1 { stroke: var(--accent); stroke-opacity: 0.38; stroke-width: 0.5; }
.atlas .dots-b2 { stroke: var(--accent); stroke-opacity: 0.52; stroke-width: 0.56; }
.atlas .dots-b3 { stroke: var(--accent); stroke-opacity: 0.78; stroke-width: 0.66; }
.atlas .dots-b4 { stroke: var(--accent); stroke-opacity: 1; stroke-width: 0.76; }
.atlas .graticule, .atlas .sphere, .atlas .borders, .atlas .outline, .atlas .uk, .atlas .hover-outline, .atlas .ring, .atlas .visitor { fill: none; vector-effect: non-scaling-stroke; }
.atlas .graticule { stroke: var(--ink); stroke-opacity: 0.07; stroke-width: 0.6px; }
.atlas .sphere { stroke: var(--ink); stroke-opacity: 0.16; stroke-width: 0.8px; }
.atlas .borders { stroke: var(--ink); stroke-opacity: 0.1; stroke-width: 0.5px; }
.atlas .outline { stroke: var(--accent); stroke-opacity: 0.45; stroke-width: 0.7px; }
.atlas .uk { stroke: var(--accent); stroke-opacity: 0.7; stroke-width: 0.8px; stroke-dasharray: 3 2; }
.atlas .hover-outline { stroke: var(--ink); stroke-width: 1.6px; }
.atlas .ring { stroke: var(--accent); stroke-width: 1px; }
.atlas .ring-dot { fill: var(--accent); }
.atlas .visitor { stroke: var(--ink); stroke-width: 1.2px; stroke-dasharray: 2 2; }

.map-labels { position: absolute; inset: 0; pointer-events: none; }
.label { position: absolute; width: 0; height: 0; transform-origin: 0 0; transition: transform 1.1s var(--ease); }
.label-inner { position: absolute; left: 0; top: 0; white-space: nowrap; font-family: var(--mono); font-size: 12px; color: var(--ink); background: rgba(28, 26, 24, 0.82); padding: 2px 6px; opacity: 0; animation: label-in 0.5s 0.8s forwards; }
.label.big .label-inner { background: var(--accent); color: var(--bg); font-size: 14px; font-weight: 500; padding: 5px 9px; }
.label.side-r .label-inner { transform: translate(10px, -50%); }
.label.side-l .label-inner { transform: translate(calc(-100% - 10px), -50%); }
.label.side-u .label-inner { transform: translate(-50%, calc(-100% - 8px)); }
.label.side-d .label-inner { transform: translate(-50%, 10px); }
@keyframes label-in { to { opacity: 1; } }

.map-tooltip { position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, calc(-100% - 16px)); background: var(--bg-3); border: 1px solid var(--line); padding: 10px 12px; min-width: 160px; max-width: 260px; font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.map-tooltip strong { display: block; font: 800 22px/1.05 var(--sans); font-stretch: 72%; margin-bottom: 4px; }
.map-tooltip .tt-share { color: var(--accent); }
.map-tooltip .tt-muted { color: var(--muted); }
.map-tooltip.below { transform: translate(-50%, 18px); }

.map-controls { position: absolute; right: 0; top: 0; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.map-controls button { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.map-controls button:hover { border-color: var(--ink); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.legend-scale, .legend-extra { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.legend-scale .key { margin-left: 8px; }
.legend-scale .key:first-child { margin-left: 0; }
.key { display: inline-block; border-radius: 50%; background: var(--accent); }
.key-0 { width: 5px; height: 5px; opacity: 0.28; }
.key-1 { width: 6px; height: 6px; opacity: 0.38; }
.key-2 { width: 7px; height: 7px; opacity: 0.52; }
.key-3 { width: 8px; height: 8px; opacity: 0.78; }
.key-4 { width: 9px; height: 9px; }
.key-none { width: 5px; height: 5px; background: var(--dot); }
.key-visitor { width: 10px; height: 10px; background: none; border: 1.5px dashed var(--ink); }

.progress { display: flex; gap: 6px; }
.progress a { flex: 1; min-height: 32px; display: flex; align-items: center; }
.progress span { display: block; width: 100%; height: 3px; background: var(--line); transition: background 0.3s; }
.progress a.is-done span, .progress a[aria-current] span { background: var(--accent); }
.progress a:hover span { background: var(--ink); }

/* Masaüstü: solda akan metin, sağda ekrana sabitlenmiş harita. */
@media (min-width: 960px) {
  .story { display: grid; grid-template-columns: minmax(380px, 460px) minmax(0, 1fr); }
  .story-steps { grid-column: 1; grid-row: 1; padding: 0 32px 0 var(--gutter); }
  .story-map { grid-column: 2; grid-row: 1; position: sticky; top: 0; height: 100vh; height: 100svh; justify-content: center; padding: 24px var(--gutter) 24px 8px; }
  .step:last-child { min-height: 100vh; }
}
/* Mobil ve tablet: harita üstte sabit, metin kartları altında akar. */
@media (max-width: 959.98px) {
  .story-map { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px var(--gutter) 6px; border-bottom: 1px solid var(--line-2); }
  .legend { font-size: 11px; gap: 4px 12px; }
  .legend-extra { display: none; }
  .map { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; }
  .map-frame { grid-column: 1 / -1; }
  .legend { grid-column: 1; grid-row: 2; }
  .map-controls { position: static; grid-column: 2; grid-row: 2; flex-direction: row; }
  .step { min-height: 78vh; padding: 40px 0; }
  .label-inner { font-size: 10px; padding: 1px 4px; }
  .label.big .label-inner { font-size: 12px; padding: 3px 7px; }
}

/* ---------- bölümler: tüm ülkeler (grafik + tablo), soyadı hakkında, hikâyeler ve form, kaynaklar ---------- */
.section { max-width: 1280px; margin: 0 auto; padding: clamp(72px, 10vw, 128px) var(--gutter) 0; }
.section h2 { font-size: clamp(40px, 5vw, 72px); }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }

.countries-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.chart { flex: 1 1 440px; min-width: 0; margin: 0; }
.chart figcaption { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bars li { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 52px; align-items: center; gap: 12px; font-family: var(--mono); font-size: 13px; }
.bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.bar-track { height: 6px; background: var(--bg-3); }
.bar-fill { display: block; height: 100%; min-width: 2px; background: var(--accent); opacity: 0.85; }
.bar-fill.is-top { opacity: 1; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; }
.note-mark { color: var(--accent); margin-left: 2px; }

.table-wrap { flex: 1 1 440px; min-width: 0; }
.table-wrap .field-label { margin-top: 0; }
.table-scroll { margin-top: 16px; border: 1px solid var(--line-2); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font: 400 12px var(--mono); color: var(--muted); padding: 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table td.num:last-child { color: var(--accent); }
.table tbody tr:hover td { background: var(--bg-2); }
.flag { width: 24px; height: 18px; object-fit: cover; outline: 1px solid rgba(242, 238, 232, 0.12); }
.table-empty { padding: 16px 12px; color: var(--muted); }
.table-meta { margin-top: 12px; }

.about { display: grid; gap: 32px; }
.prose { display: flex; flex-direction: column; gap: 18px; font-size: 18px; line-height: 1.7; color: var(--text); max-width: 680px; }
@media (min-width: 960px) { .about { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; } }

.stories-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.story-list { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--bg-2); border-top: 2px solid var(--accent); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.card-meta { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card-meta .flag { width: 20px; height: 15px; }
.card-text { font-size: 16px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.story-form { flex: 1 1 360px; background: var(--bg-2); border: 1px solid var(--line-2); padding: 28px; display: flex; flex-direction: column; }
.story-form h3 { font-size: 32px; margin-bottom: 4px; }
.story-form .fine { margin-top: 8px; }
.story-form .btn { margin-top: 20px; align-self: flex-start; }
.char-count { text-align: right; }
.turnstile { margin-top: 18px; min-height: 0; }
.form-status { margin-top: 12px; font-size: 15px; min-height: 1.5em; }
.form-status.is-ok { color: var(--ink); }
.form-status.is-error { color: var(--accent); }

.sources h2 { margin-bottom: 32px; }
.source-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; margin: 0; }
.source-list div { border-top: 1px solid var(--line); padding-top: 14px; }
.source-list dt { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink); }
.source-list dd { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---------- alt bilgi ve çerez onay bandı ---------- */
.site-footer { max-width: 1280px; margin: clamp(72px, 10vw, 128px) auto 0; padding: 28px var(--gutter) 40px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.brand-sm { font-family: var(--sans); font-size: 18px; margin-right: 8px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.footer-links a { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--ink); }

.consent { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 620px; margin: 0 auto; background: var(--bg-3); border: 1px solid var(--line); padding: 18px; display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.consent[hidden] { display: none; }
.consent p { flex: 1 1 280px; font-size: 15px; line-height: 1.5; color: var(--text); }
.consent-actions { display: flex; gap: 8px; }

/* ---------- düz sayfalar (gizlilik, 404, panel) ---------- */
.plain { max-width: 720px; margin: 0 auto; padding: 48px var(--gutter) 0; display: flex; flex-direction: column; gap: 16px; }
.plain h1 { font-size: clamp(44px, 6vw, 72px); margin-top: 16px; }
.plain h2 { font-size: 30px; margin-top: 24px; }
.plain p { font-size: 17px; line-height: 1.7; color: var(--text); }
.plain .fine { font-size: 12px; }

/* Cihazında "hareketi azalt" açık olanlar: harita kaymadan doğrudan yeni görünüme geçer. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .map-stage, .label, .progress span { transition: none !important; }
  .label-inner { animation-duration: 0.01s; animation-delay: 0s; }
  .js .scroll-hint svg { animation: none; }
}
