/* HAJD Games — shared styles. No outside fonts, scripts or trackers. */
:root {
  --bg: #0A1229;
  --bg-2: #101B3A;
  --surface: rgba(255, 255, 255, .05);
  --surface-2: rgba(255, 255, 255, .08);
  --line: rgba(191, 211, 255, .14);
  --text: #EEF2FF;
  --muted: #A9B6D6;
  --gold: #E7C77B;
  --gold-2: #F8E3A6;
  --ink: #14203D;
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-2); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(10, 18, 41, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(140deg, var(--gold-2), #C9963F); display: grid; place-items: center; color: var(--ink); font: 800 15px/1 var(--serif); }
.brand small { color: var(--muted); font-weight: 600; }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 12px; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(1.08rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 40ch; }
.eyebrow { font: 700 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.muted { color: var(--muted); }

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-2); color: var(--ink); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 6px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); line-height: 1.2; }
.store b { font-size: 16px; }
.store span { font-size: 12px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Studio hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 85% 0%, #2B3F7E 0%, rgba(43,63,126,0) 70%); pointer-events: none; }
.hero .wrap { position: relative; }
.stars { position: absolute; inset: 0; background-image: radial-gradient(1.2px 1.2px at 20px 30px, #fff 50%, transparent 51%), radial-gradient(1px 1px at 90px 120px, rgba(255,255,255,.7) 50%, transparent 51%), radial-gradient(1.4px 1.4px at 160px 60px, rgba(255,255,255,.85) 50%, transparent 51%), radial-gradient(1px 1px at 230px 150px, rgba(255,255,255,.6) 50%, transparent 51%); background-size: 260px 190px; opacity: .55; pointer-events: none; }

/* Game card on studio page */
.game-card { display: grid; grid-template-columns: 1fr; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); text-decoration: none; color: var(--text); }
.game-card:hover { border-color: rgba(231, 199, 123, .5); color: var(--text); }
.game-card .shot { aspect-ratio: 844 / 390; object-fit: cover; width: 100%; }
.game-card .body { padding: 22px 20px 24px; display: flex; gap: 16px; align-items: flex-start; }
.app-icon { width: 64px; height: 64px; border-radius: 22%; flex: none; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.chip { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(231,199,123,.14); color: var(--gold); margin-bottom: 10px; }
.more { font-weight: 700; color: var(--gold); }
@media (min-width: 860px) {
  .game-card { grid-template-columns: 1.35fr 1fr; }
  .game-card .shot { height: 100%; aspect-ratio: auto; }
  .game-card .body { flex-direction: column; padding: 32px; justify-content: center; }
}

/* Game hero */
.game-hero { position: relative; overflow: hidden; padding: 64px 0 72px; }
.game-hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .5; }
.game-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,18,41,.35) 0%, rgba(10,18,41,.75) 60%, var(--bg) 100%); }
.game-hero .wrap { position: relative; z-index: 1; }
.game-hero .app-icon { width: 104px; height: 104px; margin-bottom: 22px; }

/* Features */
.features { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 28px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(231,199,123,.14); color: var(--gold); margin-bottom: 14px; }
.feature p { color: var(--muted); margin: 0; }

/* Themes gallery */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 16px; margin: 28px -16px 0; scrollbar-width: thin; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img { width: 100%; aspect-ratio: 844 / 390; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.gallery figcaption { margin-top: 10px; font-weight: 700; }
.gallery figcaption span { color: var(--muted); font-weight: 500; }
@media (min-width: 860px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); overflow: visible; margin: 28px 0 0; padding: 0; }
  .gallery figure:first-child { grid-column: 1 / -1; }
}

/* Lists, prose, tables */
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: rgba(231,199,123,.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23E7C77B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

.prose { padding: 48px 0 72px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.prose h2 { font-size: 1.4rem; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.meta { color: var(--muted); font-size: .92rem; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 24px 0 8px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.toc li { margin: 0 0 4px; break-inside: avoid; }
details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--gold); font-weight: 400; font-size: 1.3em; line-height: 1; }
details[open] summary::after { content: "–"; }
details > :not(summary) { margin-bottom: 16px; color: var(--muted); }
.callout { border: 1px solid rgba(231,199,123,.35); background: rgba(231,199,123,.08); border-radius: 12px; padding: 16px 18px; margin: 18px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 560px) {
  section { padding: 56px 0; }
  .toc ol { columns: 1; }
  .nav { gap: 14px; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
