/* ============================================================
   SiteVerse — components.css
   Nawigacja, przyciski, plansze portfolio, usługi, proces,
   metryki, kontakt.
   ============================================================ */

/* ---------- Przyciski ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  padding: 18px 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink);
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out),
              transform 0.35s var(--ease-out);
  will-change: transform;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--ink {
  background: var(--ink);
  color: var(--paper);
}

.btn--ink:hover {
  background: var(--void-2);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  border-color: var(--ink);
}

.btn--sm {
  padding: 12px 20px;
  font-size: var(--step--1);
}

/* Na ciemnych sekcjach */
.btn--paper {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.btn--paper:hover { background: var(--paper-2); }

.btn__arrow {
  font-family: var(--font-mono);
  transition: transform 0.35s var(--ease-out);
}

.btn--ghost:hover .btn__arrow { transform: translateY(3px); }

/* ---------- Nawigacja ---------- */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.nav__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__mark { width: 30px; height: 30px; }

.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: clamp(18px, 2.4vw, 36px);
}

.nav__link {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  position: relative;
  padding-block: 6px;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.nav__link:hover { color: var(--ink); }
.nav__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  align-items: center;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}

.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* Drawer mobilny */

.drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 900; /* pod paskiem nav (1000), nad treścią */
  padding: 120px var(--gutter) 48px;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}

.drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer__link {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  text-transform: uppercase;
  line-height: 1.15;
  /* Inwersja atrament/papier przy interakcji: pole rysuje się od lewej.
     align-self, żeby inwersja obejmowała tekst, nie całą szerokość kolumny */
  position: relative;
  z-index: 0;
  align-self: flex-start;
  padding: 0.04em 0.14em;
  margin-left: -0.14em;
  transition: color 0.3s var(--ease-out);
}

.drawer__link::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

/* Hover tylko tam, gdzie hover istnieje (desktop z wąskim oknem);
   na dotyku feedback daje :active — szybszy, bez "lepkiego" hovera */
@media (hover: hover) {
  .drawer__link:hover { color: var(--paper); }
  .drawer__link:hover::before { transform: scaleX(1); }
}

.drawer__link:active,
.drawer__link:focus-visible {
  color: var(--paper);
}

.drawer__link:active::before,
.drawer__link:focus-visible::before {
  transform: scaleX(1);
  transition-duration: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
  .drawer__link,
  .drawer__link::before { transition: none; }
}

.drawer__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .drawer { display: flex; }
}

/* Na bardzo wąskich ekranach CTA nie mieści się obok logo i burgera —
   kontakt jest w drawerze */
@media (max-width: 430px) {
  .nav__right .btn { display: none; }
}

/* ---------- Plansza portfolio ---------- */

.plate__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 44px);
  box-shadow: 0 1px 2px rgba(22, 21, 15, 0.05), 0 24px 70px rgba(22, 21, 15, 0.10);
  transform-origin: center top;
}

.plate__meta {
  display: grid;
  /* minmax(0,1fr) zamiast 1fr — goły 1fr ma floor min-content (wzorzec s3) */
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "index client tags"
    "index result tags";
  column-gap: clamp(20px, 3vw, 44px);
  row-gap: 8px;
  align-items: start;
  margin-bottom: clamp(18px, 2.4vw, 30px);
  /* Kontener zapytań dla nazwy klienta — nazwy typu INOVASTORE / METALCRAFT
     w Syne 800 (~1.1em/znak, step-3) rozpychały kolaps 1fr poza viewport
     i tworzyły poziomy scroll całego dokumentu na mobile (glitch z s5,
     zdiagnozowany w s6a — dekoracje hero były fałszywym tropem, clipping
     .hero działa) */
  container-type: inline-size;
  min-width: 0;
}

.plate__index {
  grid-area: index;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  padding-top: 10px;
}

.plate__client {
  grid-area: client;
  /* Skaluje się do szerokości kolumny meta: najdłuższe słowo serii to
     10 znaków (INOVASTORE/METALCRAFT) ≈ 11.2em w Syne 800 caps.
     Wzorzec z s5 (.gexpand__client); fallback vw dla przeglądarek bez cqi. */
  font-size: min(var(--step-3), calc((100cqi - 4px) / 11.2));
  text-transform: uppercase;
  line-height: 1;
}

@supports not (font-size: 1cqi) {
  .plate__client { font-size: min(var(--step-3), 7vw); }
}

.plate__result {
  grid-area: result;
  color: var(--ink-2);
  max-width: 52ch;
}

.plate__tags {
  grid-area: tags;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-top: 10px;
}

.plate__tags span {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

/* Plansza-link do pełnego archiwum na końcu stacka */

.plate__card--archive { padding: 0; }

.plate__archive-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 2.6vw, 30px);
  width: 100%;
  padding: clamp(40px, 6vw, 96px) clamp(24px, 4vw, 64px);
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out);
  /* Kontener zapytań dla tytułu — „REALIZACJI" (10 znaków Syne 800) przy
     capie 9vw przelewało padding na 360/375 i tworzyło poziomy scroll (s6a) */
  container-type: inline-size;
}

.plate__archive-eyebrow,
.plate__archive-cta {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  transition: color 0.35s var(--ease-out);
}

.plate__archive-title {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 800;
  /* cqi = content-box linku (padding odjęty); 11.2em ≈ najdłuższe słowo */
  font-size: min(var(--step-4), calc((100cqi - 4px) / 11.2));
  line-height: 1.05;
  text-transform: uppercase;
}

@supports not (font-size: 1cqi) {
  .plate__archive-title { font-size: min(var(--step-4), 6.5vw); }
}

.plate__archive-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 450;
  text-transform: none;
}

.plate__archive-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 6px;
}

/* Inwersja na hover — jak wiersze usług */
.plate__archive-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.plate__archive-link:hover .plate__archive-eyebrow,
.plate__archive-link:hover .plate__archive-cta {
  color: var(--paper);
}

.plate__archive-link:hover .btn__arrow { transform: translateX(4px); }

/* Strzałki nawigacji stacka — sticky przy dolnej krawędzi viewportu,
   w obrębie .work__stack. Ujemny margines kasuje wysokość w flow,
   żeby klaster nie dodawał przerwy między stackiem a stopką sekcji. */

.work__nav {
  position: sticky;
  bottom: clamp(16px, 3vh, 32px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin-left: auto;
  margin-right: var(--gutter);
  margin-top: calc(-44px - clamp(16px, 3vh, 32px));
}

.work__nav[hidden] { display: none; }

.work__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.work__nav-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Krańce stacka: aria-disabled zamiast disabled — przycisk zostaje
   w tab-order, tylko nic nie robi i wygląda na wyciszony */
.work__nav-btn[aria-disabled="true"] {
  color: var(--muted);
  background: var(--paper);
  border-color: var(--line);
  cursor: default;
}

.work__nav-count {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 14px;
}

/* Ramka przeglądarki */

.browser {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--void);
}

.browser__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  /* Pigułka z faux-URL usunięta (sesja 5) — min-height trzyma
     dotychczasową wysokość paska, żeby proporcje ramki nie drgnęły */
  min-height: 42px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.browser__dots {
  display: flex;
  gap: 6px;
}

.browser__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

.browser__view {
  position: relative;
  aspect-ratio: 1920 / 950;
  overflow: hidden;
}

.browser__view img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transition: opacity 0.9s var(--ease-out);
}

.browser__view img.is-active { opacity: 1; }

/* Pojedynczy kadr bez crossfade */
.browser__view img:only-child { opacity: 1; }

@media (max-width: 960px) {
  .plate__meta {
    /* minmax(0,1fr), nie 1fr — patrz komentarz przy .plate__meta */
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "index" "client" "result" "tags";
  }
  .plate__tags {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding-top: 4px;
  }
  .plate__tags span { white-space: normal; }
}

@media (max-width: 720px) {
  .browser__view { aspect-ratio: 16 / 10; }
}

/* ---------- Usługi — wiersze ---------- */

.service { border-bottom: 1px solid var(--line-strong); }

.service__row {
  display: grid;
  grid-template-columns: auto minmax(0, 5fr) minmax(0, 6fr) auto;
  align-items: baseline;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(24px, 3.4vw, 44px) clamp(4px, 1vw, 16px);
  position: relative;
  overflow: hidden;
  transition: padding-left 0.45s var(--ease-out);
}

.service__row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-out);
  z-index: 0;
}

.service__row > * { position: relative; z-index: 1; }

.service__num {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  transition: color 0.35s var(--ease-out);
}

.service__name {
  font-family: var(--font-display);
  font-weight: 800;
  /* Nie step-2: „OPTYMALIZACJA" w Syne (≈1em/znak) musi zmieścić się
     w kolumnie 5fr bez nachodzenia na opis */
  font-size: clamp(1.4rem, 1.22rem + 0.8vw, 1.95rem);
  text-transform: uppercase;
  line-height: 1.05;
  transition: color 0.35s var(--ease-out);
}

.service__desc {
  color: var(--ink-2);
  max-width: 52ch;
  font-size: var(--step-0);
  transition: color 0.35s var(--ease-out);
}

.service__arrow {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  transform: translateX(-8px);
  opacity: 0;
  transition: transform 0.45s var(--ease-out), opacity 0.45s var(--ease-out),
              color 0.35s var(--ease-out);
}

@media (hover: hover) {
  .service__row:hover::before { transform: scaleY(1); transform-origin: top; }
  .service__row:hover { padding-left: clamp(12px, 2vw, 28px); }
  .service__row:hover .service__name { color: var(--paper); }
  .service__row:hover .service__desc { color: var(--muted-on-dark); }
  .service__row:hover .service__num { color: var(--muted-on-dark); }
  .service__row:hover .service__arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--paper);
  }
}

@media (max-width: 860px) {
  .service__row {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 10px;
  }
  .service__name { font-size: clamp(1.25rem, 5.2vw, 1.8rem); }
  .service__desc { grid-column: 2; }
  .service__arrow { display: none; }
}

/* ---------- Proces — kroki ---------- */

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(28px, 4vw, 52px) 0 clamp(28px, 4vw, 52px) clamp(24px, 3.4vw, 52px);
  position: relative;
}

.step + .step { border-top: 1px solid var(--line); }

.step::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--ink);
  transform: scaleY(var(--line-scale, 1));
  transform-origin: top;
}

.step__num {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  padding-top: 8px;
}

.step__name {
  font-size: var(--step-2);
  text-transform: uppercase;
}

@media (max-width: 720px) {
  /* „PROPOZYCJĘ" itp. w Syne nie mieszczą się przy step-2 */
  .step__name { font-size: clamp(1.35rem, 5.6vw, 1.9rem); }
}

.step__desc {
  margin-top: 12px;
  color: var(--ink-2);
  max-width: 46ch;
}

/* ---------- Metryki ---------- */

.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 1;
}

.metric__label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-on-dark);
}

/* ---------- Kontakt — email (link alternatywny) ---------- */

.contact__email-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}

.contact__email-line {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0.25);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.contact__email:hover .contact__email-line { transform: scaleX(1); }

/* ---------- Formularz kontaktowy ---------- */

/* Panel jak plansza portfolio — formularz jest częścią tej samej rodziny */
.contact__panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3.6vw, 56px);
  box-shadow: 0 1px 2px rgba(22, 21, 15, 0.04), 0 18px 50px rgba(22, 21, 15, 0.07);
  /* kontener zapytań — tytuł sukcesu skaluje się do szerokości karty (cqi) */
  container-type: inline-size;
}

.form {
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 3vw, 40px);
}

/* [hidden] przegrywa z display:flex — jawnie przywracamy */
.form[hidden],
.form__success[hidden] { display: none; }

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 3vw, 40px);
}

.form__label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 2px;
}

.form__opt {
  text-transform: none;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.form__control { position: relative; }

/* Atramentowa linia rysuje się od lewej przy focusie — echo
   rysujących się linii z procesu i kontaktu */
.form__control::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease-out);
}

.form__field:focus-within .form__control::after { transform: scaleX(1); }

.form__input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 10px 0 12px;
  caret-color: var(--ink);
}

.form__input::placeholder { color: var(--muted); opacity: 0.65; }

/* Focus pokazuje atramentowa linia (::after wyżej), nie ramka */
.form__input:focus-visible { outline: none; }

.form__textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.55;
}

/* Błąd: hairline przerywa się, komunikat mono poniżej */
.form__field.is-error .form__input {
  border-bottom-style: dashed;
  border-bottom-color: var(--ink);
}

.form__error {
  display: none;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.form__field.is-error .form__error { display: flex; align-items: center; gap: 8px; }

.form__error::before {
  content: "!";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 9px;
  line-height: 1;
}

/* Chipsy typu usługi — inwersja jak w wierszach usług */
.form__group {
  border: 0;
  padding: 0;
  margin: 0;
}

.form__group .chips { margin-top: 14px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip { position: relative; }

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out);
}

.chip:hover span {
  border-color: var(--ink);
  color: var(--ink);
}

.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* Placeholder do uzupełnienia przed deployem — celowo widoczny,
   monochromatyczny (bez łamania zasady „atrament na papierze").
   Tu, bo używany też w stopce na stronach bez pages.css. */
.ph {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--ink);
  background: var(--paper-3);
  border-bottom: 1px dashed var(--muted);
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.ph--dark {
  color: var(--paper-on-dark);
  background: rgba(241, 238, 230, 0.08);
  border-bottom-color: var(--muted-on-dark);
}

/* Honeypot — niewidoczny dla ludzi, obecny dla botów */
.form__hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Wysyłka */

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}

.form__submit {
  position: relative;
  overflow: hidden;
}

.form__submit[disabled] {
  cursor: default;
  opacity: 0.85;
}

.form__submit[disabled]:hover { transform: none; }

/* Loading: jasna linia biegnie po dolnej krawędzi przycisku */
.form__submit-line {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--paper);
  transform: translateX(-101%);
}

.form__submit.is-loading .form__submit-line {
  animation: submit-run 1.1s var(--ease-out) infinite;
}

.form__submit.is-loading .btn__arrow { opacity: 0; }

.form__hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Nota prawna pod formularzem kontaktowym (informacyjna, bez checkboxa) */
.form__consent-note {
  margin-top: 18px;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
}

.form__consent-note a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form__consent-note a:hover { color: var(--ink); }

.form__fail {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: var(--step--1);
  color: var(--ink-2);
}

.form__fail a {
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
}

/* Stan sukcesu */

.form__success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 2.4vw, 28px);
  padding-block: clamp(12px, 2vw, 24px);
  outline: none;
}

.form__success-mark {
  width: 34px;
  height: 34px;
  color: var(--ink);
}

.form__success-title {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 800;
  /* „DZIĘKUJEMY" w Syne 800 = 11.12em szerokości, a linia ma floor
     min-content — bez capa słowo wystaje poza kartę (szeroko: od 375px
     po 1440px, karta nie śledzi viewportu liniowo). Cap względem
     szerokości karty (cqi z .contact__panel); vw jako fallback. */
  font-size: min(var(--step-3), 7vw);
  font-size: min(var(--step-3), calc((100cqi - 8px) / 11.2));
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  max-width: 100%;
}

.form__success-line {
  display: block;
  overflow: hidden;
}

.form__success-line-inner { display: block; }

.form__success-line--serif .form__success-line-inner {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 450;
  text-transform: none;
  padding-right: 0.08em; /* kursywa ucina się na overflow:hidden bez zapasu */
}

.form__success-rule {
  width: 100%;
  height: 1px;
  background: var(--line-strong);
  transform-origin: left;
}

.form__success-meta {
  color: var(--ink-2);
  max-width: 44ch;
}

@media (max-width: 640px) {
  .form__row { grid-template-columns: 1fr; }
}

/* ---------- Baner zgód (Consent Mode v2, KROK 2) ----------
   Dyskretny pasek przy dolnej krawędzi — papier/atrament, hairline.
   [hidden] = display:none; JS zdejmuje atrybut i baner pojawia się od
   razu. Świadomie bez animacji wjazdu: stan zgód nie może zależeć od
   klatek animacji (spełnia też wymóg „baner musi działać bez animacji"). */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1500;
  background: var(--paper);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -8px 40px rgba(22, 21, 15, 0.10);
}

.consent__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
}

.consent__text {
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 66ch;
}

.consent__text a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .consent__actions { width: 100%; }
  .consent__actions .btn { flex: 1; justify-content: center; }
}
