/* MAX Engineering – arkusz stylów
   Kolory: grafit/antracyt, biel, limonka (akcent) */
:root {
  /* MAD Shaping – wspólna paleta. Akcent ustawia każdy serwis osobno (build.py → <style> w <head>) */
  --ink: #20272c;          /* grafit/antracyt – kolor bazowy marki */
  --ink-2: #262e34;
  --ink-3: #2f383f;
  --line-dark: #3a444c;
  --steel: #8b969f;
  --paper: #ffffff;
  --paper-2: #f2f4f5;
  --line: #dfe3e5;
  --text: #1c2226;
  --text-2: #525d65;
  --accent: #c3f53c;       /* nadpisywane per serwis */
  --accent-2: #a9dc1f;     /* hover / ciemniejszy wariant */
  --accent-ink: #1a2400;   /* tekst na tle akcentu */
  --danger: #d7372f;
  --radius: 6px;
  --wrap: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.muted { color: var(--steel); font-size: 14px; }

/* ---------- przyciski ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; border-radius: var(--radius); font-weight: 600; font-size: 15px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-lime { background: var(--accent); color: var(--accent-ink); }
.btn-lime:hover { background: var(--accent-2); }
.btn-ghost { border-color: #4a525a; color: #fff; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost-dark { border-color: var(--line); background: #fff; color: var(--text); }
.btn-ghost-dark:hover { border-color: var(--text); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: inherit; font-size: inherit; }

/* ---------- nagłówek ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(22, 25, 28, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-dark); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-size: 18px; letter-spacing: .02em; font-weight: 700; }
.logo svg { width: 30px; height: 30px; }
.logo b { font-weight: 500; color: var(--accent); margin-left: 5px; }
.logo-hub b { color: var(--steel); }
.nav ul { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { text-decoration: none; font-size: 15px; color: #cfd4d9; transition: color .15s; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 10px 8px; cursor: pointer; }
.nav-toggle span:not(.sr) { display: block; height: 2px; background: #fff; margin: 4px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; padding: 88px 0 96px; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px); background-size: 40px 40px; opacity: .35; mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.eyebrow-dark { color: var(--text-2); }
.eyebrow .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.hero h1 { font-size: clamp(44px, 6.4vw, 80px); font-weight: 700; letter-spacing: -0.035em; }
.lead { margin-top: 24px; font-size: clamp(17px, 1.6vw, 19px); color: #c3c9cf; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-specs { display: grid; grid-template-columns: repeat(3, auto); gap: 28px; margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line-dark); max-width: 560px; }
.hero-specs dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--steel); }
.hero-specs dd { margin: 4px 0 0; font-size: 14px; color: #e6e9ec; }

.hero-visual { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.tile { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 5 / 8; background: var(--ink-3); border: 1px solid var(--line-dark); }
.tile:nth-child(2) { margin-top: 48px; }
.tile:nth-child(3) { margin-top: 96px; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:hover img { transform: scale(1.04); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(22, 25, 28, .88) 0%, rgba(22, 25, 28, 0) 42%); pointer-events: none; }
.tile figcaption { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; font-size: 14px; font-weight: 600; color: #fff; line-height: 1.3; }
.tile figcaption span { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--accent); letter-spacing: .08em; margin-bottom: 4px; }

/* ---------- sekcje ---------- */
.section { padding: 104px 0; }
.section-dark { background: var(--ink-2); color: #fff; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 700; }
.section-lead { margin-top: 18px; font-size: 18px; color: var(--text-2); }
.section-dark .section-lead { color: #b5bcc3; }

/* usługi */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service { background: #fff; padding: 36px 32px 32px; display: flex; flex-direction: column; transition: background .2s; position: relative; }
.service:hover { background: #fbfcf8; }
.service::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--accent); transition: width .25s; }
.service:hover::before { width: 100%; }
.service-icon { width: 52px; height: 52px; border-radius: var(--radius); background: var(--ink); display: grid; place-items: center; margin-bottom: 24px; }
.service-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.service h3 { font-size: 22px; font-weight: 600; }
.service > p { margin-top: 12px; color: var(--text-2); font-size: 15px; }
.service ul { margin: 20px 0 28px; display: grid; gap: 7px; }
.service li { position: relative; padding-left: 20px; font-size: 15px; }
.service li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--accent-2); }
.service-btn { margin-top: auto; align-self: flex-start; font-weight: 600; font-size: 15px; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; transition: gap .15s; display: inline-flex; gap: 6px; }
.service-btn:hover { gap: 10px; }
.service-cta { background: var(--ink); color: #fff; justify-content: center; }
.service-cta:hover { background: var(--ink); }
.service-cta > p { color: #b5bcc3; margin-bottom: 28px; }
.service-cta .btn { align-self: flex-start; }

/* dlaczego my */
.why-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.why-list li { background: var(--ink-2); padding: 32px; }
.why-num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.why-list h3 { margin-top: 18px; font-size: 20px; font-weight: 600; }
.why-list p { margin-top: 10px; color: #a9b1b8; font-size: 15px; }

/* proces */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.process li { position: relative; }
.process li:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: 56px; right: -12px; height: 1px; background: repeating-linear-gradient(90deg, var(--steel) 0 6px, transparent 6px 12px); }
.step { position: relative; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1.5px solid var(--text); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; margin-bottom: 20px; }
.process li:first-child .step { background: var(--accent); border-color: var(--accent); }
.process h3 { font-size: 19px; font-weight: 600; }
.process p { margin-top: 8px; color: var(--text-2); font-size: 15px; }

/* ---------- kontakt ---------- */
.section-contact { background: var(--paper-2); }
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.contact-info h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; }
.contact-info > p { margin-top: 18px; color: var(--text-2); font-size: 17px; }
.contact-info .eyebrow { color: var(--text-2); }
.contact-points { margin-top: 36px; display: grid; gap: 18px; }
.contact-points li { display: grid; gap: 2px; font-size: 16px; }
.contact-points span { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.contact-points a { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent-2); justify-self: start; }
.contact-note { margin-top: 36px; padding: 20px 22px; background: #fff; border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; }
.contact-note p { margin-top: 6px; color: var(--text-2); }

.form, .form-success { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 20px; }
.field { display: grid; gap: 6px; align-content: start; }
.field-full { grid-column: 1 / -1; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.field em { color: var(--danger); font-style: normal; }
.opt { font-weight: 400; color: var(--text-2); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=url], .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 140px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231b1f23' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; min-height: 0; }
.err:empty { display: none; }

.drop { display: flex; align-items: center; gap: 14px; padding: 22px; border: 1.5px dashed #b9bfc4; border-radius: var(--radius); cursor: pointer; font-weight: 400 !important; color: var(--text-2); transition: border-color .15s, background .15s; }
.drop:hover, .drop.drag { border-color: var(--text); background: #fafbf6; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop svg { width: 26px; height: 26px; fill: none; stroke: var(--text); stroke-width: 1.8; flex: none; }
.drop b { color: var(--text); }
.file-list { display: grid; gap: 6px; }
.file-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 14px; padding: 8px 12px; background: var(--paper-2); border-radius: 4px; }
.file-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list small { color: var(--text-2); font-family: var(--mono); }
.file-list button { background: none; border: 0; cursor: pointer; color: var(--text-2); font-size: 18px; line-height: 1; padding: 0 4px; }
.file-list button:hover { color: var(--danger); }

.check { grid-template-columns: auto 1fr; align-items: start; column-gap: 12px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); }
.check label { font-weight: 400; font-size: 14px; color: var(--text-2); }
.check .err { grid-column: 2; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
.turnstile { grid-column: 1 / -1; }

.form-foot { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.form-status { font-size: 14px; color: var(--text-2); }
.form-status.error { color: var(--danger); }

.form-success { text-align: center; padding: 64px 40px; }
.form-success svg { width: 64px; height: 64px; margin: 0 auto 20px; fill: none; stroke-width: 2.4; }
.form-success circle { stroke: var(--line); }
.form-success path { stroke: var(--accent-2); stroke-linecap: round; stroke-linejoin: round; }
.form-success h3 { font-size: 26px; }
.form-success p { margin: 12px auto 28px; color: var(--text-2); max-width: 420px; }

/* ---------- stopka ---------- */
.site-footer { background: var(--ink); color: #cfd4d9; padding: 56px 0 28px; font-size: 15px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.logo-footer { color: #fff; margin-bottom: 10px; }
.footer-contact, .footer-links { display: grid; gap: 8px; align-content: start; }
.site-footer a { text-decoration: none; }
.site-footer a:hover, .site-footer .linklike:hover { color: var(--accent); }
.site-footer .linklike { text-decoration: none; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-dark); font-size: 13px; color: var(--steel); }

/* ---------- cookies ---------- */
.cookie { position: fixed; z-index: 90; left: 20px; bottom: 20px; max-width: 420px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.cookie h2 { font-size: 17px; margin-bottom: 8px; }
.cookie p { font-size: 14px; color: var(--text-2); }
.cookie-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }

/* ---------- strona polityki ---------- */
.doc { padding: 64px 0 96px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 12px; }
.doc h2 { font-size: 22px; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--text-2); margin-bottom: 10px; }
.doc ul { list-style: disc; padding-left: 22px; }
.doc .todo { background: #fff8d6; padding: 2px 6px; border-radius: 3px; color: #6b5800; }

/* ---------- RWD ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 64px; }
  .hero-visual { max-width: 620px; }
  .services, .why-list { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .process li::after { display: none; }
  .contact { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav ul { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); border-bottom: 1px solid var(--line-dark); padding: 8px 20px 20px; display: none; }
  .nav ul.open { display: flex; }
  .nav ul li a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
  .nav ul li .btn { margin-top: 16px; width: 100%; }
  .hero { padding: 56px 0 72px; }
  .hero-specs { grid-template-columns: 1fr 1fr; gap: 18px; }
  .hero-visual { gap: 8px; }
  .tile:nth-child(2) { margin-top: 24px; }
  .tile:nth-child(3) { margin-top: 48px; }
  .tile figcaption { left: 8px; right: 8px; bottom: 8px; font-size: 12px; }
  .hero-actions .btn { width: 100%; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
  .services, .why-list { grid-template-columns: 1fr; }
  .service, .why-list li { padding: 28px 24px; }
  .process { grid-template-columns: 1fr; }
  .process li { display: grid; grid-template-columns: 44px 1fr; column-gap: 18px; }
  .process .step { grid-row: span 2; margin: 0; }
  .form, .form-success { padding: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
  .cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* =====================================================================
   KOMPONENTY MAD SHAPING (wspólne dla serwisów)
   ===================================================================== */
.section-alt { background: var(--paper-2); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 3px; background: var(--accent); color: var(--accent-ink); }
.badge-outline { background: transparent; border: 1px solid currentColor; color: var(--steel); }

/* problem → rozwiązanie */
.problems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.problem { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; background: #fff; }
.problem .num { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.problem h3 { font-size: 19px; font-weight: 600; margin-top: 14px; }
.problem p { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.problem .fix { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; font-weight: 600; }
.problem .fix::before { content: "→ "; color: var(--accent-2); }

/* usługi – wariant listy szczegółowej */
.svc-detail { display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 40px 0; border-top: 1px solid var(--line); }
.svc-detail:last-child { border-bottom: 1px solid var(--line); }
.svc-detail .tag { font-family: var(--mono); font-size: 12px; color: var(--text-2); letter-spacing: .06em; }
.svc-detail h3 { font-size: 26px; font-weight: 600; margin-top: 8px; }
.svc-detail .svc-lead { color: var(--text-2); font-size: 16px; margin-bottom: 20px; }
.svc-detail ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
.svc-detail li { position: relative; padding-left: 20px; font-size: 15px; }
.svc-detail li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--accent-2); }
.svc-detail .service-btn { margin-top: 22px; display: inline-flex; }
.svc-detail .note { margin-top: 16px; font-size: 13px; color: var(--text-2); }

/* co otrzymasz – formaty */
.deliver { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.deliver li { background: var(--ink-2); padding: 26px 22px; }
.deliver .fmt { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .06em; }
.deliver h3 { font-size: 18px; font-weight: 600; margin-top: 12px; color: #fff; }
.deliver p { margin-top: 8px; color: #a9b3ba; font-size: 14px; }

/* blok wyróżniony (np. analizy w MAD Plast) */
.feature { background: var(--ink); color: #fff; border-radius: 10px; padding: 56px; position: relative; overflow: hidden; }
.feature::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px); background-size: 32px 32px; opacity: .25; pointer-events: none; }
.feature > * { position: relative; }
.feature-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; margin-bottom: 40px; }
.feature-head h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; }
.feature-head p { color: #b9c2c8; font-size: 17px; }
.sim-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sim { margin: 0; background: #151a1e; border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.sim svg { width: 100%; height: auto; display: block; }
.sim figcaption { padding: 14px 16px 16px; font-size: 14px; }
.sim figcaption b { display: block; font-weight: 600; margin-bottom: 4px; }
.sim figcaption span { color: #9aa5ad; font-size: 13px; }
.feature-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 24px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.feature-list li { font-size: 14px; color: #d5dbdf; padding-left: 18px; position: relative; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border: 1.5px solid var(--accent); border-radius: 50%; }
.feature-foot { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin-top: 36px; }
.feature-foot small { color: #8b969f; font-size: 13px; max-width: 560px; }

/* przepływ (pipeline) */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.pipeline li { padding: 28px 26px; position: relative; border-right: 1px solid var(--line); }
.pipeline li:last-child { border-right: 0; }
.pipeline li:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 34px; width: 16px; height: 16px; background: #fff; border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: rotate(45deg); z-index: 1; }
.pipeline .stage { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.pipeline h3 { font-size: 20px; font-weight: 600; margin-top: 10px; }
.pipeline p { margin-top: 8px; color: var(--text-2); font-size: 14px; }
.pipeline .fmts { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--text); background: var(--paper-2); display: inline-block; padding: 3px 8px; border-radius: 3px; }

/* materiały */
.mat-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mat-table th, .mat-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mat-table th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); font-weight: 400; }
.mat-table td:first-child { font-weight: 600; white-space: nowrap; }
.mat-table td:nth-child(2) { font-family: var(--mono); font-size: 13px; }
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.split .section-head { margin-bottom: 0; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }

/* grupa checkboxów w formularzu (chipy) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 40px; font-size: 14px; font-weight: 500 !important; cursor: pointer; transition: border-color .15s, background .15s; user-select: none; }
.chips label:hover { border-color: var(--text-2); }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips label::before { content: ""; width: 14px; height: 14px; border: 1.5px solid var(--text-2); border-radius: 3px; flex: none; transition: background .15s, border-color .15s; }
.chips label:has(input:checked) { border-color: var(--text); background: color-mix(in srgb, var(--accent) 22%, #fff); }
.chips label:has(input:checked)::before { background: var(--text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.4 2.3 4.6-5' fill='none' stroke='white' stroke-width='1.8'/%3E%3C/svg%3E") center/10px no-repeat; border-color: var(--text); }
.chips label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.privacy-hint { display: flex; gap: 10px; font-size: 13px; color: var(--text-2); background: var(--paper-2); padding: 12px 14px; border-radius: var(--radius); }
.privacy-hint svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--text-2); stroke-width: 1.8; margin-top: 1px; }

/* powiązane serwisy */
.sister { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.sister a { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: #fff; transition: border-color .2s, transform .2s; }
.sister a:hover { border-color: var(--c); transform: translateY(-2px); }
.sister .sw { width: 12px; height: 44px; border-radius: 2px; background: var(--c); }
.sister b { font-family: var(--font-head); font-size: 20px; display: block; }
.sister span { color: var(--text-2); font-size: 14px; }
.sister .arr { font-size: 22px; color: var(--text-2); }

/* stopka – lista serwisów */
.footer-sites { display: grid; gap: 8px; align-content: start; }
.footer-sites a { display: inline-flex; align-items: center; gap: 10px; }
.footer-sites i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.footer-inner.four { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.footer-head { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); margin-bottom: 6px; }

/* hero – wariant z ilustracją SVG */
.hero-svg { margin: 0; position: relative; }
.hero-svg svg { width: 100%; height: auto; }
.hero-svg figcaption { position: absolute; right: 0; bottom: -24px; font-family: var(--mono); font-size: 11px; color: #67727b; letter-spacing: .06em; text-transform: uppercase; }

/* HUB madshaping.pl */
.hub-hero { padding: 96px 0 56px; }
.hub-hero h1 { font-size: clamp(40px, 5.6vw, 72px); font-weight: 700; letter-spacing: -0.035em; max-width: 900px; }
.hub-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 96px; position: relative; }
.hub-card { --c: var(--accent); display: flex; flex-direction: column; min-height: 420px; padding: 32px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line-dark); color: #fff; text-decoration: none; position: relative; overflow: hidden; transition: border-color .25s, transform .25s; }
.hub-card:hover { border-color: var(--c); transform: translateY(-4px); }
.hub-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c); }
.hub-card .hub-brand { font-family: var(--font-head); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.hub-card .hub-brand em { font-style: normal; color: var(--c); font-weight: 500; }
.hub-card .hub-domain { font-family: var(--mono); font-size: 12px; color: var(--steel); margin-top: 6px; }
.hub-card p { margin-top: 22px; color: #c2cad0; font-size: 16px; }
.hub-card ul { margin: 22px 0 28px; display: grid; gap: 6px; }
.hub-card li { font-size: 14px; color: #dfe4e7; padding-left: 18px; position: relative; }
.hub-card li::before { content: ""; position: absolute; left: 0; top: .7em; width: 9px; height: 2px; background: var(--c); }
.hub-card .go { margin-top: auto; font-weight: 600; display: inline-flex; gap: 8px; color: var(--c); }

@media (max-width: 1024px) {
  .problems { grid-template-columns: repeat(2, 1fr); }
  .deliver { grid-template-columns: repeat(2, 1fr); }
  .feature { padding: 40px 28px; }
  .feature-head { grid-template-columns: 1fr; gap: 16px; }
  .sim-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-list { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline li:nth-child(2) { border-right: 0; }
  .pipeline li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pipeline li::after { display: none; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .hub-cards { grid-template-columns: 1fr; }
  .hub-card { min-height: 0; }
  .footer-inner.four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .problems, .deliver, .sim-grid, .feature-list, .sister { grid-template-columns: 1fr; }
  .svc-detail { grid-template-columns: 1fr; gap: 14px; padding: 32px 0; }
  .svc-detail ul { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline li { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .pipeline li:last-child { border-bottom: 0; }
  .feature { padding: 32px 20px; border-radius: 6px; }
  .hub-hero { padding: 56px 0 36px; }
  .footer-inner.four { grid-template-columns: 1fr; }
}
.scanline { animation: scan 7s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateX(-26px); } to { transform: translateX(26px); } }
@media (prefers-reduced-motion: reduce) { .scanline { animation: none; } }
/* hero – pojedyncze zdjęcie */
.hero-photo { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-dark); aspect-ratio: 4 / 5; max-height: 560px; justify-self: end; width: min(100%, 440px); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo figcaption { position: absolute; left: 16px; bottom: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(32, 39, 44, .75); padding: 6px 10px; border-radius: 3px; }
.hero-photo figcaption b { color: var(--accent); font-weight: 400; }
@media (max-width: 1024px) { .hero-photo { justify-self: start; aspect-ratio: 16 / 10; width: 100%; max-width: 620px; } }
.services.five { grid-template-columns: repeat(3, 1fr); }
.service .service-num { font-family: var(--mono); font-size: 12px; color: var(--text-2); margin-bottom: 18px; display: block; }
.service-hl { background: var(--ink) !important; color: #fff; }
.service-hl > p { color: #b9c2c8 !important; }
.service-hl li { color: #e3e8eb; }
.service-hl .service-num { color: var(--accent); }
.service-hl .service-btn { color: #fff; }
.hero-visual.two { grid-template-columns: repeat(2, 1fr); max-width: 460px; justify-self: end; width: 100%; }
.hero-visual.two .tile:nth-child(2) { margin-top: 56px; }
@media (max-width: 1024px) { .hero-visual.two { justify-self: start; } }

/* ===== v2: logo MAD Shaping, powrót do strony głównej, ludzie, realizacje, analizy ===== */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo img { height: 38px; width: auto; }
.brand-site { font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .12em; color: var(--accent); text-decoration: none; padding-left: 12px; border-left: 1px solid var(--line-dark); line-height: 28px; }
.brand-site:hover { color: #fff; }
.site-footer .brand { margin-bottom: 10px; }
.nav-home { display: inline-flex; align-items: center; gap: 6px; }
.nav-home svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

.person-card { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.person-card img, .avatar-ph { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-ph { display: grid; place-items: center; background: var(--ink); color: var(--accent); font-family: var(--font-head); font-size: 26px; font-weight: 700; }
.person-card b { display: block; font-size: 17px; }
.person-card span { display: block; font-size: 14px; color: var(--text-2); }
.person-card .person-label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* realizacje */
.cases { display: grid; gap: 24px; }
.case { display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.case-media { background: var(--ink-2); min-height: 320px; position: relative; display: grid; place-items: center; }
.case-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.case-media .ph { color: #8b969f; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: 24px; border: 1px dashed var(--line-dark); border-radius: 6px; }
.case-body { padding: 36px; }
.case-body .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.case-body .tags span { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 3px; background: var(--paper-2); color: var(--text-2); }
.case-body h3 { font-size: 24px; font-weight: 600; }
.case-body dl { margin: 22px 0 0; display: grid; gap: 14px; }
.case-body dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.case-body dd { margin: 4px 0 0; font-size: 15px; }
.case.is-draft { border-style: dashed; }
.case.is-draft .case-body h3::after { content: "w przygotowaniu"; margin-left: 10px; vertical-align: middle; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .06em; padding: 3px 8px; border-radius: 3px; background: var(--accent); color: var(--accent-ink); }

/* O nas (strona główna) */
.hub-logo { display: block; width: min(420px, 80vw); height: auto; margin-bottom: 36px; image-rendering: auto; }
.about { padding: 96px 0; background: var(--paper); color: var(--text); }
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 8px; }
.member { display: grid; grid-template-columns: 140px 1fr; gap: 26px; padding: 28px; border: 1px solid var(--line); border-radius: 10px; }
.member img, .member .avatar-ph { width: 140px; height: 140px; border-radius: 8px; object-fit: cover; font-size: 44px; }
.member h3 { font-size: 22px; font-weight: 600; }
.member .role { margin-top: 4px; color: var(--text-2); font-size: 14px; font-family: var(--mono); letter-spacing: .02em; }
.member p { margin-top: 14px; font-size: 15px; color: var(--text); }
.member .area { margin-top: 14px; display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; text-decoration: none; }
.member .area i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* piramida tworzyw */
.pyramid { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 12px; }
.pyramid svg { width: 100%; height: auto; display: block; }
.pyramid figcaption { font-size: 13px; color: var(--text-2); margin-top: 8px; }

/* analizy – obrazy wyników */
.sim .sim-img { background: #fff; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.sim .sim-img img { width: 100%; height: 100%; object-fit: contain; }
.feature-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.feature-groups h3 { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.feature-groups .feature-list { margin: 0; padding: 0; border: 0; grid-template-columns: 1fr 1fr; }

@media (max-width: 1024px) {
  .case { grid-template-columns: 1fr; }
  .case-media { min-height: 240px; }
  .team { grid-template-columns: 1fr; }
  .feature-groups { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .brand-logo img { height: 32px; }
  .brand-site { font-size: 13px; padding-left: 10px; }
  .member { grid-template-columns: 1fr; }
  .member img, .member .avatar-ph { width: 96px; height: 96px; font-size: 32px; }
  .case-body { padding: 24px; }
  .feature-groups .feature-list { grid-template-columns: 1fr; }
}
.person-card .avatar-ph { display: grid; color: var(--accent); font-size: 26px; }

/* ===== realizacja – etapy i galeria ===== */
a.case-media { display: block; cursor: zoom-in; }
.case-media-light { background: #f2f2f2; }
.case-media-light img { object-fit: contain; padding: 12px; }
.case-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.case-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.case-step h4 { font-family: var(--font-head); font-size: 17px; font-weight: 600; margin: 0; display: flex; gap: 10px; align-items: baseline; }
.case-step h4 span { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--accent-2); }
.case-step p { font-size: 13px; color: var(--text-2); margin: 6px 0 14px; min-height: 3.6em; }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.thumbs a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: #f2f2f2; cursor: zoom-in; }
.thumbs a:only-child, .thumbs a:first-child:nth-last-child(3) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.thumbs a:hover img { transform: scale(1.05); }

/* lightbox */
.lightbox { margin: 0; position: fixed; inset: 0; z-index: 200; background: rgba(15, 19, 22, .94); display: grid; grid-template-rows: 1fr auto; padding: 56px 64px 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; align-self: center; justify-self: center; border-radius: 4px; background: #fff; }
.lightbox figcaption { color: #d5dbdf; text-align: center; font-size: 14px; padding-top: 14px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: var(--accent); color: var(--accent-ink); }
.lightbox .lb-close { top: 12px; right: 16px; }
.lightbox .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 1024px) { .case-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .case-steps { grid-template-columns: 1fr; }
  .case-step p { min-height: 0; }
  .lightbox { padding: 56px 8px 16px; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 12px; transform: none; }
}

/* ===== galeria realizacji: zdjęcie główne + miniatury, automatyczne przewijanie ===== */
.case-slider { display: flex; flex-direction: column; background: #f2f2f2; min-height: 0; place-items: stretch; }
.slide-main { position: relative; display: block; flex: 1; min-height: 340px; cursor: zoom-in; overflow: hidden; }
.slide-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: opacity .35s ease; }
.slide-main img.is-fading { opacity: 0; }
.slide-cap { position: absolute; left: 12px; bottom: 12px; right: 12px; display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: #fff; background: rgba(32, 39, 44, .78); padding: 7px 11px; border-radius: 4px; width: fit-content; max-width: calc(100% - 24px); }
.slide-cap b { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--accent); white-space: nowrap; }
.slide-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); }
.case-slider.is-playing .slide-progress { animation: slideProgress var(--slide-ms, 4000ms) linear forwards; }
@keyframes slideProgress { from { width: 0; } to { width: 100%; } }
.slide-thumbs { display: flex; gap: 6px; padding: 10px 12px 12px; overflow-x: auto; scrollbar-width: thin; background: #e9ebec; }
.slide-thumb { flex: none; width: 72px; height: 50px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: #fff; cursor: pointer; opacity: .65; transition: opacity .2s, border-color .2s; }
.slide-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-thumb:hover { opacity: 1; }
.slide-thumb.is-active { opacity: 1; border-color: var(--accent-2); }
.slide-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) { .slide-main { min-height: 240px; } .slide-thumb { width: 60px; height: 42px; } }
.case-slider .slide-thumb img { position: static; inset: auto; width: 100%; height: 100%; object-fit: cover; padding: 0; }
.case-slider .slide-main img { position: absolute; inset: 0; }
.case > * { min-width: 0; }
