/* Pierworys.pl — system wizualny z materiałów szkoleniowych (JetBrains Mono, indygo, lawenda) */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/assets/fonts/jbm-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/assets/fonts/jbm-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --indigo: #3a28cc;
  --indigo-deep: #2c1ea3;
  --violet: #5b48e0;
  --violet-light: #7b6ef0;
  --indigo-soft: #6b5ed9;
  --lilac: #b8b0ff;
  --lav: #efeefb;
  --lav-line: #d9d6ee;
  --ink: #1e1d26;
  --muted: #62606e;
  --grey: #9aa0a6;
  --line: #cbcbcb;
  --rust: #b4470f;
  --paper: #ffffff;

  --font: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space: clamp(4.5rem, 9vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-variant-ligatures: none;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--indigo-deep); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }

:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--indigo); color: #fff; padding: .6rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; color: #fff; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- etykiety z prezentacji ---------- */
.label {
  font-size: .75rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 .9rem;
}
.label--indigo { color: var(--indigo); font-weight: 700; }
.pg {
  display: inline-block; font-weight: 700; color: var(--indigo); font-size: .95rem;
  padding-bottom: .35rem; border-bottom: 2px solid var(--indigo); min-width: 3.6rem;
}
.tag {
  font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; text-align: right;
  padding-right: 1rem; border-right: 2px solid var(--ink); line-height: 1.6;
}

/* strzałka z prezentacji */
.arrow {
  position: relative; height: 2px; background: var(--indigo); width: min(100%, 36rem);
  margin: 2rem 0;
}
.arrow::after {
  content: ""; position: absolute; right: -2px; top: -5px;
  border-left: 12px solid var(--indigo); border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.arrow::before {
  content: ""; position: absolute; right: 10px; top: -4px; width: 12px; height: 10px; background: var(--indigo);
}

/* ---------- nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--lav-line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 4.5rem; }
.brand {
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--indigo); text-decoration: none;
  display: inline-flex; align-items: baseline;
}
.brand span { color: var(--muted); font-weight: 400; }
.brand:hover { color: var(--indigo-deep); }

.nav ul { list-style: none; display: flex; gap: .25rem; align-items: center; }
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav a:not(.btn) {
  display: block; padding: .5rem .7rem; color: var(--ink); text-decoration: none; font-size: .9rem;
  border-bottom: 2px solid transparent;
}
.nav a:not(.btn):hover { color: var(--indigo); }
.nav a[aria-current="page"]:not(.btn) { color: var(--indigo); border-bottom-color: var(--indigo); font-weight: 700; }

.menu-toggle {
  display: none; font: inherit; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
  background: none; border: 2px solid var(--ink); color: var(--ink); padding: .45rem .8rem; cursor: pointer;
}
.menu-toggle[aria-expanded="true"] { background: var(--ink); color: #fff; }

@media (max-width: 960px) {
  .js .menu-toggle { display: inline-block; }
  .js .nav {
    position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 2px solid var(--indigo);
    flex-direction: column; align-items: stretch; padding: 1rem var(--gutter) 1.5rem; gap: 1rem; display: none;
  }
  .js .nav.is-open { display: flex; }
  .js .nav ul { flex-direction: column; align-items: stretch; }
  .js .nav a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--lav-line); font-size: 1rem; }
  .js .nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--indigo); }
  .nav ul { flex-wrap: wrap; }
  .bar { flex-wrap: wrap; }
}

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .75rem; font: inherit; font-weight: 700; font-size: .95rem;
  background: var(--indigo); color: #fff; border: 2px solid var(--indigo); padding: .9rem 1.4rem;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--indigo-deep); border-color: var(--indigo-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--indigo); }
.btn--ghost:hover { background: var(--lav); color: var(--indigo-deep); }
.btn--light { background: #fff; color: var(--indigo); border-color: #fff; }
.btn--light:hover { background: var(--lav); border-color: var(--lav); color: var(--indigo-deep); }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: var(--space); position: relative; }
.sheet-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.5rem); font-weight: 800; color: var(--indigo); line-height: 1.04; letter-spacing: -0.035em;
}
.hero h1 .line2 { display: block; color: var(--ink); }
.hero .lead { font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 34em; margin-top: 1.75rem; color: var(--ink); }
.iso { width: 100%; height: auto; }

.meta {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin: 0 0 2.25rem;
}
.meta > div { padding: 0 2rem; border-left: 1.5px solid var(--ink); }
.meta > div:first-child { padding-left: 0; border-left: 0; }
.meta dt { font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; margin-bottom: .45rem; }
.meta dd { margin: 0; font-size: .95rem; line-height: 1.5; }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 26rem; margin-inline: auto; width: 100%; }
}
@media (max-width: 640px) {
  .meta { grid-template-columns: 1fr; gap: 1rem; }
  .meta > div { border-left: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--indigo); }
  .meta > div:first-child { padding-left: 1rem; border-left: 2px solid var(--indigo); }
  .tag { font-size: .68rem; }
}

/* animacja izometrii — jedyny ruch na stronie */
.iso .floor, .iso .body, .iso .roof, .iso .cube, .iso .axes { transform-box: fill-box; }
@media (prefers-reduced-motion: no-preference) {
  .js .iso .floor { animation: isoFade .7s ease-out both; }
  .js .iso .axes { animation: isoFade .6s .9s ease-out both; }
  .js .iso .body path, .js .iso .body line { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: isoDraw 1.1s .25s cubic-bezier(.6,.1,.2,1) forwards; }
  .js .iso .body .fill { animation: isoFade .5s 1s both; }
  .js .iso .roof { animation: isoDrop .8s 1.15s cubic-bezier(.2,.8,.2,1) both; }
  .js .iso .cube { animation: isoSlide .7s 1.6s cubic-bezier(.2,.8,.2,1) both; }
}
@keyframes isoFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes isoDraw { to { stroke-dashoffset: 0; } }
@keyframes isoDrop { from { opacity: 0; transform: translateY(-38px); } to { opacity: 1; transform: none; } }
@keyframes isoSlide { from { opacity: 0; transform: translate(-30px, 16px); } to { opacity: 1; transform: none; } }

/* ---------- sekcje ---------- */
.section { padding-block: var(--space); }
.section--lav { background: var(--lav); }
.section--tight { padding-top: 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); color: var(--indigo); }
.section-head p { color: var(--muted); max-width: 38em; margin: 0; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--indigo); margin: 2.5rem 0 1rem; }
.prose h3 { font-size: 1.05rem; margin: 2rem 0 .6rem; }
.prose ul { margin: 0 0 1em; }
.muted { color: var(--muted); }

/* listy z kwadratowym punktorem jak w prezentacji */
.sq { list-style: none; }
.sq li { position: relative; padding-left: 1.25rem; margin-bottom: .45rem; }
.sq li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: var(--ink); }
.sq--indigo li::before { background: var(--indigo); }

/* ---------- pola (karty) ---------- */
.fields { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.field {
  background: var(--lav); padding: 1.6rem 1.5rem 1.75rem; display: flex; flex-direction: column;
  border: 2px solid var(--lav);
}
.field--outline { background: #fff; border-color: var(--indigo); }
.field--warn { background: #fff; border-color: var(--rust); }
.field h3 { font-size: 1.05rem; color: var(--indigo); margin-bottom: .35rem; }
.field--warn h3 { color: var(--rust); }
.field .sub { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }
.field .sub::before { content: "→ "; }
.field .sq { font-size: .9rem; }
.field .more { margin-top: auto; padding-top: 1rem; font-size: .88rem; font-weight: 700; text-decoration: none; }
.field .more:hover { text-decoration: underline; }
.section--lav .field { background: #fff; border-color: #fff; }
.section--lav .field--outline { border-color: var(--indigo); }

/* rozbudowane pozycje (usługi, szkolenia, produkty) */
.entry {
  display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 1.5rem 3rem;
  padding: 2.25rem 0; border-top: 1.5px solid var(--lav-line);
}
.entry:last-child { border-bottom: 1.5px solid var(--lav-line); }
.entry h2, .entry h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); color: var(--indigo); }
.entry .for { color: var(--muted); font-size: .88rem; margin-top: .6rem; }
.entry .for::before { content: "→ "; }
.entry-body > p { max-width: 42em; }
.entry-body .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .5rem 2rem; margin-top: .75rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; list-style: none; }
.chip { font-size: .74rem; letter-spacing: .08em; padding: .25rem .6rem; border: 1.5px solid var(--lav-line); color: var(--muted); }
.chip--status { border-color: var(--indigo); color: var(--indigo); font-weight: 700; }
.chip--soon { border-color: var(--line); color: var(--muted); }
@media (max-width: 760px) { .entry { grid-template-columns: 1fr; } }

/* statystyki jak slajd 02 */
.stats { display: flex; flex-wrap: wrap; gap: 2rem 4rem; }
.stat b { display: block; font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 800; color: var(--indigo); line-height: 1; letter-spacing: -0.04em; }
.stat span { display: block; margin-top: .6rem; font-size: .9rem; color: var(--muted); max-width: 14rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem 5rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* kroki — prawdziwa sekwencja */
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 0; counter-reset: s; }
.steps li { padding: 1.5rem 1.5rem 1.5rem 0; border-top: 2px solid var(--indigo); margin-right: 1.5rem; }
.steps .n { display: block; font-weight: 800; color: var(--indigo); font-size: .95rem; margin-bottom: .9rem; }
.steps h3 { font-size: 1rem; margin-bottom: .5rem; }
.steps p { font-size: .9rem; color: var(--muted); margin: 0; }

/* blok wyróżniony — pełne indygo jak slajd 12 */
.slab { background: var(--indigo); color: #fff; padding: clamp(2rem, 5vw, 3.5rem); }
.slab h2 { color: #fff; font-size: clamp(1.5rem, 3.2vw, 2.4rem); max-width: 22em; }
.slab p { color: #e6e3ff; max-width: 40em; margin-top: 1rem; }
.slab .actions { margin-top: 2rem; }
.slab a:not(.btn) { color: #fff; }

/* wyróżnione szkolenie */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; border: 2px solid var(--indigo); padding: clamp(1.75rem, 4vw, 3rem); background: #fff; }
.feature h3 { font-size: clamp(1.4rem, 3vw, 2.2rem); color: var(--indigo); line-height: 1.08; margin-bottom: 1rem; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* realizacje */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.25rem; }
.case { background: var(--lav); padding: 1.75rem; display: flex; flex-direction: column; }
.case .kind { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--indigo); font-weight: 700; margin-bottom: .8rem; }
.case h2, .case h3 { font-size: 1.15rem; margin-bottom: .75rem; }
.case p { font-size: .92rem; }
.case .sq { font-size: .88rem; margin-top: .25rem; }
.case .chips { margin-top: auto; padding-top: 1.25rem; }
.case .chip { background: #fff; border-color: #fff; }

/* ---------- formularz ---------- */
.form { display: grid; gap: 1.25rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: block; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .45rem; }
.form .opt { text-transform: none; letter-spacing: 0; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 0; padding: .8rem .9rem; transition: border-color .15s;
}
.form textarea { min-height: 11rem; resize: vertical; line-height: 1.55; }
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--indigo) 50%), linear-gradient(135deg, var(--indigo) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.5rem; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--indigo-soft); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--lav-line); }
.form [aria-invalid="true"] { border-color: var(--rust); }
.form .err { color: var(--rust); font-size: .85rem; margin-top: .4rem; min-height: 0; }
.form .err:empty { display: none; }
.form .hint { font-size: .82rem; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 1rem 1.25rem; font-size: .95rem; border-left: 3px solid var(--indigo); background: var(--lav); }
.status:empty { display: none; }
.status.is-error { border-left-color: var(--rust); background: #fbf1ec; color: #7a2f09; }
.status.is-ok { border-left-color: var(--indigo); }
.form-done { border: 2px solid var(--indigo); padding: 2rem; }
.form-done h2 { color: var(--indigo); font-size: 1.4rem; margin-bottom: .75rem; }

.contact-aside { border-left: 2px solid var(--indigo); padding-left: 1.75rem; }
.contact-aside .big { font-size: clamp(1rem, 1.8vw, 1.2rem); font-weight: 700; word-break: break-all; }

/* ---------- stopka: tabliczka rysunkowa ---------- */
.site-footer { margin-top: var(--space); padding-bottom: 2.5rem; position: relative; overflow: hidden; }
.titleblock { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; border: 1.5px solid var(--ink); }
.titleblock > div { padding: 1.25rem 1.4rem; border-left: 1.5px solid var(--ink); }
.titleblock > div:first-child { border-left: 0; }
.titleblock .label { font-size: .68rem; margin-bottom: .6rem; color: var(--muted); }
.titleblock .brandline { font-weight: 800; color: var(--indigo); font-size: 1.1rem; }
.titleblock p, .titleblock li { font-size: .86rem; margin: 0; line-height: 1.7; }
.titleblock ul { list-style: none; }
.titleblock a { color: var(--ink); text-decoration: none; }
.titleblock a:hover { color: var(--indigo); text-decoration: underline; }
@media (max-width: 860px) {
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > div:nth-child(3) { border-left: 0; }
  .titleblock > div:nth-child(n+3) { border-top: 1.5px solid var(--ink); }
}
@media (max-width: 520px) {
  .titleblock { grid-template-columns: 1fr; }
  .titleblock > div { border-left: 0; }
  .titleblock > div + div { border-top: 1.5px solid var(--ink); }
}
.foot-line { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 2rem; min-height: 90px; }
.foot-tag { display: flex; align-items: center; gap: 1.1rem; font-size: .74rem; letter-spacing: .26em; text-transform: uppercase; }
.foot-tag::before { content: ""; width: 3.6rem; height: 2px; background: var(--indigo); flex: none; }
.ramp { width: 110px; height: 90px; flex: none; }

/* 404 */
.notfound { min-height: 50vh; }
.contact-split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 860px) { .contact-split { grid-template-columns: 1fr; } }
ol { margin: 0; padding: 0; }
.site-footer { margin-top: 0; }
.hero .h1-page { max-width: 18em; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; color: var(--indigo); letter-spacing: -0.035em; line-height: 1.05; }
.h-sec { font-size: clamp(1.5rem, 3vw, 2.3rem); color: var(--indigo); }
.h-sec--s { font-size: clamp(1.4rem, 2.8vw, 2rem); }
.h-sec--l { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
.prod-title { font-size: 1.1rem; color: var(--indigo); margin-bottom: .75rem; }
.small { font-size: .92rem; }
.who { font-size: .85rem; margin-bottom: .9rem; }
.mt-05 { margin-top: .5rem; } .mt-1 { margin-top: 1rem; } .mt-15 { margin-top: 1.5rem; } .mt-2 { margin-top: 2rem; } .mt-25 { margin-top: 2.5rem; }
.measure { max-width: 44em; } .measure-s { max-width: 34em; }
.hero-foot { margin-top: clamp(2rem, 4vw, 3rem); }
.hero-foot .arrow { width: 100%; max-width: none; margin-top: 0; }
.hero-foot .meta { grid-template-columns: repeat(4, minmax(0, max-content)); margin-bottom: 0; }
@media (max-width: 960px) { .hero-foot .meta { grid-template-columns: repeat(2, minmax(0, max-content)); gap: 1.5rem 0; } .hero-foot .meta > div:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 640px) { .hero-foot .meta { grid-template-columns: 1fr; } .hero-foot .meta > div, .hero-foot .meta > div:nth-child(3) { padding-left: 1rem; border-left: 2px solid var(--indigo); } }
.nav .btn[aria-current="page"] { background: var(--indigo-deep); }
.hero--page { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
