/* Pyzi Games — ortak stil. Renkler oyunun Theme.swift dosyasındaki değerlerden gelir. */
:root {
  --night: #140d40;
  --violet: #4a29a8;
  --panel: #3d2994;
  --chrome: #6e52db;
  --ink: #1a0f45;
  --paper: #f3eeff;
  --muted: #b9acec;
  --gold: #ffcc45;
  --coral: #ff737a;
  --teal: #45d6cc;
  --blue: #669eff;
  --lilac: #c78fff;
  --green: #80e085;

  --display: "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night) linear-gradient(180deg, var(--violet) 0, var(--night) 900px) no-repeat;
  color: var(--paper);
  font: 400 1.0625rem/1.6 var(--body);
}

/* Dil seçimi: etkin olmayan dildeki içerik gizlenir. */
html[data-lang="en"] [lang="tr"],
html[data-lang="tr"] [lang="en"] { display: none !important; }

img { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Üst çubuk ---------- */
.top { display: flex; align-items: center; gap: 20px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: #fff; text-decoration: none; font: 800 1.35rem/1 var(--display); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--paper); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.top nav a:hover { color: var(--gold); }
.langs { display: flex; background: rgba(20, 13, 64, 0.55); border-radius: 999px; padding: 3px; }
.langs button {
  font: 700 0.8rem/1 var(--body); color: var(--muted); background: none; border: 0;
  padding: 7px 11px; border-radius: 999px; cursor: pointer;
}
html[data-lang="en"] .langs [data-set="en"],
html[data-lang="tr"] .langs [data-set="tr"] { background: var(--chrome); color: #fff; }
@media (max-width: 620px) { .top nav { display: none; } }

/* ---------- Kabartmalı parçalar (oyundaki ChunkyButtonStyle) ---------- */
.chunky {
  display: inline-block; font: 800 1.15rem/1 var(--display); text-decoration: none;
  color: var(--ink); background: var(--gold); padding: 16px 24px 14px; border-radius: 18px;
  box-shadow: 0 6px 0 #b8902f;
}
.chunky.is-quiet { background: var(--chrome); color: #fff; box-shadow: 0 6px 0 #4a36a0; }
a.chunky:hover { color: var(--ink); transform: translateY(2px); box-shadow: 0 4px 0 #b8902f; }

/* ---------- Giriş ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(28px, 6vw, 72px) clamp(56px, 9vw, 120px); }
.hero h1 { font-size: clamp(3rem, 8.2vw, 6.25rem); line-height: 0.92; letter-spacing: -0.025em; }
.hero .lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 30em; margin-top: 22px; color: #e3dafc; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 32px; }
.hero .cta small { font-size: 0.92rem; color: var(--muted); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

/* ---------- Oynanabilir tahta ---------- */
.play { background: var(--panel); border-radius: 30px; padding: clamp(14px, 2.4vw, 22px); box-shadow: 0 10px 0 #24165f; max-width: 480px; width: 100%; justify-self: center; }
.play-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; margin-bottom: 14px; }
.play-bar p { font: 800 1.1rem/1.1 var(--display); }
.hearts { display: flex; gap: 5px; background: rgba(20, 13, 64, 0.5); padding: 8px 12px; border-radius: 999px; }
.hearts svg { width: 18px; height: 18px; fill: var(--coral); transition: fill 0.2s, transform 0.2s; }
.hearts svg.is-lost { fill: #5a4aa3; transform: scale(0.8); }
.board { position: relative; aspect-ratio: 1; background: var(--night); border-radius: 20px; overflow: hidden; }
.tile {
  position: absolute; width: calc(100% / var(--n)); height: calc(100% / var(--n)); padding: 0;
  left: calc(var(--x) * 100% / var(--n)); top: calc(var(--y) * 100% / var(--n));
  background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.42s cubic-bezier(0.5, 0, 0.9, 0.5), opacity 0.42s ease-in;
}
.tile i {
  position: absolute; inset: 7% 7% 13%; border-radius: 24%; background: var(--c);
  box-shadow: 0 0.36em 0 var(--d); display: grid; place-items: center; font-size: clamp(10px, 1.4vw, 16px);
}
.tile svg { width: 78%; height: 78%; fill: var(--ink); transform: rotate(var(--r)); }
.tile[data-d="u"] { --c: var(--gold); --d: #b8902f; --r: 0deg; }
.tile[data-d="r"] { --c: var(--coral); --d: #b84f55; --r: 90deg; }
.tile[data-d="d"] { --c: var(--blue); --d: #486fb8; --r: 180deg; }
.tile[data-d="l"] { --c: var(--teal); --d: #2f9891; --r: 270deg; }
.tile.is-gone { opacity: 0; pointer-events: none; }
.tile.is-blocked i { animation: nope 0.32s; }
.tile:focus-visible { outline: none; }
.tile:focus-visible i { outline: 3px solid #fff; outline-offset: 2px; }
@keyframes nope { 25% { translate: -7% 0; } 50% { translate: 7% 0; } 75% { translate: -4% 0; } }
.play-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; min-height: 44px; }
.play-foot p { font-size: 0.92rem; color: var(--muted); }
.play-foot button { font: 800 0.95rem/1 var(--display); color: #fff; background: var(--chrome); border: 0; border-radius: 13px; padding: 12px 16px 10px; box-shadow: 0 4px 0 #4a36a0; cursor: pointer; white-space: nowrap; }
.play-foot button:active { transform: translateY(3px); box-shadow: 0 1px 0 #4a36a0; }

/* ---------- Bölümler ---------- */
.band { padding-block: clamp(56px, 9vw, 112px); }
.band > .wrap > h2 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); max-width: 14em; }
.band > .wrap > h2 + p { max-width: 36em; margin-top: 16px; color: #dcd2fa; font-size: 1.1rem; }

.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 32px); margin-top: clamp(36px, 5vw, 64px); list-style: none; padding: 0; }
.modes li:nth-child(even) { margin-top: 56px; }
.modes h3 { font-size: 1.55rem; margin-top: 20px; color: var(--tone); }
.modes p { font-size: 0.98rem; color: #dcd2fa; margin-top: 6px; }
.phone { border-radius: 13% / 6.2%; border: 5px solid #0d0830; box-shadow: 0 9px 0 #0d0830; background: #0d0830; width: 100%; height: auto; }
@media (max-width: 860px) {
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modes li:nth-child(even) { margin-top: 40px; }
}
@media (max-width: 460px) {
  .modes { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 20px; }
  .modes li { flex: 0 0 68%; scroll-snap-align: center; }
  .modes li:nth-child(even) { margin-top: 0; }
}

.journey { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.journey h2 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 36px; }
.facts strong { display: block; font: 800 1.2rem/1.2 var(--display); color: var(--gold); }
.facts span { font-size: 0.98rem; color: #dcd2fa; }
@media (max-width: 760px) {
  .journey { grid-template-columns: 1fr; }
  .journey .phone { max-width: 240px; }
  .facts { grid-template-columns: 1fr; }
}

.studio { background: var(--paper); color: var(--ink); border-radius: 36px; padding: clamp(28px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 5vw, 64px); }
.studio h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.studio p + p { margin-top: 14px; }
.studio a { color: #4a29a8; font-weight: 600; }
.studio a:hover { color: var(--ink); }
@media (max-width: 760px) { .studio { grid-template-columns: 1fr; } }

/* ---------- Alt bilgi ---------- */
.foot { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; padding-block: 40px 56px; font-size: 0.92rem; color: var(--muted); }
.foot p { margin-right: auto; }
.foot a { color: var(--paper); }

/* ---------- Yazı sayfaları (gizlilik) ---------- */
.doc { max-width: 720px; padding-block: clamp(24px, 5vw, 56px) 40px; }
.doc h1 { font-size: clamp(2.4rem, 6vw, 3.75rem); }
.doc .stamp { color: var(--muted); margin-top: 12px; font-size: 0.95rem; }
.doc h2 { font-size: 1.6rem; margin-top: 2.2em; color: var(--gold); }
.doc h3 { font-size: 1.2rem; margin-top: 1.5em; }
.doc p, .doc ul, .doc ol { margin-top: 0.85em; color: #e6defc; }
.doc ul, .doc ol { padding-left: 1.25em; }
.doc li + li { margin-top: 0.4em; }
.doc strong { color: #fff; }
.doc .gist { background: var(--panel); border-radius: 22px; padding: 22px 24px; margin-top: 28px; box-shadow: 0 7px 0 #24165f; }
.doc .gist p:first-child { margin-top: 0; }

.doc .choices { list-style: none; padding: 0; margin-top: 28px; display: grid; gap: 18px; }
.choices > li { background: var(--panel); border-radius: 22px; padding: 22px 24px; box-shadow: 0 7px 0 #24165f; margin: 0; }
.choices h2 { margin-top: 0; font-size: 1.4rem; }
.path { display: inline-block; background: rgba(20, 13, 64, 0.6); color: #fff; font-weight: 600; padding: 2px 10px; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile { transition-duration: 0.01s; }
  .tile.is-blocked i { animation: none; }
}
