/* ===== Weź Przerzuć - styl: atrament, pergamin, sepia ===== */

:root {
  --ink:      #14110b;
  --ink-2:    #1b170f;
  --panel:    #221c13;
  --panel-2:  #2b2418;
  --line:     #3b3322;
  --paper:    #ece1cb;
  --paper-dim:#a99c80;
  --gold:     #cb9b4f;
  --gold-soft:#e0bd7e;
  --rust:     #b14a2c;
  --crit:     #84b14e;
  --maxw: 1080px;
  --display: "Fraunces", Georgia, serif;
  --body: "Newsreader", Georgia, serif;
  --label: "Archivo", system-ui, sans-serif; /* grotesk do etykiet/kickerów/nav */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.06rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* papierowe ziarno na całości */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 2; }

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--paper); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 720px; }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 17, 11, .82);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 90px; }
.brand { display: inline-flex; align-items: center; }
.brand__logo {
  height: 70px; width: auto; display: block;
  transition: transform .25s ease;
}
.brand:hover .brand__logo { transform: rotate(-6deg) scale(1.05); }

.nav__links { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  color: var(--paper-dim); font-size: .8rem; letter-spacing: .1em;
  text-transform: uppercase; font-family: var(--label); font-weight: 600;
}
.nav__links a:hover { color: var(--gold-soft); }
.nav__toggle { display: none; background: none; border: none; color: var(--paper); font-size: 1.5rem; cursor: pointer; }

/* ===== HERO ===== */
.hero { position: relative; overflow: hidden; padding: clamp(5rem, 16vh, 9rem) 0; }
.hero__media {
  position: absolute; inset: 0; z-index: 0;
  background: url("../img/hero.jpg") center 30% / cover no-repeat;
  filter: saturate(.7) contrast(1.02);
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20,17,11,.96) 0%, rgba(20,17,11,.78) 45%, rgba(20,17,11,.35) 100%),
    linear-gradient(0deg, var(--ink) 2%, transparent 40%);
}
.hero__inner { position: relative; z-index: 1; max-width: 660px; }
.hero__kicker {
  font-family: var(--label); font-weight: 700;
  text-transform: uppercase; letter-spacing: .2em;
  font-size: .8rem; color: var(--gold); margin: 0 0 1.2rem;
}
.hero__title {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(2.8rem, 8vw, 5.2rem); line-height: .98;
  margin: 0 0 1.4rem; letter-spacing: -.01em;
}
.hero__title-accent { color: var(--gold-soft); }
.hero__lead { font-size: 1.2rem; color: var(--paper); max-width: 30em; margin: 0 0 2.2rem; }
.hero__cta { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }

.btn { font-family: var(--display); font-weight: 600; font-size: 1rem; transition: transform .14s ease, background .2s ease; }
.btn--primary {
  display: inline-block; background: var(--gold); color: var(--ink);
  padding: .8rem 1.7rem; border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(0,0,0,.35);
}
.btn--primary:hover { transform: translate(-1px,-1px); background: var(--gold-soft); color: var(--ink); box-shadow: 5px 5px 0 rgba(0,0,0,.35); }
.btn--text { color: var(--paper-dim); }
.btn--text:hover { color: var(--gold-soft); }

/* ===== SECTIONS ===== */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--alt { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__title {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.05;
  margin: 0 0 .3rem;
}
.section__sub { color: var(--paper-dim); font-style: italic; margin: 0 0 2.4rem; }
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
em { color: var(--gold-soft); }

/* ===== GROUP TITLE ===== */
.group__title {
  font-family: var(--display); font-weight: 600; font-style: italic;
  font-size: 1.3rem; color: var(--gold);
  margin: 2.4rem 0 1.2rem;
  display: flex; align-items: center; gap: 1rem;
}
.group__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.group__title:first-of-type { margin-top: 0; }
.group__note { color: var(--paper-dim); margin: 0; }
.group__hint { color: var(--paper-dim); font-style: italic; font-size: .85rem; margin: -.6rem 0 1.1rem; }

/* ===== PEOPLE ===== */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.people--gm { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.person {
  display: flex; align-items: center; gap: 1rem;
  background: var(--panel); border: 1px solid var(--line);
  padding: 1rem 1.1rem; border-radius: 3px;
  transition: transform .16s ease, border-color .2s ease;
}
.person:nth-child(odd) { transform: rotate(-.5deg); }
.person:nth-child(even) { transform: rotate(.6deg); }
.person:hover { transform: rotate(0) translateY(-3px); border-color: var(--gold); }
.person--open { cursor: pointer; position: relative; }
.person--open::after { content: "↗"; position: absolute; top: 8px; right: 11px; font-family: var(--label); font-size: .8rem; color: var(--paper-dim); opacity: .55; transition: opacity .2s ease, color .2s ease; }
.person--open:hover::after { opacity: 1; color: var(--gold-soft); }
.person--open:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.avatar {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%;
  overflow: hidden; border: 2px solid var(--line);
  background: var(--panel-2); display: grid; place-items: center;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.avatar--mono::before {
  content: attr(data-i);
  font-family: var(--display); font-weight: 900; font-size: 1.5rem;
  color: var(--gold);
}
.person__name { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 0; }
.person__role { color: var(--paper-dim); font-size: .95rem; margin: .1rem 0 0; }
.person__note { color: var(--paper-dim); font-size: .85rem; margin: .3rem 0 0; }

/* ===== KAMPANIE ===== */
.camps { display: flex; flex-direction: column; gap: 2rem; }
.camp {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 3px; overflow: hidden;
  box-shadow: 4px 4px 0 rgba(0,0,0,.25);
}
.camp:nth-child(even) { transform: rotate(-.4deg); }
.camp:nth-child(odd) { transform: rotate(.3deg); }
.camp:nth-child(even) .camp__media { order: 2; }
.camp__media { min-height: 240px; background: var(--panel-2); }
.camp__media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.8); }
.camp__media--empty {
  display: grid; place-items: center; padding: 1.5rem;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 12px, transparent 12px 24px),
    var(--panel-2);
}
.camp__media--empty span {
  font-family: var(--display); font-style: italic; font-weight: 600;
  color: var(--line); font-size: 1.6rem; text-align: center;
  filter: brightness(2.2);
}
.camp__body { padding: 1.8rem 2rem; }
.camp__tag { font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--gold); margin: 0 0 .5rem; }
.camp__name { font-family: var(--display); font-weight: 900; font-size: 1.7rem; margin: 0 0 .7rem; }
.camp__desc { color: var(--paper); margin: 0; }
.camp__meta { color: var(--paper-dim); font-size: .85rem; font-style: italic; margin: 1.1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line); }

/* ===== JAK GRAMY (specs) ===== */
.specs { margin: 0; display: flex; flex-direction: column; }
.spec {
  display: grid; grid-template-columns: 150px 1fr; gap: 1.6rem;
  padding: 1.3rem 0 1.3rem 1.2rem;
  border-top: 1px solid var(--line);
  border-left: 2px solid transparent;
  transition: border-left-color .2s ease, background .2s ease;
}
.spec:first-child { border-top: none; }
.spec:hover { border-left-color: var(--gold); background: rgba(203,155,79,.045); }
.spec dt {
  font-family: var(--display); font-weight: 600; font-style: italic;
  font-size: 1.2rem; color: var(--gold-soft); margin: 0; padding-top: .1rem;
}
.spec dd { margin: 0; color: var(--paper); }

/* ===== OGLĄDAJ ===== */
.watch { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.watch__card {
  display: flex; flex-direction: column; gap: .2rem;
  background: var(--panel); border: 1px solid var(--line);
  padding: 1.6rem 1.5rem; border-radius: 3px;
  transition: transform .16s ease, border-color .2s ease;
}
.watch__card:hover { transform: translateY(-3px); border-color: var(--gold); }
.watch__label { font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; color: var(--rust); }
.watch__name { font-family: var(--display); font-weight: 900; font-size: 1.6rem; color: var(--paper); }
.watch__handle { color: var(--paper-dim); font-size: .9rem; }

/* ===== SOCIAL ===== */
.social { display: flex; flex-wrap: wrap; gap: .8rem; }
.social__link {
  font-family: var(--display); font-weight: 600;
  background: var(--panel); border: 1px solid var(--line);
  padding: .65rem 1.3rem; border-radius: 2px; color: var(--paper);
}
.social__link:hover { border-color: var(--gold); color: var(--gold-soft); }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--line); padding: 1.6rem 0; color: var(--paper-dim); font-size: .85rem; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.die { background: none; border: none; padding: 0; cursor: pointer; width: 60px; height: 60px; line-height: 0; }
.die svg { width: 100%; height: 100%; display: block; overflow: visible; transform-origin: 50% 50%; }
.die__edge { fill: var(--panel-2); stroke: var(--gold); stroke-width: 3; stroke-linejoin: round; transition: fill .2s ease; }
.die__face { fill: rgba(203,155,79,.10); stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; transition: fill .2s ease; }
.die__facet { stroke: var(--gold); stroke-width: 1; opacity: .3; }
.die__num { font-family: var(--display); font-weight: 900; font-size: 26px; fill: var(--gold-soft); text-anchor: middle; dominant-baseline: central; }
.die:hover .die__edge { fill: var(--panel); }
.die:hover .die__face { fill: rgba(203,155,79,.2); }

/* ===== LIVE BADGE ===== */
.livebar {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: rgba(27,23,15,.96); border: 1px solid var(--rust);
  color: var(--paper); font-family: var(--label); font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; font-size: .72rem;
  padding: 7px 15px; border-radius: 999px;
}
.livebar[hidden] { display: none; }
.livebar:hover { color: #fff; border-color: #e23b2e; text-decoration: none; }
.livebar__dot { width: 9px; height: 9px; border-radius: 50%; background: #e23b2e; animation: livepulse 1.5s infinite; }
@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(226,59,46,.6); }
  70% { box-shadow: 0 0 0 9px rgba(226,59,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(226,59,46,0); }
}

/* ===== KAFELEK KAMPANII KLIKALNY ===== */
.camp--open { cursor: pointer; }
.camp__chron { display: inline-block; margin: 1rem 0 0; font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--gold-soft); transition: color .2s ease; }
.camp--open:hover { border-color: var(--gold); }
.camp--open:hover .camp__chron { color: #fff; }
.camp--open:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ===== KRONIKI SESJI (modal) ===== */
#sessions-modal { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 70; }
#sessions-modal.open { display: flex; }
#sessions-modal .panel.sessions-panel {
  position: relative; width: 100%; max-width: 640px; max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, rgba(34,26,18,.99), rgba(18,14,10,1));
  border: 1px solid var(--gold); border-radius: 10px; padding: 26px 30px; color: var(--paper);
  box-shadow: 0 0 0 4px rgba(0,0,0,.5), 0 14px 44px rgba(0,0,0,.8);
}
#sessions-modal .close { float: right; cursor: pointer; color: var(--gold); font-size: 28px; line-height: .7; font-family: var(--display); }
#sessions-modal .close:hover { color: var(--gold-soft); }
#sessions-modal h2 { font-family: var(--display); font-weight: 900; color: var(--gold-soft); font-size: 1.7rem; margin: 0 0 2px; padding-right: 28px; }
.sess-sub { font-family: var(--label); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--gold); margin: 0 0 1.3rem; }
.sess-list { list-style: none; margin: 0; padding: 0; }
.sess-item { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: baseline; padding: .95rem .5rem; border-top: 1px solid var(--line); cursor: pointer; transition: background .15s ease; }
.sess-item:first-child { border-top: none; }
.sess-item:hover { background: rgba(203,155,79,.07); }
.sess-n { font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; color: var(--gold); white-space: nowrap; }
.sess-t { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--paper); }
.sess-d { font-style: italic; color: var(--paper-dim); font-size: .8rem; white-space: nowrap; }
.sess-back { background: none; border: none; cursor: pointer; font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--paper-dim); padding: 0; margin: 0 0 1.1rem; }
.sess-back:hover { color: var(--gold-soft); }
.sess-story { color: var(--paper); line-height: 1.85; font-size: 1.05rem; }
.sess-story p { margin: 0 0 1.05rem; }
.sess-story p:last-child { margin-bottom: 0; }
.sess-loading { color: var(--paper-dim); font-style: italic; }

/* ===== KARTA POSTACI (modal, snapshot KNG) ===== */
#party-modal { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 70; }
#party-modal.open { display: flex; }
#party-modal .panel {
  position: relative; width: 100%; max-width: 580px; max-height: 90vh; overflow: auto;
  background: linear-gradient(180deg, rgba(34,26,18,.99), rgba(18,14,10,1));
  border: 1px solid var(--gold); border-radius: 10px; padding: 26px 28px; color: var(--paper);
  box-shadow: 0 0 0 4px rgba(0,0,0,.5), 0 14px 44px rgba(0,0,0,.8);
}
#party-modal #party-detail { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 72; width: max-content; min-width: 280px; max-width: min(90vw,560px); max-height: 84vh; overflow: auto; }
#party-modal h2 { font-family: var(--display); font-weight: 900; margin: 0 0 2px; color: var(--gold-soft); font-size: 1.9rem; }
#party-modal .sub { color: var(--paper-dim); font-style: italic; font-size: 1rem; padding-bottom: 10px; border-bottom: 1px solid rgba(203,155,79,.3); margin-bottom: 12px; }
#party-modal .row { display: flex; gap: 10px; flex-wrap: wrap; font-size: .95rem; margin-bottom: 8px; }
#party-modal .row span { background: rgba(0,0,0,.32); border: 1px solid rgba(203,155,79,.28); border-radius: 7px; padding: 4px 11px; }
#party-modal .conds { margin: 6px 0 2px; }
#party-modal .pill { display: inline-block; background: #5a1717; color: #ffd9c0; border: 1px solid #7a2a2a; border-radius: 20px; padding: 3px 11px; font-size: .78rem; margin: 2px 2px 0 0; }
#party-modal .lbl { font-family: var(--label); color: var(--gold); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin: 14px 0 6px; }
#party-modal .close { float: right; cursor: pointer; color: var(--gold); font-size: 28px; line-height: .7; font-family: var(--display); }
#party-modal .close:hover { color: var(--gold-soft); }
#party-modal .tabs { display: flex; gap: 5px; margin: 15px 0 12px; flex-wrap: wrap; border-bottom: 1px solid rgba(203,155,79,.4); }
#party-modal .tabs button { font-family: var(--label); font-weight: 600; background: linear-gradient(180deg,#352a1e,#241c13); color: var(--gold); border: 1px solid var(--line); border-bottom: none; border-radius: 8px 8px 0 0; padding: 8px 14px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
#party-modal .tabs button:hover { color: var(--gold-soft); }
#party-modal .tabs button.active { background: linear-gradient(180deg,var(--gold-soft),#9a7b1c); color: #1c140a; border-color: var(--gold-soft); }
#party-modal .grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 7px; }
#party-modal .stat { background: linear-gradient(180deg,var(--panel-2),var(--panel)); border: 1px solid var(--line); border-radius: 8px; padding: 7px 4px; text-align: center; font-size: .7rem; color: var(--paper-dim); font-family: var(--label); text-transform: uppercase; letter-spacing: .04em; }
#party-modal .stat b { display: block; font-size: 1.05rem; color: var(--gold-soft); font-family: var(--display); margin-top: 3px; }
#party-modal .igrid { display: grid; grid-template-columns: repeat(auto-fill,minmax(82px,1fr)); gap: 8px; }
#party-modal .icell { position: relative; text-align: center; padding: 8px 4px 6px; border-radius: 9px; background: radial-gradient(circle at 50% 28%, #322817, #14100a); border: 1px solid var(--line); box-shadow: inset 0 0 10px rgba(0,0,0,.7); cursor: pointer; }
#party-modal .icell:hover { border-color: var(--gold); box-shadow: inset 0 0 10px rgba(0,0,0,.7), 0 0 8px rgba(203,155,79,.5); }
#party-modal .icell.eq { border-color: rgba(132,177,78,.55); }
#party-modal .icell img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 1px 2px #000); }
#party-modal .icell .iname { display: block; font-size: .62rem; line-height: 1.15; margin-top: 4px; max-height: 26px; overflow: hidden; color: var(--paper-dim); }
#party-modal .icell .qty { position: absolute; top: 2px; right: 4px; background: rgba(0,0,0,.78); border-radius: 6px; padding: 0 5px; font-size: .68rem; }
#party-modal .icell .eqd { position: absolute; top: 3px; left: 4px; color: var(--crit); font-size: .7rem; }
#party-modal .srank { font-family: var(--display); color: var(--gold-soft); font-weight: 600; font-size: .95rem; margin: 13px 0 6px; padding-bottom: 3px; border-bottom: 1px solid rgba(203,155,79,.25); }
#party-modal .skillgrid { display: grid; grid-template-columns: repeat(2,1fr); gap: 4px 16px; font-size: .9rem; color: var(--paper-dim); }
#party-modal .skillgrid .skill { text-transform: capitalize; border-bottom: 1px dotted rgba(203,155,79,.18); padding: 3px 0; cursor: pointer; }
#party-modal .skillgrid .skill:hover { color: var(--paper); }
#party-modal .skillgrid .skill b { color: var(--gold-soft); float: right; }
#party-modal .empty { color: #6a5d45; font-size: .85rem; font-style: italic; }
#party-modal h3 { font-family: var(--display); color: var(--gold-soft); font-size: 1.3rem; margin: 0 0 10px; padding-right: 30px; border-bottom: 1px solid rgba(203,155,79,.3); padding-bottom: 8px; }
#party-detail p { font-size: .95rem; line-height: 1.55; white-space: pre-wrap; margin: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
  .camp, .camp:nth-child(odd), .camp:nth-child(even) { grid-template-columns: 1fr; transform: none; }
  .camp:nth-child(even) .camp__media { order: 0; }
  .camp__media { min-height: 180px; }
}
@media (max-width: 720px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 90px; left: 0; right: 0;
    flex-direction: column; gap: 0; display: none;
    background: var(--ink-2); border-bottom: 1px solid var(--line);
    padding: .5rem 1.5rem 1rem;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { display: block; padding: .8rem 0; }
  .livebar { font-size: .64rem; padding: 6px 11px; letter-spacing: .06em; }
  .livebar__more { display: none; }
  .watch { grid-template-columns: 1fr; }
  .spec { grid-template-columns: 1fr; gap: .3rem; }
  .sess-item { grid-template-columns: 1fr; gap: .15rem; }
  .sess-d { white-space: normal; }
}
