/* ============================================================
   mlateralne.pl — nowy wygląd
   Paleta: ciepła terakota (z logo) + kremowe tło + głęboka zieleń
   Fonty: Fraunces (nagłówki) + Inter (tekst) — hostowane lokalnie
   ============================================================ */

:root {
  --bg: #FAF6F0;
  --surface: #FFFFFF;
  --ink: #2B2620;          /* nagłówki, wyróżnienia */
  --text: #4A4238;         /* treść akapitów */
  --muted: #6B6258;        /* podpisy, daty (kontrast ≥4.5:1 na kremie) */
  --muted-2: #8A7F72;      /* najcichszy — daty w opiniach itp. */
  --brand: #C05A22;
  --brand-dark: #A04513;
  --brand-soft: #F5E4D5;
  --brand-softer: #FBF2EA;
  --copper-light: #E0A470; /* miedziane detale na ciemnym (stopka) */
  --sage: #5F7263;
  --line: #E7DDD0;
  --line-strong: #E0CDB9;  /* obrysy przycisków, hover linii */
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  /* cienie: cieplejsze, krótsze, zawsze w parze z linią 1px */
  --shadow-sm: 0 1px 2px rgba(43, 38, 32, .05), 0 3px 10px -2px rgba(43, 38, 32, .05);
  --shadow: 0 2px 4px rgba(43, 38, 32, .05), 0 14px 30px -12px rgba(43, 38, 32, .14);
  --shadow-lg: 0 4px 10px rgba(43, 38, 32, .05), 0 28px 56px -20px rgba(120, 72, 40, .22);
  --shadow-btn: 0 8px 18px -10px rgba(160, 69, 19, .55);
  --ease: .18s ease-out;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .6em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { letter-spacing: -.01em; }
strong { color: var(--ink); }

a { color: var(--brand-dark); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
a:hover { color: var(--brand); }
::selection { background: rgba(192, 90, 34, .22); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ---------------------------------------------------------- przyciski */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: .6rem 1.75rem; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), color var(--ease), border-color var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-softer); color: var(--brand-dark); }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-light:hover { color: var(--brand-dark); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { color: #fff; border-color: #fff; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------- nagłówek */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(43,38,32,.06); }

.header-inner {
  display: flex; align-items: center; gap: 1.2rem;
  min-height: 92px;
}

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand-logo { flex-shrink: 0; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-head); font-size: 1.18rem; letter-spacing: .01em; }
.brand-text small { color: var(--muted); font-size: .74rem; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: .2rem; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .55rem .82rem; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .92rem;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}
.main-nav a:hover { background: var(--brand-softer); color: var(--brand-dark); }
.main-nav li.active > a { color: var(--brand-dark); background: var(--brand-soft); font-weight: 600; }

.main-nav .sub {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50;
  flex-direction: column; gap: 0; min-width: 300px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow);
  padding: .5rem;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.main-nav .has-sub:hover .sub,
.main-nav .has-sub:focus-within .sub,
.main-nav .has-sub.open .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .sub a { display: block; padding: .5rem .7rem; font-size: .92rem; border-radius: 8px; }
.caret { transition: transform .18s; }
.has-sub:hover .caret, .has-sub.open .caret { transform: rotate(180deg); }

.btn-phone {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem 1.05rem; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 600; font-size: .92rem; white-space: nowrap;
  transition: background .16s, transform .16s;
}
.btn-phone:hover { background: var(--brand); color: #fff; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: 1.5px solid var(--line); border-radius: 10px;
  padding: .62rem .6rem; cursor: pointer;
}
.nav-toggle-bar { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: clip;
  background:
    radial-gradient(56% 44% at 88% -6%, var(--brand-soft) 0%, rgba(245, 228, 213, 0) 72%),
    radial-gradient(700px 420px at -12% 110%, rgba(95, 114, 99, .08), transparent 60%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.overline {
  text-transform: uppercase; letter-spacing: .16em; font-size: .75rem;
  font-weight: 700; color: var(--brand-dark);
  margin: 0 0 1rem;
}
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); margin-bottom: .5em; }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 56ch; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

.hero-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.8rem 0 0; }
.hero-chips a {
  display: inline-flex; align-items: center; gap: .5rem; padding: .44rem .85rem;
  background: rgba(255, 255, 255, .6); border: 1px solid var(--line); border-radius: 999px;
  font-size: .82rem; font-weight: 500; color: var(--muted); text-decoration: none;
  transition: border-color var(--ease), color var(--ease);
}
.hero-chips a::before {
  content: ""; width: 5px; height: 5px; border-radius: 99px; background: var(--brand); flex: none;
}
.hero-chips a:hover { border-color: var(--line-strong); color: var(--brand-dark); }

.hero-media { position: relative; justify-self: center; }
.hero-media img {
  position: relative; z-index: 1;
  width: min(400px, 78vw);
  aspect-ratio: 4 / 5.4; object-fit: cover;
  border-radius: 51% 49% 46% 54% / 60% 57% 43% 40%;
  box-shadow: var(--shadow-lg);
  border: 6px solid #fff;
  filter: saturate(.94);
}
/* passe-partout: cienka linia obiegająca portret w tym samym kształcie */
.hero-media::after {
  content: ""; position: absolute; z-index: 1; inset: -11px;
  border: 1px solid var(--line); pointer-events: none;
  border-radius: 51% 49% 46% 54% / 60% 57% 43% 40%;
}
.hero-media:has(img.pshape-jajo)::after        { border-radius: 51% 49% 46% 54% / 60% 57% 43% 40%; }
.hero-media:has(img.pshape-kolo)::after        { border-radius: 50%; }
.hero-media:has(img.pshape-luk)::after         { border-radius: 50% 50% 20px 20px / 56% 56% 20px 20px; }
.hero-media:has(img.pshape-migdal)::after      { border-radius: 72% 28% 68% 32% / 56% 44% 56% 44%; }
.hero-media:has(img.pshape-kamien)::after      { border-radius: 36% 64% 44% 56% / 62% 38% 66% 34%; }
.hero-media:has(img.pshape-zaokraglony)::after { border-radius: 32px; }
/* kształt portretu — wybierany w panelu (Podstrony → O mnie → Zdjęcie portretowe) */
.hero-media img.pshape-jajo        { border-radius: 51% 49% 46% 54% / 60% 57% 43% 40%; }
.hero-media img.pshape-kolo        { aspect-ratio: 1 / 1; border-radius: 50%; }
.hero-media img.pshape-luk         { border-radius: 50% 50% 16px 16px / 56% 56% 16px 16px; }
.hero-media img.pshape-migdal      { border-radius: 72% 28% 68% 32% / 56% 44% 56% 44%; }
.hero-media img.pshape-kamien      { border-radius: 36% 64% 44% 56% / 62% 38% 66% 34%; }
.hero-media img.pshape-zaokraglony { border-radius: 26px; }

.hero-blob {
  position: absolute; inset: -7% -9% auto auto;
  width: 78%; aspect-ratio: 1;
  background: linear-gradient(140deg, var(--brand-soft), rgba(192, 90, 34, .34));
  border-radius: 58% 42% 55% 45% / 45% 58% 42% 55%;
  filter: blur(2px);
  animation: blob 14s ease-in-out infinite alternate;
}
@keyframes blob {
  from { transform: rotate(-4deg) scale(1); }
  to { transform: rotate(7deg) scale(1.06); }
}

/* ---------------------------------------------------------- sekcje */

.section { padding-block: clamp(3.25rem, 7vw, 6rem); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.8rem;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; }
/* nagłówek „O mnie” na dole strony głównej — wyśrodkowany */
.section-about .section-head { justify-content: center; text-align: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: .92rem; color: var(--brand-dark);
  text-decoration: none; white-space: nowrap;
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0% 1.5px;
  transition: background-size .22s ease-out;
}
.link-arrow:hover { background-size: 100% 1.5px; color: var(--brand-dark); }
.link-arrow svg { transition: transform .16s; }
.link-arrow:hover svg { transform: translateX(4px); }

/* karty terapii — równe wysokości, link dopięty do dołu */
.cards-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.section-therapies .cards-grid { grid-template-columns: repeat(3, 1fr); }
.card {
  display: flex; flex-direction: column; gap: .4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.25rem;
  color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); color: var(--ink); }
.card h3 { font-size: 1.18rem; margin: 0; transition: color .16s; }
.card:hover h3 { color: var(--brand-dark); }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.card-more {
  margin-top: auto; padding-top: .9rem;
  font-size: .88rem; font-weight: 600; color: var(--brand);
}
.card-more::after { content: " →"; transition: margin-left .16s; }
.card:hover .card-more::after { margin-left: .3rem; }

/* ---------------------------------------------------------- treść (prose) */

.prose { max-width: 76ch; margin-inline: auto; }
.prose-intro { margin-bottom: 2rem; }
.prose h1, .prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-top: 2.2rem; }
.prose h3 { font-size: 1.25rem; margin-top: 1.8rem; }
.prose p { margin: 0 0 1.1em; }
.prose img {
  border-radius: 14px; box-shadow: var(--shadow-sm);
  cursor: zoom-in;
}
.prose .alignleft { float: left; margin: .35rem 1.4rem .9rem 0; max-width: min(320px, 46%); }
.prose .alignright { float: right; margin: .35rem 0 .9rem 1.4rem; max-width: min(320px, 46%); }
.prose .aligncenter, .prose .alignnone { display: block; margin: 1.2rem auto; }

/* obrazki wstawiane edytorem z panelu (klasy CKEditora 5) */
.prose figure.image {
  display: table; clear: both; text-align: center;
  margin: 1.4rem auto; max-width: 100%;
}
.prose figure.image img {
  display: block; margin: 0 auto; max-width: 100%; height: auto;
  border-radius: 14px; box-shadow: var(--shadow-sm);
}
.prose figure.image.image-style-align-left { float: left; clear: none; margin: .4rem 1.6rem 1rem 0; }
.prose figure.image.image-style-align-right { float: right; clear: none; margin: .4rem 0 1rem 1.6rem; }
.prose figure.image:not(.image_resized).image-style-align-left,
.prose figure.image:not(.image_resized).image-style-align-right { max-width: min(380px, 48%); }
.prose figure.image.image_resized { display: block; }
.prose figure.image.image_resized img { width: 100%; }
.prose img.image-style-align-left { float: left; margin: .4rem 1.6rem 1rem 0; max-width: min(380px, 48%); }
.prose img.image-style-align-right { float: right; margin: .4rem 0 1rem 1.6rem; max-width: min(380px, 48%); }
.prose .image-inline { max-width: 100%; }
.prose figure.image > figcaption {
  display: table-caption; caption-side: bottom;
  font-size: .85rem; color: var(--muted); padding-top: .5rem; text-align: center;
}
.prose blockquote {
  margin: 1.5rem 0; padding: 1rem 1.4rem;
  background: var(--brand-softer); border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0; color: var(--ink);
}
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .35em; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.4rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .8rem; text-align: left; }
.prose th { background: var(--brand-softer); font-weight: 600; }

.prose-columns { max-width: 900px; }

/* ---------------------------------------------------------- opinie */

.quotes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.quote-card {
  margin: 0; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s;
}
.quote-card:hover { box-shadow: var(--shadow); }
.quote-mark { color: #D98A54; margin-bottom: .7rem; }
.quote-card blockquote { margin: 0 0 1rem; font-size: .96rem; color: var(--text); }
.quote-card blockquote p { margin: 0 0 .8em; }
.quote-card blockquote p:last-child { margin-bottom: 0; }
/* podpis oddzielony cienką linią, data dosunięta do prawej */
.quote-card figcaption {
  margin-top: auto; border-top: 1px solid #F1E7DA; padding-top: .75rem;
  display: flex; align-items: baseline; gap: .6rem; flex-direction: row;
}
.quote-card figcaption strong { font-weight: 600; font-size: .92rem; color: var(--brand-dark); }
.quote-card figcaption span { margin-left: auto; font-size: .8rem; color: var(--muted-2); }
.quote-image { border-radius: 12px; cursor: zoom-in; margin-bottom: .9rem; }

/* podstrona Opinie — mozaika: naturalne wysokości, przemienne odcienie,
   duży delikatny cudzysłów w tle */
.quotes-columns { columns: 2; column-gap: .9rem; max-width: 1000px; margin-inline: auto; }
.quotes-columns .quote-card {
  break-inside: avoid; margin-bottom: .9rem;
  position: relative; overflow: hidden; border: 0; border-radius: 20px;
  box-shadow: none;
}
.quotes-columns .quote-card:nth-child(3n+1) { background: var(--brand-softer); }
.quotes-columns .quote-card:nth-child(3n+2) { background: #fff; border: 1px solid var(--line); }
.quotes-columns .quote-card:nth-child(3n)   { background: var(--brand-soft); }
.quotes-columns .quote-card::before {
  content: "„"; position: absolute; right: 6px; top: -18px;
  font: 700 96px/1 var(--font-head); color: rgba(192, 90, 34, .07);
  pointer-events: none;
}
.quotes-columns .quote-mark { display: none; }
.quotes-columns .quote-card figcaption { border-top-color: rgba(160, 69, 19, .14); }

/* ---------------------------------------------------------- artykuły */

.articles-list { display: flex; flex-direction: column; gap: 1.6rem; max-width: 1000px; margin-inline: auto; }
.article-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2.2rem);
}
.article-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.article-head h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin: 0 0 .25rem; }
.article-source { margin: 0; color: var(--brand-dark); font-weight: 600; font-size: .92rem; }
.article-count {
  flex-shrink: 0; padding: .3rem .8rem; border-radius: 999px;
  background: var(--brand-softer); color: var(--brand-dark);
  font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.article-intro { color: var(--muted); }
.scans-row {
  display: flex; gap: .9rem; overflow-x: auto; padding-block: .4rem .6rem;
  scroll-snap-type: x mandatory;
}
.scans-row img {
  height: 240px; width: auto; flex-shrink: 0;
  border-radius: 10px; border: 1px solid var(--line);
  cursor: zoom-in; scroll-snap-align: start;
  transition: transform .16s, box-shadow .16s;
}
.scans-row img:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.scans-hint { margin: .3rem 0 0; font-size: .82rem; color: var(--muted); }

/* ---------------------------------------------------------- podstrona */

.page-hero {
  position: relative;
  background:
    radial-gradient(700px 340px at 85% -20%, rgba(192, 90, 34, .11), transparent 60%);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.4rem, 5vw, 3.8rem);
}
/* krótka terakotowa linia akcentu na dolnej krawędzi (strony bez zdjęcia) */
.page-hero:not(.has-photo)::after {
  content: ""; position: absolute; bottom: -2px; height: 3px; width: 64px;
  left: calc(max((100% - var(--wrap)) / 2, 0px) + clamp(1rem, 4vw, 2rem));
  border-radius: 999px; background: var(--brand);
}
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: .3em; }
.page-hero .lead { margin: 0; }
.page-hero .overline { margin-bottom: .6rem; }

.page-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
}
.page-hero-img {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 1.6rem;
}
.page-main .prose { margin-inline: 0; }

/* ---------- nagłówek ze zdjęciem (baner tuż pod menu) ----------
   Zdjęcie wypełnia nagłówek w tle, tytuł stoi na jasnej strefie u góry.
   Wysokość: .h-niski/.h-sredni/.h-wysoki · efekt: .fx-gradient/pelne/fala/winieta */
.page-hero.has-photo {
  position: relative; isolation: isolate; border-bottom: none;
  display: flex; flex-direction: column; justify-content: flex-start;
}
.page-hero.has-photo > .wrap { position: relative; z-index: 1; }

/* Podświetlenie napisów — poświata idąca OD LITER (text-shadow), płynna, bez
   prostokąta. Wariant per strona (.ov-*), zawsze w kolorze tła strony. */
.page-hero.has-photo.ov-delikatna > .wrap :is(.overline, h1, .lead) {
  text-shadow: 0 0 7px var(--bg), 0 0 15px var(--bg);
}
.page-hero.has-photo.ov-poswiata > .wrap :is(.overline, h1, .lead) {
  text-shadow: 0 0 6px var(--bg), 0 0 14px var(--bg), 0 0 26px var(--bg);
}
.page-hero.has-photo.ov-mocna > .wrap :is(.overline, h1, .lead) {
  text-shadow: 0 0 5px var(--bg), 0 0 12px var(--bg), 0 0 24px var(--bg),
               0 0 42px var(--bg), 0 0 64px var(--bg);
}
/* „miękki blask" — poświata od liter + rozmyty rozbłysk za tekstem
   (radial rozmyty filtrem, więc bez żadnej ostrej krawędzi) */
.page-hero.has-photo.ov-blask > .wrap :is(.overline, h1, .lead) {
  text-shadow: 0 0 6px var(--bg), 0 0 16px var(--bg);
}
.page-hero.has-photo.ov-blask > .wrap::before {
  content: ""; position: absolute; z-index: -1; inset: -1rem -2.5rem;
  background: radial-gradient(closest-side at 32% 50%,
    color-mix(in srgb, var(--bg) 82%, transparent), transparent);
  filter: blur(28px);
  pointer-events: none;
}

.page-hero.has-photo.h-niski  { min-height: clamp(220px, 28vw, 340px); padding-block: clamp(1.8rem, 4vw, 2.6rem) clamp(2rem, 5vw, 3.2rem); }
.page-hero.has-photo.h-sredni { min-height: clamp(300px, 38vw, 460px); padding-block: clamp(2.2rem, 5vw, 3.2rem) clamp(2.6rem, 6vw, 4rem); }
.page-hero.has-photo.h-wysoki { min-height: clamp(380px, 48vw, 600px); padding-block: clamp(2.4rem, 5vw, 3.8rem) clamp(3rem, 6vw, 5rem); }

.page-hero-photo { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.page-hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block;
  filter: saturate(.88) contrast(.98);
}
.page-hero-photo::before, .page-hero-photo::after { content: ""; position: absolute; inset: 0; }

/* welon pod tytułem (u góry), by tekst był czytelny na zdjęciu */
.page-hero-photo::before {
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 86%, transparent) 0%,
    color-mix(in srgb, var(--bg) 55%, transparent) 26%,
    color-mix(in srgb, var(--bg) 18%, transparent) 48%,
    transparent 64%);
}

/* efekt „wyłanianie" — kremowa kurtyna od góry, zdjęcie odsłania się ku dołowi */
.page-hero.fx-gradient .page-hero-photo::before { display: none; }
.page-hero.fx-gradient .page-hero-photo::after {
  background: linear-gradient(to bottom,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 96%, transparent) 16%,
    color-mix(in srgb, var(--bg) 88%, transparent) 30%,
    color-mix(in srgb, var(--bg) 68%, transparent) 46%,
    color-mix(in srgb, var(--bg) 38%, transparent) 66%,
    color-mix(in srgb, var(--bg) 12%, transparent) 85%,
    transparent 100%);
}

/* efekt „pełne zdjęcie" — całe zdjęcie widoczne, tylko delikatne zejście w tło u dołu */
.page-hero.fx-pelne .page-hero-photo::after {
  background: linear-gradient(to bottom, transparent 72%, color-mix(in srgb, var(--bg) 60%, transparent) 90%, var(--bg) 100%);
}

/* efekt „miękka fala" — organiczna, falista dolna krawędź rozpływająca się w tle */
.page-hero.fx-fala .page-hero-photo {
  -webkit-mask: radial-gradient(140% 82% at 50% 0%, #000 60%, transparent 100%);
          mask: radial-gradient(140% 82% at 50% 0%, #000 60%, transparent 100%);
}
.page-hero.fx-fala .page-hero-photo::after {
  background: linear-gradient(to bottom, transparent 78%, var(--bg) 100%);
}

/* efekt „winieta" — miękkie ściemnienie w kolorze tła po bokach i u dołu */
.page-hero.fx-winieta .page-hero-photo::after {
  background:
    radial-gradient(125% 100% at 50% 22%, transparent 46%, color-mix(in srgb, var(--bg) 55%, transparent) 82%, var(--bg) 100%),
    linear-gradient(to bottom, transparent 80%, var(--bg) 100%);
}

.page-aside { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 1.1rem; }
.aside-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem;
}
.aside-card h2 { font-size: 1.2rem; margin-bottom: .6rem; }
.aside-card p { font-size: .92rem; color: var(--muted); margin-top: 0; }
.aside-card .btn { margin-bottom: .6rem; }
.aside-loc { display: flex; align-items: center; gap: .45rem; font-size: .9rem !important; margin-bottom: 0; }
.aside-links ul { list-style: none; margin: 0; padding: 0; }
.aside-links li { border-bottom: 1px solid var(--line); }
.aside-links li:last-child { border-bottom: none; }
.aside-links a { display: block; padding: .5rem .1rem; font-size: .92rem; text-decoration: none; color: var(--ink); }
.aside-links a:hover { color: var(--brand-dark); padding-left: .3rem; transition: padding .16s, color .16s; }

/* ---------------------------------------------------------- kontakt */

.contact-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.4rem; align-items: start; }
.contact-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.6rem, 3.5vw, 2.4rem);
}
.contact-card h2 { font-size: 1.6rem; }
.contact-note {
  padding: .9rem 1.1rem; background: var(--brand-softer);
  border-radius: 12px; color: var(--brand-dark); font-weight: 500; font-size: .95rem;
}
.contact-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list li { display: flex; align-items: center; gap: 1rem; }
.contact-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--brand-soft); color: var(--brand-dark); flex-shrink: 0;
}
.contact-list small { display: block; color: var(--muted); font-size: .8rem; }
.contact-list a, .contact-list div > span { font-weight: 600; font-size: 1.08rem; color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--brand-dark); }
/* kroki z numerkami w kółkach — wspólny motyw (kontakt, „Jak wygląda nauka?”) */
.contact-steps { list-style: none; counter-reset: krok; margin: 0 0 1.2rem; padding: 0; }
.contact-steps li {
  counter-increment: krok; position: relative;
  padding-left: 46px; margin-bottom: .8em; font-size: .95rem; min-height: 34px;
}
.contact-steps li::before {
  content: counter(krok);
  position: absolute; left: 0; top: -1px;
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--brand-softer); border: 1px solid var(--brand-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 14px var(--font-head); color: var(--brand-dark);
}

/* ---------------------------------------------------------- pracownia (sklep) */

.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.shop-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  display: flex; flex-direction: column; padding-top: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.shop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
/* zdjęcie produktu — kadr o wybieranym w panelu kształcie (kilka organicznych);
   pierścienie passe-partout rysowane box-shadow, więc podążają za kształtem */
.shop-photo {
  width: min(66%, 210px); aspect-ratio: 4 / 5; object-fit: cover;
  display: block; margin: .35rem auto 0;
  border-radius: 46% 54% 52% 48% / 38% 40% 60% 62%;
  box-shadow:
    0 0 0 1px #EBDFCE,
    0 0 0 9px #fff,
    0 0 0 10px #F1E2D2,
    0 14px 30px -12px rgba(43, 38, 32, .2);
  background: var(--brand-softer); cursor: zoom-in;
  transition: transform .2s ease;
}
.shop-photo.shape-jajo        { aspect-ratio: 4 / 5; border-radius: 46% 54% 52% 48% / 38% 40% 60% 62%; }
.shop-photo.shape-kolo        { aspect-ratio: 1 / 1; border-radius: 50%; }
.shop-photo.shape-zaokraglony { aspect-ratio: 4 / 5; border-radius: 18px; }
.shop-photo.shape-lisc        { aspect-ratio: 1 / 1; border-radius: 8% 46% 8% 46% / 46% 8% 46% 8%; }
.shop-photo.shape-kropla      { aspect-ratio: 4 / 5; border-radius: 62% 38% 46% 54% / 55% 42% 58% 45%; }
.shop-card:hover .shop-photo { transform: rotate(-1.5deg) scale(1.02); }
.shop-card:hover .shop-photo.shape-kolo,
.shop-card:hover .shop-photo.shape-zaokraglony { transform: scale(1.03); }
.shop-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.shop-cat {
  align-self: flex-start; font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  background: var(--brand-soft); color: var(--brand-dark);
  padding: .3rem .65rem; border-radius: 999px; text-transform: uppercase;
}
.shop-body h3 { margin: 0; font-size: 1.15rem; }
.shop-desc { margin: 0; color: var(--muted); font-size: .92rem; }
.shop-foot {
  margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
}
.shop-price { font: 600 1.3rem/1 var(--font-head); color: var(--brand-dark); }
.shop-foot .btn { min-height: 44px; padding: .4rem 1.3rem; font-size: .92rem; }

/* „duch” wolnego miejsca — szkielet karty, gdy w siatce zostaje puste pole */
.karta-duch {
  border: 1.5px dashed var(--line-strong); border-radius: 20px;
  background: rgba(255, 255, 255, .45);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 32px; min-height: 320px;
}
.karta-duch .owal { width: 96px; height: 116px; background: var(--brand-soft); border-radius: 50%/46%; }
.karta-duch .belka { height: 9px; border-radius: 999px; background: #EFE3D3; width: 120px; }
.karta-duch .belka--krotka { width: 76px; }

/* pusty stan Pracowni — organiczny blob + istniejący komunikat */
.pusty-stan {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 4rem 1.5rem; min-height: 320px;
}
.pusty-stan .blob { position: relative; width: 120px; height: 112px; margin-bottom: 1.4rem; }
.pusty-stan .blob::before {
  content: ""; position: absolute; inset: 0;
  background: var(--brand-soft); border-radius: 55% 45% 58% 42% / 52% 60% 40% 48%;
}
.pusty-stan .blob::after {
  content: ""; position: absolute; inset: 16px;
  border: 1.5px solid rgba(160, 69, 19, .28); border-radius: 55% 45% 58% 42% / 52% 60% 40% 48%;
}
.pusty-stan p { max-width: 44ch; color: var(--muted); }

@media (max-width: 1024px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .shop-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- pasek CTA */

.cta-band {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  background: linear-gradient(135deg, #C4602A 0%, #B14E1C 100%);
  color: #FFFDF9; border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
}
/* delikatne okręgi w tle pasa */
.cta-band::before, .cta-band::after {
  content: ""; position: absolute; border: 1.5px solid rgba(250, 246, 240, .15);
  border-radius: 999px; pointer-events: none;
}
.cta-band::before { width: 340px; height: 340px; right: -90px; top: -170px; }
.cta-band::after { width: 220px; height: 220px; right: 180px; bottom: -140px; }
.cta-band h2 { color: #fff; margin-bottom: .3em; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta-band p { margin: 0; opacity: .92; max-width: 52ch; }
.cta-band-actions { display: flex; gap: .8rem; flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------------------------------------------------------- stopka */

.site-footer {
  background: var(--ink); color: #C9BFB2; margin-top: 2rem;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--brand-dark) 0%, var(--copper-light) 45%, var(--brand) 100%) 1;
}
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1.1fr; gap: 2rem;
  padding-block: 3rem 2rem;
}
.site-footer h3 { font: 600 1rem/1.3 var(--font-head); color: var(--brand-soft); margin-bottom: .85rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand-text strong { color: #fff; }
.footer-brand p { color: #C9BFB2; font-size: .93rem; max-width: 40ch; }
.footer-nav ul, .footer-contact ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li, .footer-contact li { margin-bottom: .5em; }
.site-footer a {
  color: #D9CFC2; text-decoration: none; font-size: .93rem;
  transition: color .16s ease-out;
}
.site-footer a:hover { color: var(--bg); text-decoration: underline; text-underline-offset: 4px; }
.footer-contact li { color: #C9BFB2; font-size: .93rem; }
.footer-contact li:first-child a { font-weight: 600; font-size: 1rem; color: var(--bg); }
.footer-note { color: #A99F92; font-size: .84rem; margin-top: 1rem; max-width: 34ch; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-block: 1.2rem;
}
.footer-bottom p { margin: 0; font-size: .8rem; line-height: 1.65; color: #A99F92; }

/* ---------------------------------------------------------- lightbox */

.lightbox {
  border: none; padding: 0; background: transparent;
  max-width: 92vw; max-height: 92vh;
}
.lightbox::backdrop { background: rgba(28, 24, 20, .82); backdrop-filter: blur(4px); }
.lightbox img {
  max-width: 92vw; max-height: 86vh; width: auto; height: auto;
  border-radius: 12px; display: block; box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.lightbox-close {
  position: absolute; top: -0.4rem; right: -0.4rem; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  border: none; background: #fff; color: var(--ink);
  font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------- strony błędów */

.error-page { text-align: center; padding-block: 6rem; }
.error-page .lead { margin-inline: auto; margin-bottom: 2rem; }

/* ---------------------------------------------------------- responsywność */

@media (max-width: 1024px) {
  .cards-grid, .quotes-grid { grid-template-columns: repeat(2, 1fr); }
  .main-nav a { padding-inline: .55rem; font-size: .9rem; }
}

@media (max-width: 990px) {
  .nav-toggle { display: flex; order: 3; }
  .btn-phone { margin-left: auto; }
  .btn-phone span { display: none; }
  .btn-phone { padding: .68rem; }
  .header-inner { min-height: 78px; }
  .site-header .brand-logo { width: 54px; height: 54px; }

  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
    max-height: calc(100dvh - 78px); overflow-y: auto;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: .8rem; gap: .1rem; }
  .main-nav a { display: block; padding: .7rem .8rem; font-size: 1rem; }
  .main-nav .sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    display: none; box-shadow: none; border: none;
    background: var(--brand-softer); border-radius: 10px; margin: .2rem 0 .4rem .8rem;
  }
  .main-nav .has-sub.open .sub { display: block; }

  .page-hero.has-photo.h-niski  { min-height: clamp(190px, 46vw, 300px); }
  .page-hero.has-photo.h-sredni { min-height: clamp(240px, 62vw, 400px); }
  .page-hero.has-photo.h-wysoki { min-height: clamp(300px, 78vw, 480px); }
  .page-hero-photo img { object-position: center 40%; }

  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-media { order: -1; }
  .hero-media img { width: min(300px, 70vw); }
  .page-layout { grid-template-columns: 1fr; }
  .page-aside { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
  .quotes-columns { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (max-width: 720px) {
  h1, .hero h1 { font-size: 31px; line-height: 1.12; }
  h2, .section-head h2 { font-size: 26px; }
  .header-inner { min-height: 64px; }
  .section { padding-block: 3.25rem; }
  /* telefon jako okrągły przycisk */
  .btn-phone { width: 44px; height: 44px; padding: 0; justify-content: center; }
  /* przyciski hero w kolumnie, pełna szerokość */
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  /* portret mniejszy */
  .hero-media img { width: min(230px, 64vw); }
  .quotes-columns { columns: 1; }
  .cta-band { padding: 2rem 1.5rem; }
}

@media (max-width: 560px) {
  .cards-grid, .quotes-grid { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .site-header .brand-logo { width: 46px; height: 46px; }
  .prose .alignleft, .prose .alignright { float: none; margin: 1rem auto; max-width: 100%; display: block; }
  .prose figure.image.image-style-align-left, .prose figure.image.image-style-align-right,
  .prose img.image-style-align-left, .prose img.image-style-align-right {
    float: none; margin: 1rem auto; max-width: 100%;
  }
  .prose figure.image.image_resized { width: 100% !important; }
  .scans-row img { height: 190px; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}
