/* ==========================================================
   Webtivo: wspólny system wizualny (strona główna, /ai, demo, sukces).
   Tokeny w OKLCH na nazwach rdzenia Webtivo. Opis: DESIGN.md.
========================================================== */

/* ==========================================================
   Font: Schibsted Grotesk (SIL OFL 1.1, licencja w /fonts/OFL.txt),
   hostowany lokalnie. Zmienna grubość 400-900, jedna rodzina świadomie:
   hierarchię budują grubość i rozmiar.
========================================================== */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  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;
}

/* ==========================================================
   Tokeny (rdzeń Webtivo, wartości w OKLCH)
   Strategia: Restrained + jedna sekcja w kolorze akcentu (kontakt).
   Akcent to sygnałowy żółty: WYŁĄCZNIE tło / podkreślenie,
   nigdy kolor tekstu na jasnym tle (kontrast ~1.4:1).
========================================================== */
:root {
  --bg:          oklch(0.985 0 0);
  --bg-alt:      oklch(0.955 0 0);
  --surface:     oklch(0.995 0 0);
  --border:      oklch(0.87 0.003 260);
  --border-strong: oklch(0.78 0.004 260);
  --border-input: oklch(0.6 0.005 260);
  --bg-media:    oklch(0.915 0 0);
  --heading-hover: oklch(0.3 0.006 260);
  --heading:     oklch(0.19 0.006 260);
  --text:        oklch(0.32 0.006 260);
  --muted:       oklch(0.46 0.006 260);
  --accent:      oklch(0.885 0.175 95);
  --accent-dark: oklch(0.845 0.17 88);
  --accent-glow: oklch(0.885 0.175 95 / 0.45);
  --on-accent:   var(--heading);
  --danger:      oklch(0.5 0.19 27);
  --ok-bg:       oklch(0.93 0.06 150);
  --ok-text:     oklch(0.36 0.09 150);
  --accent-wash: oklch(0.97 0.04 95);
  --on-ink-muted: oklch(0.85 0 0);

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --shadow-card: 0 1px 0 oklch(0.86 0 0), 0 28px 50px -30px oklch(0.24 0.01 260 / 0.42);
  --shadow-btn:  none;
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --transition:  .22s var(--ease-out);

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-h1:   clamp(2.5rem, 1.35rem + 4.3vw, 4.75rem);
  --fs-h2:   clamp(2rem, 1.35rem + 2.3vw, 3.25rem);
  --fs-h3:   1.3125rem;
  --fs-lead: clamp(1.125rem, 1.05rem + .3vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-xs:    .8125rem;

  --section-y: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --gutter: clamp(1rem, .5rem + 2vw, 2rem);

  --z-header: 100;
  --z-menu:   110;
  --z-skip:   200;
}

/* ==========================================================
   Reset i baza
========================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
  scroll-padding-bottom: 1rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }

a { color: var(--heading); }

::selection { background: var(--accent-glow); color: var(--heading); }

h1, h2, h3 {
  color: var(--heading);
  font-weight: 800;
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-h1);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 820;
}
h2 {
  font-size: var(--fs-h2);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 720;
}
p { text-wrap: pretty; }

.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; fill: currentColor; }

.container {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--tight-bottom { padding-bottom: clamp(3rem, 2rem + 3vw, 4.5rem); }
.section--tight-top { padding-top: clamp(3rem, 2rem + 3vw, 4.5rem); }

.section-head { max-width: 46rem; }
.section-lead {
  margin-top: 1.25rem;
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 40ch;
}

.num { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute; 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: -100px;
  background: var(--heading); color: var(--bg);
  padding: .75rem 1rem; border-radius: var(--radius-md);
  font-weight: 650; text-decoration: none;
  z-index: var(--z-skip);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--heading);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Przycisk wyglądający jak link (akcje na stronie, np. otwarcie polityki) */
.link-button {
  display: inline; padding: 0; border: 0; background: none;
  font: inherit; color: var(--heading); font-weight: 620;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em;
  cursor: pointer;
}
.link-button:hover { background: var(--accent-glow); }

/* Linki w tekście: atrament + podkreślenie; żółte tło na hover */
.text-link {
  color: var(--heading);
  font-weight: 620;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .2em;
  transition: background-color var(--transition);
}
.text-link:hover { background: var(--accent-glow); }

/* ==========================================================
   Przyciski: jeden kształt (radius-md) w całym serwisie
========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px;
  padding: .8rem 1.35rem;
  border-radius: var(--radius-md);
  border: 0;
  font-weight: 650; font-size: 1rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:active { transform: translateY(1px); }
@media (max-width: 420px) {
  .btn { white-space: normal; text-align: center; }
}
.btn .icon { width: 1.05em; height: 1.05em; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dark); }

.btn-quiet {
  background: transparent; color: var(--heading);
  box-shadow: inset 0 0 0 1.5px var(--heading);
}
.btn-quiet:hover { background: var(--heading); color: var(--bg); }

.btn-ink { background: var(--heading); color: var(--bg); }
.btn-ink:hover { background: var(--heading-hover); }

/* ==========================================================
   Nagłówek
========================================================== */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 72px;
}

.logo { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--heading);
  font-weight: 900; font-size: 1.15rem; line-height: 1;
}
.logo-word {
  font-weight: 850; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--heading); line-height: 1;
}
.logo-word b {
  font-weight: inherit;
  background: linear-gradient(transparent 60%, var(--accent) 60% 94%, transparent 94%);
}

.header-actions { display: flex; align-items: center; gap: .5rem; }

.nav-list { display: none; }
.nav-list a {
  display: block;
  text-decoration: none; color: var(--text);
  font-size: var(--fs-small); font-weight: 520;
  padding: .5rem .2rem;
  transition: color var(--transition);
}
.nav-list a:hover { color: var(--heading); }
.nav-list a[aria-current="true"] { color: var(--heading); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; }

.header-tel {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; min-width: 44px; justify-content: center; padding-inline: .6rem;
  text-decoration: none; color: var(--heading);
  font-weight: 680; white-space: nowrap;
  border-radius: var(--radius-md);
}
.header-tel:hover { background: var(--accent-glow); }
.header-tel span { display: none; }

.header-cta { display: none; }

.nav-toggle {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--heading); cursor: pointer;
}
.nav-toggle:hover { background: var(--bg-alt); }
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 899px) {
  #main-nav.nav-open .nav-list {
    display: flex; flex-direction: column;
    position: absolute; left: 0; right: 0; top: 72px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: .75rem var(--gutter) 1.5rem;
    z-index: var(--z-menu);
    box-shadow: 0 24px 40px -24px oklch(0.24 0.01 260 / 0.35);
  }
  #main-nav.nav-open .nav-list a {
    font-size: 1.25rem; font-weight: 650; color: var(--heading);
    padding: .8rem 0;
    border-bottom: 1px solid var(--border);
  }
  #main-nav.nav-open .nav-list li:nth-last-child(2) a { border-bottom: 0; }
  #main-nav.nav-open .nav-list .nav-cta-mobile a {
    margin-top: .75rem; padding: .8rem 1.35rem;
    border-bottom: 0; color: var(--on-accent); font-size: var(--fs-body);
  }
}

@media (min-width: 900px) {
  .nav-list { display: flex; align-items: center; gap: 1.6rem; }
  .nav-cta-mobile { display: none; }
  .nav-toggle { display: none; }
  .header-cta { display: inline-flex; min-height: 44px; padding: .6rem 1.05rem; font-size: var(--fs-small); }
  .header-tel span { display: inline; }
  .header-tel .icon { display: none; }
  .header-actions { gap: 1rem; }
  .site-header .nav-inner { gap: 2rem; }
  #main-nav { margin-left: auto; }
}

.only-desktop { display: none; }
@media (min-width: 900px) {
  .only-mobile { display: none; }
  .only-desktop { display: inline-flex; }
}

/* ==========================================================
   Hero
========================================================== */
.hero { padding-block: clamp(2.75rem, 1.5rem + 5vw, 6rem) clamp(3rem, 1.5rem + 4vw, 5rem); }
.hero-grid {
  display: grid;
  grid-template-areas: "title" "copy" "portrait";
  column-gap: clamp(2.5rem, 5vw, 5rem);
  row-gap: clamp(1.5rem, 3vw, 2.25rem);
}
.hero h1 { grid-area: title; max-width: 20ch; font-size: clamp(2.05rem, 1.15rem + 4.4vw, 3.4rem); }
.hero .hero-copy { grid-area: copy; }
.hero .hero-portrait,
.hero .hero-aside { grid-area: portrait; }
.hero h1 .mark {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 86%;
  background-size: 100% .3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-inline: .03em;
}
.hero-lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 50ch;
}
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: .75rem; }
/* Na telefonie główną akcją jest połączenie, wycena jest drugorzędna */
@media (max-width: 899px) {
  .hero-quote { background: transparent; color: var(--heading); box-shadow: inset 0 0 0 1.5px var(--heading); }
  .hero-quote:hover { background: var(--heading); color: var(--bg); }
}
@media (max-width: 479px) {
  .hero-actions .btn { flex: 1 1 100%; }
}
/* Na małych ekranach wizual dublowałby sekcję Realizacje tuż pod nim */
@media (max-width: 599px) {
  .hero-visual { display: none; }
}

.hero-portrait { max-width: 440px; width: 100%; justify-self: start; }
.portrait-frame {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-alt);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
/* Tymczasowy wizual hero (do czasu aktualnego zdjęcia): jeden czytelny telefon w panelu */
.hero-phone-panel {
  position: relative;
  aspect-ratio: 1 / 1;
  container-type: inline-size;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-media);
}
/* Cały górny kawałek telefonu, kadr kończy się tuż pod przyciskiem „Zadzwoń” z podpisu
   (zrzut 390x844, przycisk kończy się na 73% wysokości ekranu). */
.hero-phone-panel .phone {
  width: 60%;
  top: 1.75rem;
  top: calc(3.26cqw + 13px);
}

/* Gdy ważne przyciski są niżej na ekranie (np. dwa przyciski telefonu na /strona-dla-gabinetu):
   węższy telefon mieści ok. 82% wysokości ekranu zamiast 73% */
.hero-phone-panel--deep .phone { width: 52%; }

.hero-portrait figcaption {
  margin-top: .9rem;
  font-size: var(--fs-small); color: var(--muted); max-width: 36ch;
}
.hero-portrait figcaption strong { color: var(--heading); font-weight: 680; }

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
    grid-template-areas: "title title" "copy portrait";
  }
  .hero h1 { max-width: none; font-size: clamp(2.6rem, 0.3rem + 4.9vw, 4.4rem); }
  .hero-portrait { justify-self: end; }
  /* Wariant z podglądem czatu zamiast portretu (/ai) */
  .hero-grid--chat { grid-template-columns: minmax(0, 1fr) minmax(0, 31rem); }
  .hero .hero-grid--chat h1 { font-size: clamp(2.6rem, 1rem + 3.6vw, 4rem); }
}

/* ==========================================================
   Realizacje: 5 projektów, 5 pól, różne proporcje
========================================================== */
.work-grid {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  gap: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 2.5vw, 2rem);
}
.work-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-media);
  box-shadow: var(--shadow-card);
}
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.media-desktop { aspect-ratio: 16 / 10; }
.media-strip   { aspect-ratio: 16 / 10; }
.media-strip img { object-position: center 78%; }

/* Telefon wyłaniający się z dołu panelu */
.media-phone {
  aspect-ratio: 5 / 4;
  box-shadow: none;
  background: var(--bg-media);
}
.phone {
  position: absolute; top: 8%; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 46%;
  border-radius: 26px 26px 0 0;
  border: 6px solid var(--heading);
  border-bottom: 0;
  overflow: hidden;
  background: var(--heading);
}
.phone img { width: 100%; height: auto; object-fit: initial; }


.work-meta { margin-top: 1.4rem; max-width: 34rem; }
.work-meta h3 { display: inline; }
.work-place {
  margin-top: .2rem;
  color: var(--muted); font-size: var(--fs-small); font-weight: 560;
}
.work-meta p:not(.work-place) { margin-top: .6rem; }
.work-link {
  margin-top: .8rem;
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 650; color: var(--heading);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em;
  min-height: 44px;
  transition: background-color var(--transition);
}
.work-link:hover { background: var(--accent-glow); }
.work-link .icon { width: .95em; height: .95em; }

.work { min-width: 0; }
.work-link { overflow-wrap: anywhere; }

@media (min-width: 900px) {
  .work-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: 0;
  }
  .work {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 0;
    margin-bottom: clamp(3rem, 6vw, 4.5rem);
  }
  .work:last-child { margin-bottom: 0; }
  .work--feature   { grid-column: 1 / 9; }
  .work--tall      { grid-column: 9 / 13; }
  .work--tall-left { grid-column: 1 / 5; }
  .work--wide      { grid-column: 5 / 13; }
  .work--strip     { grid-column: 1 / 13; }
  .media-strip     { aspect-ratio: 21 / 8; }
  .media-phone     { aspect-ratio: auto; min-height: 22rem; }
  .phone           { width: 62%; top: 9%; }
}
@media (max-width: 899px) {
  .media-phone { aspect-ratio: 16 / 10; }
  .media-phone .phone { width: 40%; }
}
@media (max-width: 599px) {
  .media-desktop,
  .media-strip,
  .media-phone { aspect-ratio: 2 / 1; }
  .work--compact {
    order: 1;
    display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0 1rem; align-items: start;
  }
  .work--compact .work-media { aspect-ratio: 1 / 1; border-radius: var(--radius-md); }
  .work--compact .phone { width: 62%; top: 12%; border-width: 3px; border-radius: var(--radius-md) var(--radius-md) 0 0; }
  .work--compact .work-meta { margin-top: 0; }
  .work--compact .work-meta h3 { font-size: var(--fs-lead); }
  .work--compact .work-meta p:not(.work-place) { display: none; }
  .work--compact .work-link { margin-top: .2rem; font-size: var(--fs-small); }
}

/* Odsłanianie zrzutów: domyślnie WIDOCZNE; animacja odpala się jednorazowo,
   gdy zrzut dojeżdża do ekranu (karta w tle / renderer bez JS = brak ukrycia) */
@media (prefers-reduced-motion: no-preference) {
  .work-media.is-in { animation: shot-in .9s var(--ease-out) both; }
  @keyframes shot-in {
    from { clip-path: inset(6% 6% 6% 6% round var(--radius-lg)); opacity: 0; transform: translateY(18px); }
    to   { clip-path: inset(0 0 0 0 round var(--radius-lg)); opacity: 1; transform: none; }
  }
}

/* ==========================================================
   Usługi: cennik, nie siatka kart (strona główna i /ai)
========================================================== */
.incl {
  margin-top: 1.1rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
  font-size: var(--fs-small); color: var(--text);
}
.incl li { display: inline-flex; align-items: center; gap: .4rem; }
.incl .icon { width: 1em; height: 1em; color: var(--heading); }

.price-from { display: block; font-size: var(--fs-small); color: var(--muted); font-weight: 560; }
.price-unit { font-size: 1rem; font-weight: 620; letter-spacing: 0; font-variant-numeric: normal; }
.price-foot { margin-top: 1.5rem; font-size: var(--fs-small); color: var(--muted); max-width: 64ch; }
.price-foot strong { color: var(--heading); font-weight: 680; }

/* Tablica cennika: nazwa, kropkowa prowadnica i cena w jednej linii, jak w warsztacie */
.price-board {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 2px solid var(--heading);
}
.board-row {
  padding-block: clamp(1.5rem, 2.5vw, 2rem);
  border-bottom: 1px solid var(--border-strong);
}
.board-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem;
}
.board-head h3 { font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem); }
.board-opt { font-size: var(--fs-small); font-weight: 520; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.leader {
  display: none;
  flex: 1 1 3rem; min-width: 3rem;
  border-bottom: 2px dotted var(--border-input);
  transform: translateY(-.3em);
}
.board-price { color: var(--heading); white-space: nowrap; }
.board-price .price-from { display: inline; font-size: var(--fs-small); margin-right: .15rem; }
.board-amount {
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem);
  font-weight: 820; letter-spacing: -0.02em; line-height: 1.1;
}
.board-price .price-unit { font-size: var(--fs-small); }
.board-row--main .board-amount {
  background: linear-gradient(transparent 62%, var(--accent) 62% 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.board-desc { margin-top: .6rem; max-width: 56ch; }
.board-row .incl { margin-top: .9rem; }
@media (min-width: 640px) {
  .board-head { flex-wrap: nowrap; }
  .board-head h3 { flex: 0 1 auto; }
  .leader { display: block; }
}

/* ==========================================================
   AI: podgląd prawdziwego demo
========================================================== */
.ai-grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.ai-grid > * { min-width: 0; }
.ai-more { margin-top: 1.25rem; max-width: 46ch; }
/* Trzy narzędzia AI: lista z linią atramentu, jak cennik, bez kart i ikon */
.ai-tools { margin-top: 2rem; border-top: 2px solid var(--heading); max-width: 40rem; }
.ai-tools li { padding-block: 1.1rem; border-bottom: 1px solid var(--border-strong); }
.ai-tools p { margin-top: .4rem; max-width: 52ch; }
.ai-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.ai-actions .text-link { display: inline-flex; align-items: center; min-height: 44px; }

.chat {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--heading); color: var(--bg);
}
.chat-head strong { font-weight: 680; font-size: 1rem; }
.chat-head span { font-size: var(--fs-xs); color: var(--on-ink-muted); }
.chat-log {
  display: flex; flex-direction: column; gap: .75rem;
  padding: 1.25rem;
}
@media (min-width: 960px) {
  .chat-log { max-height: 32rem; overflow-y: auto; }
}
.msg {
  max-width: 88%;
  padding: .8rem 1rem;
  border-radius: var(--radius-lg);
  font-size: var(--fs-small); line-height: 1.5;
  color: var(--heading);
}
.msg strong { font-weight: 700; }
.msg ul { margin-top: .4rem; display: grid; gap: .15rem; }
.msg-bot { align-self: flex-start; background: var(--bg-alt); border-bottom-left-radius: 4px; }
.msg-user { align-self: flex-end; background: var(--accent); border-bottom-right-radius: 4px; font-weight: 560; }
.typing { display: inline-flex; gap: 4px; padding: 1rem; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .35; }
@media (prefers-reduced-motion: no-preference) {
  .typing i { animation: dot 1s var(--ease-out) infinite; }
  .typing i:nth-child(2) { animation-delay: .15s; }
  .typing i:nth-child(3) { animation-delay: .3s; }
  @keyframes dot { 0%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
  .msg.is-new { animation: msg-in .45s var(--ease-out) both; }
  @keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
.chat-ask {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}
.chat-ask p { font-size: var(--fs-xs); color: var(--muted); font-weight: 560; }
.chat-ask .chat-done { font-size: var(--fs-small); color: var(--text); }
.chips { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  min-height: 44px;
  padding: .55rem .85rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--heading);
  background: transparent; color: var(--heading);
  font-size: var(--fs-small); font-weight: 600; text-align: left;
  cursor: pointer;
  transition: background-color var(--transition);
}
.chip:hover { background: var(--accent); }
.chip:disabled { opacity: .4; cursor: default; background: transparent; }
.chat-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  margin-top: 1rem;
  font-size: var(--fs-xs); color: var(--muted);
}
.chat-foot a { font-size: var(--fs-small); display: inline-flex; align-items: center; min-height: 44px; }

@media (min-width: 960px) {
  .ai-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .chat { position: sticky; top: 104px; }
}

/* ==========================================================
   Jak pracuję: prawdziwa sekwencja, więc numeracja ma sens
========================================================== */
.steps {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid; gap: 2.5rem clamp(1.5rem, 3vw, 2.5rem);
  counter-reset: step;
}
.steps li { border-top: 2px solid var(--heading); padding-top: 1.25rem; }
.step-no {
  display: block;
  font-size: clamp(2.25rem, 1.75rem + 1.6vw, 3.1rem);
  font-weight: 820; line-height: 1;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}
.steps h3 { margin-top: 1rem; }
.steps p { margin-top: .6rem; max-width: 34ch; }
.after-steps {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-strong);
  max-width: 62ch;
  font-size: var(--fs-lead); line-height: 1.5;
}
.after-steps strong { color: var(--heading); }

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ==========================================================
   FAQ
========================================================== */
.faq-wrap { display: grid; gap: 2.5rem; }
.faq-list { border-top: 1px solid var(--border-strong); }
.faq-item { border-bottom: 1px solid var(--border-strong); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  padding: 1.35rem 0;
  cursor: pointer; list-style: none;
  font-size: 1.15rem; font-weight: 680; line-height: 1.35;
  color: var(--heading);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon {
  width: 22px; height: 22px;
  transition: transform var(--transition);
}
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item summary:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
.faq-answer { padding-bottom: 1.5rem; max-width: 62ch; }

@media (min-width: 900px) {
  .faq-wrap { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; }
  .faq-wrap .section-head { position: sticky; top: 6.5rem; align-self: start; }
}

/* ==========================================================
   Kontakt: jedyna sekcja w kolorze akcentu
========================================================== */
.contact { background: var(--accent); color: var(--heading); }
.contact h2 { color: var(--heading); }
.contact-grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.contact-copy p { margin-top: 1.25rem; font-size: var(--fs-lead); line-height: 1.5; max-width: 34ch; }
.big-tel {
  display: inline-flex; align-items: center; gap: .9rem;
  margin-top: 2.25rem;
  color: var(--heading); text-decoration: none;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
  font-weight: 850; letter-spacing: -0.02em; line-height: 1;
  font-variant-numeric: tabular-nums;
  padding-block: .35rem;
}
.big-tel .icon { width: .7em; height: .7em; }
.contact-copy .tel-hours { margin-top: .4rem; font-size: var(--fs-body); font-weight: 600; color: var(--heading); }
.big-tel:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: .12em; }
.contact-lines { margin-top: 1.5rem; display: grid; gap: .6rem; }
.contact-lines li { display: flex; align-items: flex-start; gap: .6rem; }
.contact-lines .icon { margin-top: .2em; }
.contact-lines a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -.6rem; font-weight: 650; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }

.form-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  box-shadow: 0 30px 60px -36px oklch(0.25 0.06 80 / 0.55);
}
.form-panel h3 { margin-bottom: 1.25rem; }
.contact-form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; align-items: start; }
.pair-legend { padding: 0; margin-bottom: .7rem; font-size: var(--fs-small); font-weight: 650; color: var(--heading); }
.pair-legend .optional { font-weight: 480; color: var(--text); }
.form-group { display: grid; gap: .4rem; }
.form-group label { font-size: var(--fs-small); font-weight: 650; color: var(--heading); }
.form-group .optional { font-weight: 480; color: var(--muted); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  min-height: 48px;
  padding: .75rem .9rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-input);
  background: var(--surface);
  color: var(--heading);
  font: inherit; font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none; appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%23202226' d='M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 16px;
  padding-right: 2.5rem;
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); opacity: 1; }
.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover { border-color: var(--heading); }
.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 2px;
  border-color: var(--heading);
}
.form-group [aria-invalid="true"] { border-color: var(--danger); }
.form-group [aria-invalid="true"]:focus-visible { outline-color: var(--danger); border-color: var(--danger); }
.field-error { font-size: var(--fs-small); font-weight: 600; color: var(--danger); }
.field-hint { font-size: var(--fs-xs); color: var(--muted); }
.contact-pair { border: 0; padding: 0; margin: 0; min-width: 0; }
.contact-pair > .field-hint,
.contact-pair > .field-error { grid-column: 1 / -1; margin-top: -.5rem; }

.rodo-note {
  font-size: var(--fs-xs); line-height: 1.55; color: var(--muted); max-width: 60ch;
}
.rodo-note .link-button { font-weight: 600; }
.rodo-note strong { color: var(--text); font-weight: 650; }
.rodo-note a { color: var(--heading); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.form-next { font-size: var(--fs-small); color: var(--muted); }
.form-submit[disabled] { opacity: .7; cursor: progress; }

@media (min-width: 560px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

/* ==========================================================
   Stopka
========================================================== */
.site-footer { padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-brand p { margin-top: 1rem; max-width: 34ch; font-size: var(--fs-small); color: var(--muted); }
.footer-col h2 {
  font-size: 1rem; letter-spacing: 0; font-weight: 700;
  margin-bottom: .9rem;
}
.footer-col ul { display: grid; gap: .35rem; }
.footer-col a, .footer-col p { font-size: var(--fs-small); color: var(--text); }
.footer-col a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.footer-col ul { gap: 0; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: .2em; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem;
  font-size: var(--fs-xs); color: var(--muted);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.footer-bottom .link-button { color: var(--muted); font-weight: 400; min-height: 44px; }
.footer-bottom .link-button:hover { color: var(--heading); background: none; }
.footer-bottom a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.footer-bottom a:hover { color: var(--heading); }

@media (max-width: 767px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.25rem; }
  .footer-brand,
  .footer-col--area { grid-column: 1 / -1; }
  .footer-col--area { grid-row: 3; }
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
@media (min-width: 768px) and (pointer: fine) {
  .footer-col a { min-height: 0; padding-block: .3rem; }
  .footer-col h2 { margin-bottom: .6rem; }
}

/* ==========================================================
   Pasek telefonu (tylko małe ekrany)
========================================================== */
.call-bar { display: none; }
@media (max-width: 899px) {
  .call-bar {
    position: fixed; left: .75rem; right: .75rem; bottom: .75rem;
    z-index: var(--z-header);
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    min-height: 52px;
    border-radius: var(--radius-md);
    background: var(--heading); color: var(--bg);
    font-weight: 700; text-decoration: none;
    box-shadow: 0 14px 30px -12px oklch(0.2 0.01 260 / 0.5);
    transform: translateY(calc(100% + 1rem));
    visibility: hidden;
    transition: transform .35s var(--ease-out), visibility 0s .35s;
  }
  .call-bar .icon { color: var(--accent); }
  .call-bar.is-visible {
    transform: none; visibility: visible;
    transition: transform .35s var(--ease-out), visibility 0s 0s;
  }
  .site-footer { padding-bottom: 5.5rem; }
  html { scroll-padding-bottom: 5.5rem; }
}

/* ==========================================================
   Polityka prywatności (<dialog>)
========================================================== */
#privacy-dialog {
  margin: auto;
  width: min(720px, 100% - 2rem);
  max-height: min(85vh, 900px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 40px 80px -30px oklch(0.15 0.01 260 / 0.5);
}
#privacy-dialog::backdrop { background: oklch(0.2 0.006 260 / 0.55); }
.dialog-header {
  position: sticky; top: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.dialog-header h2 { font-size: 1.25rem; letter-spacing: -0.01em; }
.btn-dialog-close {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 0; border-radius: var(--radius-md);
  background: var(--bg-alt); color: var(--heading); cursor: pointer;
}
.btn-dialog-close:hover { background: var(--accent); }
.btn-dialog-close .icon { width: 20px; height: 20px; }
.dialog-body { padding: 1.5rem; font-size: var(--fs-small); line-height: 1.65; }
.dialog-body h3 { font-size: var(--fs-body); margin: 1.5rem 0 .4rem; }
.dialog-body h3:first-child { margin-top: 0; }
.dialog-body p { margin-bottom: .6rem; }
.dialog-body ul { list-style: disc; padding-left: 1.3rem; display: grid; gap: .35rem; margin-bottom: .6rem; }
.dialog-body strong { color: var(--heading); }

/* ==========================================================
   Podstrony branżowe i lokalne (/strona-dla-warsztatu, /strony-internetowe-wolomin)
========================================================== */
/* Realizacja z opisem: zrzut + co było ważne i co zrobiłem. Każda w tym samym układzie, bez zygzaka. */
.cases { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; gap: clamp(3.5rem, 7vw, 5.5rem); }
.case { display: grid; gap: 1.5rem clamp(2rem, 4vw, 3.5rem); align-items: start; }
.case > * { min-width: 0; }
.case .work-meta { margin-top: 0; }
.case-why { margin-top: .9rem; max-width: 46ch; }
.case-did { margin-top: 1.25rem; border-top: 2px solid var(--heading); }
.case-did li {
  display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: .7rem;
  padding-block: .8rem;
  border-bottom: 1px solid var(--border-strong);
}
.case-did .icon { width: 1.1rem; height: 1.1rem; margin-top: .25em; color: var(--heading); }
.case .work-link { margin-top: 1.25rem; }
@media (min-width: 900px) {
  .case { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

/* Lista „co musi mieć”: dwie kolumny tekstu z linią atramentu, bez kart i ikon */
.checklist {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid; gap: 2.25rem clamp(1.5rem, 4vw, 4rem);
}
.checklist li { border-top: 2px solid var(--heading); padding-top: 1.25rem; }
.checklist p { margin-top: .6rem; max-width: 46ch; }
@media (min-width: 768px) { .checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Hero strony lokalnej: miejscowości, do których dojeżdżam, zamiast zrzutu */
.towns {
  max-width: 26rem; width: 100%;
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
}
.towns h2 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
.towns ul {
  margin-top: 1rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem;
  border-top: 2px solid var(--heading);
}
.towns li { padding-block: .6rem; border-bottom: 1px solid var(--border-strong); font-weight: 620; color: var(--heading); }
.towns p { margin-top: 1rem; font-size: var(--fs-small); color: var(--muted); }
@media (min-width: 900px) { .towns { justify-self: end; } }

/* ==========================================================
   Polityka prywatności jako osobna strona (/polityka-prywatnosci)
========================================================== */
.legal { max-width: 46rem; }
.legal h1 { font-size: var(--fs-h2); }
.legal-updated { margin-top: 1rem; font-size: var(--fs-small); color: var(--muted); }
.legal-body { margin-top: clamp(2rem, 4vw, 3rem); border-top: 2px solid var(--heading); padding-top: clamp(1.5rem, 3vw, 2rem); }
.legal-body h2 { font-size: var(--fs-h3); letter-spacing: -0.01em; margin: 2.25rem 0 .6rem; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { margin-bottom: .8rem; max-width: 68ch; }
.legal-body ul { list-style: disc; padding-left: 1.3rem; display: grid; gap: .4rem; margin-bottom: .8rem; max-width: 68ch; }
.legal-body strong { color: var(--heading); }
.legal-body a { color: var(--heading); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }

/* ==========================================================
   Wejście hero (jedna orkiestracja przy ładowaniu)
========================================================== */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: settle .7s var(--ease-out) both; }
  .hero-copy > *, .hero-phone-panel { animation: rise .8s var(--ease-out) both; }
  .hero-phone-panel { animation-delay: .12s; }
  .hero-copy > :nth-child(1) { animation-delay: .1s; }
  .hero-copy > :nth-child(2) { animation-delay: .18s; }
  .hero h1 .mark { animation: mark-in .7s .45s var(--ease-out) both; }
  .portrait-frame { animation: unveil 1s .1s var(--ease-out) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes settle { from { transform: translateY(10px); } to { transform: none; } }
  @keyframes mark-in { from { background-size: 0% .3em; } to { background-size: 100% .3em; } }
  @keyframes unveil { from { clip-path: inset(0 0 100% 0 round var(--radius-lg)); } to { clip-path: inset(0 0 0 0 round var(--radius-lg)); } }
}

/* Kto to robi: pasek pod realizacjami, małe zdjęcie + jedno zdanie */
.owner {
  margin-top: clamp(3rem, 2rem + 4vw, 4.5rem);
  padding-top: clamp(1.75rem, 3vw, 2.25rem);
  border-top: 2px solid var(--heading);
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  max-width: 46rem;
}
.owner-photo {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius-md); background: var(--bg-media);
}
.owner-title { font-size: var(--fs-h3); letter-spacing: -0.01em; }
.owner p { margin-top: .5rem; max-width: 52ch; }
@media (min-width: 600px) {
  .owner { grid-template-columns: 120px minmax(0, 1fr); gap: 1.75rem; }
}

/* Automatyzacje: dziennik zadań wykonanych bez właściciela (powłoka jak czat) */
.auto-log .chat-log { gap: 0; }
.auto-log li {
  display: flex; gap: .65rem; align-items: flex-start;
  padding-block: .8rem;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-small); line-height: 1.5; color: var(--heading);
}
.auto-log li:last-child { border-bottom: 0; }
.auto-log li .icon { flex: none; width: 1.1em; height: 1.1em; margin-top: .2em; }
.auto-log li strong { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Jak wygląda współpraca: 5 kroków na osi (pionowo na telefonie, poziomo od 960px).
   Prawdziwa sekwencja, więc numery mają sens; ostatni krok w kolorze akcentu. */
.process { margin-top: clamp(2.5rem, 5vw, 3.5rem); display: grid; }
.process li { position: relative; padding: 0 0 2.25rem 3.5rem; }
.process li::before {
  content: ""; position: absolute;
  left: calc(1.125rem - 1px); top: 2.25rem; bottom: 0; width: 2px;
  background: var(--heading);
}
.process li:last-child { padding-bottom: 0; }
.process li:last-child::before { display: none; }
.process-no {
  position: absolute; left: 0; top: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--heading); color: var(--bg);
  font-weight: 760; font-variant-numeric: tabular-nums;
}
.process li:last-child .process-no { background: var(--accent); color: var(--on-accent); }
.process h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; margin-top: .55rem; }
.process-tag {
  display: inline-block; margin-top: .35rem;
  padding: .2rem .55rem; border-radius: var(--radius-sm);
  background: var(--bg-alt);
  font-size: var(--fs-xs); font-weight: 680; color: var(--heading);
}
.process p:not(.process-tag) { margin-top: .6rem; max-width: 40ch; }
.process-actions { margin-top: clamp(2rem, 4vw, 3rem); display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.process-note { flex-basis: 100%; font-size: var(--fs-small); color: var(--muted); }
@media (min-width: 960px) {
  .process { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 1.5rem; }
  .process li { padding: 3.5rem 0 0; }
  .process li::before { left: 2.25rem; right: -1.5rem; top: calc(1.125rem - 1px); bottom: auto; width: auto; height: 2px; }
  .process p:not(.process-tag) { max-width: none; }
}
