/* ═══════════════════════════════════════════════════════════
   YiYo — Ortak tasarım sistemi
   Tüm sayfalar (landing, yasal, 404) bu token'ları tüketir.
   Açık tema varsayılan (uygulamanın kendi paleti: krem zemin,
   lacivert yazı, portakal ve yaprak yeşili vurgu); koyu tema
   :root[data-theme="dark"] ile açılır.

   Token ADLARI legal.css ve 404'ün inline stili tarafından
   kullanılıyor — adları değiştirme, değerleri değiştir.
   ═══════════════════════════════════════════════════════════ */

:root,
:root[data-theme="light"] {
  --bg:         #FCF9F3;
  --surface:    #FFFFFF;
  --surface-2:  #F6F1E8;
  --fg:         #1E3A5F;
  --fg-muted:   #4F6D90;  /* krem üstünde 4,9:1 */
  --fg-soft:    #3B5779;
  --accent:     #F28F3E;  /* dolgu / kenar / vurgu — uygulamanın portakalı */
  --accent-ink: #B4560A;  /* accent renkli METİN (krem üstünde AA) */
  --accent-deep:#F7A24F;  /* CTA hover; lacivert metin 5,6:1 */
  --edge:       rgba(30, 58, 95, .16);
  --edge-soft:  rgba(30, 58, 95, .08);
  --shadow:     rgba(30, 58, 95, .18);
  --focus:      #A34E09;

  /* Yeşil maskotun yaprağından (#6ABE6E). "Ücretsiz / dahil / tamam"
     anlamındaki vurgular bunu kullanır; portakal ürünü işaret eder. */
  --go:         #4A9E52;
  --go-ink:     #246A3A;  /* krem 5,5:1, kum 5,0:1 (14px/600 rozet metni) */
  --go-soft:    rgba(74, 158, 82, .12);
  --go-edge:    rgba(74, 158, 82, .32);

  /* Uygulamadaki kart renkleri: öğün kartı şeftalisi, su mavisi,
     sebze yeşili, tahıl kumu. Landing bölümleri bunlarla boyanır. */
  --tint-peach: #FFE3D1;
  --tint-sky:   #DDEEFB;
  --tint-leaf:  #E4F2E3;
  --tint-sand:  #F7EBD6;
  --navy:       #1E3A5F;
  --on-navy:    #FCF9F3;
  --on-navy-muted: #B9C7D8;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg:         #0F1419;
  --surface:    #171D24;
  --surface-2:  #1E262F;
  --fg:         #F4EFE7;
  --fg-muted:   #9AA6B4;
  --fg-soft:    #C5CCD5;
  --accent:     #F5983F;
  --accent-ink: #F5983F;
  --accent-deep:#FFAE5C;
  --edge:       rgba(244, 239, 231, .16);
  --edge-soft:  rgba(244, 239, 231, .08);
  --shadow:     rgba(0, 0, 0, .5);
  --focus:      #F5983F;

  --go:         #6ABE6E;
  --go-ink:     #7FCF84;
  --go-soft:    rgba(106, 190, 110, .14);
  --go-edge:    rgba(106, 190, 110, .34);

  --tint-peach: #33231C;
  --tint-sky:   #172633;
  --tint-leaf:  #18261B;
  --tint-sand:  #2B2318;
  --navy:       #141C27;
  --on-navy:    #F4EFE7;
  --on-navy-muted: #9AA6B4;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Instrument Sans","Instrument Sans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}

/* ── Tipografi rolleri ─────────────────────────────────── */

.display {
  font-family: "Bricolage Grotesque","Bricolage Grotesque Fallback", "Instrument Sans","Instrument Sans Fallback", sans-serif;
  font-weight: 700;
  line-height: .96;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.mono {
  font-family: "Martian Mono","Martian Mono Fallback", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--fg-muted);
}

/* lang="tr" altında uppercase "YiYo"yu "YİYO" yapar — marka adı
   her zaman olduğu gibi yazılır. */
.brandname { text-transform: none; }

a { color: inherit; }

/* ── Odak halkası ──────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--focus, var(--accent));
  outline-offset: 4px;
  border-radius: 2px;
}

/* ── Tema anahtarı ─────────────────────────────────────── */

.theme-toggle,
.motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: none;
  color: var(--fg);
  cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease, color .25s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.motion-toggle:hover,
.motion-toggle:focus-visible {
  border-color: var(--fg);
  background: var(--edge-soft);
}

.theme-toggle svg,
.motion-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Açık temada ay (koyuya geçiş), koyu temada güneş */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.motion-toggle .icon-play { display: none; }
.motion-toggle[aria-pressed="true"] .icon-pause { display: none; }
.motion-toggle[aria-pressed="true"] .icon-play  { display: block; }

/* ── Butonlar ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Instrument Sans","Instrument Sans Fallback", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: none;
  color: var(--fg);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.btn:hover,
.btn:focus-visible { border-color: var(--fg); }

.btn--fill {
  background: var(--accent);
  color: var(--navy);
  border-color: var(--accent);
}

.btn--fill:hover,
.btn--fill:focus-visible {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--navy);
}

.btn[aria-disabled="true"] {
  opacity: .45;
  cursor: default;
  pointer-events: none;
}

/* ── Mağaza rozeti ─────────────────────────────────────────
   Apple'ın pazarlama kuralları yalnız resmi "App Store'dan İndirin"
   rozetine izin veriyor (dile göre yerelleştirilmiş SVG'ler
   assets/badges/ altında, siyah sürüm). Rozetin kendisi değiştirilmez:
   renk, oran ve kenarlık olduğu gibi kalır; ekranda en az 40px yükseklik.
   Google Play rozeti ancak uygulama Play'e çıkınca eklenebilir; o zamana
   kadar yalnız düz metin. */

.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.store-badge {
  display: inline-block;
  flex: none;
  line-height: 0;
  border-radius: 10px;
  transition: opacity .2s ease, transform .2s ease;
}

.store-badge img { display: block; height: 48px; width: auto; }
.store-badge:hover { opacity: .9; }

.soon {
  font-size: 14px;
  color: var(--fg-muted);
  white-space: nowrap;
}

/* ── Yalnız ekran okuyucuya ────────────────────────────── */

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── İçeriğe geç ───────────────────────────────────────────
   Klavyeyle ilk Tab'da görünür; header'daki bağlantıları atlar. */

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  font-family: "Instrument Sans","Instrument Sans Fallback", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus { top: 12px; }

/* ── Dil önerisi ───────────────────────────────────────────
   Tarayıcının dili (ya da menüden daha önce seçilen dil) sayfanınkinden
   farklıysa altta küçük bir hap. Otomatik yönlendirme yok: arama
   motorları her dili kendi adresinde görmeli. js/i18n.js çiziyor. */

.lang-hint {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 32px);
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 16px 40px -18px var(--shadow);
  font-family: "Instrument Sans","Instrument Sans Fallback", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.3;
  color: var(--fg-soft);
}

.lang-hint a { color: var(--fg); font-weight: 500; text-underline-offset: 3px; }
.lang-hint a:hover { color: var(--accent-ink); }

.lang-hint button {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--fg-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.lang-hint button:hover { color: var(--fg); background: var(--edge-soft); }

/* Landing'de mobil alt çubuk varken öneri hapı onun üstüne çıkar */
body.has-dock .lang-hint { bottom: calc(72px + env(safe-area-inset-bottom)); }
@media (min-width: 761px) { body.has-dock .lang-hint { bottom: max(16px, env(safe-area-inset-bottom)); } }

/* ── Ücretsiz rozeti ───────────────────────────────────── */

.badge-free {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Instrument Sans","Instrument Sans Fallback", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--go-ink);
  background: var(--go-soft);
  border: 1px solid var(--go-edge);
  border-radius: 999px;
  padding: 8px 14px;
  white-space: nowrap;
}

.badge-free::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--go);
  flex: none;
}

/* accent yerine yeşille vurgulanan METİN */
.go { color: var(--go-ink); }

/* ── Pixel maskot (yasal sayfalar ve 404) ──────────────── */

.mascot {
  position: relative;
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
}

.mascot.is-awake { transform: scale(1.06); }

.mascot-canvas {
  display: block;
  image-rendering: pixelated;
  animation: mascot-bob 3.6s ease-in-out infinite;
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-5px) rotate(-1.4deg); }
}

/* Konuşma balonu */
.mascot-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 16px);
  width: max-content;
  max-width: min(64vw, 250px);
  transform: translate(-50%, 8px) scale(.94);
  opacity: 0;
  pointer-events: none;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 11px 15px;
  font-family: "Instrument Sans","Instrument Sans Fallback", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 14px 34px -16px var(--shadow);
  transition: opacity .22s ease, transform .3s cubic-bezier(.22, .61, .36, 1);
  z-index: 6;
}

.mascot-bubble::before,
.mascot-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  border: 7px solid transparent;
}
.mascot-bubble::before {
  margin-left: -7px;
  border-top-color: var(--edge);
}
.mascot-bubble::after {
  margin-left: -6px;
  border-width: 6px;
  border-top-color: var(--surface);
}

.mascot.is-awake .mascot-bubble {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

/* ── Ortak footer ──────────────────────────────────────
   Lacivert, sütunlu: marka + rozet, özellik sayfaları, rehber, yasal.
   Ana sayfa, alt sayfalar, yasal sayfalar ve 404 aynı işaretlemeyi
   kullanıyor (site içi bağlantı ağı). */

.site-footer {
  background: var(--navy);
  color: var(--on-navy-muted);
  padding: clamp(44px, 6vw, 72px) clamp(20px, 4vw, 54px) 28px;
  margin-top: clamp(28px, 4vw, 48px);
  font-size: 14.5px;
}

.foot-grid {
  max-width: 1180px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 28px;
}
@media (min-width: 900px) {
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.foot-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .foot-brand { grid-column: auto; } }

.site-footer .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-footer .brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-footer .wordmark {
  font-family: "Bricolage Grotesque","Bricolage Grotesque Fallback", sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.01em;
  color: var(--on-navy);
}
.foot-brand p { margin: 14px 0 18px; max-width: 22em; line-height: 1.5; }
.foot-brand .store-badge img { height: 44px; }

.foot-col h2 {
  font-family: "Instrument Sans","Instrument Sans Fallback", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--on-navy);
  margin-bottom: 12px;
}
.foot-col ul { list-style: none; display: grid; gap: 2px; }
.foot-col a {
  display: inline-block;
  padding-block: 5px;
  color: var(--on-navy-muted);
  text-decoration: none;
  line-height: 1.35;
  transition: color .2s ease;
}
.foot-col a:hover,
.foot-col a:focus-visible { color: var(--on-navy); text-decoration: underline; text-underline-offset: 3px; }

.site-footer .colophon {
  max-width: 1180px;
  margin: clamp(32px, 5vw, 56px) auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  font-size: 13.5px;
}
.site-footer .colophon a { color: var(--on-navy); text-decoration: none; }
.site-footer .colophon a:hover { text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--on-navy); }

.site-footer .lang-btn { color: var(--on-navy-muted); border-color: rgba(255,255,255,.22); }
.site-footer .lang-btn:hover, .site-footer .lang-btn[aria-expanded="true"] { color: var(--on-navy); border-color: var(--on-navy); background: rgba(255,255,255,.08); }
.site-footer .lang-menu { bottom: calc(100% + 8px); top: auto; }
.site-footer .lang-menu a { color: var(--fg-soft); }
.site-footer .lang-menu a:hover { color: var(--fg); }

/* ── Dil seçici ────────────────────────────────────────────
   Tetikleyici tema anahtarıyla aynı kutu ölçüsünde. Menü js/i18n.js
   tarafından çiziliyor, burada yalnız görünüm var. */

.lang { position: relative; display: inline-flex; min-width: 62px; min-height: 36px; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-soft);
  cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease, color .25s ease;
}

.lang-btn:hover,
.lang-btn:focus-visible,
.lang-btn[aria-expanded="true"] {
  border-color: var(--fg);
  background: var(--edge-soft);
  color: var(--fg);
}

.lang-btn svg { width: 15px; height: 15px; display: block; flex: none; }

.lang-code {
  font-family: "Instrument Sans","Instrument Sans Fallback", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 168px;
  margin: 0;
  padding: 5px;
  list-style: none;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 44px -20px var(--shadow);
}

.lang-menu[hidden] { display: none; }

.lang-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: "Instrument Sans","Instrument Sans Fallback", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}

.lang-menu a:hover,
.lang-menu a:focus-visible {
  background: var(--edge-soft);
  color: var(--fg);
}

.lang-menu a[aria-current] {
  color: var(--accent-ink);
  font-weight: 500;
}

.lang-menu a[aria-current]::after {
  content: "✓";
  margin-left: 8px;
}

/* Sayfadaki "Hareketi durdur" anahtarı (bkz. js/theme.js) */
.motion-off .mascot-canvas { animation: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion-toggle { display: none; }
  body, .btn, .theme-toggle, .lang-btn, .lang-menu a { transition: none; }
  .mascot-canvas { animation: none; }
  .mascot, .mascot-bubble { transition: none; }
  .mascot.is-awake { transform: none; }
}
