/* ============================================================
   SILERS 2.0 — język wizualny „dokumentacja techniczna"
   Jasny papier inżynierski / noc kreślarska (data-theme light|dark)
   ============================================================ */
:root {
  --paper: #f6f5f0;
  --surface: #ffffff;
  --ink: #15171c;
  --ink-2: #4c5563;
  --ink-3: #8a8f99;
  --rule: #d9d6cc;
  --rule-2: #b8b4a6;
  --brand: #1f5bff;
  --brand-ink: #0d3fd6;
  --ok: #0c7a4d;
  --warn: #b45309;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --head: 'Archivo', 'Inter', sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --r: 2px;
  --w: 1240px;
}
html[data-theme="dark"] {
  --paper: #101216;
  --surface: #171a20;
  --ink: #e9e7e0;
  --ink-2: #a8adb8;
  --ink-3: #6d7380;
  --rule: #2a2e37;
  --rule-2: #3a3f4b;
  --brand: #5b8aff;
  --brand-ink: #7da3ff;
  --ok: #34d399;
  --warn: #fbbf24;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink-2);
  font-family: var(--body); font-size: 16.5px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); line-height: 1.05; letter-spacing: -.02em; font-weight: 800; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 28px; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* — metki techniczne — */
.spec {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); display: inline-flex; align-items: center; gap: 10px;
}
.spec b { color: var(--brand); font-weight: 500; }
.spec::before { content: ''; width: 26px; height: 1px; background: var(--rule-2); }

/* — nawigacja — */
nav.v2 { position: fixed; inset: 0 0 auto 0; z-index: 100; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
nav.v2 .in { max-width: var(--w); margin: 0 auto; padding: 0 28px; height: 64px; display: flex; align-items: center; gap: 26px; }
nav.v2 img.logo { height: 19px; width: auto; }
html[data-theme="light"] nav.v2 img.logo { filter: brightness(.2) saturate(1.4); }
nav.v2 .links { display: flex; gap: 2px; margin-left: auto; }
nav.v2 .links a { font-size: 13.5px; font-weight: 500; color: var(--ink-2); padding: 7px 11px; border-radius: var(--r); white-space: nowrap; }
nav.v2 .links a i { font-family: var(--mono); font-style: normal; font-size: 10px; color: var(--ink-3); margin-right: 5px; }
nav.v2 .links a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
nav.v2 .links a.act { color: var(--brand-ink); }
nav.v2 .links a.act i { color: var(--brand); }
nav.v2 .cta { font-size: 13.5px; font-weight: 700; padding: 10px 18px; background: var(--ink); color: var(--paper); border-radius: var(--r); white-space: nowrap; }
nav.v2 .cta:hover { background: var(--brand); color: #fff; }
#theme-btn { width: 36px; height: 36px; border-radius: var(--r); border: 1px solid var(--rule-2); background: transparent; color: var(--ink-2); cursor: pointer; font-size: 14px; display: grid; place-items: center; font-family: var(--mono); flex-shrink: 0; }
#theme-btn:hover { border-color: var(--brand); color: var(--brand-ink); }
#nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }
#mobile-menu { display: none; border-top: 1px solid var(--rule); background: var(--paper); padding: 10px 28px 18px; }
#mobile-menu a { display: block; padding: 12px 6px; font-size: 15px; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
#mobile-menu a i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--ink-3); margin-right: 8px; }
#mobile-menu a:last-child { border-bottom: 0; }

/* — hero spisu treści — */
.hero-v2 { padding: 150px 0 0; }
.hero-v2 h1 { font-size: clamp(38px, 6vw, 74px); max-width: 900px; margin: 18px 0 22px; }
.hero-v2 h1 em { font-style: normal; color: var(--brand-ink); }
.hero-v2 .lead { font-size: 18px; max-width: 640px; color: var(--ink-2); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 26px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: .08em; }
.hero-meta span b { color: var(--ink); font-weight: 500; }

/* spis działów */
.toc { margin-top: 54px; border-top: 1px solid var(--rule-2); }
.toc a { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 24px; padding: 26px 4px; border-bottom: 1px solid var(--rule); transition: .18s; }
.toc a .no { font-family: var(--mono); font-size: 15px; color: var(--ink-3); }
.toc a .t { display: flex; flex-direction: column; gap: 3px; }
.toc a .t strong { font-family: var(--head); font-weight: 800; font-size: clamp(21px, 2.6vw, 30px); color: var(--ink); letter-spacing: -.015em; transition: .18s; }
.toc a .t span { font-size: 14px; color: var(--ink-3); }
.toc a .go { font-family: var(--mono); font-size: 13px; color: var(--ink-3); transition: .18s; white-space: nowrap; }
.toc a:hover { background: var(--surface); }
.toc a:hover .t strong { color: var(--brand-ink); }
.toc a:hover .go { color: var(--brand-ink); transform: translateX(4px); }

/* — pasy sekcji — */
section.v2 { padding: 92px 0; }
section.v2.alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sec-head-v2 { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 44px; }
.sec-head-v2 h2 { font-size: clamp(26px, 3.4vw, 42px); max-width: 720px; }
.sec-head-v2 .spec { flex-shrink: 0; }

/* — blok działu na hubie — */
.dept { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; padding: 74px 0; border-top: 1px solid var(--rule); }
.dept:first-of-type { border-top: 0; }
.dept.flip > .dept-copy { order: 2; }
.dept h3 { font-size: clamp(24px, 3vw, 36px); margin: 14px 0 14px; }
.dept p.d { font-size: 15.5px; margin-bottom: 20px; }
.dept ul { list-style: none; display: grid; gap: 9px; margin-bottom: 26px; }
.dept ul li { padding-left: 26px; position: relative; font-size: 14.5px; }
.dept ul li::before { content: '—'; position: absolute; left: 0; color: var(--brand); font-family: var(--mono); }
.dept ul li b { color: var(--ink); font-weight: 600; }

/* przyciski */
.btn-v2 { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 14.5px; padding: 13px 22px; border-radius: var(--r); border: 1px solid var(--ink); color: var(--ink); transition: .18s; cursor: pointer; background: transparent; }
.btn-v2:hover { background: var(--ink); color: var(--paper); }
.btn-v2.solid { background: var(--ink); color: var(--paper); }
.btn-v2.solid:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-v2 .ar { font-family: var(--mono); transition: .18s; }
.btn-v2:hover .ar { transform: translateX(3px); }

/* — figury (realne zrzuty) — */
.fig { position: relative; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--surface); padding: 10px; }
.fig::before, .fig::after,
.fig .rg::before, .fig .rg::after {
  content: '+'; position: absolute; font-family: var(--mono); font-size: 12px; color: var(--rule-2); line-height: 1;
}
.fig::before { top: -7px; left: -5px; }
.fig::after { top: -7px; right: -5px; }
.fig .rg::before { bottom: -6px; left: -5px; }
.fig .rg::after { bottom: -6px; right: -5px; }
.fig img { width: 100%; border-radius: 1px; border: 1px solid var(--rule); }
.fig figcaption { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding: 10px 4px 2px; letter-spacing: .05em; }
.fig figcaption b { color: var(--ink-2); font-weight: 500; }
.fig-stack { display: grid; gap: 18px; }
.fig-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.fig-duo .fig:nth-child(2) { margin-top: 34px; }

/* — pas liczb — */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--surface); }
.metrics div { padding: 26px 26px 22px; border-right: 1px solid var(--rule); }
.metrics div:last-child { border-right: 0; }
.metrics .n { font-family: var(--mono); font-size: clamp(26px, 3vw, 38px); color: var(--ink); font-weight: 500; }
.metrics .n small { font-size: 55%; color: var(--brand-ink); }
.metrics .l { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }

/* — taśma produktów — */
.strip { display: flex; flex-wrap: wrap; gap: 10px; }
.strip a { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--ink); transition: .18s; }
.strip a img { width: 22px; height: 22px; border-radius: 5px; }
.strip a:hover { border-color: var(--brand); color: var(--brand-ink); }

/* — karty „co budujemy" — */
.build { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.build .b { border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--surface); padding: 28px; position: relative; }
.build .b .no { font-family: var(--mono); font-size: 12px; color: var(--ink-3); position: absolute; top: 24px; right: 24px; }
.build .b h3 { font-size: 20px; margin-bottom: 10px; padding-right: 46px; }
.build .b p { font-size: 14px; }
.build .b p a { color: var(--brand-ink); font-weight: 600; border-bottom: 1px solid currentColor; }

/* — proces — */
.steps-v2 { counter-reset: st; border-top: 1px solid var(--rule-2); }
.steps-v2 .s { display: grid; grid-template-columns: 90px 260px 1fr; gap: 24px; padding: 22px 4px; border-bottom: 1px solid var(--rule); align-items: baseline; }
.steps-v2 .s i { font-family: var(--mono); font-style: normal; font-size: 13px; color: var(--ink-3); }
.steps-v2 .s h3 { font-size: 17px; }
.steps-v2 .s p { font-size: 14px; }

/* — FAQ — */
details.v2 { border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--surface); margin-bottom: 10px; }
details.v2 summary { cursor: pointer; padding: 18px 22px; font-family: var(--head); font-weight: 700; font-size: 15.5px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 14px; }
details.v2 summary::-webkit-details-marker { display: none; }
details.v2 summary::after { content: '+'; font-family: var(--mono); color: var(--ink-3); transition: .2s; }
details.v2[open] summary::after { transform: rotate(45deg); color: var(--brand-ink); }
details.v2 .ans { padding: 0 22px 20px; font-size: 14.5px; color: var(--ink-2); }
details.v2 .ans b { color: var(--ink); }
details.v2 .ans a { color: var(--brand-ink); font-weight: 600; }

/* — pas CTA — */
.cta-v2 { border: 1px solid var(--ink); border-radius: var(--r); padding: 46px 44px; display: grid; grid-template-columns: 1.3fr auto; gap: 30px; align-items: center; background: var(--surface); position: relative; overflow: hidden; }
.cta-v2::before { content: 'SILERS · EST. 2010'; position: absolute; right: -12px; bottom: -24px; font-family: var(--head); font-weight: 800; font-size: 90px; letter-spacing: -.04em; color: color-mix(in srgb, var(--ink) 5%, transparent); pointer-events: none; white-space: nowrap; }
.cta-v2 h2 { font-size: clamp(24px, 3vw, 36px); margin-bottom: 10px; }
.cta-v2 p { font-size: 15px; }
.cta-v2 .acts { display: flex; flex-direction: column; gap: 10px; position: relative; }

/* — stopka — */
footer.v2 { border-top: 1px solid var(--rule-2); background: var(--surface); padding: 40px 0 30px; }
footer.v2 .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
footer.v2 h4 { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
footer.v2 ul { list-style: none; display: grid; gap: 7px; }
footer.v2 ul a { font-size: 13.5px; color: var(--ink-2); }
footer.v2 ul a:hover { color: var(--brand-ink); }
footer.v2 .bottom { border-top: 1px solid var(--rule); padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
footer.v2 img.logo { height: 17px; width: auto; margin-bottom: 12px; }
html[data-theme="light"] footer.v2 img.logo { filter: brightness(.2) saturate(1.4); }
footer.v2 p.about { font-size: 13px; color: var(--ink-3); max-width: 300px; }

/* — reveal — */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.rv.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .rv { opacity: 1; transform: none; transition: none; } * { transition-duration: .01ms !important; } }

@media (max-width: 1100px) {
  nav.v2 .links { display: none; }
  #nav-toggle { display: block; margin-left: auto; }
  nav.v2 .cta { margin-left: 0; }
  .dept { grid-template-columns: 1fr; gap: 34px; }
  .dept.flip > .dept-copy { order: 0; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics div:nth-child(2) { border-right: 0; }
  .metrics div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .build { grid-template-columns: 1fr; }
  .steps-v2 .s { grid-template-columns: 70px 1fr; }
  .steps-v2 .s p { grid-column: 2; }
  .cta-v2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  section.v2 { padding: 64px 0; }
  .hero-v2 { padding-top: 118px; }
  .toc a { grid-template-columns: 54px 1fr; }
  .toc a .go { display: none; }
  .fig-duo { grid-template-columns: 1fr; }
  .fig-duo .fig:nth-child(2) { margin-top: 0; }
  .metrics { grid-template-columns: 1fr; }
  .metrics div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .metrics div:last-child { border-bottom: 0; }
  footer.v2 .grid { grid-template-columns: 1fr 1fr; }
}
