:root {
  --navy: #142030;
  --navy-ink: rgba(20, 32, 48, .72);
  --pink: #F5517A;
  --pink-brand: #dc416f;
  --pink-ink: #B52454;
  --pink-glow: #ff5c8d;
  --cream: #E9D8C8;
  --dark: #0E0D12;
  --hairline: rgba(20, 32, 48, .11);
  --gutter: clamp(22px, 3.6vw, 62px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100svh;
  color: var(--navy);
  font-family: "Archivo", "Aptos", sans-serif;
  background: var(--dark);
  overflow-x: hidden;
}

/* papier z miękkim, świetlistym przenikaniem w scenę — płyta z hero */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: #f6dac2 url("paper-plate.webp") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 40%, transparent 63%);
  mask-image: linear-gradient(to right, #000 0%, #000 40%, transparent 63%);
}

/* ziarno identyczne jak w hero */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--pink-ink);
  outline-offset: 4px;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--navy);
  color: #F6ECE2;
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-64px);
  transition: transform .3s var(--ease);
}
.skip:focus-visible { transform: none; }

/* ---------- header ---------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--gutter) 22px;
  border-bottom: 1px solid var(--hairline);
}

.brand { display: inline-flex; }
.brand img { height: 26px; width: auto; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 44px);
}
.site-nav a {
  position: relative;
  padding: 8px 0 9px;
  color: var(--cream);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .35s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: .16em;
  bottom: 0;
  height: 2px;
  background: var(--pink-glow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.site-nav a:hover { color: #fff; }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: #fff; }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- układ ---------- */
.layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(560px, 43.5%) 1fr;
  min-height: 100svh;
}

/* ---------- kolumna formularza ---------- */
.panel {
  position: relative;
  z-index: 2;
  padding: clamp(84px, 9.8vh, 122px) clamp(28px, 2.6vw, 44px) clamp(36px, 4.5vh, 56px) var(--gutter);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color .35s var(--ease);
}
.back-link:hover { color: var(--pink-ink); }
.back-link .arr { transition: transform .4s var(--ease); }
.back-link:hover .arr { transform: translateX(-4px); }

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(18px, 2.6vh, 32px) 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 52px;
  height: 2px;
  background: var(--pink-brand);
}

.page-title {
  margin: clamp(14px, 2vh, 26px) 0 0;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(38px, 3.3vw, 58px);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.01em;
}
.page-title .accent { display: block; color: var(--pink); }
.page-title .mask { display: block; overflow: visible; padding-bottom: .1em; margin-bottom: -.1em; }
.page-title .line { display: block; }

.lead {
  margin: clamp(12px, 1.8vh, 22px) 0 0;
  max-width: 34rem;
  font-size: clamp(14.5px, .95vw, 15.5px);
  line-height: 1.55;
  color: var(--navy-ink);
}

.proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 1.8vw, 30px);
  margin: clamp(20px, 2.7vh, 34px) 0 0;
  padding: 0;
  list-style: none;
}
.proof li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--navy-ink);
}
.proof svg {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  stroke: var(--pink-brand);
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: -2px;
}

/* ---------- formularz ---------- */
.form {
  margin-top: clamp(22px, 2.8vh, 38px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(28px, 4.4vw, 74px);
  row-gap: clamp(14px, 1.7vh, 22px);
  max-width: 640px;
}

.field { position: relative; display: flex; flex-direction: column; }
.field--wide { grid-column: 1 / -1; }

.field label {
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
}
.field label .req { color: var(--pink-ink); }

.field input,
.field select,
.field textarea {
  appearance: none;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(20, 32, 48, .38);
  border-radius: 0;
  background: transparent;
  padding: 9px 2px 10px;
  font: inherit;
  font-size: 14.5px;
  color: var(--navy);
  transition: border-color .35s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--pink-brand);
  border-bottom-width: 2px;
  padding-bottom: 9px;
}
.field textarea {
  min-height: 52px;
  resize: vertical;
  line-height: 1.5;
}
.field select {
  cursor: pointer;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23142030' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}
.field select:invalid { color: rgba(20, 32, 48, .5); }

.field .error {
  display: none;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--pink-ink);
}
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-bottom-color: var(--pink-ink); }
.field.is-invalid .error { display: block; }

/* honeypot */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.js .page-title .mask { overflow: hidden; }
.js .is-settled .page-title .mask,
html[data-motion="paused"] .page-title .mask { overflow: visible; }

/* zgoda */
.consent {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--navy-ink);
  cursor: pointer;
}
.consent input {
  position: absolute;
  left: 0;
  top: 1px;
  opacity: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}
.consent .box {
  pointer-events: none;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--pink-brand);
  background: transparent;
  display: grid;
  place-items: center;
  transition: background .3s var(--ease);
}
.consent .box svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.consent input:checked + .box {
  background: var(--pink-brand);
}
.consent input:checked + .box svg { opacity: 1; transform: none; }
.consent input:focus-visible + .box {
  outline: 2px solid var(--pink-ink);
  outline-offset: 3px;
}
.consent a { color: var(--navy); text-underline-offset: 3px; }
.consent a:hover { color: var(--pink-ink); }
.consent.is-invalid .box { border-color: var(--pink-ink); box-shadow: 0 0 0 3px rgba(220, 65, 111, .16); }

/* submit + status */
.form-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 30px);
  flex-wrap: wrap;
  margin-top: 2px;
}

.submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-width: 250px;
  min-height: 62px;
  padding: 0 26px;
  border: 0;
  background: var(--navy);
  color: var(--cream);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  overflow: hidden;
  transition: color .35s var(--ease);
}
.submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--pink-brand);
  transform: translateX(-102%);
  transition: transform .5s var(--ease);
}
.submit:hover::before, .submit:focus-visible::before { transform: translateX(0); }
.submit:hover, .submit:focus-visible { color: #fff; }
.submit span, .submit .arr { position: relative; z-index: 1; }
.submit .arr { color: var(--pink-glow); font-size: 19px; transition: transform .45s var(--ease), color .35s var(--ease); }
.submit:hover .arr { transform: translateX(5px); color: #fff; }
.submit[aria-busy="true"] { pointer-events: none; opacity: .82; }

.form-status {
  margin: 0;
  max-width: 300px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--navy-ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.form-status.is-visible { opacity: 1; transform: none; }
.form-status a { color: var(--pink-ink); }

/* ---------- uczciwy flow kontaktu ---------- */
.contact-direct {
  max-width: 640px;
  margin-top: clamp(15px, 2vh, 22px);
  padding: 10px 0 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 2vw, 28px);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.contact-direct.has-context {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.direct-mail p,
.context-note p {
  margin: 0;
  color: var(--navy-ink);
  font-size: 11.5px;
  line-height: 1.45;
}
.direct-mail a {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 23px;
  font-weight: 600;
  text-decoration-color: var(--pink-brand);
  text-underline-offset: 4px;
}
.direct-mail small {
  display: block;
  color: var(--navy-ink);
  font-size: 10.5px;
  line-height: 1.4;
}
.context-note {
  padding-left: 12px;
  border-left: 2px solid var(--pink-brand);
}
.context-note strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy);
  font-size: 11.5px;
}
.context-note[hidden] { display: none; }

.form--contact {
  margin-top: clamp(13px, 1.8vh, 18px);
  row-gap: clamp(9px, 1.2vh, 14px);
}
.form--contact .field input,
.form--contact .field select {
  padding-top: 7px;
  padding-bottom: 8px;
}
.form--contact .field textarea {
  min-height: 44px;
  padding-top: 7px;
  padding-bottom: 8px;
}
.form--contact .form-foot {
  align-items: flex-start;
  gap: 15px;
}
.form--contact .submit {
  min-width: 266px;
  min-height: 54px;
  padding-inline: 21px;
  font-size: 14px;
}
.mailto-helper {
  max-width: 300px;
  margin: 1px 0 0;
  color: var(--navy-ink);
  font-size: 11.5px;
  line-height: 1.45;
}

.validation-summary {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 11px;
  display: flex;
  gap: 8px;
  align-items: center;
  border-left: 2px solid var(--pink-brand);
  color: var(--navy);
  background: rgba(245, 81, 122, .055);
  font-size: 12.5px;
  font-weight: 600;
}
.validation-summary[hidden] { display: none; }
.validation-summary::before,
.field.is-invalid .error::before,
.consent-error::before {
  content: "!";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  display: inline-grid;
  border: 1px solid currentColor;
  border-radius: 50%;
  place-items: center;
  font-size: 9px;
  line-height: 1;
}
.field.is-invalid .error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 4px 0 0;
  line-height: 1.35;
}
.consent {
  flex-wrap: wrap;
}
.consent-copy {
  flex: 1;
  min-width: 0;
}
.consent-error {
  width: 100%;
  margin: 2px 0 0 32px;
  display: none;
  gap: 6px;
  align-items: center;
  color: var(--pink-ink);
  font-size: 12px;
  font-weight: 500;
}
.consent.is-invalid .consent-error { display: flex; }

.flow-state {
  max-width: 640px;
  margin-top: clamp(20px, 2.8vh, 34px);
  padding: clamp(18px, 2.5vh, 28px) 0 0;
  border-top: 1px solid rgba(20, 32, 48, .25);
}
.flow-state[hidden],
.form[hidden] { display: none; }
.flow-state h2 {
  margin: 0;
  color: var(--navy);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(34px, 2.7vw, 46px);
  font-weight: 600;
  line-height: 1;
}
.flow-state h2:focus {
  outline: 2px solid var(--pink-ink);
  outline-offset: 5px;
}
.flow-state > p {
  max-width: 35rem;
  margin: 10px 0 0;
  color: var(--navy-ink);
  font-size: 14px;
  line-height: 1.55;
}
.state-email {
  min-height: 44px;
  margin-top: 13px;
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 27px;
  font-weight: 600;
  text-decoration-color: var(--pink-brand);
  text-underline-offset: 5px;
}
.state-actions {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.state-link {
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  border: 0;
  color: var(--navy);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--pink-brand);
  text-underline-offset: 5px;
  cursor: pointer;
}
.copy-address {
  min-width: 170px;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  color: var(--cream);
  background: var(--navy);
  font-weight: 600;
  cursor: pointer;
}
.copy-feedback {
  margin: 0;
  color: var(--pink-ink);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- scena ---------- */
.scene {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 24%;
  z-index: 0;
  background: var(--dark);
  overflow: hidden;
}
.scene img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  transform: scale(1.04);
  transition: transform 1.2s var(--ease), filter 1.2s var(--ease);
}

/* ---------- wejście ---------- */
.js .site-header { opacity: 0; transform: translateY(-10px); }
.js .is-ready .site-header {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease) .12s, transform .8s var(--ease) .12s;
}

.js .panel > * { opacity: 0; transform: translateY(22px); }
.js .is-ready .panel > * {
  opacity: 1; transform: none;
  transition: opacity .75s var(--ease) calc(.3s + var(--i, 0) * .09s), transform .9s var(--ease) calc(.3s + var(--i, 0) * .09s);
}

.js .page-title .line { transform: translateY(112%); }
.js .is-ready .page-title .line {
  transform: none;
  transition: transform 1s var(--ease) calc(.34s + var(--d, 0s));
}
.js .is-ready .panel > .page-title { transition: none; }
.js .panel > .page-title { opacity: 1 !important; transform: none !important; }

.js .scene img { transform: scale(1.12); filter: blur(7px) brightness(1.06); }
.js .is-ready .scene img {
  transform: scale(1.04); filter: none;
  transition: transform 1.4s var(--ease) .3s, filter 1.2s var(--ease) .3s;
}

/* ---------- wyjście ---------- */
.is-leaving .site-header,
.is-leaving .layout {
  opacity: 0;
  filter: blur(9px);
  transform: scale(.992);
  transition: opacity .34s var(--ease), filter .38s var(--ease), transform .38s var(--ease);
}

/* ---------- responsywność ---------- */
@media (max-width: 1024px) {
  body {
    background: #f6dac2 url("paper-plate.webp") center / cover no-repeat;
  }
  body::before { display: none; }
  .site-header { position: static; }
  .site-nav a { color: var(--navy); }
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--pink-ink); }
  .site-nav a::after { background: var(--pink-brand); }
  .layout { grid-template-columns: 1fr; }
  .panel { padding-top: clamp(26px, 5vh, 44px); }
  .scene {
    position: relative;
    inset: auto;
    min-height: 54svh;
    order: 2;
    background: transparent;
  }
  .scene img {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 140px);
    mask-image: linear-gradient(to bottom, transparent 0, #000 140px);
  }
  .form { max-width: none; }
  .form-status { max-width: none; }
  .contact-direct,
  .flow-state { max-width: none; }
}

@media (max-width: 640px) {
  .site-header { padding: 18px var(--gutter) 16px; }
  .brand img { height: 22px; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 10.5px; letter-spacing: .12em; }
  .site-nav a:nth-child(2) { display: none; }
  .form { grid-template-columns: 1fr; }
  .proof { grid-template-columns: 1fr; gap: 12px; }
  .submit { width: 100%; }
  .contact-direct,
  .contact-direct.has-context {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 16px;
  }
  .direct-mail a {
    min-height: 44px;
    font-size: 25px;
  }
  .context-note { padding-block: 2px; }
  .form--contact .field input,
  .form--contact .field select,
  .form--contact .field textarea {
    min-height: 44px;
    font-size: 16px;
  }
  .form--contact .field textarea { min-height: 68px; }
  .form--contact .submit { width: 100%; min-height: 56px; }
  .form--contact .form-foot { gap: 8px; }
  .mailto-helper { max-width: none; font-size: 12px; }
  .flow-state h2 { font-size: 39px; }
  .flow-state > p { font-size: 15px; }
  .state-email { font-size: 26px; }
  .state-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .copy-address { width: 100%; }
  .state-link { width: fit-content; }
}

@media (min-width: 1025px) and (max-height: 850px) {
  .panel {
    padding-top: 78px;
    padding-bottom: 18px;
  }
  .back-link { min-height: 38px; }
  .kicker { margin-top: 10px; }
  .page-title { margin-top: 8px; }
  .lead { margin-top: 7px; }
  .proof { margin-top: 11px; }
  .contact-direct { margin-top: 10px; }
  .form--contact {
    margin-top: 9px;
    row-gap: 7px;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    animation: none !important;
  }
  .js .site-header, .js .panel > *, .js .page-title .line, .js .scene img {
    opacity: 1; transform: none; filter: none;
  }
}
