/* ============================================================
   gry-rpg.pl — Theme layout
   Port układów z projektu graficznego (landing.html) + style
   specyficzne dla szablonów WordPress. Token-driven (tokens.css).
   ============================================================ */

/* ---------- Skip link / a11y ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm); }
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(246,241,231,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-strong); }
.site-header .bar { display: flex; align-items: center; gap: 22px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand .mwrap { width: 34px; height: 34px; flex: none; }
.brand .mwrap svg, .foot-col .mwrap svg { width: 100%; height: 100%; display: block; }
.brand .wm { font-family: var(--font-ui); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .wm .dash { color: var(--faint); } .brand .wm .tld { color: var(--accent); }
.mainnav { display: flex; gap: 2px; align-items: center; }
.mainnav a, .nav-item > button { font-family: var(--font-ui); font-size: 14.5px; font-weight: 500; color: var(--text); padding: 8px 12px; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; cursor: pointer; line-height: 1; }
.mainnav a:hover, .nav-item > button:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.mainnav .current-menu-item > a, .mainnav .current_page_item > a { color: var(--accent); }
.nav-item { position: relative; }
.nav-item > button .chev { width: 14px; height: 14px; color: var(--faint); transition: transform .15s; }
.nav-dd { position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .14s, transform .14s, visibility .14s; z-index: 70; }
.nav-item:hover .nav-dd, .nav-item:focus-within .nav-dd { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-item:hover .chev, .nav-item:focus-within .chev { transform: rotate(180deg); }
.sdot { width: 15px; height: 15px; border-radius: 4px; background: currentColor; flex: none; }
.header-search { margin-left: auto; width: 260px; }
.header-cta { display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; }
@media (max-width: 1080px) { .header-search { display: none; } }
@media (max-width: 940px) { .mainnav, .header-cta .btn-secondary { display: none; } .menu-btn { display: inline-flex; } }

/* mobile nav panel */
.mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--surface); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 500; }
.mobile-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Generic page scaffold ---------- */
.site-main { padding: var(--sp-10) 0 var(--sp-16); }
.page-head { margin-bottom: var(--sp-8); }
.page-head .crumbs { margin-bottom: var(--sp-5); }
.page-head h1 { font-size: clamp(30px, 3.6vw, 42px); margin-bottom: 10px; }
.page-head .sub { color: var(--muted); max-width: 60ch; }
.content-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: var(--sp-10); align-items: start; }
@media (max-width: 900px) { .content-grid { grid-template-columns: 1fr; } }
.sidebar { display: flex; flex-direction: column; gap: var(--sp-5); position: sticky; top: calc(var(--header-h) + 16px); }

/* ---------- Prose (article body) ---------- */
.prose { max-width: var(--maxw-prose); }
.prose > * + * { margin-top: var(--sp-4); }
.prose h2 { font-size: 26px; margin-top: var(--sp-8); }
.prose h3 { font-size: 20px; margin-top: var(--sp-6); }
.prose p, .prose li { font-size: 16.5px; line-height: 1.7; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.prose img { border-radius: var(--r-md); margin-block: var(--sp-4); }
.prose blockquote { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }

/* ---------- Hero (front) ---------- */
.hero { padding: var(--sp-16) 0 var(--sp-12); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-12); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: var(--sp-8); } }
.hero h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.02em; margin: 16px 0 18px; }
.hero .lead { max-width: 50ch; margin-bottom: 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.hero-stats .s .v { font-family: var(--font-mono); font-weight: 600; font-size: 22px; color: var(--ink); white-space: nowrap; }
.hero-stats .s .l { font-size: 12.5px; color: var(--muted); }
.hero-art { display: grid; place-items: center; }
.hero-art .mwrap { width: min(320px, 70%); aspect-ratio: 1; }
.hero-art .mwrap svg { width: 100%; height: 100%; }

/* ---------- Sections ---------- */
.section { padding: var(--sp-16) 0; }
.band-sunken { background: var(--surface-sunken); border-block: 1px solid var(--border); }
.sec-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: var(--sp-8); flex-wrap: wrap; }
.sec-title h2 { font-size: 30px; }
.sec-title .sub { color: var(--muted); margin-top: 6px; max-width: 56ch; }

/* silo tiles */
.silos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 880px) { .silos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .silos { grid-template-columns: 1fr; } }
.silo { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); transition: border-color .14s, box-shadow .14s, transform .14s; }
.silo:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); text-decoration: none; }
.silo .si { width: 42px; height: 42px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.silo .si svg { width: 22px; height: 22px; }
.silo .st { font-family: var(--font-head); font-weight: 600; font-size: 16px; color: var(--ink); }
.silo .sc { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* tools grid */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 880px) { .tools { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tools { grid-template-columns: 1fr; } }
.tool { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); transition: border-color .14s, box-shadow .14s; }
.tool:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); text-decoration: none; }
.tool .ti { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.tool .ti svg { width: 22px; height: 22px; }
.tool h4 { font-size: 17px; color: var(--ink); }
.tool p { font-size: 13.5px; color: var(--muted); }
.tool .go { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.step .n { font-family: var(--font-mono); font-weight: 600; font-size: 14px; color: var(--accent); background: var(--accent-soft); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px; }
.step h4 { font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); }

/* ---------- Card grids (archives) ---------- */
.card-grid { display: grid; gap: var(--sp-5); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* blog / post card */
.post { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; transition: border-color .14s, box-shadow .14s; }
.post:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); text-decoration: none; }
.post .thumb { aspect-ratio: 16/9; background: var(--surface-sunken); position: relative; display: grid; place-items: center; border-bottom: 1px solid var(--border); overflow: hidden; }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post .thumb .gly { width: 46px; height: 46px; color: var(--border-ink); }
.post .pbody { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post h3, .post h4 { font-size: 16.5px; color: var(--ink); line-height: 1.25; }
.post .pmeta { font-size: 12.5px; color: var(--faint); margin-top: auto; }

/* ---------- Single layouts ---------- */
.entry-header { margin-bottom: var(--sp-6); }
.entry-header .meta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.entry-title { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; }
.entry-lead { font-family: var(--font-ui); font-size: 19px; line-height: 1.55; color: var(--muted); margin-top: 12px; max-width: 60ch; }
.entry-thumb { margin: var(--sp-6) 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); }

/* ---------- Pagination wrapper ---------- */
.pagination-wrap { margin-top: var(--sp-10); display: flex; justify-content: center; }
.pagination-wrap .page-numbers { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--r-sm);
  font-size: 14px; color: var(--text); font-family: var(--font-mono); margin: 0 2px; }
.pagination-wrap .page-numbers:hover { border-color: var(--border-ink); background: var(--surface-2); text-decoration: none; }
.pagination-wrap .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination-wrap .page-numbers.dots { border: 0; background: none; color: var(--faint); }

/* ---------- Final CTA dark ---------- */
.cta-final { background: var(--ink); color: #efe7d6; }
.cta-final h2 { color: #fff; font-size: 38px; }
.cta-final .lead { color: #c9bfa9; }
.cta-final .btn-secondary { background: transparent; color: #f6f1e7; border-color: rgba(246,241,231,.3); }
.cta-final .btn-secondary:hover { background: rgba(246,241,231,.1); border-color: rgba(246,241,231,.5); color:#fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-sunken); border-top: 1px solid var(--border-strong); padding: var(--sp-12) 0 var(--sp-8); margin-top: var(--sp-16); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--sp-8); }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); } }
.foot-col h5 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.foot-col a { display: block; font-size: 14px; color: var(--text); padding: 4px 0; }
.foot-col a:hover { color: var(--accent); text-decoration: none; }
.foot-col .mwrap { width: 34px; height: 34px; }
.foot-bottom { margin-top: var(--sp-10); padding-top: var(--sp-5); border-top: 1px solid var(--border-strong); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------- Misc ---------- */
.section-spacer { height: var(--sp-12); }
.text-center { text-align: center; }
.mt-6 { margin-top: var(--sp-6); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: var(--sp-6); }
