:root {
  color-scheme: dark;
  /* Official brand mark colors (docs/10-marka-ve-store.md §7.4): turuncu #E8590C,
     lacivert #0F172A, krem #FFF6E7. Accent is boosted to the documented dark-theme
     value (docs/09-tasarim.md §2) since this page is dark-only. */
  --bg: #0f172a;
  --bg-deep: #0a1120;
  --surface: #16223a;
  --surface-strong: #1c2b46;
  --text: #fff6e7;
  --muted: #adb8cc;
  --muted-2: #7f8ba3;
  --accent: #ff7a2f;
  --accent-hover: #ff9152;
  --accent-soft: rgba(255, 122, 47, .14);
  --on-accent: #1a0e02;
  --positive: #58c47c;
  --link: #ffa06a;
  --link-hover: #ffc9a0;
  --border: rgba(255, 255, 255, .10);
  --border-strong: rgba(255, 255, 255, .17);
  --content-wide: 1120px;
  --content-reading: 920px;

  /* Participant color identity (docs/09-tasarim.md §2 · §4) — used to echo each
     mode's real in-app accent (Skor Tut turuncu, Kura Çek mor, Turnuva mavi). */
  --mode-purple: #9b7bff;
  --mode-purple-soft: rgba(155, 123, 255, .16);
  --mode-blue: #4fa3ff;
  --mode-blue-soft: rgba(79, 163, 255, .16);

  --radius-sm: 12px;
  --radius-button: 14px;
  --radius-card: 16px;
  --radius-sheet: 24px;

  --font-display: 'Sora', Inter, ui-sans-serif, system-ui, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% -8%, rgba(255,122,47,.16), transparent 31%),
    radial-gradient(circle at 91% 3%, rgba(79,163,255,.10), transparent 27%),
    linear-gradient(180deg, var(--bg), var(--bg-deep) 78%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
}

a { color: inherit; }
button { font: inherit; }
img { max-width: 100%; }
.shell { width: min(calc(100% - 32px), var(--content-wide)); margin: 0 auto; }
.legal-page .shell { width: min(calc(100% - 32px), var(--content-reading)); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(9,17,31,.86);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -.03em;
}
.brand img,
.brand-mark {
  width: 39px;
  height: 39px;
  object-fit: cover;
  border-radius: 11px;
}
.center-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius: 999px;
}
.center-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}
.center-nav a:hover,
.center-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-soft);
}
.lang-switch {
  justify-self: end;
  display: inline-flex;
  gap: 6px;
}
.lang-switch button {
  min-width: 44px;
  min-height: 44px;
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.lang-switch button:hover { border-color: var(--border-strong); color: var(--text); }
.lang-switch button.active {
  color: var(--on-accent);
  border-color: var(--accent);
  background: var(--accent);
}

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
:where(a, button)[aria-disabled="true"] { cursor: default; }
.lang-panel[hidden] { display: none !important; }

/* Entrance reveal: gated behind an html class the boot script adds, so content
   stays fully visible by default (no-JS, JS-disabled, or headless renders never
   ship blank sections — see reference/hooks.md reveal-visibility rule). */
html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
html.js-reveal [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(88,196,124,.45); }
  50% { box-shadow: 0 0 0 5px rgba(88,196,124,0); }
}
.pulse { animation: pulseDot 1.8s ease-out infinite; }

@keyframes confettiBurst {
  0% { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.4); opacity: 0; }
}
.confetti-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  top: 50%;
  left: 50%;
  opacity: 0;
  pointer-events: none;
}
.confetti-dot.is-bursting { animation: confettiBurst .9s cubic-bezier(.2,.7,.3,1) forwards; }
.confetti-dot:nth-of-type(5n+1) { background: var(--accent); }
.confetti-dot:nth-of-type(5n+2) { background: var(--mode-blue); }
.confetti-dot:nth-of-type(5n+3) { background: var(--mode-purple); }
.confetti-dot:nth-of-type(5n+4) { background: var(--positive); }
.confetti-dot:nth-of-type(5n+5) { background: var(--link-hover); }

@media (max-width: 760px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: auto;
    padding: 12px 0;
  }
  .center-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .center-nav a { flex: 1 0 auto; }
  .lang-switch { grid-column: 2; grid-row: 1; }
}

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