/* Pogodny brzuch – list na papierze: kartki z zagięciami, polaroidy na spinaczach, wycinek na taśmie */
:root {
  --fiolet: #612c96;
  --atrament: #3d1c5f;
  --oliwka: #c0c059;
  --oliwka-ciemna: #5e5e1c;
  --zielen: #73c322;
  --zielen-tekst: #17260a;
  --biurko: #ebe2f3;
  --tlo: #f7f5fa;
  --papier: #fdfcfe;
  --tekst: #241b2d;
  --linia: #d6c9e4;
  --plocha: #ebe2f3;
  --szeryf: "EB Garamond", Georgia, "Times New Roman", serif;
  --bezszeryf: "Geologica", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--bezszeryf);
  font-size: 1.09rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--tekst);
  background-color: var(--biurko);
  background-image:
    radial-gradient(rgba(97, 44, 150, .05) 1px, transparent 1.2px),
    radial-gradient(rgba(97, 44, 150, .035) 1px, transparent 1.2px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
  padding-bottom: 96px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fiolet); }
strong { font-weight: 600; }
small { font-size: .9rem; }
:focus-visible { outline: 3px solid var(--fiolet); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--szeryf); color: var(--atrament); font-weight: 500; margin: 0; }
h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); line-height: 1.08; letter-spacing: -.005em; margin: .2rem 0 .9rem; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.25rem); line-height: 1.12; margin-bottom: .55rem; }
h3 { font-size: 1.45rem; line-height: 1.2; margin-bottom: .3rem; }
h4 { font-size: 1.28rem; line-height: 1.2; margin-bottom: .3rem; }
p { margin: 0 0 .7rem; }

.szer { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

/* ---------- głowka ---------- */
.glowka { padding: 14px 0 6px; }
.glowka .szer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.znak {
  font-family: var(--szeryf); font-style: italic; font-weight: 500;
  font-size: 2.1rem; line-height: 1; color: var(--atrament); text-decoration: none;
  transform: rotate(-2deg); display: inline-block; padding-bottom: 4px;
  border-bottom: 2px solid var(--oliwka);
}

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--bezszeryf); font-weight: 600; text-decoration: none; cursor: pointer;
  border: 0; border-radius: 3px; line-height: 1.2;
}
.btn-cta {
  background: var(--zielen); color: var(--zielen-tekst);
  min-height: 60px; padding: 12px 26px; font-size: 1.15rem;
  box-shadow: 0 3px 0 #4f8a14;
}
.btn-cta:hover { background: #82d22f; }
.przycisk-glowka { min-height: 52px; font-size: 1.125rem; padding: 10px 20px; }
.btn-cta-xl { min-height: 84px; min-width: 330px; font-size: 1.42rem; padding: 16px 34px; }

/* ---------- arkusze i kartki ---------- */
.arkusz { padding: 18px 0 22px; }
.kartka, .wycinek {
  position: relative;
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
  background: var(--papier);
  padding: 34px 44px 38px;
  box-shadow: 0 1px 0 #e2d8ec, 0 10px 26px -12px rgba(61, 28, 95, .35);
}
/* zagięcia po złożeniu listu na trzy */
.kartka-zlozona {
  background-image:
    linear-gradient(to bottom, transparent calc(33.3% - 1px), rgba(61, 28, 95, .07) calc(33.3% - 1px), rgba(255, 255, 255, .9) calc(33.3% + 1px), transparent calc(33.3% + 3px)),
    linear-gradient(to bottom, transparent calc(66.6% - 1px), rgba(61, 28, 95, .07) calc(66.6% - 1px), rgba(255, 255, 255, .9) calc(66.6% + 1px), transparent calc(66.6% + 3px));
}
/* poszarpany dolny brzeg */
.kartka-zlozona::after, .kartka-oferty::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 12px;
  background: var(--papier);
  clip-path: polygon(0 0, 100% 0, 100% 40%, 96% 90%, 92% 35%, 87% 80%, 82% 30%, 77% 95%, 71% 40%, 66% 75%, 60% 25%, 55% 85%, 49% 35%, 44% 90%, 38% 30%, 33% 70%, 27% 20%, 22% 90%, 16% 40%, 11% 80%, 6% 25%, 2% 70%, 0 30%);
}
.kartka-waska { width: min(900px, calc(100% - 40px)); }

.numer-kartki {
  font-family: var(--szeryf); font-style: italic; font-size: 1.15rem; color: var(--fiolet);
  margin-bottom: .35rem;
}
.pod-h2 { max-width: 70ch; font-size: 1.12rem; }

/* ---------- list: nagłówek i układ ---------- */
.naglowek-listu {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-family: var(--szeryf); font-size: 1.2rem; color: var(--atrament);
  padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1px solid var(--linia);
}
.data-listu { font-style: italic; }
.uklad-listu { display: grid; grid-template-columns: 170px minmax(0, 1fr) 360px; gap: 30px; align-items: start; }
.margines { border-right: 1px solid var(--linia); padding-right: 16px; min-height: 100%; }
.notka {
  font-family: var(--szeryf); font-style: italic; font-size: 1.16rem; line-height: 1.3;
  color: var(--fiolet); margin: 0 0 1rem;
}
.notka-podkr { text-decoration: underline; text-decoration-color: var(--oliwka); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.zwrot { font-family: var(--szeryf); font-style: italic; font-size: 1.45rem; color: var(--atrament); margin: 0; }
.wstep { font-size: 1.14rem; max-width: 62ch; }
.tresc-listu .btn-cta-xl { margin-top: .5rem; }
.drobne { font-size: .95rem; color: #5a4c68; margin-top: .6rem; }

/* ---------- polaroidy ---------- */
.polaroid {
  position: relative; margin: 0; background: #fff;
  padding: 12px 12px 14px;
  box-shadow: 0 2px 3px rgba(36, 27, 45, .14), 0 14px 24px -10px rgba(36, 27, 45, .38);
}
.polaroid img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; }
.polaroid figcaption {
  font-family: var(--szeryf); font-style: italic; font-size: 1.08rem; line-height: 1.3;
  color: var(--atrament); padding: 10px 4px 2px; text-align: center;
}
.polaroid-prawy { transform: rotate(3deg); margin-top: 8px; }
.polaroid-prawy img { object-position: 40% 40%; }
.polaroid-lewy { transform: rotate(-2.5deg); }
.polaroid-koniec { transform: rotate(-3deg); }
.spinacz {
  position: absolute; top: -18px; left: 28px; width: 18px; height: 54px;
  border: 2.5px solid #8c8697; border-radius: 9px; z-index: 2;
}
.spinacz::after {
  content: ""; position: absolute; left: 3px; top: 8px; width: 7px; height: 32px;
  border: 2.5px solid #8c8697; border-radius: 6px; border-bottom-color: transparent;
}

/* ---------- sytuacje ---------- */
.akapit-dnia {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 30px;
  padding: 16px 0; border-top: 1px solid var(--linia);
}
.akapit-dnia:first-of-type { margin-top: 14px; }
.akapit-dnia > div > p { max-width: 72ch; }
.akapit-ze-zdjeciem { grid-template-columns: 170px minmax(0, 1fr) 360px; align-items: start; }
.akapit-ze-zdjeciem .polaroid { margin-top: 4px; }

/* ---------- wycinek / załącznik ---------- */
.wycinek {
  background: #fbfaf3;
  transform: rotate(-.4deg);
  clip-path: polygon(0 1%, 3% 0, 8% .8%, 15% .1%, 24% .9%, 33% 0, 45% .7%, 56% .1%, 66% .9%, 77% .2%, 88% .8%, 96% 0, 100% .9%, 100% 99%, 95% 100%, 85% 99.2%, 72% 100%, 60% 99.1%, 47% 100%, 35% 99.3%, 22% 100%, 10% 99.2%, 0 100%);
  padding-top: 44px;
}
.tasma {
  position: absolute; width: 120px; height: 30px; background: rgba(192, 192, 89, .55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08); z-index: 3;
}
.tasma-lewa { top: 6px; left: 40px; transform: rotate(-4deg); }
.tasma-prawa { top: 8px; right: 50px; transform: rotate(3deg); }
.tasma-srodek { top: -14px; left: 50%; transform: translateX(-50%) rotate(-2deg); }

.rycina { margin: 18px auto 22px; max-width: 720px; }
.rycina img { width: 100%; border: 1px solid #e4dcc8; }
.rycina figcaption { font-size: 1rem; color: #4a3d58; margin-top: 8px; line-height: 1.45; }

.tytul-przyczyn { margin: 8px 0 10px; }
.przyczyny { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--atrament); border-bottom: 1px solid var(--linia); }
.przyczyna { padding: 14px 20px 10px; border-left: 1px solid var(--linia); }
.przyczyna:first-child { border-left: 0; padding-left: 0; }
.przyczyna:last-child { padding-right: 0; }
.zrodlo { font-size: .92rem; color: #5a4c68; font-style: italic; }

.objawy { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 8px 30px; padding-top: 18px; }
.objawy h3 { grid-row: span 2; }
.objawy ul { margin: 0; padding-left: 1.1rem; }
.objawy li { margin-bottom: .35rem; break-inside: avoid; }
.uwaga { font-size: 1rem; color: #4a3d58; border-left: 3px solid var(--oliwka); padding-left: 12px; margin: 6px 0 0; }

/* ---------- zapiski: tabela ---------- */
.zapiski { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 1.09rem; }
.zapiski caption { text-align: left; font-family: var(--szeryf); font-style: italic; font-size: 1.12rem; color: var(--fiolet); padding-bottom: 8px; }
.zapiski th, .zapiski td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--linia); }
.zapiski thead th { font-weight: 500; font-size: .95rem; color: #4a3d58; border-bottom: 2px solid var(--atrament); }
.zapiski tbody th { font-family: var(--szeryf); font-weight: 500; font-size: 1.2rem; color: var(--atrament); width: 24%; }
.zapiski td:last-child { width: 24%; font-size: .95rem; font-style: italic; color: #4a3d58; }

/* ---------- oferta, podpis, P.S. ---------- */
.kartka-oferty { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px 46px; }
.kartka-oferty > .numer-kartki { grid-column: 1 / -1; }
.przypiety {
  position: relative; background: var(--plocha, #ebe2f3); padding: 30px 30px 30px;
  transform: rotate(-1deg); align-self: start;
}
.przypiety p { max-width: 60ch; }
.przypiety .btn-cta-xl { margin-top: .4rem; }
.podpis-i-ps { padding-top: 4px; }
.pozdrowienie { font-family: var(--szeryf); font-style: italic; font-size: 1.3rem; margin: 0; }
.reka {
  font-family: "Caveat", "Segoe Script", cursive; font-style: normal; font-weight: 600; font-size: 3.6rem; line-height: 1;
  color: var(--fiolet); margin: 6px 0 0 20px; transform: rotate(-5deg); transform-origin: left center; display: inline-block;
}
.zawijas { display: block; color: var(--fiolet); margin: -4px 0 4px 10px; }
.kto { font-size: .98rem; color: #4a3d58; }
.dopiski { margin-top: 18px; border-top: 1px solid var(--linia); padding-top: 14px; }
.dopiski h2 { font-size: 1.5rem; margin-bottom: .4rem; }
.ps { margin: 0; padding: 9px 0; display: grid; grid-template-columns: 62px minmax(0, 1fr); column-gap: 10px; border-bottom: 1px dotted var(--linia); }
.ps-znak { font-family: var(--szeryf); font-weight: 600; font-size: 1.18rem; color: var(--fiolet); grid-row: span 2; }
.ps p { margin: 0; font-family: var(--szeryf); font-size: 1.28rem; line-height: 1.3; color: var(--tekst); }
.ps cite { font-style: normal; font-size: .95rem; color: #4a3d58; }

/* ---------- pytania ---------- */
.pytania { border-top: 2px solid var(--atrament); }
.pytania details { border-bottom: 1px solid var(--linia); }
.pytania summary {
  cursor: pointer; list-style: none; padding: 14px 36px 14px 0; position: relative;
  font-family: var(--szeryf); font-size: 1.32rem; color: var(--atrament); line-height: 1.25;
}
.pytania summary::-webkit-details-marker { display: none; }
.pytania summary::after { content: "+"; position: absolute; right: 6px; top: 10px; font-size: 1.6rem; color: var(--fiolet); }
.pytania details[open] summary::after { content: "–"; }
.pytania details p { margin: 0 0 14px; max-width: 70ch; }

/* ---------- koniec ---------- */
.kartka-koncowa { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 50px; align-items: center; padding-top: 40px; }
.koniec-tekst p { max-width: 60ch; }
.koniec-tekst .btn-cta-xl { margin-top: .4rem; }

/* ---------- stopka ---------- */
.stopka { padding: 22px 0 26px; font-size: .95rem; color: #4a3d58; }
.stopka .szer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; border-top: 1px solid #cdbddd; padding-top: 14px; }
.stopka p { margin: 0; }
.stopka nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.stopka a { color: var(--atrament); }

/* ---------- podstrony ---------- */
body.krotka { min-height: 100vh; display: flex; flex-direction: column; }
body.krotka main { flex: 1; }
.podstrona { padding: 18px 0 30px; }
.podstrona .kartka { width: min(780px, calc(100% - 40px)); }
.podstrona h1 { font-size: clamp(2rem, 3vw, 2.6rem); }
.podstrona h2 { font-size: 1.4rem; margin-top: 1.2rem; }
.formularz { display: grid; gap: 14px; margin-top: 14px; }
.formularz label { display: grid; gap: 4px; font-weight: 400; }
.formularz input, .formularz textarea {
  font: inherit; font-weight: 400; padding: 11px 12px; border: 1px solid #b9a8cc; border-radius: 2px; background: #fff; color: var(--tekst);
}
.formularz .btn { justify-self: start; min-width: 240px; }
#kontaktDakujeme { margin-top: 14px; padding: 14px 16px; background: var(--biurko); font-family: var(--szeryf); font-size: 1.25rem; color: var(--atrament); }

/* ---------- popup i lista (engine) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(36, 18, 54, .84); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 1000; }
.modal-overlay.show { display: flex; }
.modal {
  position: relative; width: min(660px, 100%); background: var(--papier); color: var(--tekst);
  padding: 46px 44px 38px; text-align: center; max-height: calc(100vh - 40px); overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4); transform: rotate(-.6deg);
}
.modal .close {
  position: absolute; top: 14px; right: 16px; width: 48px; height: 48px; border: 1px solid var(--atrament);
  background: #fff; color: var(--atrament); font-size: 1.9rem; line-height: 1; cursor: pointer; border-radius: 50%;
}
.modal .badge { display: inline-block; background: var(--oliwka); color: var(--zielen-tekst); padding: 6px 16px; font-weight: 600; font-size: 1.02rem; transform: rotate(-2deg); }
.modal h3 { font-family: var(--szeryf); font-weight: 600; font-size: 2.9rem; color: var(--fiolet); margin: 16px 0 6px; line-height: 1.05; }
.modal > p { font-size: 1.3rem; font-weight: 500; margin-bottom: 14px; }
.modal .offer { border-top: 1px solid var(--linia); border-bottom: 1px solid var(--linia); padding: 12px 0 2px; margin-bottom: 22px; }
.modal .offer p { margin: 0 0 10px; font-size: 1.06rem; }
.modal .btn { white-space: normal; width: 100%; min-height: 86px; font-size: 1.42rem; }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  background: var(--atrament); color: #fff; border-top: 3px solid var(--oliwka);
  display: flex; align-items: center; justify-content: center; gap: 22px; padding: 10px 20px;
}
.sticky-cta > span { font-size: 1.06rem; }
.sticky-cta .btn { flex: 0 0 auto; min-height: 60px; font-size: 1.125rem; }

/* ---------- mobil i tablet ---------- */
@media (max-width: 1020px) {
  .uklad-listu { grid-template-columns: 140px minmax(0, 1fr); }
  .polaroid-prawy { grid-column: 1 / -1; max-width: 560px; justify-self: center; }
  .akapit-ze-zdjeciem { grid-template-columns: 140px minmax(0, 1fr); }
  .akapit-ze-zdjeciem .polaroid { grid-column: 1 / -1; max-width: 560px; justify-self: center; }
  .akapit-dnia { grid-template-columns: 140px minmax(0, 1fr); }
  .kartka-oferty { grid-template-columns: 1fr; }
  .kartka-koncowa { grid-template-columns: 1fr; }
  .polaroid-koniec { max-width: 560px; justify-self: center; }
}
@media (max-width: 720px) {
  body { font-size: 1.08rem; padding-bottom: 136px; }
  .szer { width: calc(100% - 28px); }
  .znak { font-size: 1.6rem; }
  .przycisk-glowka { min-height: 48px; font-size: 1rem; padding: 8px 12px; }
  .kartka, .wycinek { width: calc(100% - 20px); padding: 22px 18px 26px; }
  .wycinek { padding-top: 40px; transform: none; }
  .kartka-waska, .podstrona .kartka { width: calc(100% - 20px); }
  .naglowek-listu { font-size: 1.05rem; margin-bottom: 10px; padding-bottom: 6px; }
  .naglowek-listu .od-kogo { display: none; }
  h1 { font-size: 1.85rem; margin-bottom: .6rem; }
  .tresc-listu .btn-cta-xl { margin-top: .2rem; }
  .uklad-listu, .akapit-dnia, .akapit-ze-zdjeciem { grid-template-columns: 1fr; gap: 8px; }
  .margines { border-right: 0; padding-right: 0; display: none; }
  .akapit-dnia .notka { margin-bottom: 0; }
  .btn-cta-xl { min-width: 0; width: 100%; font-size: 1.25rem; min-height: 80px; padding: 14px 18px; }
  .polaroid, .polaroid-prawy, .akapit-ze-zdjeciem .polaroid, .polaroid-koniec { max-width: none; width: 100%; transform: rotate(1.2deg); margin-top: 18px; }
  .polaroid-lewy, .polaroid-koniec { transform: rotate(-1.2deg); }
  .przyczyny { grid-template-columns: 1fr; }
  .przyczyna, .przyczyna:first-child, .przyczyna:last-child { border-left: 0; padding: 12px 0 6px; border-top: 1px solid var(--linia); }
  .przyczyna:first-child { border-top: 0; }
  .objawy { grid-template-columns: 1fr; }
  .zapiski thead { display: none; }
  .zapiski tr, .zapiski th, .zapiski td { display: block; width: 100% !important; }
  .zapiski th, .zapiski td { padding: 4px 0; border: 0; }
  .zapiski tr { padding: 10px 0; border-bottom: 1px solid var(--linia); }
  .przypiety { padding: 26px 18px 22px; transform: none; }
  .reka { font-size: 3rem; }
  .ps { grid-template-columns: 54px minmax(0, 1fr); }
  .ps p { font-size: 1.18rem; }
  .pytania summary { font-size: 1.2rem; }
  .modal { padding: 54px 20px 26px; transform: none; }
  .modal h3 { font-size: 2.1rem; }
  .modal .btn { font-size: 1.2rem; }
  .sticky-cta { flex-direction: column; gap: 8px; padding: 10px 14px; text-align: center; }
  .sticky-cta > span { font-size: 1rem; }
  .sticky-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .sticky-cta, .modal-overlay, .glowka .btn { display: none !important; } body { background: #fff; padding: 0; } }
