/* Root */
:root {
  --bg: #FBF6F4;
  --surface: #FFFFFF;
  --text: #2A1C1C;
  --muted: #6A5352;
  --accent: #A8323F;
  --accent-text: #FBF6F4;
  --plate-bg: #2A1C1C;
  --plate-text: #FBF6F4;
  --line: #E4D6D3;
  --font-heading: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius-card: 0px;
  --radius-btn: 10px;
  --shadow: 0 1px 2px rgb(42 28 28 / .06), 0 12px 32px rgb(42 28 28 / .08);
  --pad-side: clamp(16px, 4vw, 40px);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  background-image:
    radial-gradient(1200px 600px at 85% -5%, rgb(168 50 63 / .07), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #F6EDEA 55%, var(--bg) 100%),
    repeating-conic-gradient(rgb(42 28 28 / .014) 0% 25%, transparent 0% 50%);
  background-size: auto, auto, 7px 7px;
  background-attachment: fixed;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 4.6vw + 0.6rem, 4.6rem); line-height: 1.08; margin: 0 0 20px; }
h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); line-height: 1.15; margin: 0 0 16px; }
h3 { font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); line-height: 1.25; margin: 0 0 10px; }
p { margin: 0 0 16px; max-width: 68ch; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
address { font-style: normal; }
.shell { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad-side); }
.shell--narrow { max-width: 760px; }
.skipway {
  position: absolute; left: -9999px; top: 0;
  background: var(--plate-bg); color: var(--plate-text);
  padding: 12px 20px; border-radius: var(--radius-btn); z-index: 100;
}
.skipway:focus { left: 16px; top: 16px; color: var(--plate-text); }
.band { padding: clamp(64px, 9vw, 128px) 0; }
.band__heading { line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 24px; }
.band__heading + .band__intro { margin-top: -8px; }
.band__intro { color: var(--muted); font-size: 1.05em; }
.mark {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 7vw + 1rem, 7.5rem);
  line-height: 1;
  color: var(--accent);
  font-weight: 800;
}

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgb(251 246 244 / .94);
  backdrop-filter: blur(6px);
}
.topbar__row {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 24px; min-height: 72px; flex-wrap: wrap;
}
.brandmark {
  margin-left: auto; margin-right: 0;
  font-family: var(--font-heading); font-weight: 700;
  font-size: 1.15rem; color: var(--text); text-decoration: none;
  white-space: nowrap;
}
.topbar__rule { height: 4px; background: var(--accent); width: 100%; }
.menu__list { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.menu__link {
  position: relative; display: inline-block; padding: 10px 14px;
  color: var(--text); text-decoration: none; font-size: 1rem;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom / 0% 3px;
  transition: background-size .25s ease;
}
.menu__link:hover, .menu__link:focus-visible { background-size: 100% 3px; }
.menu__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; bottom: -1px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: markpulse 1.6s ease-in-out infinite;
}
@keyframes markpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.5); } }
.menu__trigger {
  display: none; min-height: 44px; padding: 8px 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-btn);
  font: inherit; font-weight: 600; cursor: pointer;
}

/* Mobile menu */
@media (max-width: 767px) {
  .menu__trigger { display: inline-flex; align-items: center; gap: 8px; }
  .menu__list {
    display: none; flex-direction: column; width: 100%;
    padding: 8px 0 16px; gap: 0;
  }
  .menu--open .menu__list { display: flex; }
  .menu__link { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .brandmark { margin-left: 0; order: -1; }
  .topbar__row { gap: 12px; }
}

/* Buttons */
.action {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  border: 1px solid var(--accent); border-radius: var(--radius-btn);
  background: linear-gradient(105deg, #B8424E 0%, var(--accent) 55%, #8E2A34 100%) no-repeat 0 0 / 100% 100%;
  color: var(--accent-text); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-position .3s ease, box-shadow .3s ease, transform .15s ease;
  box-shadow: var(--shadow);
}
.action:hover { background-position: 30% 0; color: var(--accent-text); text-decoration: none; }
.action:focus-visible {
  outline: 3px solid var(--plate-bg); outline-offset: 3px;
  color: var(--accent-text); text-decoration: none;
}
.action:active { box-shadow: none; transform: translateY(1px); }
.action--quiet {
  background: var(--surface); color: var(--accent); border-color: var(--accent);
}
.action--quiet:hover { background: #F4E7E4; color: var(--accent); }
.action--quiet:focus-visible { outline-color: var(--accent); }

/* Hero */
.hero { padding-top: clamp(40px, 6vw, 80px); }
.hero__grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 0; align-items: center;
}
.hero__text { position: relative; z-index: 2; }
.hero__media { position: relative; min-height: 320px; }
.hero__photo {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  animation: herosettle .8s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes herosettle { from { transform: scale(1.04); } to { transform: scale(1); } }
.inkplate {
  background: var(--plate-bg); color: var(--plate-text);
  padding: clamp(28px, 4vw, 56px);
  margin-right: calc(-1 * clamp(24px, 5vw, 90px));
  position: relative; z-index: 2;
}
.inkplate p { color: var(--plate-text); opacity: .92; }
.inkplate a { color: #F3C9CD; }
.hero__action { margin-top: 8px; }
.hero__title { font-size: clamp(2.25rem, 3.4vw + 1rem, 3.25rem); line-height: 1.1; }

/* Checklist */
.kiedy__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.kiedy__list { list-style: none; margin: 0; padding: 0; }
.kiedy__item {
  padding: 14px 0 14px 34px; position: relative;
  border-bottom: 1px solid var(--line);
}
.kiedy__item::before {
  content: ""; position: absolute; left: 6px; top: 22px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}
.kiedy__media { align-self: center; }
.kiedy__media img { border: 1px solid var(--line); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; max-height: 520px; }
.band__more { margin-top: 24px; }

/* Services */
.dzialy { background: linear-gradient(180deg, rgb(255 255 255 / .65), rgb(255 255 255 / 0)); }
.dzialy__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, minmax(280px, auto));
  align-items: stretch;
  gap: 28px; margin-top: 32px;
}
.tile {
  background: var(--surface); border: 1px solid var(--line);
  padding: 32px; display: flex; flex-direction: column; gap: 16px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tile__photo-frame { overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; }
.tile__photo { transition: transform .5s ease; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; max-height: 220px; }
.tile:hover .tile__photo { transform: scale(1.06); }
.tile__text { color: var(--muted); flex-grow: 1; }
.tile--ink { background: var(--plate-bg); color: var(--plate-text); border-color: var(--plate-bg); }
.tile--ink .tile__text { color: #E9D9D6; }
.tile--ink .action { background: var(--surface); color: var(--accent); border-color: var(--surface); box-shadow: none; }
.tile--ink .action:hover { background: #F4E7E4; color: var(--accent); }
.dzialy__link { align-self: flex-start; margin-top: auto; }

/* Steps */
.etapy__wrap {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 64px); margin-top: 32px; align-items: center;
}
.etapy__media img { border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.etapy__step { padding: 18px 0; border-bottom: 1px solid var(--line); }
.etapy__text { color: var(--muted); margin: 0; }

/* Form section */
.zgloszenie__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px); align-items: start;
}
.zgloszenie__card {
  width: 100%; text-align: left; display: block;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-btn); padding: 16px 20px;
  font: inherit; cursor: pointer; margin-bottom: 10px;
  transition: border-color .25s ease, transform .25s ease;
}
.zgloszenie__card:hover { border-color: var(--accent); transform: translateX(4px); }
.zgloszenie__label { display: block; font-weight: 600; color: var(--text); }
.zgloszenie__hint { display: block; color: var(--muted); font-size: .95em; margin-top: 4px; }
.zgloszenie__panel {
  background: var(--surface); border-left: 3px solid var(--accent);
  padding: 14px 20px; margin: 0 0 14px; max-width: none;
}
.zgloszenie__panel p { margin: 0; color: var(--muted); }
.zgloszenie__form { background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 3vw, 36px); }

/* Contact form */
.contactform__field { margin-bottom: 18px; }
.contactform__label { display: block; font-weight: 600; margin-bottom: 6px; }
.contactform__input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-btn);
  background: var(--bg); color: var(--text); font: inherit;
}
.contactform__input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.contactform__area { min-height: 120px; resize: vertical; }
.contactform__check { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; }
.contactform__check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }
.contactform__check label { font-size: .95em; color: var(--muted); }
.contactform__note { color: var(--muted); font-size: .95em; }
.contactform__send { width: 100%; }
.contactform__error { color: #8E2A34; font-size: .95em; margin: -12px 0 16px; }
.contactform.is-sending .contactform__send { opacity: .6; pointer-events: none; }

/* FAQ */
.queries__list { margin-top: 28px; max-width: 760px; }
.queries__item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-btn); padding: 0; margin-bottom: 12px;
  transition: border-color .25s ease;
}
.queries__item[open] { border-color: var(--accent); }
.queries__question {
  cursor: pointer; padding: 18px 22px; font-weight: 600;
  list-style: none;
}
.queries__question::-webkit-details-marker { display: none; }
.queries__question::before { content: "+ "; color: var(--accent); font-weight: 700; }
.queries__item[open] .queries__question::before { content: "– "; }
.queries__item p { padding: 0 22px 18px; margin: 0; color: var(--muted); }

/* Footer */
.colophon { background: var(--plate-bg); color: var(--plate-text); padding: clamp(48px, 6vw, 80px) 0 32px; }
.colophon__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(28px, 4vw, 56px);
}
.colophon__heading {
  font-family: var(--font-heading); font-weight: 700;
  margin: 0 0 14px; color: #F3C9CD;
}
.colophon address p { margin: 0 0 8px; color: var(--plate-text); opacity: .92; }
.colophon__contacts ul { list-style: none; margin: 0; padding: 0; }
.colophon__contacts li { margin-bottom: 8px; color: var(--plate-text); opacity: .92; }
.colophon__contacts span { color: #F3C9CD; }
.colophon__contacts a { color: var(--plate-text); }
.colophon__links { list-style: none; margin: 0; padding: 0; }
.colophon__links li { margin-bottom: 8px; }
.colophon__links a { color: #F3C9CD; }
.colophon__bottom { border-top: 1px solid rgb(251 246 244 / .2); margin-top: 40px; padding-top: 20px; }
.colophon__copy { margin: 0; font-size: .95em; opacity: .85; }

/* Call button */
.callbtn {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 26px;
  background: var(--accent); color: var(--accent-text);
  text-decoration: none; font-weight: 600;
  box-shadow: var(--shadow);
  transition: background-position .3s ease, transform .2s ease;
  background-image: linear-gradient(105deg, #B8424E, var(--accent));
  background-size: 200% 100%;
}
.callbtn:hover { background-position: 100% 0; color: var(--accent-text); }
.callbtn:focus-visible { outline: 3px solid var(--plate-bg); outline-offset: 3px; }
.callbtn:active { box-shadow: none; transform: translateY(1px); }

/* Inner pages */
.pagehead { padding: clamp(40px, 6vw, 72px) 0 0; }
.readable { max-width: 760px; }
.readable h2 { margin-top: 40px; }
.readable ul, .readable ol { padding-left: 26px; margin: 0 0 16px; }
.readable li { margin-bottom: 8px; }
.readable table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.readable th, .readable td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.readable th { background: var(--surface); }

/* Thanks & 404 */
.confirm, .missing { text-align: center; padding-top: clamp(40px, 6vw, 80px); }
.confirm h1, .missing h1 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.confirm .action, .missing .action { margin: 8px 8px 8px 0; }

/* Reveal */
html.is-ready .fadein { transition: opacity .35s ease, transform .5s ease; }
html.is-ready .fadein:not(.fadein--shown) { opacity: 0; transform: translateY(18px); }
html.is-ready .fadein--shown { opacity: 1; transform: none; }

/* Breakpoints */
@media (max-width: 1280px) {
  .inkplate { margin-right: -32px; }
}
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .inkplate { margin-right: 0; margin-top: -48px; margin-left: clamp(16px, 4vw, 40px); }
  .kiedy__grid, .etapy__wrap, .zgloszenie__grid { grid-template-columns: 1fr; }
  .kiedy__media img { aspect-ratio: 16 / 9; max-width: 640px; }
}
@media (max-width: 768px) {
  .dzialy__grid { grid-template-columns: 1fr; }
  .colophon__grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .band { padding: clamp(56px, 10vw, 80px) 0; }
  .kiedy__item { padding: 10px 0 10px 30px; }
  .kiedy__item::before { top: 17px; }
  .callbtn { right: 16px; bottom: 16px; min-height: 44px; padding: 10px 18px; border-radius: 22px; }
  .action { width: 100%; }
  .zgloszenie__form .action { width: auto; }
}
@media (max-width: 480px) {
  .hero { padding-top: 24px; }
  .inkplate { margin-left: 0; margin-top: -32px; }
  .tile { padding: 28px; min-height: 0; max-height: none; }
  .tile__photo { max-height: 180px; }
  .queries__question { padding: 14px 16px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html.is-ready .fadein,
  html.is-ready .fadein:not(.fadein--shown) { opacity: 1; transform: none; }
}

@media (min-width: 1025px) {
  .hero__text { max-width: 46%; }
  .inkplate { margin-right: calc(-1 * clamp(40px, 6vw, 96px)); }
}

/* Reveal fallback */
@supports (animation-timeline: view()) {
  html.is-ready .fadein:not(.fadein--shown) {
    animation-name: reveal-view;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
  @keyframes reveal-view { to { opacity: 1; transform: none; } }
}
