/* ============================================================
   STYLE.CSS
   Odium Stüdyo - sinematik, tek renkli, editöryel.
   Bölümler:
     01 Yerleşim & yardımcılar
     02 Doku (grain + vignette)
     03 Butonlar
     04 Navbar + mobil menü
     05 Hero
     06 İstatistik şeridi
     07 Hakkımızda + hizmetler
     08 Projeler (iş ızgarası)
     09 Proje detay
     10 Ekip
     11 Katıl (CTA)
     12 Footer
   ============================================================ */

/* ============================================================
   01 · YERLEŞİM & YARDIMCILAR
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.container--wide { max-width: var(--container-wide); }

.section { padding-block: var(--section-y); }

/* Bölüm başlığı - dikey yığın (split-header yok) */
.section-head {
  max-width: 60ch;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.section-head__title {
  font-size: var(--fs-h2);
  letter-spacing: var(--track-display);
}
.section-head__lead {
  margin-top: var(--s-5);
  max-width: 56ch;
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
}

.overline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-overline);
  font-weight: var(--w-medium);
  letter-spacing: var(--track-overline);
  text-transform: uppercase;
  color: var(--text-3);
}
.overline::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--line-2);
}

/* ============================================================
   02 · DOKU
   Sabit, pointer-events yok. Kaydırılan kapsayıcıya uygulanmaz.
   ============================================================ */
.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   03 · BUTONLAR
   ============================================================ */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  white-space: nowrap;
  padding: 0.8rem 1.4rem;
  border-radius: var(--r-md);
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--w-medium);
  letter-spacing: 0.01em;
  transition: transform var(--t-fast), background var(--t-base),
              border-color var(--t-base), color var(--t-base), opacity var(--t-base);
}
.btn__icon { width: 1.1em; height: 1.1em; flex: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--text-inverse);
  --btn-bd: var(--accent);
  font-weight: var(--w-semibold);
}
.btn--primary:hover {
  background: #e9e9e6;
  border-color: #e9e9e6;
}
.btn--secondary:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
  color: var(--accent);
}
.btn--dark {
  --btn-bg: var(--surface);
  --btn-fg: var(--text-3);
  --btn-bd: var(--line);
  cursor: not-allowed;
}
.btn--lg { padding: 1rem 1.8rem; font-size: var(--fs-body); }
.btn--sm { padding: 0.6rem 1.05rem; font-size: var(--fs-sm); }

/* ============================================================
   04 · NAVBAR
   Tek satır, ≤ 80px. Kaydırınca cam.
   ============================================================ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background var(--t-base), border-color var(--t-base), backdrop-filter var(--t-base);
}
.navbar--scrolled {
  background: rgba(11, 12, 11, 0.72);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.navbar__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: var(--w-semibold);
  font-size: 1.05rem;
  letter-spacing: var(--track-tight);
}
.navbar__logo-img { width: 30px; height: 30px; }
.navbar__logo-accent { color: var(--text-2); font-weight: var(--w-regular); }

.nav-links {
  display: none;
  align-items: center;
  gap: 0.4rem;
}
.nav-links__item {
  position: relative;
  padding: 0.5rem 0.85rem;
  font-size: var(--fs-sm);
  color: var(--text-2);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links__item:hover { color: var(--text); background: var(--surface); }
.nav-links__item.active { color: var(--text); }
.nav-links__item.active::after {
  content: "";
  position: absolute;
  left: 0.85rem; right: 0.85rem; bottom: 0.1rem;
  height: 1px;
  background: var(--accent);
}

.navbar__actions { display: flex; align-items: center; gap: var(--s-3); }
.navbar__cta { display: none; }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.lang-switch__btn {
  padding: 0.3rem 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--w-medium);
  letter-spacing: 0.06em;
  color: var(--text-3);
  border-radius: 7px;
  transition: color var(--t-fast), background var(--t-fast);
}
.lang-switch__btn.is-active { color: var(--text-inverse); background: var(--accent); }
.lang-switch__btn:not(.is-active):hover { color: var(--text); }

/* Hamburger */
.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.hamburger__line {
  height: 1.5px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-fast);
}
.hamburger.is-active .hamburger__line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.is-active .hamburger__line:nth-child(2) { opacity: 0; }
.hamburger.is-active .hamburger__line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .navbar__cta { display: inline-flex; }
  .hamburger { display: none; }
}

/* Mobil menü */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: grid;
  place-items: center;
  padding: var(--pad);
  background: rgba(11, 12, 11, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__nav { display: flex; flex-direction: column; align-items: center; gap: var(--s-5); width: 100%; max-width: 320px; }
.mobile-menu__links { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); width: 100%; }
.mobile-menu__link {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: var(--w-medium);
  color: var(--text-2);
  padding: 0.4rem;
  transition: color var(--t-fast);
}
.mobile-menu__link:hover, .mobile-menu__link.active { color: var(--text); }
.mobile-menu__cta { margin-top: var(--s-3); width: 100%; }
.lang-switch--menu { margin-top: var(--s-2); }
@media (min-width: 1024px) { .mobile-menu { display: none; } }

/* ============================================================
   İLETİŞİM PENCERESİ (modal) - fade + hafif yükseliş
   ============================================================ */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: grid;
  place-items: center;
  padding: var(--pad);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease-soft), visibility 0.28s var(--ease-soft);
}
.contact-modal.is-open { opacity: 1; visibility: visible; }
.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 8, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.contact-modal__card {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 2 * var(--pad));
  overflow-y: auto;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--sh-lg);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.32s var(--ease);
}
.contact-modal.is-open .contact-modal__card { transform: none; }
.contact-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text-2);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.contact-modal__close:hover { color: var(--text); background: var(--surface-2); border-color: var(--line-2); }
.contact-modal__title { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: var(--track-display); padding-right: 2.5rem; }
.contact-modal__desc { margin-top: var(--s-3); color: var(--text-2); font-size: var(--fs-sm); line-height: var(--lh-relaxed); max-width: 40ch; }

.contact-list { margin-top: var(--s-6); display: flex; flex-direction: column; gap: var(--s-2); }
.contact-item {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.contact-item:hover { border-color: var(--line-2); background: var(--surface-2); }
.contact-item:active { transform: translateY(1px); }
.contact-item__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
}
.contact-item__icon svg { width: 19px; height: 19px; }
.contact-item__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact-item__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--text-3);
}
.contact-item__value { font-size: var(--fs-sm); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-item__arrow { margin-left: auto; flex: none; width: 16px; height: 16px; color: var(--text-3); transition: transform var(--t-base), color var(--t-fast); }
.contact-item:hover .contact-item__arrow { color: var(--text); transform: translate(2px, -2px); }

/* ============================================================
   05 · HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: var(--s-8);
  overflow: hidden;
}
/* Tek, sade vignette - üç glow blobu yok */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 78% 18%, rgba(255,255,255,0.06), transparent 55%),
    radial-gradient(140% 120% at 50% 120%, rgba(0,0,0,0.6), transparent 60%);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 80% at 50% 40%, transparent 55%, rgba(0,0,0,0.55));
}
.hero .container { position: relative; z-index: 1; }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}
@media (min-width: 900px) {
  /* minmax(0,...): uzun kelime sütunu büyütüp amblemi daraltamaz -> amblem küçülmez */
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  /* Dönen kelime uzunken küçülme yerine: yazı sola, amblem sağa kayar */
  .hero__text, .hero__visual { transition: transform 0.5s var(--ease); }
  .hero--rotate-wide .hero__text { transform: translateX(clamp(-3rem, -4vw, -2.5rem)); }
  .hero--rotate-wide .hero__visual { transform: translateX(clamp(3rem, 5.5vw, 4.5rem)); }
}

.hero__overline { margin-bottom: var(--s-5); }
.hero__title {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  font-size: var(--fs-hero);
  line-height: 0.96;
  letter-spacing: var(--track-display);
}
.hero__title-line { display: block; }
.hero__title-line--muted {
  color: var(--text-3);
  font-weight: var(--w-light);
}
/* Vurgu: aynı ailede, parlak + ağır. Farklı font enjekte edilmez. */
.hero__hl {
  color: var(--text);
  font-weight: var(--w-bold);
}
/* Dönen kelime (Oyunların / Animasyonların) - yumuşak fade geçişi */
.hero__rotate {
  display: inline-block;
  transition: opacity 0.3s var(--ease-soft), transform 0.3s var(--ease-soft);
}
.hero__rotate.is-swapping {
  opacity: 0;
  transform: translateY(-0.18em);
}
.hero__subtitle {
  margin-top: var(--s-5);
  max-width: 46ch;
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
}
.hero__actions {
  margin-top: var(--s-7);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

/* Amblem - tek gerçek görsel, sade kaide.
   Görsel kutusu içeriğe sarılır; halka görselin merkezine
   göre konumlanır, böylece tam eş merkezli olur. */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  width: fit-content;
  margin-inline: auto;
  justify-self: center;
}
.hero__logo-img {
  position: relative;
  z-index: 1;
  width: clamp(220px, 34vw, 400px);
  max-width: none;
  height: auto;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.6));
}
.hero__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 132%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle, rgba(255,255,255,0.045), transparent 66%);
  z-index: 0;
}
@media (max-width: 899px) {
  .hero__visual { order: -1; }
  .hero__logo-img { width: clamp(150px, 42vw, 220px); }
}

/* ============================================================
   05.B · PROJE SEÇİCİ (çapraz bölme + hover video)
   ============================================================ */
.choose { position: relative; }
.choose__split {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
}
/* Başlık: videoların ve çapraz çizginin ÜSTÜNDE, ortada */
.choose__title {
  position: absolute;
  top: clamp(5rem, 13vh, 8.5rem);
  left: 50%;
  z-index: 4;
  width: min(90%, 26ch);
  text-align: center;
  font-size: var(--fs-h2);
  letter-spacing: var(--track-display);
  color: var(--text);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.78), 0 1px 4px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  /* Başta gizli; bölüme gelince belirir, birkaç saniye sonra kaybolur */
  opacity: 0;
  transform: translateX(-50%) translateY(-18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.choose__title.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* Masaüstü: bölüm tam ekranı kaplar ve kaydırma boyunca sabitlenir (pin).
   Pin mesafesi sarmalayıcının YÜKSEKLİĞİNDEN gelir (padding değil):
   pinHeight - 100vh = sabit kalma süresi. 220vh -> ~120vh boyunca sabit. */
.choose__pin { height: auto; }
@media (min-width: 768px) {
  .choose__pin { height: 160vh; }
  .choose__split { position: sticky; top: 0; height: 100dvh; }
}
.choose__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
  color: var(--text);
  text-decoration: none;
}
.choose__panel--games {
  clip-path: polygon(0 0, 56% 0, 44% 100%, 0 100%);
  justify-content: flex-start;
  padding-left: clamp(1.5rem, 9vw, 8rem);
}
.choose__panel--anim {
  clip-path: polygon(56% 0, 100% 0, 100% 100%, 44% 100%);
  justify-content: flex-end;
  padding-right: clamp(1.5rem, 9vw, 8rem);
}
.choose__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease-soft);
}
.choose__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.45));
  transition: background 0.4s var(--ease-soft);
}
.choose__label {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  pointer-events: none;
}
.choose__label-text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: var(--w-semibold);
  letter-spacing: var(--track-tight);
  line-height: 1;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.55);
  transition: transform var(--t-base) var(--ease);
}
.choose__panel:hover .choose__label-text,
.choose__panel:focus-visible .choose__label-text { transform: translateY(-2px); }
.choose__click {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--text-2);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 3px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.choose__click svg { width: 1em; height: 1em; transition: transform var(--t-base); }
/* hover: video belirginleşir + büyür, yazı parlar */
.choose__panel:hover .choose__video,
.choose__panel:focus-visible .choose__video { transform: scale(1.05); opacity: 1; }
.choose__panel:hover .choose__scrim,
.choose__panel:focus-visible .choose__scrim { background: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0.08) 60%, rgba(0,0,0,0.3)); }
.choose__panel:hover .choose__click { color: var(--text); border-color: var(--accent); }
.choose__panel:hover .choose__click svg { transform: translateX(4px); }
.choose__panel:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

.choose__divider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.28));
}
.choose__divider line { stroke: url(#choose-div-grad); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* Mobil: çapraz yerine üst üste iki panel, pin yok */
@media (max-width: 767px) {
  .choose__split { height: auto; display: flex; flex-direction: column; }
  .choose__panel {
    position: relative;
    inset: auto;
    clip-path: none;
    height: 42vh;
    min-height: 240px;
    justify-content: center;
    padding: 0;
  }
  .choose__label { align-items: center; text-align: center; }
  .choose__divider { display: none; }
  .choose__panel--games { border-bottom: 1px solid var(--line-2); }
}

/* ============================================================
   06 · İSTATİSTİK ŞERİDİ
   ============================================================ */
.stats {
  border-block: 1px solid var(--line);
  background: var(--bg-1);
}
.stats__grid {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .stats__grid { grid-template-columns: repeat(3, 1fr); } }
.stat {
  padding: clamp(1.5rem, 4vw, 2.75rem) var(--s-4);
  border-top: 1px solid var(--line);
  text-align: center;
}
.stat:first-child { border-top: none; }
@media (min-width: 640px) {
  .stat { border-top: none; border-left: 1px solid var(--line); }
  .stat:first-child { border-left: none; }
}
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: var(--w-semibold);
  letter-spacing: var(--track-tight);
  line-height: 1;
}
.stat__label {
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--text-3);
}

/* ============================================================
   07 · HAKKIMIZDA + HİZMETLER
   Editöryel 2 sütun, kart kutusu yerine ince çizgi.
   ============================================================ */
.about__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
}
@media (min-width: 1024px) {
  .about__layout { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
}
.about__intro { position: sticky; top: calc(var(--nav-h) + 2rem); }
.about__title { font-size: var(--fs-h2); letter-spacing: var(--track-display); }
.about__desc {
  margin-top: var(--s-5);
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  max-width: 42ch;
}

.services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 640px) { .services { grid-template-columns: 1fr 1fr; } }

.service {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2vw, 1.75rem);
  border-top: 1px solid var(--line);
  transition: background var(--t-base);
}
.service:hover { background: var(--surface); }
/* 5 hizmet, simetrik 2-1-2: Mix & Mastering (3.) ortada, tam genişlik */
@media (min-width: 640px) {
  .service:nth-child(1), .service:nth-child(2) { border-top: none; }
  .service:nth-child(1), .service:nth-child(4) { border-right: 1px solid var(--line); }
  .service:nth-child(3) {
    grid-column: 1 / -1;
    text-align: center;
  }
  .service:nth-child(3) .service__icon { margin-inline: auto; }
  .service:nth-child(3) .service__desc { margin-inline: auto; }
}
@media (max-width: 639px) {
  .service:first-child { border-top: none; }
}
.service__icon {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  margin-bottom: var(--s-5);
}
.service__icon svg { width: 22px; height: 22px; }
.service__title {
  font-size: var(--fs-h3);
  font-weight: var(--w-semibold);
}
.service__desc {
  margin-top: var(--s-3);
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  max-width: 42ch;
}

/* ============================================================
   08 · PROJELER  (iş ızgarası)
   İlk proje geniş; gerisi 2'li. Görsel öncelikli kartlar.
   ============================================================ */
/* Oklu sürgü: viewport sabit, track yatay kayar. cards-per-view 1/2/3. */
.work-carousel { position: relative; }
.work-carousel__viewport { overflow: hidden; padding-block: 2px; }
.work-grid {
  --g: clamp(1rem, 2vw, 1.5rem);
  display: flex;
  flex-wrap: nowrap;
  gap: var(--g);
  transition: transform 500ms var(--ease-soft);
}
.work-card { flex: 0 0 100%; }
@media (min-width: 640px)  { .work-card { flex-basis: calc((100% - var(--g)) / 2); } }
@media (min-width: 1024px) { .work-card { flex-basis: calc((100% - var(--g) * 2) / 3); } }

/* Ok düğmeleri - mevcut monokrom UI'a uygun */
.work-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-2);
  color: var(--text);
  box-shadow: var(--sh-md);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), opacity var(--t-fast);
}
.work-carousel__nav:hover { background: var(--surface-3); }
.work-carousel__nav:active { transform: translateY(-50%) scale(0.95); }
.work-carousel__nav svg { width: 20px; height: 20px; }
.work-carousel__nav--prev { left: -1.4rem; }
.work-carousel__nav--next { right: -1.4rem; }
@media (max-width: 1023px) {
  .work-carousel__nav { width: 42px; height: 42px; }
  .work-carousel__nav--prev { left: 0.4rem; }
  .work-carousel__nav--next { right: 0.4rem; }
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  cursor: pointer;
  transition: border-color var(--t-base), transform var(--t-base);
}
.work-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.work-card:focus-visible { outline-offset: 4px; }

.work-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-3);
}
.work-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow), opacity var(--t-base);
}
.work-card:hover .work-card__img { transform: scale(1.04); }
.work-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,12,11,0.85) 0%, transparent 45%);
}

.work-card__status {
  position: absolute;
  top: var(--s-4); left: var(--s-4);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(11,12,11,0.82);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
}
.work-card__status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.work-card__status--completed .work-card__status-dot { background: var(--status-done); }
.work-card__status--active .work-card__status-dot {
  background: var(--status-active);
  box-shadow: 0 0 0 0 rgba(140,149,168,0.6);
  animation: pulse-dot 2.4s var(--ease-soft) infinite;
}
.work-card__status--planned .work-card__status-dot { background: var(--status-planned); }

.work-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.work-card__cat {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--text-3);
}
.work-card__title {
  font-size: var(--fs-h3);
  font-weight: var(--w-semibold);
  line-height: var(--lh-snug);
}
.work-card__studio { color: var(--text-2); font-size: var(--fs-sm); }
.work-card__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--s-1); }
.work-card__tag {
  padding: 0.25rem 0.6rem;
  font-size: var(--fs-xs);
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.work-card__cta {
  margin-top: auto;
  padding-top: var(--s-2);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--w-medium);
  color: var(--text);
}
.work-card__cta svg { width: 1em; height: 1em; transition: transform var(--t-base); }
.work-card:hover .work-card__cta svg { transform: translateX(4px); }

/* ============================================================
   09 · PROJE DETAY
   ============================================================ */
.project-detail { padding-top: calc(var(--nav-h) + var(--s-7)); }
.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--s-7);
  padding: 0.55rem 1rem 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: var(--fs-sm);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.pd-back:hover { color: var(--text); border-color: var(--line-2); background: var(--surface); }
.pd-back svg { width: 1.1em; height: 1.1em; }

.pd-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 900px) { .pd-hero { grid-template-columns: 1.1fr 1fr; } }
.pd-cover {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  background: var(--bg-3);
}
.pd-cover__img { width: 100%; height: 100%; object-fit: cover; }

.pd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: var(--s-4); }
.pd-meta__badge {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--text-2);
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.pd-meta__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.pd-meta__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.pd-meta__status--completed .pd-meta__dot { background: var(--status-done); }
.pd-meta__status--active .pd-meta__dot { background: var(--status-active); }
.pd-meta__status--planned .pd-meta__dot { background: var(--status-planned); }

.pd-title { font-size: var(--fs-display); letter-spacing: var(--track-display); }
.pd-summary {
  margin-top: var(--s-5);
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  max-width: 52ch;
}
.pd-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--s-5); }
.pd-tags__item {
  padding: 0.3rem 0.7rem;
  font-size: var(--fs-xs);
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.pd-buttons { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

.pd-body {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  max-width: 72ch;
}
.pd-body__heading {
  font-size: var(--fs-h3);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.pd-body__text {
  color: var(--text-2);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  white-space: pre-line;
}

.pd-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin-top: var(--s-7);
}
@media (min-width: 640px) { .pd-details { grid-template-columns: repeat(2, 1fr); } }
.pd-detail-card {
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.pd-detail-card__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--text-3);
}
.pd-detail-card__value { margin-top: var(--s-2); font-size: var(--fs-h3); font-weight: var(--w-medium); }

.pd-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-7);
}
.pd-gallery__item { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.pd-gallery__img { width: 100%; height: 100%; object-fit: cover; }

/* Proje fragmanı (YouTube) */
.pd-trailer { margin-top: clamp(2.5rem, 6vw, 4rem); }
.pd-trailer__heading {
  font-size: var(--fs-h3);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.pd-trailer__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-3);
}
.pd-trailer__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pd-trailer__note {
  margin-top: var(--s-4);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}
.pd-trailer__note svg { width: 18px; height: 18px; flex: none; color: var(--text-2); }

/* Portfolyo bilgilendirmesi - detayın en üstünde, site tonunda sade kutu */
.pd-disclaimer {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.1rem, 2.5vw, 1.6rem) clamp(1.2rem, 3vw, 1.9rem);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.pd-disclaimer__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--fs-overline);
  letter-spacing: var(--track-overline);
  text-transform: uppercase;
  color: var(--text-2);
}
.pd-disclaimer__head svg { width: 16px; height: 16px; flex: none; }
.pd-disclaimer__text {
  margin-top: var(--s-3);
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}
.pd-disclaimer__text + .pd-disclaimer__text { margin-top: var(--s-2); }

/* ============================================================
   10 · EKİP
   ============================================================ */
/* Flex + ortalama: son satırda tek kalan üye ortalanır. */
.team-grid {
  --g: clamp(0.75rem, 2vw, 1.5rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--g);
}
.member { flex: 0 1 calc(50% - var(--g) / 2); }
@media (min-width: 640px) { .member { flex-basis: calc(33.333% - var(--g) * 2 / 3); } }
@media (min-width: 1024px) { .member { flex-basis: calc(25% - var(--g) * 3 / 4); } }

.member { position: relative; }
.member__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-3);
}
.member__img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transition: filter var(--t-slow), transform var(--t-slow);
}
.member:hover .member__img { filter: grayscale(0); transform: scale(1.03); }
.member__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,12,11,0.55), transparent 50%);
  pointer-events: none;
}
.member__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: var(--w-semibold);
  color: var(--text-3);
  background: var(--bg-3);
}
.member__socials {
  position: absolute;
  right: var(--s-3); bottom: var(--s-3);
  z-index: 2;
  display: flex;
  gap: 0.4rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.member:hover .member__socials, .member:focus-within .member__socials { opacity: 1; transform: none; }
.member__social {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: rgba(11,12,11,0.85);
  border: 1px solid var(--line-2);
  color: var(--text);
  transition: background var(--t-fast), color var(--t-fast);
}
.member__social:hover { background: var(--accent); color: var(--text-inverse); }
.member__social svg { width: 16px; height: 16px; }
.member__name { margin-top: var(--s-4); font-size: 1.02rem; font-weight: var(--w-semibold); }
.member__roles { margin-top: var(--s-2); display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; }
.member__role {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--text-3);
}
.member__role:not(:last-child)::after { content: "·"; margin-left: 0.5rem; color: var(--line-2); }

/* Ekip ızgarası kapanışı: "ve daha nicesi" */
.team-more {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1em;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: var(--w-medium);
  letter-spacing: var(--track-tight);
  color: var(--text-3);
}
.team-more__dots {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  margin-left: 0.5em;
}
.team-more__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  opacity: 0.3;
}
@media (prefers-reduced-motion: no-preference) {
  .team-more__dot { animation: dot-wave 1.5s var(--ease-soft) infinite; }
  .team-more__dot:nth-child(2) { animation-delay: 0.18s; }
  .team-more__dot:nth-child(3) { animation-delay: 0.36s; }
}

/* ============================================================
   11 · KATIL (CTA)
   ============================================================ */
.join__card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-1);
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}
.join__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 120% at 50% -10%, rgba(255,255,255,0.07), transparent 60%);
  pointer-events: none;
}
.join__inner { position: relative; max-width: 56ch; margin-inline: auto; }
.join__title {
  font-size: var(--fs-display);
  letter-spacing: var(--track-display);
}
.join__desc {
  margin-top: var(--s-5);
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
}
.join__actions { margin-top: var(--s-7); display: flex; justify-content: center; }
.join__contact { margin-top: var(--s-5); font-size: var(--fs-sm); color: var(--text-3); }
.join__contact a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; transition: color var(--t-fast); }
.join__contact a:hover { color: var(--accent); }

/* ============================================================
   SSS - akordeon (native <details>)
   ============================================================ */
.faq { max-width: 820px; }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: clamp(1.1rem, 2.5vw, 1.6rem) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: var(--w-medium);
  color: var(--text-2);
  transition: color var(--t-fast);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::marker { content: ""; }
.faq__item:hover .faq__q,
.faq__item[open] .faq__q { color: var(--text); }
.faq__marker { position: relative; flex: none; width: 18px; height: 18px; }
.faq__marker::before, .faq__marker::after {
  content: "";
  position: absolute;
  background: var(--text-2);
  transition: transform var(--t-base);
}
.faq__marker::before { top: 50%; left: 0; width: 100%; height: 1.5px; transform: translateY(-50%); }
.faq__marker::after  { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
.faq__item[open] .faq__marker::after { transform: translateX(-50%) scaleY(0); }
.faq__a {
  padding-bottom: clamp(1.1rem, 2.5vw, 1.6rem);
  max-width: 68ch;
  color: var(--text-2);
  line-height: var(--lh-relaxed);
}
.faq__a p + p { margin-top: var(--s-4); }
.faq__a a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.faq__a a:hover { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .faq__item[open] .faq__a { animation: faq-in 0.4s var(--ease) both; }
}

/* ============================================================
   12 · FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); background: var(--bg-1); }
.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding-block: clamp(3rem, 6vw, 5rem);
}
@media (min-width: 768px) { .footer__inner { grid-template-columns: 1.5fr 1fr 1fr; } }

.footer__logo { display: inline-flex; }
.footer__logo-img { width: 38px; height: 38px; }
.footer__brand-desc { margin-top: var(--s-4); color: var(--text-2); font-size: var(--fs-sm); max-width: 34ch; line-height: var(--lh-relaxed); }

.footer__column-title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--text-3);
  margin-bottom: var(--s-4);
}
.footer__links { display: flex; flex-direction: column; gap: var(--s-3); }
.footer__link { color: var(--text-2); font-size: var(--fs-sm); transition: color var(--t-fast); }
.footer__link:hover { color: var(--text); }

.footer__socials { display: flex; flex-direction: column; gap: var(--s-3); }
.footer__social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-2);
  font-size: var(--fs-sm);
  transition: color var(--t-fast);
}
.footer__social-link svg { width: 18px; height: 18px; }
.footer__social-link:hover { color: var(--text); }

.footer__bottom { border-top: 1px solid var(--line); }
.footer__bottom-inner {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding-block: var(--s-5);
  font-size: var(--fs-xs);
  color: var(--text-3);
}
@media (min-width: 640px) { .footer__bottom-inner { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer__note { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* ============================================================
   GİZLİ SATRANÇ MENÜSÜ
   Navbar piyon butonu sadece sayfa en üstteyken görünür.
   ============================================================ */
.navbar__chess {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base),
              background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.navbar__chess:hover { color: var(--accent); background: var(--surface-2); border-color: var(--line-2); transform: translateY(-1px); }
.navbar__chess svg { width: 1.25rem; height: 1.25rem; }
/* Kaydırınca (en üstte değilken) piyonu gizle */
.navbar--scrolled .navbar__chess {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.85);
  pointer-events: none;
}

/* ---- Tam ekran satranç görünümü ---- */
.chess-view {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-1) 52%, var(--bg));
  opacity: 0;
  visibility: hidden;
  transform: scale(0.99);
  transition: opacity 0.32s var(--ease-soft), visibility 0.32s var(--ease-soft), transform 0.32s var(--ease);
  overflow-y: auto;
}
.chess-view::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.74), transparent 78%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.74), transparent 78%);
}
.chess-view.is-open { opacity: 1; visibility: visible; transform: none; }

.chess-view__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--pad);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(11, 12, 11, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2;
}
.chess-view__back {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: none;
  border: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: color var(--t-base);
}
.chess-view__back:hover { color: var(--accent); }
.chess-view__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  letter-spacing: var(--track-tight);
  text-align: center;
}
.chess-view__bar-end { width: 7.5rem; }

.chess-view__body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-content: start;
  justify-items: center;
  padding: clamp(1.5rem, 4vw, 3rem) var(--pad) var(--s-8);
  max-width: var(--container-wide);
  margin-inline: auto;
  width: 100%;
}
@media (min-width: 1024px) {
  .chess-view__body {
    grid-template-columns: minmax(15.5rem, 17rem) minmax(0, 1fr) minmax(15.5rem, 17rem);
    align-items: start;
    justify-items: stretch;
  }
}

.chess-stage { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; justify-self: center; gap: var(--s-4); }

.chess-board {
  position: relative;
  width: min(92vw, 68vh, 560px);
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow:
    0 36px 80px -34px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateZ(0);
  transition: transform var(--t-base), box-shadow var(--t-base);
  user-select: none;
}
.chess-board:hover {
  transform: translateY(-2px) translateZ(0);
  box-shadow:
    0 42px 90px -34px rgba(0, 0, 0, 1),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.chess-board.is-locked { cursor: default; }

.chess-sq {
  position: relative;
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: clamp(1.6rem, 6.2vw, 2.7rem);
  line-height: 1;
  transition: background var(--t-fast), filter var(--t-fast), transform var(--t-fast);
}
.chess-sq::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 52%);
  transition: opacity var(--t-fast);
}
.chess-sq:hover::after,
.chess-sq:focus-visible::after { opacity: 1; }
.chess-sq:active { transform: scale(0.985); }
/* Klasik yeşil/beyaz tahta */
.chess-sq--light { background: #E7E5C5; }
.chess-sq--dark  { background: #687B50; }
.chess-board.is-locked .chess-sq { cursor: default; }
/* Sarı vurgu (seçim + son hamle) - yeşil/beyaz üstünde okunur */
.chess-sq--light.is-last, .chess-sq--light.is-selected { background: #F6F669; }
.chess-sq--dark.is-last,  .chess-sq--dark.is-selected  { background: #BACA2B; }
/* Şah - kareyi kırmızı parıltıyla işaretle (taban rengi korunur) */
.chess-sq.is-check { background-image: radial-gradient(circle at center, rgba(220, 40, 40, 0.95), rgba(220, 40, 40, 0.4) 55%, transparent 72%); }

.chess-pc { position: relative; z-index: 1; pointer-events: none; transition: transform var(--t-fast), filter var(--t-fast); }
/* Taş görselleri */
img.chess-pc { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.38)); }
.chess-sq.is-selected .chess-pc,
.chess-sq.is-last .chess-pc { transform: translateY(-3px) scale(1.04); }
.chess-pc.is-motion-hidden { opacity: 0; }
.chess-pc-flyer {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  pointer-events: none;
  object-fit: contain;
  transform-origin: 50% 50%;
  will-change: transform, filter;
  filter: drop-shadow(0 13px 11px rgba(0, 0, 0, 0.42));
}
.chess-pc-flyer.is-flying {
  transition:
    transform 0.38s cubic-bezier(0.22, 0.84, 0.18, 1),
    filter 0.38s cubic-bezier(0.22, 0.84, 0.18, 1);
  filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.38));
}
/* Görsel yoksa Unicode yedeği */
.chess-pc--glyph.is-white { color: #FFFFFF; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55); }
.chess-pc--glyph.is-black { color: #181A18; text-shadow: 0 0 1px rgba(255, 255, 255, 0.45); }

.chess-sq__dot {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}
.chess-sq__dot--move { width: 28%; height: 28%; background: rgba(0, 0, 0, 0.16); }
.chess-sq__dot--capture { inset: 7%; width: auto; height: auto; border: 4px solid rgba(0, 0, 0, 0.16); background: none; }

.chess-sq__rank, .chess-sq__file {
  position: absolute;
  font-size: 0.6rem;
  font-weight: var(--w-semibold);
  font-family: var(--font-mono);
  pointer-events: none;
  z-index: 1;
}
.chess-sq--light .chess-sq__rank, .chess-sq--light .chess-sq__file { color: #769656; }
.chess-sq--dark .chess-sq__rank, .chess-sq--dark .chess-sq__file { color: #EEEED2; }
.chess-sq__rank { top: 2px; left: 3px; }
.chess-sq__file { bottom: 1px; right: 3px; }

.chess-status {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  color: var(--text-2);
  text-align: center;
  min-height: 1.4em;
}
.chess-status.is-result { color: var(--accent); font-size: var(--fs-body); }
.chess-status.is-error { color: var(--status-planned); }

.chess-rail,
.chess-side { width: 100%; max-width: 24rem; display: flex; flex-direction: column; gap: var(--s-5); }
@media (min-width: 1024px) {
  .chess-rail,
  .chess-side {
    max-width: none;
    position: sticky;
    top: calc(var(--nav-h) + 1rem);
  }
}
.chess-control { display: flex; flex-direction: column; gap: var(--s-3); }
.chess-control--leaderboard { gap: var(--s-3); }
.chess-control__label {
  font-size: var(--fs-overline);
  letter-spacing: var(--track-overline);
  text-transform: uppercase;
  color: var(--text-3);
}
.chess-levels { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); }
.chess-level {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base), transform var(--t-fast);
}
.chess-level:hover { border-color: var(--line-2); color: var(--text); }
.chess-level:active { transform: translateY(1px); }
.chess-level.is-active { background: var(--accent); border-color: var(--accent); color: var(--text-inverse); }
.chess-level__name { font-size: var(--fs-sm); font-weight: var(--w-medium); }
.chess-level__elo { font-family: var(--font-mono); font-size: var(--fs-xs); opacity: 0.7; }

.chess-sides { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.chess-sidebtn {
  padding: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base), transform var(--t-fast);
}
.chess-sidebtn:hover { border-color: var(--line-2); color: var(--text); }
.chess-sidebtn:active { transform: translateY(1px); }
.chess-sidebtn.is-active { background: var(--accent); border-color: var(--accent); color: var(--text-inverse); }

.chess-actions { display: flex; flex-direction: column; gap: var(--s-2); }
.chess-actions__btn { width: 100%; justify-content: center; }

/* ---- Oyuncu başlığı ---- */
.chess-player {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.095), transparent 58%),
    var(--surface-2);
}
.chess-player::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.chess-player__id { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.chess-player__name {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  letter-spacing: var(--track-tight);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chess-player__edit {
  flex: none;
  background: none;
  border: 0;
  color: var(--text-3);
  font-size: var(--fs-xs);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color var(--t-base);
}
.chess-player__edit:hover { color: var(--accent); }
.chess-player__elo { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-2); letter-spacing: 0.04em; }
.chess-player__elo strong { color: var(--accent); font-weight: var(--w-semibold); }

/* ---- Liderlik tablosu ---- */
.chess-lb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.chess-lb__row {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  align-items: center;
  gap: var(--s-2);
  padding: 0.5rem 0.65rem;
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-sm);
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.chess-lb__row:hover { background: var(--surface-2); transform: translateX(2px); }
.chess-lb__row.is-me { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.chess-lb__rank { font-family: var(--font-mono); color: var(--text-3); font-size: var(--fs-xs); }
.chess-lb__name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chess-lb__name em { color: var(--text-3); font-style: normal; font-size: var(--fs-xs); }
.chess-lb__elo { font-family: var(--font-mono); color: var(--accent); font-weight: var(--w-semibold); }
.chess-lb__empty { padding: 0.65rem; font-size: var(--fs-xs); color: var(--text-3); }

/* ---- Ad girme penceresi (görünüm içinde) ---- */
.chess-namegate {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: var(--pad);
  background: rgba(8, 9, 8, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.chess-namegate[hidden] { display: none; }
.chess-namegate__card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--sh-lg);
  text-align: center;
}
.chess-namegate__title { font-family: var(--font-display); font-size: var(--fs-h3); letter-spacing: var(--track-tight); }
.chess-namegate__desc { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--text-2); line-height: var(--lh-normal); }
.chess-namegate__input {
  width: 100%;
  margin-top: var(--s-4);
  padding: 0.8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  text-align: center;
}
.chess-namegate__input:focus { outline: none; border-color: var(--accent); }
.chess-namegate__err { margin-top: var(--s-2); font-size: var(--fs-sm); color: #E48A8A; }
.chess-namegate__err[hidden] { display: none; }
.chess-namegate__actions { margin-top: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.chess-namegate__actions .btn { width: 100%; justify-content: center; }

@keyframes chess-panel-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes chess-piece-pop {
  0% { transform: translateY(7px) scale(0.92); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2)); }
  70% { transform: translateY(-4px) scale(1.06); }
  100% { transform: translateY(-3px) scale(1.04); }
}

@keyframes chess-dot-pulse {
  0%, 100% { transform: scale(0.82); opacity: 0.5; }
  50% { transform: scale(1); opacity: 0.95; }
}

@media (prefers-reduced-motion: no-preference) {
  .chess-view.is-open .chess-stage,
  .chess-view.is-open .chess-rail > *,
  .chess-view.is-open .chess-side > * {
    animation: chess-panel-rise 0.56s var(--ease) both;
  }
  .chess-view.is-open .chess-rail > *:nth-child(2) { animation-delay: 0.06s; }
  .chess-view.is-open .chess-side > *:nth-child(2) { animation-delay: 0.05s; }
  .chess-view.is-open .chess-side > *:nth-child(3) { animation-delay: 0.1s; }
  .chess-sq.is-last .chess-pc { animation: chess-piece-pop 0.28s var(--ease) both; }
  .chess-sq__dot--move { animation: chess-dot-pulse 1.25s var(--ease-soft) infinite; }
  .chess-status.is-result { animation: chess-panel-rise 0.38s var(--ease) both; }
  .chess-namegate__card { animation: chess-panel-rise 0.42s var(--ease) both; }
}

@media (prefers-reduced-motion: reduce) {
  .chess-view, .navbar__chess, .chess-board, .chess-sq, .chess-pc, .chess-pc-flyer, .chess-level, .chess-sidebtn, .chess-lb__row { transition: none; }
  .chess-board:hover, .chess-lb__row:hover, .chess-sq:active, .chess-level:active, .chess-sidebtn:active { transform: none; }
  .chess-sq__dot--move { animation: none; }
}
