/* ============================================================
   WRD! – Word, Rounds, Duel!  ·  Web sitesi stilleri
   Tüm sayfalar bu dosyayı paylaşır.
   ============================================================ */

:root {
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #efedf8;
  --text: #17162b;
  --muted: #5f5d7a;
  --border: #e3e1ef;

  --primary: #5b3df5;
  --primary-strong: #4a2ee0;
  --primary-soft: #ece8ff;
  --on-primary: #ffffff;

  --accent: #ff5a5f;
  --accent-strong: #e3484d;
  --accent-soft: #ffe9ea;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 22, 43, 0.07);
  --maxw: 1080px;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12111f;
    --surface: #1b1a2e;
    --surface-2: #242238;
    --text: #f1f0fa;
    --muted: #a8a5c4;
    --border: #2e2c48;

    --primary: #8b74ff;
    --primary-strong: #a493ff;
    --primary-soft: #2a2450;
    --on-primary: #12111f;

    --accent: #ff6e72;
    --accent-strong: #ff8a8d;
    --accent-soft: #3a2230;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; }

a { color: var(--primary-strong); }

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

.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;
}

.container { max-width: var(--maxw); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

/* ---------- Dil görünürlüğü ----------
   Her sayfada içerik iki kez bulunur: [data-lang="tr"] ve [data-lang="en"].
   <html lang="..."> değerine göre sadece biri gösterilir. */
[data-lang] { display: none !important; }
html[lang="tr"] div[data-lang="tr"],
html[lang="en"] div[data-lang="en"] { display: block !important; }
html[lang="tr"] span[data-lang="tr"],
html[lang="en"] span[data-lang="en"] { display: inline !important; }

/* ---------- Logo karoları ---------- */
.tiles {
  display: inline-flex;
  gap: 0.18em;
  font-size: var(--tile-size, 24px);
  font-weight: 900;
  line-height: 1;
}
.tile {
  width: 1.4em;
  height: 1.4em;
  border-radius: 0.24em;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0.14em 0 rgba(0, 0, 0, 0.25);
  transform: rotate(var(--r, 0deg));
  user-select: none;
}
.tile.bang { background: var(--accent); }

/* ---------- Üst bar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; }
.brand .tiles { --tile-size: 19px; }
.brand-dev { font-weight: 800; font-size: 0.95rem; color: var(--muted); }

.site-nav { display: flex; gap: 0.25rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.95rem;
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-strong); }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  flex-shrink: 0;
}
.lang-switch button {
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

@media (max-width: 760px) {
  .site-header { position: static; }
  .site-nav { order: 3; width: 100%; margin-left: 0; flex-wrap: wrap; overflow: visible; }
  .site-nav a { font-size: 0.9rem; padding: 0.4rem 0.75rem; }
  .brand-dev { display: none; }
}

/* ---------- Yasal sayfa düzeni ---------- */
.legal-hero { max-width: var(--maxw); margin: 0 auto; padding: 2.75rem 1.25rem 0.5rem; }
.legal-hero h1 {
  text-wrap: balance;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}
.legal-hero .lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; margin: 0 0 0.75rem; }
.meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; color: var(--muted); font-weight: 700; font-size: 0.92rem; }

.legal-layout {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 960px) {
  .legal-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; }
}

/* İçindekiler */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.toc summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "▾"; font-size: 1rem; transition: transform 0.2s; }
.toc[open] summary::after { transform: rotate(180deg); }
.toc ol { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.toc li a {
  display: block;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
}
.toc li a:hover { background: var(--surface-2); color: var(--text); }
.toc li a.active { background: var(--primary-soft); color: var(--primary-strong); }
@media (min-width: 960px) {
  .toc { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; }
  .toc summary { pointer-events: none; }
  .toc summary::after { content: none; }
}

/* Metin gövdesi */
.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3.5vw, 2.75rem);
  max-width: 78ch;
  overflow-wrap: anywhere;
}
.prose > :first-child { margin-top: 0; }
.prose h2 {
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.25;
  margin: 2.4rem 0 0.8rem;
  padding-top: 0.25rem;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose h3 { font-size: 1.08rem; font-weight: 800; margin: 1.6rem 0 0.5rem; }
.prose p, .prose li { line-height: 1.75; }
.prose p { margin: 0.8rem 0; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0.6rem 0 1rem; }
.prose li { margin: 0.35rem 0; }
.prose li::marker { color: var(--primary); font-weight: 900; }
.prose a { color: var(--primary-strong); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.prose strong { font-weight: 800; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.table-scroll { overflow-x: auto; margin: 1rem 0 1.25rem; border: 1px solid var(--border); border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin: 0; }
.prose th, .prose td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { background: var(--surface-2); font-weight: 800; white-space: nowrap; }

.note {
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
  padding: 0.9rem 1.1rem;
  border-radius: 0 10px 10px 0;
  margin: 1.25rem 0;
}
.note.warn { border-left-color: var(--accent); background: var(--accent-soft); }
.note p { margin: 0.3rem 0; }
.note p:first-child { margin-top: 0; }

.steps { list-style: none; padding: 0; margin: 1rem 0 1.25rem; counter-reset: step; }
.steps li { position: relative; padding-left: 3.1rem; margin: 0.9rem 0; counter-increment: step; min-height: 2.2rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.1rem;
  width: 2.2rem; height: 2.2rem;
  border-radius: 9px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 900;
  display: grid; place-items: center;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
}

.kbd {
  display: inline-block;
  padding: 0.05em 0.5em;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 0.92em;
  line-height: 1.5;
}

/* Düğmeler */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 800;
  font-size: 1rem;
  padding: 0.85rem 1.3rem;
  border-radius: 12px;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.outline { background: var(--surface); color: var(--text); border: 2px solid var(--border); box-shadow: 0 4px 0 var(--border); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0 1.25rem; }
.prose .btn { color: var(--on-primary); }
.prose .btn.accent { color: #fff; }
.prose .btn.outline { color: var(--text); }

/* ---------- Ana sayfa ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) 1.25rem 2rem;
  text-align: center;
}
.hero .tiles { --tile-size: clamp(46px, 9vw, 76px); gap: 0.2em; }
.hero .tile:nth-child(1) { --r: -6deg; }
.hero .tile:nth-child(2) { --r: 3deg; }
.hero .tile:nth-child(3) { --r: -2deg; }
.hero .tile:nth-child(4) { --r: 7deg; }
.hero h1 {
  margin: 1.75rem auto 0.6rem;
  max-width: 24ch;
  text-wrap: balance;
  font-size: clamp(1.6rem, 4.2vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.hero .lede { color: var(--muted); font-size: 1.15rem; max-width: 38rem; margin: 0 auto; }
.store-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.75rem; }
.store-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}
.store-btn small { display: block; font-size: 0.7rem; font-weight: 700; opacity: 0.75; line-height: 1; margin-bottom: 0.15rem; }
.store-btn .store-label { display: block; line-height: 1.15; text-align: left; }
.store-btn svg { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
.store-btn.is-soon { opacity: 0.55; cursor: default; box-shadow: none; }
.when-live { display: none; }
.store-btn:not(.is-soon) .when-soon, body.stores-live .lede .when-soon { display: none; }
.store-btn:not(.is-soon) .when-live, body.stores-live .lede .when-live { display: inline; }

.cards {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: transform 0.15s, border-color 0.15s;
}
a.card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card .icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}
.card h2, .card h3 { margin: 0; font-size: 1.1rem; font-weight: 900; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.card .more { margin-top: auto; padding-top: 0.5rem; font-weight: 800; color: var(--primary-strong); font-size: 0.92rem; }
.card.support { grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; }
.card.support .grow { flex: 1 1 260px; }
.card.support .icon { margin: 0; }

/* ---------- Alt bilgi ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 1.75rem 1.25rem 2.25rem; color: var(--muted); font-size: 0.9rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.footer-inner a { color: inherit; font-weight: 700; text-decoration: none; }
.footer-inner a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Yazdırma ---------- */
@media print {
  .site-header, .site-footer, .toc, .btn-row { display: none !important; }
  body { background: #fff; color: #000; }
  .prose { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .legal-layout { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, a.card, .toc summary::after { transition: none; }
}
