/* Oldblood - strona gry. Kolory z interfejsu gry (crates/ob-client/src/ui/theme.rs). */
@font-face { font-family: "Alegreya Sans"; src: url(fonts/AlegreyaSans-Medium.woff) format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(fonts/AlegreyaSans-Bold.woff) format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Alegreya SC"; src: url(fonts/AlegreyaSC-Bold.woff) format("woff"); font-weight: 700; font-display: swap; }

:root {
  --field: #382417;
  --field-raised: #4e3320;
  --field-sunk: #21150d;
  --line: #96703e;
  --text: #f6eace;
  --text-soft: #dcc8a2;
  --text-faint: #c0a884;
  --paper: #ecdcb8;
  --paper-ink: #342214;
  --gold: #e2ac3a;
  --gold-light: #ffe082;
  --gold-dark: #7c5016;
  --leather-dark: #26170e;
  --red: #96241c;
  --green: #8ccc68;
  --gem: #cc2222;
  --radius: 10px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 500 18px/1.55 "Alegreya Sans", "Trebuchet MS", system-ui, sans-serif;
  background-color: var(--leather-dark);
  /* ciemne drewno: słoje + delikatne pasy desek */
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 2px, transparent 2px 180px),
    repeating-linear-gradient(0deg, rgba(255,220,160,.025) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.05) 0 3px, transparent 3px 23px),
    linear-gradient(180deg, #2b1a10, #1f130b 60%, #2b1a10);
}
img { max-width: 100%; display: block; }
a { color: var(--gold-light); }
a:hover { color: #fff3c4; }
h1, h2, h3 { font-family: "Alegreya SC", Georgia, serif; font-weight: 700; color: var(--gold-light); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); text-align: center; text-shadow: 0 2px 0 #1a0e06, 0 0 18px rgba(226,172,58,.25); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
code, .cmd { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .86em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* --- nagłówek --- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(38,23,14,.97), rgba(33,21,13,.94));
  border-bottom: 2px solid var(--gold-dark);
  box-shadow: 0 2px 0 rgba(226,172,58,.25), 0 6px 16px rgba(0,0,0,.45);
}
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 56px; }
.brand { font-family: "Alegreya SC", Georgia, serif; font-weight: 700; font-size: 1.45rem; color: var(--gold-light); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand svg { width: 26px; height: 30px; }
.top nav { margin-left: auto; display: flex; gap: 4px 18px; flex-wrap: wrap; }
.top nav a { color: var(--text-soft); text-decoration: none; font-weight: 700; }
.top nav a:hover { color: var(--gold-light); }
.top .btn { padding: 6px 14px; font-size: .95rem; }

/* --- przyciski jak w grze: czerwień ze złotą ramką --- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; color: var(--text);
  padding: 11px 22px; border-radius: 6px;
  background: linear-gradient(180deg, #b0352a, var(--red) 55%, #6e1912);
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 1px rgba(255,224,130,.35), 0 3px 0 #3a0c08, 0 6px 14px rgba(0,0,0,.4);
  transition: transform .08s, filter .15s;
}
.btn:hover { color: #fff; filter: brightness(1.12); }
.btn:active { transform: translateY(2px); }
.btn.ghost { background: linear-gradient(180deg, var(--field-raised), var(--field)); }
.btn[aria-disabled="true"] { filter: grayscale(.8) brightness(.8); pointer-events: none; }

/* --- rama „rzeźbione drewno i złoto” --- */
.frame {
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(255,220,160,.03) 0 1px, transparent 1px 6px),
    linear-gradient(180deg, var(--field-raised), var(--field));
  border: 2px solid var(--gold-dark);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 3px var(--field-sunk), inset 0 0 0 4px rgba(226,172,58,.55), 0 10px 26px rgba(0,0,0,.5);
  padding: 26px;
}
.frame::before, .frame::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold) 45%, var(--gold-dark));
  box-shadow: 0 1px 2px rgba(0,0,0,.6); top: -7px; left: -7px;
}
.frame::after { left: auto; right: -7px; }
.paper {
  background: linear-gradient(180deg, #f1e3c2, var(--paper));
  color: var(--paper-ink);
  border-radius: 6px;
  padding: 18px 22px;
  box-shadow: inset 0 0 30px rgba(124,80,22,.25);
}

/* ozdobna linia z klejnotem pod nagłówkiem */
.rule { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -4px auto 26px; max-width: 360px; }
.rule::before, .rule::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.rule i { width: 12px; height: 12px; transform: rotate(45deg); background: radial-gradient(circle at 35% 35%, #ff8a7a, var(--gem) 55%, #6b0d0d); border: 2px solid var(--gold); }

section { padding: 64px 0 24px; scroll-margin-top: 60px; }

/* --- hero --- */
.hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; padding: 0; overflow: hidden; border-bottom: 3px solid var(--gold-dark); }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,6,.0) 30%, rgba(20,12,6,.55) 62%, rgba(26,16,9,.97)); }
.hero .wrap { position: relative; z-index: 1; padding-bottom: 44px; width: 100%; }
.hero h1 { font-size: clamp(3rem, 11vw, 6.2rem); margin: 0; letter-spacing: .02em; text-shadow: 0 3px 0 #2a1608, 0 0 30px rgba(0,0,0,.7); }
.hero .lead { font-size: clamp(1.15rem, 2.6vw, 1.5rem); max-width: 640px; color: var(--text); text-shadow: 0 2px 6px rgba(0,0,0,.8); }
.badge { display: inline-block; font-weight: 700; font-size: .85rem; color: var(--paper-ink); background: var(--gold); border-radius: 999px; padding: 3px 12px; margin-bottom: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* --- karty --- */
.cards { display: grid; align-items: start; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card h3 { display: flex; gap: 10px; align-items: center; }
.card .ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--field-sunk); border: 2px solid var(--gold); font-size: 18px; }
.card p:last-child { margin-bottom: 0; }
.note { margin-top: 26px; }
.note p:last-child { margin: 0; }

/* --- galeria --- */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }
.shot { margin: 0; position: relative; border-radius: 8px; overflow: hidden; border: 2px solid var(--gold-dark); box-shadow: inset 0 0 0 1px rgba(226,172,58,.4), 0 6px 16px rgba(0,0,0,.45); background: var(--field-sunk); cursor: zoom-in; }
.shot img { width: 100%; height: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .35s; }
.shot:hover img { transform: scale(1.04); }
.shot figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; font-weight: 700; font-size: .95rem; background: linear-gradient(180deg, transparent, rgba(20,12,6,.88)); }
.shot.wide { grid-column: span 2; grid-row: span 2; }
@media (max-width: 560px) { .shot.wide { grid-column: auto; grid-row: auto; } }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(12,7,3,.94); display: none; align-items: center; justify-content: center; flex-direction: column; padding: 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 82vh; border: 2px solid var(--gold-dark); border-radius: 6px; }
.lightbox p { margin: 12px 0 0; color: var(--text-soft); text-align: center; }
.lightbox button { position: absolute; background: var(--field); color: var(--gold-light); border: 2px solid var(--gold-dark); border-radius: 50%; width: 46px; height: 46px; font-size: 22px; cursor: pointer; }
.lightbox .close { top: 14px; right: 14px; }
.lightbox .prev { left: 10px; top: 50%; }
.lightbox .next { right: 10px; top: 50%; }

/* --- lista „co działa” --- */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); list-style: none; padding: 0; margin: 0; }
.features li { padding: 14px 16px 14px 48px; position: relative; background: rgba(33,21,13,.6); border: 1px solid rgba(150,112,62,.5); border-radius: 8px; }
.features li::before { content: "✦"; position: absolute; left: 16px; top: 13px; color: var(--gold); font-size: 1.1rem; }
.features b { color: var(--gold-light); }
.todo { margin-top: 26px; }
.todo ul { margin: .4em 0 0; padding-left: 1.2em; }
.todo li { margin: .25em 0; }

/* --- jak zacząć --- */
.start { display: grid; gap: 26px; grid-template-columns: 1.1fr 1fr; align-items: center; }
@media (max-width: 820px) { .start { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 16px 54px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-family: "Alegreya SC", serif; font-size: 1.2rem; color: var(--paper-ink); background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold) 55%, var(--gold-dark)); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.steps b { color: var(--gold-light); }
.start img { border-radius: 8px; border: 2px solid var(--gold-dark); box-shadow: 0 8px 22px rgba(0,0,0,.5); }

/* --- pobieranie --- */
.dl { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.dl .frame { display: flex; flex-direction: column; }
.dl .os { width: 48px; height: 48px; margin-bottom: 6px; fill: var(--gold-light); }
.dl .meta { color: var(--text-faint); font-size: .92rem; margin-bottom: 14px; }
.dl ul { margin: 0 0 18px; padding-left: 1.1em; color: var(--text-soft); font-size: .95rem; flex: 1; }
.dl .btn { text-align: center; }
.dl .soon { text-align: center; color: var(--text-faint); font-weight: 700; padding: 11px; border: 2px dashed var(--line); border-radius: 6px; }
.sums { text-align: center; color: var(--text-faint); font-size: .9rem; margin-top: 16px; }

table.req { width: 100%; border-collapse: collapse; font-size: .97rem; }
table.req th, table.req td { text-align: left; padding: 9px 10px; border-bottom: 1px solid rgba(124,80,22,.35); vertical-align: top; }
table.req th { font-family: "Alegreya SC", serif; color: var(--gold-dark); }
.scroll-x { overflow-x: auto; }

pre { white-space: pre-wrap; word-break: break-word; background: var(--field-sunk); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; overflow-x: auto; color: var(--text); margin: 0 0 1em; }

footer { margin-top: 60px; padding: 30px 0 40px; border-top: 2px solid var(--gold-dark); color: var(--text-faint); font-size: .92rem; text-align: center; background: rgba(20,12,6,.5); }
footer p { margin: .3em 0; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .top nav { display: none; }
  .top .wrap { justify-content: space-between; }
  .frame { padding: 20px 18px; }
  section { padding-top: 48px; }
  .hero { min-height: min(74vh, 620px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .shot img { transition: none; } }
