/* ADIM statik web sayfalarının ORTAK kabuğu: renk/ölçü değişkenleri, temel
   stiller, header (masaüstü menü + JavaScript gerektirmeyen dar ekran
   menüsü), düğmeler, küçük ortak bileşenler ve footer. Web ana sayfasıyla
   (Flutter landing) aynı tasarım dili.
   Kullanan sayfalar: ADIM Nedir?, Gizlilik, Destek, Hesap Silme. Sayfaya
   özel stiller adim-nedir.css ve legal.css içindedir. */

:root {
  --primary: #1565c0;
  --primary-dark: #0f4fa8;
  --accent: #3fa2f6;
  --navy: #173452;
  --ink: #1d2d3d;
  --body: #4f5d6b;
  --muted: #9fb0c3;
  --line: #e6ecf4;
  --soft: #f5f8fd;
  --teacher: #7655d9;
  --family: #168b3f;
  --radius-lg: 28px;
  --radius-md: 22px;
  --shadow-sm: 0 8px 18px rgba(23, 52, 82, .05);
  --shadow-md: 0 14px 34px rgba(23, 52, 82, .09);
  --shadow-lg: 0 24px 48px rgba(23, 52, 82, .22);
  --max: 1180px;
  --gutter: 32px;
  --header-h: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
figure { margin: 0; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e3eaf3;
  box-shadow: 0 6px 18px rgba(23, 52, 82, .06);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
  text-decoration: none;
}
.brand img { width: 42px; height: 42px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .6px;
  color: var(--primary-dark);
}
.brand-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a:hover { background: var(--soft); color: var(--primary); }
.main-nav a[aria-current="page"] { color: var(--primary); background: #eaf3ff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 22px rgba(21, 101, 192, .22); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }
.btn-outline { border: 1.5px solid var(--primary); color: var(--primary); background: rgba(255, 255, 255, .8); }
.btn-outline:hover { background: #fff; color: var(--primary-dark); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { color: var(--navy); transform: translateY(-2px); }

/* Dar ekran menüsü (JavaScript gerektirmez). */
.menu { display: none; position: relative; }
.menu summary {
  list-style: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 24px; height: 24px; }
.menu[open] summary { background: var(--soft); }
.menu nav {
  position: absolute;
  right: 0;
  top: 52px;
  min-width: 220px;
  padding: 8px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.menu nav a {
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.menu nav a:hover, .menu nav a[aria-current="page"] { background: var(--soft); color: var(--primary); }

/* ---------- Ortak küçük bileşenler ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid #d7e5f7;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 16px;
}
.icon svg { width: 26px; height: 26px; }
.icon.blue { background: #dceaf8; color: var(--primary); }
.icon.green { background: #dcead9; color: var(--family); }
.icon.purple { background: #e8e0f6; color: var(--teacher); }
.icon.orange { background: #ffebdc; color: #d9692a; }
.icon.teal { background: #d7f2ec; color: #0f8f7e; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy); color: var(--muted); padding: 44px 0 28px; }
.footer-top { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-sub { color: #b9c8da; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; margin-left: auto; }
.footer-nav a { padding: 8px 12px; border-radius: 10px; color: #d3deea; font-weight: 700; text-decoration: none; }
.footer-nav a:hover, .footer-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .08); }
.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 13px;
}
.footer-bottom a { color: #d3deea; }

/* ---------- Hareket dili (motion.js ile) ----------
   Gizleme YALNIZ motion.js <html>'e "motion-ready" ekleyince etkindir;
   JavaScript kapalıysa / "hareketi azalt" açıksa içerik baştan görünür.
   Belirme ayrı translate/scale özellikleriyle yapılır; hover'ların
   kullandığı transform ile çakışmaz. Yalnız opacity/translate/scale. */

:root { --ease-out: cubic-bezier(.22, 1, .36, 1); }

html.motion-ready [data-reveal] {
  opacity: 0;
  translate: 0 18px;
  transition:
    opacity .6s var(--ease-out),
    translate .6s var(--ease-out),
    scale .6s var(--ease-out),
    transform .22s ease,
    box-shadow .22s ease,
    border-color .22s ease,
    background-color .18s ease;
  transition-delay:
    var(--reveal-delay, 0ms),
    var(--reveal-delay, 0ms),
    var(--reveal-delay, 0ms),
    0s, 0s, 0s, 0s;
}
html.motion-ready [data-reveal="scale"] { scale: .98; }
html.motion-ready [data-reveal].is-visible { opacity: 1; translate: none; scale: none; }

/* Menü: hover'da ince alt çizgi (yerleşim değişmez). */
.main-nav a { position: relative; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform .2s var(--ease-out);
}

/* Düğmeler: basınca hafif çökme; ok ikonu hover'da birkaç piksel ilerler. */
.btn:active { transform: translateY(0) scale(.98); }
.btn svg:last-child:not(:first-child) { transition: transform .2s var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .main-nav a:hover::after { transform: scaleX(1); }
  .btn:hover svg:last-child:not(:first-child) { transform: translateX(3px); }
}

/* ---------- Responsive (ortak kabuk) ---------- */

@media (max-width: 1099px) {
  .main-nav, .header-cta { display: none; }
  .menu { display: block; }
  .footer-top { flex-direction: column; text-align: center; }
  .footer-nav { justify-content: center; margin-left: 0; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (max-width: 767px) {
  :root { --gutter: 18px; }
}

@media (max-width: 420px) {
  .brand-sub { display: none; }
  .btn { white-space: normal; }
}

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