/* Palut, kurumsal site. Uygulamanın token'larıyla aynı palet:
   lib/core/theme/app_colors.dart (#5B5FE9 primary, #FF8A3D accent)
   Yazı ailesi de uygulamadan: Baloo 2 (başlık) + Nunito (metin).
   Harici CDN yok, yazı tipleri kendi sunucumuzdan gelir, üçüncü tarafa
   ziyaretçi IP'si sızmaz (bkz. cerez.html). */

@font-face {
  font-family: 'Baloo 2';
  src: url('../fonts/Baloo2-800.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/Nunito-Variable.ttf') format('truetype');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --primary: #5b5fe9;
  --primary-dark: #4a4ec4;
  --primary-soft: #eef0fe;
  --accent: #ff8a3d;
  --accent-soft: #fff1e6;
  --success: #22c55e;
  --warning: #f5b940;
  --error: #ef4767;

  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #fbfbfe;
  --text: #1e2130;
  --muted: #5c6178;
  --faint: #8d92a8;
  --line: #e6e8f2;

  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 1px 2px rgba(20, 22, 40, 0.04), 0 8px 24px rgba(20, 22, 40, 0.06);
  --measure: 70ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #7c80f2;
    --primary-dark: #5b5fe9;
    --primary-soft: #1e2140;
    --accent: #ff9c5c;
    --accent-soft: #33220f;
    --bg: #0f1117;
    --surface: #1c1f2a;
    --surface-2: #181b24;
    --text: #e8eaf2;
    --muted: #a8adc2;
    --faint: #7f849b;
    --line: #2b3040;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}
h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  margin-top: 2.2em;
}
h3 {
  font-size: 1.15rem;
  margin-top: 1.8em;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--primary);
  overflow-wrap: anywhere;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--primary-dark);
}

strong {
  font-weight: 800;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 0.15em 0.45em;
  border-radius: 6px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

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

.wrap {
  width: min(1080px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ── Üst bar ─────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
}
.nav a:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.nav a[aria-current='page'] {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

@media (max-width: 860px) {
  .topbar__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 0 0.45rem;
    gap: 0.45rem;
    min-height: 0;
  }
  /* Menü iki satıra sarınca başlık 135px'e çıkıp ekranın altıda birini
     yiyordu. Tek satırda kalır, taşarsa parmakla yana kaydırılır. */
  .nav {
    margin-left: 0;
    gap: 0.2rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Kenarda kesilen madde "devamı var" desin diye taşma payı. */
    margin-inline: -1.25rem;
    padding-inline: 1.25rem;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  .nav a {
    padding: 0.32rem 0.6rem;
    font-size: 0.86rem;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  html {
    scroll-padding-top: 104px;
  }
}

/* ── Hero ────────────────────────────────────────────────────── */

.hero {
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.hero__art {
  text-align: center;
}
.hero__art img {
  width: min(360px, 100%);
  filter: drop-shadow(0 18px 34px rgba(91, 95, 233, 0.22));
}
.hero p.lead {
  font-size: 1.16rem;
  color: var(--muted);
  max-width: 46ch;
}

@media (max-width: 820px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__art {
    order: -1;
  }
  .hero__art img {
    width: min(240px, 62%);
  }
}

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1rem;
  padding: 0.8rem 1.5rem;
  border-radius: 14px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active {
  transform: translateY(2px);
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 0 var(--primary-dark);
}
.btn--primary:hover {
  color: #fff;
}
.btn--ghost {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Kartlar / bölümler ──────────────────────────────────────── */

section.band {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 {
  margin-top: 0;
  font-size: 1.08rem;
}
.card p {
  color: var(--muted);
  font-size: 0.97rem;
  margin-bottom: 0;
}
.card .ic {
  font-size: 1.6rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.7rem;
}

.card--link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card--link:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  color: inherit;
}

.note {
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
}
.note p:last-child {
  margin-bottom: 0;
}
.note--warn {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* ── Belge sayfaları ─────────────────────────────────────────── */

.doc {
  padding: clamp(2rem, 5vw, 3.5rem) 0 4rem;
}
.doc__head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.6rem;
  margin-bottom: 2rem;
}
.doc__meta {
  color: var(--faint);
  font-size: 0.92rem;
  font-weight: 700;
}
.doc__layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.doc__body {
  max-width: var(--measure);
  min-width: 0;
}
.doc__body h2:first-of-type {
  margin-top: 0;
}

.toc {
  position: sticky;
  top: 92px;
  font-size: 0.9rem;
  border-left: 2px solid var(--line);
  padding-left: 1rem;
}
.toc strong {
  display: block;
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.6rem;
}
.toc a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 0.22rem 0;
  font-weight: 600;
}
.toc a:hover {
  color: var(--primary);
}

@media (max-width: 940px) {
  .doc__layout {
    /* `1fr` değil `minmax(0,1fr)`: grid track'in varsayılan alt sınırı
       `auto` olduğu için içindeki 540px'lik tablo sayfanın tamamını yatay
       kaydırılır hâle getiriyordu. Tablo kendi kutusunda kayar. */
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .toc {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
  }
  .toc a {
    display: inline-block;
    margin-right: 1rem;
  }
}

.doc__body ul,
.doc__body ol {
  padding-left: 1.3rem;
  margin: 0 0 1.2em;
}
.doc__body li {
  margin-bottom: 0.5em;
}
.doc__body li::marker {
  color: var(--primary);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.94rem;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.4rem 0;
}
.table-scroll table {
  margin: 0;
  min-width: 540px;
}
@media (max-width: 560px) {
  .table-scroll {
    /* Kayan tablonun kenardan başladığı belli olsun. */
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 0.85rem;
  }
  .table-scroll table {
    min-width: 460px;
  }
  th,
  td {
    padding: 0.6rem 0.5rem;
  }
}
th,
td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom-width: 2px;
}
tbody tr:last-child td {
  border-bottom: 0;
}

dl.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.2rem;
  margin: 1.2rem 0;
}
dl.kv dt {
  font-weight: 800;
  color: var(--faint);
}
dl.kv dd {
  margin: 0;
}
@media (max-width: 560px) {
  dl.kv {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
  dl.kv dd {
    margin-bottom: 0.7rem;
  }
}

.pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.pill--no {
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: #15803d;
}
.pill--yes {
  background: var(--accent-soft);
  color: #b45309;
}
@media (prefers-color-scheme: dark) {
  .pill--no {
    color: #86efac;
  }
  .pill--yes {
    color: var(--accent);
  }
}

/* ── Alt bilgi ───────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 2.5rem 0 3rem;
  margin-top: 3rem;
  font-size: 0.94rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 2rem;
}
.footer h4 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.7rem;
}
.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer li {
  margin-bottom: 0.35rem;
}
.footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.footer a:hover {
  color: var(--primary);
}
.footer__legal {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.86rem;
}
.footer__legal p {
  margin-bottom: 0.4rem;
}
@media (max-width: 720px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer__grid > div:first-child {
    grid-column: 1 / -1;
  }
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Son emniyet: hiçbir şey sayfa gövdesini yana kaydıramasın.
   `hidden` DEĞİL `clip`: `overflow-x:hidden` html/body üzerinde
   `position:sticky`'yi öldürüyor (üst bar sayfayla birlikte yukarı
   kayıp gidiyordu). `clip` kırpar ama sticky bağlamı bozmaz. */
html,
body {
  overflow-x: clip;
}
