:root {
  --bg: #12100e;
  --bg-2: #1a1714;
  --panel: #211d19;
  --line: #3a322a;
  --text: #e8e0d2;
  --muted: #a89c8a;
  --accent: #d9a441;
  --accent-ink: #1a1305;
  --it: #d9a441;
  --rnr: #8fbf5a;
  --coah: #d2553f;
  --radius: 10px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

body.mod-it { --accent: var(--it); }
body.mod-rnr { --accent: var(--rnr); --accent-ink: #10190a; }
body.mod-coah { --accent: var(--coah); --accent-ink: #1c0906; }

/* language switch: only the active language is shown */
[data-lang="en"] [lang="pl"],
[data-lang="pl"] [lang="en"] { display: none !important; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin-top: 2.2em; padding-top: .2em; }
h3 { font-size: 1.15rem; margin-top: 1.6em; color: var(--accent); }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

code, kbd {
  font: .88em/1.4 Consolas, "Cascadia Mono", monospace;
  background: #0c0a09;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .1em .4em;
  white-space: nowrap;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(18, 16, 14, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 60px; flex-wrap: wrap;
}
.brand {
  font-family: Georgia, serif; font-weight: 700; font-size: 1.2rem;
  color: var(--text); letter-spacing: .04em;
}
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a {
  color: var(--muted); padding: 6px 10px; border-radius: 6px; font-size: .95rem;
}
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.lang {
  display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.lang button {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 5px 10px; font: inherit; font-size: .85rem; font-weight: 600;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 56px;
  /* the picture itself is set inline on each page (a url() inside a custom property
     would be resolved against this stylesheet's folder, not the page) */
  background: var(--bg-2) center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero .lead { font-size: 1.2rem; max-width: 46em; color: #f1eadc; }
.hero-row { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.hero-row > div { flex: 1 1 420px; min-width: 0; }
.hero-icon {
  width: 168px; height: 168px; border-radius: 16px;
  border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.badge {
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 99px;
  border: 1px solid var(--accent); color: var(--accent);
}
.badge.muted { border-color: var(--line); color: var(--muted); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px;
  font-weight: 600; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.disabled {
  background: transparent; border-color: var(--line); color: var(--muted);
  cursor: default; pointer-events: none;
}

/* ---------- content ---------- */
main { padding-bottom: 72px; }

.cards {
  display: grid; gap: 20px; margin-top: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  --accent: var(--c, #d9a441);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius); overflow: hidden; color: var(--text);
}
.card:hover { text-decoration: none; border-color: var(--accent); }
.card-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: #0c0a09; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-top: 0; font-size: 1.3rem; }
.card-body p { color: var(--muted); font-size: .97rem; }
.card-more { margin-top: auto; color: var(--accent); font-weight: 600; }

.stats {
  display: grid; gap: 12px; margin: 22px 0;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.stat b {
  display: block; font: 700 1.7rem/1.1 Georgia, serif; color: var(--accent);
}
.stat span { color: var(--muted); font-size: .9rem; }

.note {
  border-left: 3px solid var(--accent);
  background: var(--panel); padding: 12px 16px; margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.note p:last-child { margin-bottom: 0; }

.toc {
  display: flex; gap: 6px 14px; flex-wrap: wrap; margin: 26px 0 0;
  padding: 12px 16px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius); font-size: .93rem;
}

.table-scroll { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

figure { margin: 24px 0; }
figure img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
figcaption { color: var(--muted); font-size: .88rem; margin-top: 6px; }

.gallery {
  display: grid; gap: 12px; margin: 18px 0 24px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.gallery a, .gallery figure { margin: 0; }
.gallery img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.gallery figcaption { text-align: center; }

details {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 16px; margin: 0 0 12px; background: var(--bg-2);
}
summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
details[open] { padding-bottom: 14px; }
details h3:first-of-type { margin-top: .4em; }

.cols { display: grid; gap: 0 36px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-2);
  padding: 28px 0 36px; color: var(--muted); font-size: .9rem;
}
.site-footer .wrap { display: flex; gap: 12px 32px; flex-wrap: wrap; justify-content: space-between; }
.site-footer p { margin: 0 0 .4em; max-width: 46em; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 44px 0 36px; }
  .hero-icon { width: 112px; height: 112px; }
  .nav { margin-left: 0; order: 3; width: 100%; padding-bottom: 8px; }
  .lang { margin-left: auto; }
}

/* ---------- logos ---------- */
.brand img { height: 44px; width: auto; border-radius: 6px; display: block; }
.home-logo {
  width: min(640px, 100%); border-radius: 14px; margin: 0 0 26px;
  border: 1px solid var(--line); box-shadow: 0 12px 48px rgba(0,0,0,.65);
}
.hero-logo {
  width: min(400px, 100%); height: auto; border-radius: 14px;
  border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.6);
}

/* ---------- ImmersiveTrader <-> Roots & Remedies link ---------- */
.duo {
  margin: 34px 0; padding: 22px;
  border: 1px solid var(--line); border-radius: 14px;
  border: 2px solid transparent;
  background:
    linear-gradient(120deg, #2b2416, #1f2a17) padding-box,
    linear-gradient(90deg, var(--it), var(--rnr)) border-box;
}
.duo-head {
  display: flex; align-items: center; justify-content: center; gap: 14px 22px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.duo-head img { height: 96px; width: auto; border-radius: 10px; }
.duo-plus { font: 700 2.4rem/1 Georgia, serif; color: var(--text); }
.duo h2 { margin: 0 0 .5em; padding: 0; text-align: center; }
.duo-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: center; }
.duo-grid img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.duo .it { color: var(--it); }
.duo .rnr { color: var(--rnr); }
.duo .actions { margin-top: 14px; }

.tag-link {
  display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: 99px;
  font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(217,164,65,.15); color: var(--it); border: 1px solid var(--it);
}
.tag-link.rnr { background: rgba(143,191,90,.15); color: var(--rnr); border-color: var(--rnr); }

@media (max-width: 640px) {
  .brand img { height: 36px; }
  .duo { padding: 16px; }
  .duo-head img { height: 64px; }
}
