/* VXN — wdrożenia AI. Jeden arkusz dla całej strony. */

@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  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;
}

/* ---------- Tokeny ---------- */
:root {
  color-scheme: light;
  --paper: #f5f6f4;
  --surface: #ffffff;
  --sunken: #eceee9;
  --ink: #181b21;
  --muted: #535a66;
  --line: #d6d9d2;
  --signal: #e8590c;
  --on-signal: #181b21;
  --signal-text: #b23a06;
  --data: #0e5a6b;
  --data-bg: #e1eff1;
  --mark: #ffe2cc;
  --ok: #1f6b3a;
  --err: #a8201a;
  --focus: #0e5a6b;

  --font-display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.2vw, 2.75rem);
  --step-4: clamp(2.4rem, 1.5rem + 4.2vw, 4.5rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --wrap: 72rem;
  --r-s: 6px;
  --r-m: 12px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #13161b;
  --surface: #1b1f26;
  --sunken: #0f1115;
  --ink: #eceef1;
  --muted: #a6adb8;
  --line: #2d333c;
  --signal: #ff7a33;
  --on-signal: #13161b;
  --signal-text: #ff9b5e;
  --data: #72d1dd;
  --data-bg: #12323a;
  --mark: #5a2c10;
  --ok: #7fd49a;
  --err: #ff8f86;
  --focus: #72d1dd;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #13161b;
    --surface: #1b1f26;
    --sunken: #0f1115;
    --ink: #eceef1;
    --muted: #a6adb8;
    --line: #2d333c;
    --signal: #ff7a33;
    --on-signal: #13161b;
    --signal-text: #ff9b5e;
    --data: #72d1dd;
    --data-bg: #12323a;
    --mark: #5a2c10;
    --ok: #7fd49a;
    --err: #ff8f86;
    --focus: #72d1dd;
  }
}

/* ---------- Baza ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--signal-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--mark); color: var(--ink); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--step-4); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.25; }
p { text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.measure { max-width: 38rem; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; border-radius: var(--r-s);
}
.skip-link:focus { top: 1rem; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.35rem;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn-primary { background: var(--signal); color: var(--on-signal); }
.btn-primary:hover { background: color-mix(in srgb, var(--signal) 86%, var(--ink)); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- Nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { width: 2rem; height: 2rem; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; }
.brand-sub { color: var(--muted); font-size: var(--step--1); display: none; }
@media (min-width: 40rem) { .brand-sub { display: inline; } }

.nav-menu { display: flex; align-items: center; gap: 0.25rem; list-style: none; padding: 0; }
.nav-menu a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.8rem;
  color: var(--ink); text-decoration: none; border-radius: 999px; font-weight: 550;
}
.nav-menu a:hover { background: var(--sunken); }
.nav-menu a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.nav-menu .nav-cta { background: var(--ink); color: var(--paper); margin-left: 0.25rem; }
.nav-menu .nav-cta:hover { background: color-mix(in srgb, var(--ink) 85%, var(--signal)); }

.icon-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: none;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.menu-toggle { display: none; }

@media (max-width: 56rem) {
  .menu-toggle { display: inline-grid; }
  .nav-menu {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { min-height: 3rem; font-size: 1.125rem; }
  .nav-menu .nav-cta { justify-content: center; margin: 0.5rem 0 0; }
}

/* ---------- Sekcje ---------- */
.section { padding-block: clamp(4rem, 3rem + 5vw, 7.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); max-width: 44rem; }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(3.5rem, 2rem + 5vw, 6rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 4.5rem); align-items: center; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } .hero h1 { font-size: clamp(2.6rem, 0.6rem + 4.1vw, 4.5rem); } }
.hero h1 { max-width: 15ch; }
.hero-lead { margin-top: 1.5rem; font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-note { margin-top: 1.25rem; font-size: var(--step--1); color: var(--muted); }

/* Panel transformacji: e-mail -> dane */
.xform {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -32px color-mix(in srgb, var(--ink) 45%, transparent);
  overflow: hidden;
}
.xform-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); background: var(--sunken);
  font-size: var(--step--1); color: var(--muted);
}
.xform-bar strong { color: var(--ink); font-weight: 600; }
.xform-mail { padding: 1.1rem 1.1rem 1.25rem; font-size: 0.95rem; line-height: 1.6; }
.xform-mail .from { color: var(--muted); font-size: var(--step--1); margin-bottom: 0.5rem; }
.xform-mail mark {
  background: transparent; color: inherit; border-radius: 3px; padding: 0 0.1em;
  box-shadow: inset 0 -0.45em 0 transparent; transition: box-shadow .45s ease;
}
.xform-mail mark.on { box-shadow: inset 0 -0.45em 0 var(--mark); }
.xform-out { border-top: 1px dashed var(--line); background: var(--data-bg); padding: 1rem 1.1rem 1.15rem; }
.xform-out dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; font-size: 0.92rem; }
.xform-out dt { color: var(--muted); }
.xform-out dd { font-weight: 600; color: var(--data); min-height: 1.4em; }
.xform-out dd span { opacity: 0; transition: opacity .35s ease; }
.xform-out dd.on span { opacity: 1; }
.xform-reply { grid-column: 1 / -1; margin-top: 0.5rem; padding-top: 0.6rem; border-top: 1px solid color-mix(in srgb, var(--data) 25%, transparent); }
.xform-reply p { color: var(--ink); font-weight: 400; font-size: 0.92rem; opacity: 0; transition: opacity .5s ease; }
.xform-reply.on p { opacity: 1; }
.pill { display: inline-block; padding: 0.05rem 0.55rem; border-radius: 999px; background: var(--surface); border: 1px solid currentColor; font-size: 0.82rem; }
.no-js .xform mark, .xform.done mark { box-shadow: inset 0 -0.45em 0 var(--mark); }
.no-js .xform-out dd span, .no-js .xform-reply p, .xform.done dd span, .xform.done .xform-reply p { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .xform mark { box-shadow: inset 0 -0.45em 0 var(--mark); transition: none; }
  .xform-out dd span, .xform-reply p { opacity: 1; transition: none; }
}

/* ---------- Usługi (wiersze, nie karty) ---------- */
.services { list-style: none; padding: 0; border-top: 2px solid var(--ink); }
.service {
  display: grid; gap: 0.75rem 2rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line);
}
@media (min-width: 52rem) { .service { grid-template-columns: 17rem 1fr 13rem; align-items: start; } }
.service h3 { font-size: var(--step-2); line-height: 1.1; }
.service p { color: var(--muted); max-width: 40rem; }
.service .fits { margin-top: 0.6rem; font-size: var(--step--1); color: var(--muted); }
.service .fits b { color: var(--ink); font-weight: 600; }
.service-link { font-weight: 600; justify-self: start; }
@media (min-width: 52rem) { .service-link { justify-self: end; text-align: right; } }

/* ---------- Proces (to jest sekwencja) ---------- */
.steps { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: step; }
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { counter-increment: step; padding: 1.5rem 1.5rem 1.75rem 0; border-top: 2px solid var(--ink); position: relative; }
@media (min-width: 52rem) { .step + .step { padding-left: 1.5rem; border-left: 1px solid var(--line); } }
.step::before {
  content: counter(step); display: block; margin-bottom: 1rem;
  font-family: var(--font-display); font-size: 3rem; font-weight: 300; line-height: 1; color: var(--signal-text);
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.98rem; }
.step .deliv { margin-top: 0.75rem; font-size: var(--step--1); color: var(--ink); }

/* ---------- Demo (zaproszenie) ---------- */
.demo-band { background: var(--ink); color: var(--paper); }
.demo-band .section-head p { color: color-mix(in srgb, var(--paper) 72%, var(--ink)); }
.demo-band a:not(.btn) { color: var(--signal); }
.demo-list { list-style: none; padding: 0; display: grid; gap: 1px; background: color-mix(in srgb, var(--paper) 18%, var(--ink)); border: 1px solid color-mix(in srgb, var(--paper) 18%, var(--ink)); border-radius: var(--r-m); overflow: hidden; }
@media (min-width: 46rem) { .demo-list { grid-template-columns: 1fr 1fr; } }
.demo-list li { background: var(--ink); padding: 1.5rem; }
.demo-list h3 { margin-bottom: 0.4rem; }
.demo-list p { color: color-mix(in srgb, var(--paper) 72%, var(--ink)); font-size: 0.98rem; }
.demo-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.demo-band .btn-primary { color: #13161b; }
.demo-band .fine { font-size: var(--step--1); color: color-mix(in srgb, var(--paper) 72%, var(--ink)); }

/* ---------- Realizacje ---------- */
.cases { display: grid; gap: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.case { display: grid; gap: 1.25rem 3rem; }
@media (min-width: 56rem) { .case { grid-template-columns: 1fr 1fr; } }
.case-meta { font-size: var(--step--1); color: var(--muted); margin-bottom: 0.5rem; }
.case h3 { font-size: var(--step-2); margin-bottom: 0.75rem; }
.case p + p { margin-top: 0.6rem; }
.case blockquote {
  align-self: start; padding: 1.25rem 0 0 1.5rem; border-left: 3px solid var(--signal);
  font-family: var(--font-display); font-size: var(--step-1); line-height: 1.4; font-weight: 450; letter-spacing: -0.005em;
}
.case blockquote footer { margin-top: 0.85rem; font-family: var(--font-body); font-size: var(--step--1); color: var(--muted); }
.case blockquote footer b { color: var(--ink); font-weight: 600; }

/* ---------- Bezpieczeństwo ---------- */
.facts { display: grid; gap: 1.5rem 2.5rem; list-style: none; padding: 0; }
@media (min-width: 46rem) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts li { padding-left: 1.75rem; position: relative; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 0.85rem; height: 0.85rem;
  border: 2px solid var(--data); border-radius: 3px;
  background: linear-gradient(var(--data), var(--data)) center / 0.35rem 0.35rem no-repeat;
}
.facts b { display: block; font-weight: 650; margin-bottom: 0.2rem; }
.facts span { color: var(--muted); }

/* ---------- O mnie ---------- */
.about { display: grid; gap: 2rem 3rem; align-items: start; }
@media (min-width: 52rem) { .about { grid-template-columns: 15rem 1fr; } }
.about img { width: 100%; max-width: 15rem; aspect-ratio: 864 / 1184; object-fit: cover; border-radius: var(--r-m); background: var(--sunken); }
.about h2 { margin-bottom: 1.25rem; }
.about p + p { margin-top: 0.9rem; }
.timeline { margin-top: 1.75rem; list-style: none; padding: 0; display: grid; gap: 0.6rem; font-size: 0.98rem; }
.timeline li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- FAQ ---------- */
.faq { border-top: 2px solid var(--ink); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 650; font-size: var(--step-1); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 0.7rem; height: 0.7rem; margin-right: 0.3rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-25%);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-25%); }
.faq .answer { padding: 0 0 1.4rem; color: var(--muted); max-width: 44rem; }
.faq .answer p + p { margin-top: 0.6rem; }

/* ---------- Formularze ---------- */
.contact-grid { display: grid; gap: 2.5rem 4rem; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1fr 1.15fr; } }
.contact-direct { margin-top: 1.75rem; display: grid; gap: 0.4rem; font-size: var(--step-1); }
.contact-direct a { font-weight: 600; }
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field label, .label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: var(--step--1); color: var(--muted); }
.input, .textarea, .select {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.9rem;
  background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--ink) 35%, var(--line)); border-radius: var(--r-s);
}
.textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--ink); }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline-offset: 1px; border-color: var(--focus); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--err); }
.field-error { color: var(--err); font-size: var(--step--1); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5rem; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
.consent-note { font-size: var(--step--1); color: var(--muted); }

/* ---------- Stopka ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: 0.95rem; color: var(--muted); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; align-items: flex-start; }
.footer-grid nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-grid a { color: var(--ink); }
.linklike { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

/* ---------- Baner zgody ---------- */
.consent {
  position: fixed; z-index: 60; left: var(--gutter); right: var(--gutter); bottom: var(--gutter);
  max-width: 34rem; margin-left: auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: 0 20px 40px -20px color-mix(in srgb, var(--ink) 50%, transparent);
  padding: 1.15rem 1.25rem;
}
.consent[hidden] { display: none; }
.consent h2 { font-size: var(--step-1); margin-bottom: 0.4rem; }
.consent p { font-size: 0.95rem; color: var(--muted); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; }
.consent .btn { min-height: 2.75rem; padding: 0.5rem 1.1rem; }

/* ---------- Strony tekstowe ---------- */
.prose { max-width: 44rem; }
.prose h1 { font-size: var(--step-3); margin-bottom: 1rem; }
.prose h2 { font-size: var(--step-2); margin: 2.5rem 0 0.75rem; }
.prose p, .prose ul { margin-top: 0.75rem; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.35rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
@media (forced-colors: active) {
  .btn, .icon-btn, .input, .textarea { border: 1px solid ButtonText; }
}
