/* WOD Türkiye — legal document pages.
   Standalone stylesheet: these pages are long-form prose, so they use semantic
   elements with a scoped stylesheet rather than utility classes on every node.
   Design tokens are copied from tailwind.config.js so the pages match the site. */

:root {
  --background: #0d0d0d;
  --surface: #131313;
  --surface-container: #1a1a1a;
  --on-surface: #e8e6e5;
  --on-surface-variant: #9b9b9b;
  --primary: #ffffff;
  --outline: #3a3a3a;
  --content-width: 1200px;
  --prose-width: 74ch;
}

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

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

body {
  margin: 0;
  background-color: var(--background);
  color: var(--on-surface);
  font-family: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

.font-display { font-family: "Anton", Impact, sans-serif; }

a { color: inherit; }

/* ── Site header ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--outline);
  background-color: var(--background);
}

.site-header__inner {
  margin: 0 auto;
  display: flex;
  max-width: var(--content-width);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--primary); }
.brand img { height: 36px; width: auto; }
.brand span { font-size: 22px; text-transform: uppercase; letter-spacing: 0.02em; }

.header-nav { display: flex; align-items: center; gap: 20px; }

.header-nav a,
.header-nav span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color 0.15s;
}
.header-nav a:hover { color: var(--primary); }
.header-nav a[aria-current="page"],
.header-nav span[aria-current="page"] { color: var(--primary); }
.lang-sep { color: rgba(255,255,255,0.25); }

/* ── Document ────────────────────────────────────────────── */

.doc {
  margin: 0 auto;
  max-width: var(--content-width);
  padding: 48px 24px 96px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 1024px) {
  .doc { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
}

/* Table of contents */

.toc {
  border: 1px solid var(--outline);
  border-radius: 12px;
  background-color: var(--surface);
  padding: 20px;
}

@media (min-width: 1024px) {
  .toc { position: sticky; top: 88px; max-height: calc(100vh - 120px); overflow-y: auto; }
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--on-surface-variant);
}

.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.toc li { margin: 0 0 4px; }

.toc a {
  display: block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.toc a:hover { background-color: var(--surface-container); color: var(--primary); }

/* Prose */

.prose { min-width: 0; max-width: var(--prose-width); }

.doc-title { margin: 0 0 8px; font-size: clamp(32px, 6vw, 52px); line-height: 1.05; text-transform: uppercase; color: var(--primary); }
.doc-subtitle { margin: 0 0 24px; font-size: 16px; color: var(--on-surface-variant); }

.doc-meta {
  margin: 0 0 40px;
  border: 1px solid var(--outline);
  border-radius: 12px;
  background-color: var(--surface);
  padding: 16px 20px;
  font-size: 14px;
}
.doc-meta dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 0; }
.doc-meta dt { color: var(--on-surface-variant); }
.doc-meta dd { margin: 0; }

.prose h2 {
  margin: 56px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--outline);
  font-family: "Anton", Impact, sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--primary);
  scroll-margin-top: 88px;
}

.prose h3 {
  margin: 36px 0 12px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary);
  scroll-margin-top: 88px;
}

.prose h4 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  scroll-margin-top: 88px;
}

.prose p { margin: 0 0 18px; }
.prose strong { color: var(--primary); font-weight: 700; }

.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.prose li::marker { color: var(--on-surface-variant); }

.prose hr { display: none; }

/* Tables — wrapped in .table-wrap so they can scroll on narrow screens */

.table-wrap {
  margin: 0 0 24px;
  overflow-x: auto;
  border: 1px solid var(--outline);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }

.prose thead th {
  background-color: var(--surface-container);
  text-align: left;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.prose th, .prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--outline);
  vertical-align: top;
  line-height: 1.55;
}

.prose tbody tr:last-child th,
.prose tbody tr:last-child td { border-bottom: 0; }

.prose td[align="center"], .prose th[align="center"] { text-align: center; }

/* First column of a two-column definition table reads as a label */
.prose tbody th { color: var(--primary); font-weight: 700; text-align: left; }

/* ── Footer ──────────────────────────────────────────────── */

.site-footer { width: 100%; border-top: 2px solid var(--primary); background-color: var(--background); }

.site-footer__inner {
  margin: 0 auto;
  display: flex;
  max-width: var(--content-width);
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 48px 24px;
}

@media (min-width: 768px) {
  .site-footer__inner { flex-direction: row; align-items: flex-start; }
}

.site-footer__brand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
@media (min-width: 768px) { .site-footer__brand { align-items: flex-start; } }
.site-footer__copy { margin: 0; font-size: 13px; color: var(--on-surface-variant); }

.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.site-footer nav a {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer nav a:hover { color: var(--primary); }

/* ── Print ───────────────────────────────────────────────── */

@media print {
  .site-header, .toc, .site-footer { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .doc { display: block; padding: 0; max-width: none; }
  .prose { max-width: none; }
  .doc-title, .prose h2, .prose h3, .prose h4, .prose strong, .prose tbody th { color: #000; }
  .prose h2 { border-top-color: #999; page-break-after: avoid; }
  .prose h3, .prose h4 { page-break-after: avoid; }
  .table-wrap { border-color: #999; overflow: visible; }
  .prose th, .prose td { border-bottom-color: #ccc; }
  .prose thead th { background: #eee; }
  .doc-meta { border-color: #999; background: none; }
  tr, table { page-break-inside: avoid; }
}
