/* =========================================================================
   BoxGames Online: temel stiller
   Sıcak kâğıt zemin, mürekkep siyahı yazı, tek vurgu rengi (domates kırmızısı).
   Süs yerine içerik: sade başlıklar, net çizgiler, az ama yerinde hareket.
   ========================================================================= */
:root {
  --paper: #f5eee0;
  --paper-2: #ede3cf;
  --paper-3: #dccdb0;
  --card: #fffaf1;
  --line: #d9cbb0;
  --ink: #1b1712;
  --ink-2: #3d352c;
  --ink-3: #6b5f50;
  --accent: #d9442b;
  --accent-2: #b8371f;
  --accent-ink: #fff8ef;
  --mustard: #f2b134;
  --pine: #1f5c4a;
  --ok: #1f7a4d;
  --err: #b3261e;

  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-text: 'Archivo', 'Segoe UI', system-ui, sans-serif;

  --t-xs: .78rem; --t-sm: .9rem; --t-md: 1rem; --t-lg: 1.15rem; --t-xl: 1.35rem;
  --t-2xl: clamp(1.6rem, 2.6vw, 2rem);
  --t-3xl: clamp(1.8rem, 3.2vw, 2.4rem);
  --t-hero: clamp(2.1rem, 4.4vw, 3.4rem);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 88px; --s-10: 112px;
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-pill: 999px;
  --bw: 1.5px;
  --border: var(--bw) solid var(--ink);
  --border-soft: 1px solid var(--line);
  --shadow-sm: 2px 2px 0 var(--ink);
  --shadow-md: 3px 3px 0 var(--ink);
  --shadow-lg: 5px 5px 0 var(--ink);
  --wrap: 1180px;
  --nav-h: 66px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --halftone: radial-gradient(var(--ink) 1px, transparent 1.3px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-text); font-size: var(--t-md); line-height: 1.6; font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--mustard); color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--f-text); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 0; font-variation-settings: 'wdth' 94; }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--s-4)); margin-inline: auto; }
.wrap.narrow { --wrap: 860px; }
@media (min-width: 768px) { .wrap { width: min(var(--wrap), 100% - 2 * var(--s-6)); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s-4); top: -60px; z-index: 200; padding: var(--s-2) var(--s-4); background: var(--ink); color: var(--paper); border-radius: var(--r-sm); }
.skip:focus { top: var(--s-2); }
.muted { color: var(--ink-3); }
.small { font-size: var(--t-sm); }

.label { font-family: var(--f-text); font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow { display: inline-block; color: var(--accent); }
.em { color: var(--accent); }
.lead { font-size: var(--t-lg); color: var(--ink-2); line-height: 1.6; }

/* ---------- Butonlar ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5); border: var(--border); border-radius: var(--r-md);
  background: var(--card); color: var(--ink); text-decoration: none; white-space: nowrap;
  font-weight: 700; font-size: .95rem; box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-lg { min-height: 52px; padding: 0 var(--s-6); font-size: 1.02rem; }
.btn-sm { min-height: 36px; padding: 0 var(--s-4); font-size: var(--t-sm); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.link:hover { color: var(--accent); }
.link svg { width: 16px; height: 16px; }

/* ---------- Üye simgesi ---------- */
.avatar { --sz: 36px; flex: none; width: var(--sz); height: var(--sz); border-radius: 50%; background: var(--av, var(--ink)); color: #fff; display: inline-grid; place-items: center; font-weight: 800; font-size: calc(var(--sz) * .44); line-height: 1; border: 1.5px solid var(--ink); }

/* ---------- Üst menü ---------- */
.nav { position: sticky; top: 0; z-index: 60; background: rgba(245, 238, 224, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.is-scrolled { border-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: var(--s-5); height: var(--nav-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo-mark { width: 34px; height: 34px; }
.logo-word { display: flex; flex-direction: column; line-height: 1; }
.logo-word b { font-family: var(--f-display); font-weight: 800; font-size: 1.22rem; letter-spacing: -.01em; }
.logo-word span { font-size: .6rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); margin-top: 3px; }
.nav-links { display: flex; gap: 2px; margin: 0 0 0 var(--s-5); list-style: none; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; font-weight: 600; font-size: .95rem; text-decoration: none; border-radius: var(--r-sm); color: var(--ink-2); transition: background .15s, color .15s; }
.nav-links a:hover { background: var(--paper-2); color: var(--ink); }
.nav-links a[aria-current='page'] { color: var(--ink); background: var(--paper-2); }
.nav-auth { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); }
.nav-login { font-weight: 600; font-size: .95rem; text-decoration: none; padding: 8px 10px; border-radius: var(--r-sm); }
.nav-login:hover { background: var(--paper-2); }
.umenu { position: relative; }
.umenu-btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); font-weight: 700; font-size: .92rem; }
.umenu-btn:hover { border-color: var(--ink-3); }
.umenu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 6px; background: var(--card); border: var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-md); display: none; z-index: 70; }
.umenu.is-open .umenu-list { display: grid; }
.umenu-list a, .umenu-list button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: var(--r-sm); text-decoration: none; font-size: .95rem; }
.umenu-list a:hover, .umenu-list button:hover { background: var(--paper-2); }
.umenu-list button { border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); margin-top: 4px; color: var(--ink-3); }
.nav-toggle { display: none; width: 44px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); position: relative; flex: none; }
.nav-toggle i, .nav-toggle i::before, .nav-toggle i::after { position: absolute; left: 50%; width: 18px; height: 2px; margin-left: -9px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), background .2s; content: ''; }
.nav-toggle i { top: 50%; margin-top: -1px; }
.nav-toggle i::before { top: -6px; left: 0; margin: 0; } .nav-toggle i::after { top: 6px; left: 0; margin: 0; }
.nav.is-open .nav-toggle i { background: transparent; }
.nav.is-open .nav-toggle i::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav-toggle i::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 960px) {
  .nav-in { gap: var(--s-3); }
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: var(--s-2) var(--s-4) var(--s-4); background: var(--paper); border-bottom: var(--border-soft); box-shadow: 0 12px 24px rgba(27, 23, 18, .08); display: none; }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a { font-size: 1.1rem; padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links li:last-child a { border-bottom: 0; }
  .umenu-btn > span:not(.avatar) { display: none; }
  .umenu-btn svg { display: none; }
  .umenu-btn { padding: 3px; }
}
@media (max-width: 420px) { .nav-login { display: none; } .logo-word span { display: none; } }

/* ---------- Bölümler ---------- */
.section { padding: var(--s-9) 0; position: relative; }
.section-sm { padding: var(--s-7) 0 var(--s-8); }
.section-head { max-width: 640px; margin-bottom: var(--s-6); }
.section-head h2 { font-size: var(--t-3xl); margin-top: var(--s-2); }
.section-head p { margin-top: var(--s-3); }
.section-row { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; margin-bottom: var(--s-6); }
.section-row .section-head { margin-bottom: 0; }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink .lead, .band-ink p { color: #d9ccb4; }
.band-paper2 { background: var(--paper-2); border-block: var(--border-soft); }
.halftone { display: none; }
@media (max-width: 768px) { .section { padding: var(--s-8) 0; } .section-sm { padding: var(--s-6) 0 var(--s-7); } .section-head { margin-bottom: var(--s-5); } }

/* ---------- Alt bilgi ---------- */
.footer { background: var(--ink); color: #cfc2a9; padding: var(--s-8) 0 var(--s-5); }
.footer a { text-decoration: none; transition: color .15s; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s-6); }
.footer h4 { font-size: var(--t-sm); color: var(--paper); margin-bottom: var(--s-3); font-weight: 700; letter-spacing: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--t-sm); }
.footer .logo-word b { color: var(--paper); }
.footer-note { font-size: var(--t-sm); margin-top: var(--s-4); max-width: 38ch; line-height: 1.6; }
.footer-bot { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-7); padding-top: var(--s-4); border-top: 1px solid #3d352c; font-size: var(--t-xs); color: #a3967f; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Görünür olunca belirme (kısa ve sakin) ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .05s; } .reveal.d2 { transition-delay: .1s; } .reveal.d3 { transition-delay: .15s; }
.intro { animation: rise .5s var(--ease) both; }
.intro.d1 { animation-delay: .05s; } .intro.d2 { animation-delay: .1s; } .intro.d3 { animation-delay: .15s; } .intro.d4 { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Bildirim ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 150; padding: var(--s-3) var(--s-5); border-radius: var(--r-md); background: var(--ink); color: var(--paper); font-weight: 600; font-size: var(--t-sm); box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: toast 2.8s var(--ease) forwards; max-width: calc(100vw - 32px); text-align: center; transform: translateX(-50%); }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 12px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- iPhone bilgi çubuğu ---------- */
.ios-tip { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; padding: 0 var(--s-3) calc(var(--s-3) + env(safe-area-inset-bottom)); pointer-events: none; animation: rise .35s var(--ease) both; }
.ios-tip-in { pointer-events: auto; max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: 22px 1fr 32px; gap: var(--s-3); align-items: start; padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); border: var(--border); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-md); }
.ios-tip-in > svg { width: 22px; height: 22px; margin-top: 2px; }
.ios-tip p { font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2); }
.ios-tip p b { color: var(--ink); }
.ios-tip button { width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: none; display: grid; place-items: center; color: var(--ink-3); }
.ios-tip button:hover { background: var(--paper-2); color: var(--ink); }
.ios-tip button svg { width: 16px; height: 16px; }
