/* Strona gry Idle Subduer. Źródło: tools/website/style.css (kopiowane przez build_site.py). */

@font-face {
  font-family: "Jersey 10";
  src: url("/fonts/Jersey10-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #0c0a10;
  --bg-2: #15111b;
  --panel: #1c1722;
  --line: #3a2e2a;
  --text: #e9e0d2;
  --muted: #a99f92;
  --gold: #e3b45a;
  --gold-dim: #8a6a33;
  --blood: #b53a2c;
  --legendary: #ff8b2e;
  --todo-bg: #5a1f18;
  --todo-text: #ffd7a8;
  --pixel: "Jersey 10", "Courier New", monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

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

img { max-width: 100%; height: auto; image-rendering: pixelated; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffd88a; }
a:focus-visible, .cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--pixel);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--gold);
  margin: 0 0 0.4em;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: var(--bg); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: var(--gutter); }

/* ---------- nagłówek i stopka ---------- */

.site-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px max(var(--gutter), calc((100% - var(--max)) / 2));
  background: rgba(12, 10, 16, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 30px/1 var(--pixel); color: var(--gold); text-decoration: none;
}
.brand img { image-rendering: pixelated; }

.site-header nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.site-header nav a, .footer-links a {
  font: 24px/1 var(--pixel); color: var(--text); text-decoration: none; padding: 6px 0;
}
.site-header nav a:hover, .footer-links a:hover { color: var(--gold); }
.site-header nav a[aria-current="page"] { color: var(--gold); border-bottom: 2px solid var(--gold); }
a.lang {
  border: 1px solid var(--gold-dim); padding: 4px 8px !important; color: var(--gold) !important;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px max(var(--gutter), calc((100% - var(--max)) / 2)) 36px;
  color: var(--muted); font-size: 15px;
}
.footer-links { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.site-footer p { margin: 4px 0; }

/* ---------- pixel art ---------- */

.sprite {
  --scale: 1;
  width: calc(var(--fw) * var(--scale) * 1px);
  height: calc(var(--fw) * var(--scale) * 1px);
  background-image: var(--img);
  background-repeat: no-repeat;
  background-size: calc(var(--fw) * var(--frames) * var(--scale) * 1px) 100%;
  background-position: 0 0;
  image-rendering: pixelated;
  animation: strip calc(var(--frames) * 0.2s) steps(var(--frames)) infinite;
}

@keyframes strip {
  to { background-position: calc(var(--fw) * var(--frames) * var(--scale) * -1px) 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sprite { animation: none; }
}

/* ---------- landing ---------- */

.hero {
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, rgba(12, 10, 16, 0.96) 0%, rgba(12, 10, 16, 0.75) 45%, rgba(12, 10, 16, 0.2) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%),
    var(--scene);
  background-size: auto, auto, 1080px auto;
  background-position: 0 0, 0 0, right 45%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 56px var(--gutter) 64px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center;
}

.kicker {
  font: 26px/1 var(--pixel); color: var(--blood); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 8px;
}
.hero h1 { font-size: clamp(64px, 11vw, 120px); text-shadow: 0 4px 0 #000; }
.lead { font-size: 20px; max-width: 34em; color: var(--text); }
.note { color: var(--muted); font-size: 15px; }

.cta {
  display: inline-block;
  font: 30px/1 var(--pixel); color: var(--bg); background: var(--gold);
  padding: 14px 22px 12px; border: 2px solid #000; box-shadow: 4px 4px 0 #000;
  cursor: default;
}

.hero-art { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 300px; }
.hero-monster { --scale: 2; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.5)); }
.app-icon {
  position: absolute; left: 0; bottom: 0; width: 128px; height: 128px;
  border: 2px solid var(--gold-dim); box-shadow: 4px 4px 0 #000;
}

.band { max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter); }
.band.dark { max-width: none; background: var(--bg-2); border-block: 1px solid var(--line); }
.band.dark > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.band h2 { font-size: clamp(44px, 6vw, 64px); }
.section-lead { color: var(--muted); max-width: 40em; margin: -4px 0 28px; }

.features {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
}
.feature {
  background: var(--panel); border: 1px solid var(--line); padding: 20px 20px 14px;
  box-shadow: 4px 4px 0 #000;
}
.feature-icon { display: block; width: 48px; height: 48px; margin-bottom: 10px; }
.feature h3 { font-size: 32px; }
.feature p { margin: 0; color: var(--muted); }

.realms {
  list-style: none; margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.realm {
  position: relative; overflow: hidden;
  min-height: 384px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  background-color: var(--bg);
  background-image: linear-gradient(0deg, rgba(12, 10, 16, 0.95) 0%, rgba(12, 10, 16, 0.15) 55%), var(--scene);
  background-size: auto, cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--line); box-shadow: 4px 4px 0 #000;
  image-rendering: pixelated;
}
.realm .boss {
  --scale: 1;
  position: absolute; left: 50%; top: 28px; transform: translateX(-50%);
  max-width: none;
}
.realm-text { position: relative; width: 100%; padding: 14px 14px 12px; }
.realm-num { font: 22px/1 var(--pixel); color: var(--blood); }
.realm h3 { font-size: 32px; margin: 2px 0 2px; color: var(--text); }
.realm p { margin: 0; font-size: 14px; color: var(--muted); }

.chest { display: flex; justify-content: center; margin: 0 0 24px; }
.chest-anim { --scale: 3; animation-duration: 1.6s; animation-direction: alternate; }

.items {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px;
}
.item {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: var(--panel); border: 2px solid var(--legendary); padding: 14px 10px;
  box-shadow: 4px 4px 0 #000;
}
.item span { font: 24px/1.05 var(--pixel); color: var(--legendary); }

.fair { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; max-width: 46em; }
.fair li { position: relative; padding-left: 30px; }
.fair li::before {
  content: ""; position: absolute; left: 4px; top: 0.5em; width: 12px; height: 12px;
  background: var(--gold); box-shadow: 2px 2px 0 #000;
}

/* ---------- dokumenty ---------- */

.doc { max-width: 820px; margin: 0 auto; padding: 40px var(--gutter) 64px; }
.doc h1 { font-size: clamp(48px, 8vw, 72px); }
.doc h2 { font-size: 36px; margin-top: 1.6em; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 28px; margin-top: 1.4em; color: var(--text); }
.doc p, .doc li { overflow-wrap: anywhere; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li { margin: 0.25em 0; }
.doc-lang { margin-top: -6px; }
.doc-lang a { font: 24px/1 var(--pixel); }
.doc h2, .doc h3 { scroll-margin-top: 80px; }

.toc {
  background: var(--panel); border: 1px solid var(--line); padding: 16px 20px 10px; margin: 20px 0 8px;
}
.toc h2 { font-size: 28px; border: 0; margin: 0 0 6px; padding: 0; }
.toc ol { margin: 0; padding-left: 0; list-style: none; columns: 2; column-gap: 28px; }
.toc a { text-decoration: none; }

mark.todo {
  background: var(--todo-bg); color: var(--todo-text); padding: 0 4px; border: 1px dashed var(--todo-text);
}

.not-found { text-align: center; min-height: 50vh; }
.not-found h1 { font-size: 72px; }

/* ---------- telefon ---------- */

@media (max-width: 1000px) {
  .realms { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 32px; padding-bottom: 40px; }
  .hero-art { min-height: 0; order: -1; }
  .hero-monster { --scale: 1; }
  .app-icon { display: none; }
  .lead { font-size: 18px; }
  .band { padding: 40px var(--gutter); }
  .realm { min-height: 340px; }
  .chest-anim { --scale: 2; }
  .toc ol { columns: 1; }
  .brand { font-size: 26px; }
  .site-header nav a, .footer-links a { font-size: 22px; }
}
