/* ============ Root ============ */
:root {
  --mp-bg: #FFF8F4;
  --mp-surface: #FFFFFF;
  --mp-text: #2B1D14;
  --mp-muted: #6B5545;
  --mp-accent: #B53A0B;
  --mp-accent-text: #FFFFFF;
  --mp-plate-bg: #2B1D14;
  --mp-plate-text: #FFE8D6;
  --mp-line: #E8D5C4;
  --mp-radius-card: 18px;
  --mp-radius-btn: 10px;
  --mp-font: 'Avenir Next', Avenir, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mp-shadow: 0 1px 2px rgb(43 29 20 / .06), 0 12px 32px rgb(43 29 20 / .08);
  --mp-pad: clamp(16px, 4vw, 40px);
  --mp-gap: clamp(64px, 9vw, 128px);
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--mp-font);
  font-weight: 400;
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.65;
  color: var(--mp-text);
  background: var(--mp-bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.4rem, 4.6vw + .6rem, 4.6rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 2.6vw + .8rem, 3rem); }
h3 { font-size: clamp(1.2rem, .4vw + 1.1rem, 1.5rem); }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--mp-accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mp-accent); outline-offset: 4px; border-radius: 4px; }
ul { padding-left: 1.2em; }
.mp_wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--mp-pad);
  padding-right: var(--mp-pad);
}
.mp_section { padding-block: var(--mp-gap); position: relative; overflow: hidden; }
.mp_section + .mp_section { border-top: 1px solid var(--mp-line); }
.mp_section:nth-of-type(even) { background: var(--mp-surface); }
.mp_section_title { margin-bottom: 16px; }
.mp_prose { color: var(--mp-text); margin-bottom: 24px; }
.mp_accent {
  font-weight: 800;
  font-size: clamp(2.6rem, 5vw + 1rem, 5.4rem);
  line-height: 1;
  color: var(--mp-accent);
  display: inline-block;
  letter-spacing: -0.02em;
}
#faq { padding-bottom: clamp(64px, 9vw, 96px); }

/* ============ Background shapes ============ */
.mp_section::before {
  content: "";
  position: absolute;
  top: -80px; left: -120px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--mp-line), var(--mp-line) 70%, transparent 71%);
  opacity: .75;
  pointer-events: none;
}
.mp_section::after {
  content: "";
  position: absolute;
  bottom: -120px; right: -140px;
  width: 380px; height: 190px;
  border-radius: 190px 190px 0 0;
  background: var(--mp-accent);
  opacity: .14;
  pointer-events: none;
}
#w-liczbach::after {
  border-radius: 0 190px 0 0;
  right: auto; left: -140px;
}
#kontakt-krotki::before, #kontakt-krotki::after { display: none; }

/* ============ Topline ============ */
.mp_topline { background: var(--mp-plate-bg); color: var(--mp-plate-text); }
.mp_topline_note {
  max-width: 68ch;
  margin: 0 auto;
  padding: 10px 16px;
  font-size: .875rem;
  line-height: 1.5;
  text-align: center;
}

/* ============ Header ============ */
.mp_skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--mp-accent);
  color: var(--mp-accent-text);
  padding: 12px 20px;
  border-radius: 0 0 var(--mp-radius-btn) 0;
  z-index: 60;
}
.mp_skip:focus { left: 0; }
.mp_header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px var(--mp-pad);
  background: var(--mp-bg);
  border-bottom: 2px solid var(--mp-line);
  position: relative;
  z-index: 55;
}
.mp_logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--mp-text);
  text-decoration: none;
  text-align: center;
  justify-self: center;
}
.mp_logo:hover { color: var(--mp-text); }
.mp_nav_side {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.mp_nav_side:first-of-type { justify-content: flex-start; }
.mp_nav_side:last-of-type { justify-content: flex-end; }
.mp_nav_link {
  font-size: 1rem;
  color: var(--mp-text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  transition: background-color .25s ease, color .25s ease;
}
.mp_nav_link::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 4px;
  height: 2px;
  background: var(--mp-accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.mp_nav_link:hover,
.mp_nav_link:focus-visible { background: var(--mp-line); }
.mp_nav_link:hover::after,
.mp_nav_link:focus-visible::after,
.mp_nav_link[aria-current="page"]::after { transform: scaleX(1); }
.mp_nav_link[aria-current="page"] { font-weight: 600; }

/* ============ Burger ============ */
.mp_burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  background: none;
  border: 2px solid var(--mp-line);
  border-radius: var(--mp-radius-btn);
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  font-size: .875rem;
  color: var(--mp-text);
}
.mp_burger_bar {
  width: 22px; height: 2px;
  background: var(--mp-text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.mp_burger[aria-expanded="true"] .mp_burger_bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mp_burger[aria-expanded="true"] .mp_burger_bar:nth-child(2) { opacity: 0; }
.mp_burger[aria-expanded="true"] .mp_burger_bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Mobile nav ============ */
.mp_nav_open {
  position: fixed;
  inset: 0;
  background: var(--mp-bg);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  z-index: 45;
  padding: calc(var(--mp-pad) + 72px) var(--mp-pad) var(--mp-pad);
  overflow-y: auto;
}
.mp_nav_open.is_open,
.mp_nav_open.is_opened,
.mp_nav_open.mp_opened,
.mp_nav_open.mp_open,
.mp_nav_open[aria-expanded="true"],
.mp_nav_open[aria-hidden="false"],
html.mp_nav_open .mp_nav_open,
body.mp_nav_open .mp_nav_open,
.mp_header:has(.mp_burger[aria-expanded="true"]) + .mp_nav_open,
.mp_header:has(.mp_burger.is_open) + .mp_nav_open,
.mp_header:has(.mp_burger.is_opened) + .mp_nav_open {
  display: flex;
  animation: mp_fade_in .3s ease both;
}
.mp_nav_open .mp_nav_link { font-size: 1.4rem; padding: 12px 24px; }

@keyframes mp_fade_in { from { opacity: 0; } to { opacity: 1; } }

/* ============ Hero ============ */
#hero { padding-top: 48px; }
.mp_hero_photo { margin: 0 0 28px; }
.mp_hero_img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--mp-radius-card);
  box-shadow: var(--mp-shadow);
}
.mp_hero_cols {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}
.mp_hero_title {
  max-width: 14ch;
  animation: mp_rise .5s ease both;
}
.mp_hero_text > .mp_prose,
.mp_hero_text > .mp_button {
  animation: mp_rise .5s ease .08s both;
}
.mp_hero_side {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-card);
  padding: 24px;
  animation: mp_rise .5s ease .12s both;
}
.mp_hero_side .mp_prose { margin: 0; color: var(--mp-muted); }
@keyframes mp_rise {
  from { transform: translateY(12px); }
  to { transform: translateY(0); }
}

/* ============ Stats ============ */
.mp_stats_row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  text-align: center;
}
.mp_stats_item {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-card);
  padding: 32px;
  min-height: 160px;
  display: grid;
  place-content: center;
  gap: 8px;
  box-shadow: var(--mp-shadow);
}
.mp_stats_label {
  display: block;
  color: var(--mp-muted);
  font-size: .9375rem;
  margin-top: 8px;
}

/* ============ Segmented control ============ */
.mp_seg {
  display: flex;
  flex-wrap: wrap;
  border: 2px solid var(--mp-line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--mp-surface);
  margin-bottom: 16px;
}
.mp_seg_btn {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
  padding: 10px 20px;
  min-height: 44px;
  background: transparent;
  color: var(--mp-text);
  border: none;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.mp_seg_btn[aria-selected="true"] {
  background: var(--mp-plate-bg);
  color: var(--mp-plate-text);
}
.mp_seg_btn[aria-selected="false"]:hover { background: var(--mp-line); }
.mp_seg_panel { margin-bottom: 32px; }

/* ============ Cards grid ============ */
.mp_grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.mp_card {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-card);
  padding: 28px;
  box-shadow: var(--mp-shadow);
  display: flex;
  flex-direction: column;
  transition: border-color .3s ease, transform .3s ease;
}
.mp_card:hover, .mp_card:focus-within { border-color: var(--mp-accent); }
.mp_card_wide { grid-column: span 2; }
.mp_card_letter {
  font-size: clamp(2.5rem, 1.2vw + 2.1rem, 3rem);
  font-weight: 800;
  line-height: 1;
  color: var(--mp-accent);
  margin-bottom: 12px;
}
.mp_card_text { color: var(--mp-muted); flex: 1; }
.mp_button_plain { margin-top: auto; padding-top: 12px; align-self: flex-start; }

/* ============ Buttons ============ */
.mp_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 28px;
  border-radius: var(--mp-radius-btn);
  border: 2px solid var(--mp-accent);
  background: transparent;
  color: var(--mp-accent);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .1s ease, filter .2s ease;
}
.mp_button:hover {
  background: var(--mp-accent);
  color: var(--mp-accent-text);
  transform: translateY(-1px);
  filter: brightness(.94);
}
.mp_button:active {
  background: #8E2D08;
  border-color: #8E2D08;
  color: var(--mp-accent-text);
  filter: none;
  transform: translateY(0);
}
.mp_button:focus-visible { outline: 3px solid var(--mp-accent); outline-offset: 4px; }
.mp_button_light {
  background: transparent;
  border-color: var(--mp-plate-text);
  color: var(--mp-plate-text);
}
.mp_button_light:hover { background: var(--mp-plate-text); color: var(--mp-plate-bg); filter: none; }
.mp_button_light:active { background: #E7C9AC; border-color: #E7C9AC; color: var(--mp-plate-bg); }
.mp_button_plain {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--mp-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 6px 2px;
  transition: color .2s ease;
}
.mp_button_plain:hover { color: #8E2D08; }

/* ============ Announcement ============ */
.mp_notice {
  background: var(--mp-line);
  border: 1px solid var(--mp-line);
  border-left: 6px solid var(--mp-accent);
  border-radius: var(--mp-radius-btn);
  padding: 16px 24px;
  margin: 0 0 32px;
}

/* ============ FAQ ============ */
.mp_faq { display: grid; gap: 12px; max-width: 760px; }
.mp_faq_item {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: 12px;
  padding: 4px 24px;
  transition: border-color .3s ease;
}
.mp_faq_item[open] { border-color: var(--mp-accent); }
.mp_faq_item summary {
  font-weight: 600;
  padding: 16px 0;
  cursor: pointer;
  list-style-position: inside;
}
.mp_faq_item p { color: var(--mp-muted); padding-bottom: 16px; margin: 0; }

/* ============ Media block ============ */
.mp_media {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 28px;
  align-items: center;
}
.mp_media_photo { margin: 0; }
.mp_media_img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--mp-radius-card);
  box-shadow: var(--mp-shadow);
}
.mp_media_arch .mp_media_img {
  aspect-ratio: 3 / 4;
  border-radius: 160px 160px var(--mp-radius-card) var(--mp-radius-card);
}
.mp_media_text { max-width: 68ch; }

/* ============ Form ============ */
.mp_form {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-card);
  box-shadow: var(--mp-shadow);
  padding: clamp(24px, 4vw, 40px);
  max-width: 760px;
  display: grid;
  gap: 20px;
}
.mp_field { display: grid; gap: 6px; }
.mp_label { font-weight: 600; font-size: .9375rem; }
.mp_input {
  font: inherit;
  color: var(--mp-text);
  padding: 12px 16px;
  min-height: 48px;
  border: 2px solid var(--mp-line);
  border-radius: var(--mp-radius-btn);
  background: var(--mp-bg);
  width: 100%;
  transition: border-color .25s ease;
}
.mp_input:focus-visible { outline: 3px solid var(--mp-accent); outline-offset: 2px; border-color: var(--mp-accent); }
.mp_input::placeholder { color: var(--mp-muted); opacity: 1; }
.mp_area { min-height: 120px; resize: vertical; }
.mp_check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; }
.mp_check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--mp-accent); }
.mp_note { color: var(--mp-muted); font-size: .875rem; margin: 0; }
.mp_error {
  color: #92300A;
  font-size: .875rem;
  font-weight: 600;
  margin: 2px 0 0;
}
.mp_input.mp_invalid { border-color: #92300A; }
.mp_sending { opacity: .6; pointer-events: none; }
.mp_submit { justify-self: start; }

/* ============ Plate ============ */
.mp_plate {
  background: var(--mp-plate-bg);
  color: var(--mp-plate-text);
  border-radius: var(--mp-radius-card);
  padding: clamp(32px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}
.mp_plate::after {
  content: "";
  position: absolute;
  top: -70px; right: -70px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: var(--mp-accent);
  opacity: .25;
  pointer-events: none;
}
.mp_plate_title { color: var(--mp-plate-text); }
.mp_plate_text { color: var(--mp-plate-text); opacity: .92; }

/* ============ Interior page head ============ */
.mp_page_head { padding-bottom: 0; }
.mp_page_head .mp_prose { color: var(--mp-muted); }

/* ============ Prose (policies) ============ */
.mp_prose_full { max-width: 760px; }
.mp_prose_full ol { padding-left: 1.4em; }
.mp_prose_full li { margin-bottom: 8px; }
.mp_prose_full table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: .9375rem;
}
.mp_prose_full th, .mp_prose_full td {
  border: 1px solid var(--mp-line);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.mp_prose_full th { background: var(--mp-line); }

/* ============ Contacts block ============ */
.mp_contact_list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.mp_contact_list li { display: flex; gap: 10px; }
.mp_contact_list span { font-weight: 600; min-width: 84px; }

/* ============ Thanks / 404 ============ */
.mp_confirm {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-left: 6px solid var(--mp-accent);
  border-radius: var(--mp-radius-card);
  box-shadow: var(--mp-shadow);
  padding: clamp(24px, 4vw, 40px);
  max-width: 760px;
  margin: 0 auto;
}
.mp_confirm .mp_button { margin-top: 8px; }
.mp_actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.mp_code {
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--mp-accent);
  letter-spacing: -0.02em;
}

/* ============ Footer ============ */
.mp_footer {
  background: var(--mp-plate-bg);
  color: var(--mp-plate-text);
  padding: clamp(40px, 6vw, 72px) 0 24px;
  margin-top: 0;
}
.mp_footer_cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.mp_footer_title {
  color: var(--mp-plate-text);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--mp-accent);
  display: inline-block;
  padding-bottom: 4px;
}
.mp_footer_list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mp_footer_list a, .mp_footer a { color: var(--mp-plate-text); }
.mp_footer_list a:hover { color: #F6D2B4; }
.mp_footer address { font-style: normal; font-size: .9375rem; line-height: 1.6; }
.mp_footer address p { margin: 0 0 8px; max-width: none; }
.mp_footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9375rem; }
.mp_footer ul li span { opacity: .75; }
.mp_footer_bottom {
  border-top: 1px solid rgb(255 232 214 / .25);
  margin-top: 40px;
  padding-top: 20px;
}
.mp_footer_copy { margin: 0; font-size: .875rem; opacity: .85; max-width: none; }

/* ============ Reveal ============ */
html.mp_ready .mp_reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
html.mp_ready .mp_reveal.mp_shown {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Media queries ============ */
@media (max-width: 1024px) {
  .mp_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp_card_wide { grid-column: span 2; }
  .mp_media { grid-template-columns: 1fr 1.2fr; }
  .mp_media_arch { grid-column: span 2; max-width: 420px; }
  .mp_footer_cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .mp_nav_side { display: none; }
  .mp_burger { display: flex; }
  .mp_header { grid-template-columns: auto 1fr auto; }
  .mp_logo { justify-self: start; text-align: left; }
  .mp_burger { justify-self: end; }
}

@media (max-width: 768px) {
  .mp_hero_cols { grid-template-columns: 1fr; }
  .mp_hero_side { padding: 20px; }
  .mp_media { grid-template-columns: 1fr; }
  .mp_media_arch { grid-column: auto; max-width: 360px; }
  .mp_stats_row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

@media (max-width: 640px) {
  .mp_grid { grid-template-columns: minmax(0, 1fr); }
  .mp_card_wide, .mp_media_arch { grid-column: auto; }
  .mp_seg { width: 100%; }
  .mp_seg_btn { flex: 1; }
  .mp_submit { justify-self: stretch; }
  .mp_hero_text > .mp_button { width: 100%; }
}

@media (max-width: 480px) {
  .mp_plate { padding: 28px 20px; }
  .mp_card { padding: 20px; }
  .mp_topline_note { font-size: .8125rem; }
  .mp_actions { flex-direction: column; align-items: flex-start; }
  .mp_footer_cols { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1280px) {
  .mp_wrap { max-width: 1200px; }
  .mp_hero_img { border-radius: 24px; }
}

@media (min-width: 1025px) {
  .mp_grid > .mp_card:nth-child(4) { grid-column: span 2; }
}

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

/* ============ Ambient background layer ============ */
body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
}
body::before {
  top: -160px;
  right: -220px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--mp-line), var(--mp-line) 68%, transparent 69%);
  opacity: .8;
}
body::after {
  bottom: -200px;
  left: -260px;
  width: 560px;
  height: 280px;
  border-radius: 280px 280px 0 0;
  background: var(--mp-accent);
  opacity: .1;
}
