/* Root */
:root {
  --bg: #FBF6F4;
  --surface: #FFFFFF;
  --text: #2A1C1C;
  --muted: #6A5352;
  --accent: #A8323F;
  --accent-dark: #8A2632;
  --accent-text: #FFFFFF;
  --plate-bg: #2A1C1C;
  --plate-text: #FBF6F4;
  --line: #E5D9D6;
  --radius-card: 8px;
  --radius-btn: 999px;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --shadow-soft: 0 1px 2px rgb(42 28 28 / .06), 0 12px 32px rgb(42 28 28 / .08);
  --pad: clamp(16px, 4vw, 40px);
  --gap-sec: clamp(64px, 9vw, 128px);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100%;
}
img { max-width: 100%; height: auto; display: block; object-fit: cover; border-radius: var(--radius-card); }
h1, h2, h3, h4 { font-weight: 750; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 4.6vw + 0.6rem, 4.6rem); line-height: 1.06; }
h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); line-height: 1.15; }
h3 { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem); }
p { max-width: 68ch; }
a { color: var(--accent-dark); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Layout */
.sd_wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--pad); }
.sd_block { padding-block: calc(var(--gap-sec) / 2); position: relative; }
.sd_block + .sd_block { padding-top: 0; }
main.sd_area, #main { padding-bottom: var(--gap-sec); }
.sd_h2 { margin: 0 0 16px; }
.sd_intro { margin: 0 0 32px; color: var(--muted); }
.sd_text { color: var(--muted); }
.sd_ink { color: var(--accent); white-space: nowrap; }

/* Skip link */
.sd_skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--plate-bg); color: var(--plate-text);
  padding: 10px 20px; border-radius: var(--radius-btn); z-index: 200;
}
.sd_skip:focus { left: 16px; top: 16px; }

/* Header */
.sd_topbar {
  position: sticky; top: 12px; z-index: 170;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 12px var(--pad) 0; padding: 12px 20px;
  background: var(--surface); border-radius: 18px;
  box-shadow: var(--shadow-soft); border: 1px solid var(--line);
  min-height: 64px;
}
.sd_mark {
  font-weight: 750; color: var(--text); text-decoration: none;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem); text-align: center; flex: 1;
}
.sd_mark_foot { font-size: 1.15rem; margin: 0 0 8px; }
.sd_topbar_tel { white-space: nowrap; }
.sd_topbar_tel { min-height: 48px; padding: 12px 24px; font-size: 1rem; font-weight: 600; }

/* Drawer nav */
.sd_drawer {
  position: fixed; inset: 132px auto 0 0; width: min(320px, 86vw);
  background: var(--surface); z-index: 160;
  padding: 24px; transform: translateX(-102%); visibility: hidden;
  transition: transform 0.35s ease, visibility 0.35s ease;
  box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 24px;
  overflow-y: auto;
}
.sd_drawer.is_drawer_on, body.is_drawer_on .sd_drawer { transform: translateX(0); visibility: visible; }
.sd_drawer_veil {
  position: fixed; inset: 0; background: rgb(42 28 28 / .45); z-index: 150;
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
body.is_drawer_on .sd_drawer_veil { opacity: 1; visibility: visible; }
.sd_drawer_list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sd_drawer_link {
  display: block; padding: 12px 16px; border-radius: var(--radius-card);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.05rem;
  transition: background 0.25s ease;
}
.sd_drawer_link::after {
  content: ""; display: block; height: 2px; width: 0;
  background: var(--accent); margin-top: 4px; border-radius: 2px;
  transition: width 0.25s ease;
}
.sd_drawer_link:hover { background: var(--bg); }
.sd_drawer_link:hover::after, .sd_drawer_link[aria-current="page"]::after { width: 48px; }
.sd_drawer_link[aria-current="page"] { color: var(--accent-dark); }
.sd_drawer_btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-btn);
  padding: 10px 18px; font: inherit; font-weight: 600; color: var(--text);
  cursor: pointer;
}
.sd_drawer_btn:hover { background: var(--bg); }
.sd_drawer_btn:active { transform: scale(0.97); }
.sd_drawer_btn_bar {
  width: 20px; height: 2px; background: var(--text); border-radius: 2px;
  box-shadow: 0 -6px 0 var(--text), 0 6px 0 var(--text);
}
.sd_drawer_btn_inner { border: none; padding-inline: 0; }

/* Buttons */
.sd_btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px; border: none; border-radius: var(--radius-btn);
  background: var(--accent); color: var(--accent-text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transition: background 0.25s ease, transform 0.15s ease;
}
.sd_btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent-dark); border-radius: inherit;
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.35s ease;
}
.sd_btn:hover::before { transform: scaleX(1); }
.sd_btn:hover { background: var(--accent); }
.sd_btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 0 7px rgb(168 50 63 / .25); }
.sd_btn:active { transform: scale(0.97); }
.sd_btn_ghost {
  background: transparent; color: var(--accent-dark);
  border: 2px solid var(--accent);
}
.sd_btn_ghost:hover { background: rgb(168 50 63 / .08); }
.sd_btn.is_locked { opacity: 0.7; pointer-events: none; }

/* Section background layers */
#liczby, #zgloszenie, #obszar,
.sd_block:nth-of-type(even) {
  background: var(--surface);
}
.sd_block::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: linear-gradient(160deg, rgb(168 50 63 / .05), rgb(42 28 28 / .03) 45%, transparent 70%);
}
#liczby::after, #zgloszenie::after {
  content: ""; position: absolute; left: 0; right: 0; height: 26px; z-index: 1;
  background: var(--bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  bottom: -1px;
}
#liczby { margin-top: 8px; padding-top: var(--gap-sec); }

/* Hero */
#hero { padding-top: calc(var(--gap-sec) / 2); }
.sd_hero {
  display: grid; gap: 32px; align-items: center;
  grid-template-columns: 1fr;
}
.sd_hero_copy { max-width: 56ch; }
.sd_hero_copy > * { animation: sd_lift 0.5s ease both; }
.sd_hero_copy > *:nth-child(2) { animation-delay: 0.08s; }
.sd_hero_copy > *:nth-child(3) { animation-delay: 0.16s; }
@keyframes sd_lift { from { transform: translateY(12px); } to { transform: translateY(0); } }
.sd_mark_hero { margin: 0 0 20px; }
.sd_mark_hero .sd_ink { display: inline-block; font-size: 0.72em; }
.sd_hero_lead { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); color: var(--muted); margin: 0 0 28px; }
.sd_hero_media { display: flex; justify-content: center; }
.sd_hero_media img { aspect-ratio: 4 / 3; width: 100%; max-width: 640px; object-fit: cover; }

/* Stats plate */
.sd_panel {
  position: relative; z-index: 1;
  background: var(--plate-bg); color: var(--plate-text);
  border-radius: 18px; padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow-soft);
}
.sd_stats { display: grid; gap: 24px; }
.sd_stats_row { display: flex; align-items: center; gap: 24px; margin: 0; }
.sd_stats_num {
  font-size: clamp(3rem, 6vw, 5rem); font-weight: 750; line-height: 1;
  color: var(--plate-text); min-width: 1.2ch; margin: 0;
}
.sd_stats_label { margin: 0; color: #D9CBC7; }
.sd_panel_title { color: var(--plate-text); margin: 0 0 12px; }
.sd_panel p { color: #D9CBC7; }
.sd_panel a { color: #F3B7BD; }
.sd_gwarancje { margin-top: 40px; max-width: 760px; }

/* Tabs */
.sd_tabs {
  display: flex; flex-wrap: nowrap; gap: 8px; margin: 0 0 28px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.sd_tab { white-space: nowrap; flex: none; }
.sd_tab {
  min-height: 44px; padding: 0 22px; border-radius: var(--radius-btn);
  border: 2px solid var(--line); background: var(--surface);
  font: inherit; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.sd_tab:hover { border-color: var(--accent); color: var(--accent-dark); }
.sd_tab:active { transform: scale(0.97); }
.sd_tab[aria-selected="true"] { background: var(--plate-bg); border-color: var(--plate-bg); color: var(--plate-text); }

/* Numbered service rows */
.sd_row_list { list-style: none; margin: 0; padding: 0; counter-reset: sdrow; }
.sd_row {
  display: flex; align-items: baseline; gap: clamp(16px, 3vw, 40px);
  padding: 24px 20px; border-radius: var(--radius-card);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.sd_row:hover { box-shadow: 0 10px 28px rgb(168 50 63 / .22); transform: translateY(-2px); }
.sd_row_no {
  font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 750; color: var(--accent);
  min-width: 2ch; line-height: 1;
}
.sd_row_desc { margin: 0; max-width: 60ch; }
.sd_pane:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: var(--radius-card); }
.sd_uslugi_media, .sd_area_media { margin-block: 64px 0; }
.sd_uslugi_media img {
  aspect-ratio: 16 / 9; width: 100%; max-width: 960px;
  margin-inline: auto; border-radius: 24px; object-fit: cover;
}
.sd_area_media img { aspect-ratio: 1 / 1; max-width: 640px; width: 100%; }

/* Form */
.sd_brief {
  display: grid; gap: 16px; max-width: 720px; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.3s ease;
}
.sd_brief:focus-within { box-shadow: 0 10px 28px rgb(168 50 63 / .18); }
.sd_brief_row { display: grid; gap: 6px; }
.sd_brief_tag { font-weight: 600; font-size: 0.95rem; }
.sd_brief_input {
  font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--line); border-radius: var(--radius-card);
  padding: 12px 16px; width: 100%;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.sd_brief_input::placeholder { color: var(--muted); opacity: 1; }
.sd_brief_input:focus { border-color: var(--accent); outline: none; background: var(--surface); }
.sd_brief_input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sd_brief_area { resize: vertical; min-height: 120px; }
.sd_brief_check { display: flex; gap: 12px; align-items: flex-start; }
.sd_brief_check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.sd_brief_check label { max-width: 60ch; }
.sd_brief_hint { color: var(--muted); font-size: 0.9rem; margin: 0; }
.sd_brief_err { color: var(--accent-dark); font-weight: 600; margin: 0; }
.sd_brief .sd_brief_err:empty { display: none; }
.sd_brief.is_locked .sd_brief_send { opacity: 0.7; pointer-events: none; }

/* FAQ */
.sd_qa { display: grid; gap: 12px; width: 100%; max-width: 720px; margin-inline: auto; }
.sd_qa_item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 4px 20px;
  transition: box-shadow 0.3s ease;
}
.sd_qa_item:hover { box-shadow: 0 8px 22px rgb(168 50 63 / .15); }
.sd_qa_item summary {
  cursor: pointer; font-weight: 650; padding: 16px 0; list-style-position: inside;
}
.sd_qa_item[open] summary { color: var(--accent-dark); }
.sd_qa_item p { padding-bottom: 16px; margin: 0; color: var(--muted); }

/* Area list */
.sd_city_list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px;
  max-width: 640px;
}
.sd_city_list li { border-bottom: 1px solid var(--line); padding: 8px 0; }

/* Announcement note */
.sd_note {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(680px, calc(100vw - 32px)); z-index: 140;
  background: var(--plate-bg); color: var(--plate-text);
  border-radius: 14px; padding: 16px 20px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-soft);
}
.sd_note p { margin: 0; font-size: 0.95rem; }
.sd_note a { color: #F3B7BD; }
.sd_note_close {
  background: none; border: 1px solid #D9CBC7; color: var(--plate-text);
  border-radius: var(--radius-btn); padding: 8px 16px;
  font: inherit; font-size: 0.9rem; cursor: pointer; flex: none;
  transition: background 0.25s ease;
}
.sd_note_close:hover { background: rgb(251 246 244 / .15); }
.sd_note_close:active { transform: scale(0.97); }

/* Footer */
.sd_bottom { background: var(--plate-bg); color: var(--plate-text); margin-top: var(--gap-sec); }
.sd_bottom .sd_wrap { padding-block: clamp(48px, 6vw, 80px); }
.sd_bottom_cols { display: grid; gap: 32px; grid-template-columns: 1fr; }
.sd_bottom_col { min-width: 0; }
.sd_bottom_head { color: var(--plate-text); font-size: 1.1rem; margin: 0 0 14px; }
.sd_bottom .sd_text { color: #D9CBC7; }
.sd_bottom_list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sd_bottom_link { color: #F3B7BD; text-decoration: none; }
.sd_bottom_link:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.sd_bottom address { font-style: normal; color: #D9CBC7; }
.sd_bottom address p { margin: 0 0 10px; }
.sd_bottom ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: #D9CBC7; }
.sd_bottom ul li span { color: #F3B7BD; font-weight: 600; margin-right: 6px; }
.sd_bottom a { color: #F3B7BD; }
.sd_bottom_copy { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid rgb(251 246 244 / .2); color: #D9CBC7; font-size: 0.9rem; }

/* Inner page head */
.sd_page_head { padding-block: calc(var(--gap-sec) / 2) 0; }
.sd_page_head h1 { margin: 0 0 16px; }

/* Prose (policies, terms) */
.sd_text_policy { max-width: 760px; }
.sd_toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px 28px; margin: 0 0 32px; }
.sd_toc ol { margin: 0; padding-left: 20px; }
.sd_section_num { font-weight: 700; color: var(--accent-dark); }
.sd_text table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
.sd_text th, .sd_text td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }

/* Contacts */
.sd_contact_list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sd_contact_list li span { font-weight: 600; color: var(--accent-dark); margin-right: 8px; }

/* Confirm & 404 */
.sd_confirm { max-width: 760px; }
.sd_confirm .sd_panel { margin: 28px 0; }
.sd_errpage .sd_panel { margin: 28px 0; }

/* Cards */
.sd_tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 24px;
  box-shadow: 0 1px 2px rgb(42 28 28 / .06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.sd_tile:hover {
  box-shadow: 0 10px 28px rgb(168 50 63 / .2);
  transform: translateY(-2px);
}
.sd_tile:focus-within { box-shadow: 0 10px 28px rgb(168 50 63 / .25); }

/* Reveal */
html.is_js .sd_rise { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
html.is_js .sd_rise.is_risen { opacity: 1; transform: none; }

/* Breakpoints */
@media (min-width: 480px) {
  .sd_city_list { grid-template-columns: repeat(3, 1fr); }
  .sd_bottom_cols { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 640px) {
  .sd_stats { grid-template-columns: repeat(2, 1fr); }
  .sd_brief { padding: 32px; }
}
@media (min-width: 768px) {
  .sd_hero { grid-template-columns: 1.1fr 1fr; gap: 48px; }
  .sd_city_list { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .sd_bottom_cols { grid-template-columns: repeat(4, 1fr); }
  .sd_hero { grid-template-columns: 1.2fr 1fr; }
  .sd_row { padding: 28px 24px; }
}
@media (min-width: 1280px) {
  .sd_wrap { max-width: 1200px; }
  .sd_hero { gap: 64px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.is_js .sd_rise { opacity: 1; transform: none; }
  .sd_drawer { transition: none; }
}

/* Mobile hero scale & FAQ rhythm */
@media (max-width: 767px) {
  .sd_mark_hero { font-size: clamp(32px, 8vw, 44px); line-height: 1.05; }
  #pytania { padding-bottom: 96px; }
}
#pytania { padding-bottom: 96px; }

/* Card effect on reduced layout */
@media (min-width: 640px) {
  .sd_tile { padding: 28px; }
}

/* Drawer offset below the floating header */
@media (min-width: 640px) {
  .sd_drawer { inset: 96px auto 0 0; }
}
