/* DUSKFEAST site: the stylesheet of the legal pages, the press kit and the 404 page (the home pages use the v2 build in
   assets/v2/). No build step, no external requests. */

/* Site v2: the legal, press and 404 pages keep this stylesheet and its class names (build_legal.py), restyled to the v2
   "Kara Demir" palette. Heading font: the Cinzel subset (OFL, assets/fonts/OFL.txt) that Web/tools/prep_media.sh copies. */
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0d0a09;
  --bg-2: #151110;
  --panel: #1f1916;
  --panel-2: #2a221e;
  --line: #3e3029;
  --text: #f2e8d6;
  --muted: #cfc1aa;
  --gold: #e3b56d;
  --gold-2: #ffd7a0;
  --ember: #ff8a3d;
  --ok: #9cc59a;
  --focus: #ffd98a;
  --radius: 10px;
  --wrap: 1120px;
  --serif: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --sans: "Gill Sans", "Segoe UI", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 96px; }
a { color: var(--gold-2); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; letter-spacing: .02em; margin: 0 0 .6em; }
/* Turkish pages: Cinzel's lowercase letters are small capitals whose i has no dot; set Cinzel text in capitals so the
   browser's Turkish casing gives İ ("GİZLİLİK", not "GızlılıK"). */
:lang(tr) h1, :lang(tr) h2, :lang(tr) h3, :lang(tr) .brand, :lang(tr) .tagline { text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); color: var(--gold-2); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: #1a1410; padding: 10px 14px; border-radius: 6px; font-weight: 700;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 16, 20, .92);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(6px)) {
  .site-header { background: rgba(18, 16, 20, .78); backdrop-filter: blur(8px); }
}
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-height: 58px; padding-top: 6px; padding-bottom: 6px; }
.brand { font-family: var(--serif); font-weight: 800; font-size: 1.15rem; letter-spacing: .14em; color: var(--text); text-decoration: none; }
.nav { flex: 1 1 auto; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: 6px 0; display: inline-block; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.lang {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  color: var(--text); text-decoration: none; font-size: .9rem;
}
.lang:hover { border-color: var(--gold); }
@media (max-width: 640px) {
  .nav { order: 3; flex-basis: 100%; }
  .nav ul { gap: 2px 14px; }
  .bar .lang { margin-left: auto; }
}

/* Language hint (shown by site.js only) */
.lang-hint { background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: .95rem; }
.lang-hint .wrap { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.lang-hint button { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 3px 10px; font: inherit; cursor: pointer; }

/* Hero */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: flex-end; isolation: isolate; background: radial-gradient(120% 90% at 70% 20%, #3a2a2a 0%, #1d1619 45%, var(--bg) 100%); }
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-art img { object-fit: cover; object-position: 50% 30%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18,16,20,.15) 0%, rgba(18,16,20,.35) 45%, rgba(18,16,20,.94) 88%, var(--bg) 100%); }
.hero-inner { padding-top: 120px; padding-bottom: 56px; }
.hero h1 { margin: 0 0 .4em; font-size: clamp(2.6rem, 1.6rem + 6vw, 5.4rem); letter-spacing: .1em; }
.hero h1 img { width: min(560px, 86vw); height: auto; }
.tagline { font-family: var(--serif); font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); color: var(--gold-2); margin-bottom: .5em; }
.lead { max-width: 640px; font-size: 1.08rem; color: var(--text); text-shadow: 0 1px 12px rgba(0,0,0,.6); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 10px 20px; border-radius: 8px; font-weight: 700; text-decoration: none;
  border: 1px solid var(--gold); background: var(--gold); color: #1a1410;
}
.btn:hover { background: var(--gold-2); color: #1a1410; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); color: #fff; }
.btn.is-disabled { background: var(--panel-2); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.badge {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px; padding: 2px 10px; border: 1px solid currentColor; color: var(--ember); white-space: nowrap;
}
.badge.ok { color: var(--ok); }
.badge.muted { color: var(--muted); }

/* Sections */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--bg-2); }
.section-intro { max-width: 720px; color: var(--muted); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { color: var(--text); }
.card p:last-child { margin-bottom: 0; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.ticks li { position: relative; padding: 12px 14px 12px 40px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.ticks li::before { content: ""; position: absolute; left: 15px; top: 19px; width: 12px; height: 12px; border: 2px solid var(--gold); border-radius: 2px; transform: rotate(45deg); }
.two { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .two { grid-template-columns: 1fr 1fr; } }
.levels { list-style: none; margin: 0; padding: 0; }
.levels li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.levels li span { color: var(--muted); }
.note { color: var(--muted); font-size: .95rem; }

/* Heroes */
.heroes { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.hero-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.hero-card .portrait { aspect-ratio: 2 / 3; background: radial-gradient(80% 60% at 50% 35%, #3a2f33 0%, var(--panel) 75%); display: flex; align-items: flex-end; justify-content: center; }
.hero-card .portrait img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.hero-card .portrait.empty::before { content: "?"; font-family: var(--serif); font-size: 5rem; color: var(--line); align-self: center; }
.hero-card .body { padding: 16px 18px 20px; }
.hero-card h3 { margin-bottom: .3em; }
.hero-card .badge { margin-bottom: 10px; }

/* Gallery */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.shot { margin: 0; aspect-ratio: 16 / 9; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; }

/* Missing image placeholder (site.js swaps a failed image for this box) */
.img-missing {
  width: 100%; height: 100%; min-height: 120px; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 12px; color: var(--muted); font-size: .85rem; border: 1px dashed var(--line); border-radius: 6px;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255,255,255,.02) 12px 24px);
}

/* Platforms */
.platforms { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); list-style: none; padding: 0; margin: 0; }
.platforms li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.platforms strong { font-size: 1.1rem; }
.platforms span.dev { color: var(--muted); font-size: .95rem; }

/* Contact / signup */
.cta { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* Tables and long text (press kit, legal) */
.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head p { color: var(--muted); max-width: 720px; }
.prose { max-width: 820px; padding-bottom: 72px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose code { font-size: .9em; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.prose blockquote { margin: 0 0 1.4em; padding: 12px 18px; background: var(--panel); border-left: 3px solid var(--line); border-radius: var(--radius); }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--panel-2); color: var(--gold-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.draft {
  border: 1px solid var(--ember); background: rgba(224, 135, 79, .08); color: var(--text);
  border-radius: var(--radius); padding: 14px 18px; margin: 0 0 24px; font-size: .95rem;
}
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 6px; margin-bottom: 28px; }
.toc ol { margin: .4em 0 .6em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #0e0c10; padding: 36px 0 44px; color: var(--muted); font-size: .95rem; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 0 0 14px; }
.site-footer p { margin: 0 0 6px; }
