:root {
  --bg: #f4f0e8;
  --surface: #faf8f3;
  --text: #24221f;
  --muted: #777168;
  --line: #cfc7ba;
  --accent: #2f4539;
  --shadow: 0 18px 45px rgba(39, 34, 28, .08);
  --max: 1440px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.72), transparent 32rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, select { font: inherit; }

button, a, select { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 200;
  transform: translateY(-200%);
  background: #111;
  color: #fff;
  padding: .7rem 1rem;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
  padding-top: 30px;
}

.brand-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 140px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .22rem;
  text-decoration: none;
  text-align: center;
}

.brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: .92;
  letter-spacing: .12em;
  font-weight: 400;
}

.brand-name {
  margin-top: .25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: .04em;
  font-style: italic;
}

.brand-subtitle {
  margin-top: .5rem;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.lang-switch {
  position: absolute;
  right: 0;
  top: 4px;
  display: flex;
  gap: .35rem;
  align-items: center;
  color: var(--muted);
  font-size: .78rem;
}

.lang-button {
  border: 0;
  padding: .3rem .15rem;
  color: inherit;
  background: transparent;
  cursor: pointer;
  letter-spacing: .08em;
}
.lang-button.is-active {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: .3em;
}

.category-nav {
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem .75rem;
}

.category-button,
.control-button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.category-button {
  padding: .62rem .95rem;
  font-size: clamp(.78rem, 1vw, .9rem);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.category-button:hover,
.control-button:hover {
  color: var(--text);
  border-color: var(--line);
}

.category-button.is-active,
.control-button.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.category-button:active,
.control-button:active { transform: translateY(1px); }

main {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 20px 0 8px;
}

.filter-group {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}

.control-button {
  padding: .45rem .72rem;
  font-size: .83rem;
}

.sort-select {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: .45rem 2rem .45rem .2rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.gallery-section { padding: 30px 0 80px; }

.gallery-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 22px;
}

.gallery-heading-row h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
}

.result-count {
  color: var(--muted);
  font-size: .85rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.artwork-card {
  display: block;
  width: 100%;
  margin: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  overflow: hidden;
}

.artwork-card button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: inherit;
}

.artwork-image-wrap {
  position: relative;
  overflow: hidden;
  background: #ddd7cd;
}

.artwork-image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .5s cubic-bezier(.2,.65,.2,1), filter .35s ease;
}

.artwork-card:hover .artwork-image { transform: scale(1.018); }

.artwork-info {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 13px 14px 14px;
}

.artwork-title {
  margin: 0 0 .2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.05rem;
}

.artwork-meta {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.artwork-price {
  margin: .35rem 0 0;
  color: var(--accent);
  font-size: .78rem;
  line-height: 1.45;
}

.status-dot {
  flex: 0 0 auto;
  width: .58rem;
  height: .58rem;
  margin-top: .38rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--accent);
  background: currentColor;
}
.status-dot.unavailable {
  color: #9b9388;
  background: transparent;
}

.empty-state {
  padding: 80px 0;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
  padding: 22px 0 34px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
}

.footer-copyright {
  justify-self: start;
}

.site-footer .footer-contact-button {
  justify-self: center;
}

.site-credit {
  justify-self: end;
  white-space: nowrap;
}

.site-credit a {
  color: var(--text);
  text-decoration-thickness: 1px;
  transition: opacity .18s ease;
}

.site-credit a:hover {
  opacity: .65;
}

.site-footer a {
  text-underline-offset: .25em;
}


.gallery-heading-actions {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.pricing-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: .25rem 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: .82rem;
  letter-spacing: .02em;
  text-underline-offset: .2em;
}

.pricing-link:hover {
  color: var(--text);
}

.pricing-dialog {
  width: min(calc(100% - 28px), 980px);
  max-width: 980px;
  max-height: 92dvh;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.pricing-dialog::backdrop {
  background: rgba(20, 19, 17, .78);
  backdrop-filter: blur(3px);
}

.pricing-panel {
  position: relative;
  max-height: 92dvh;
  overflow: auto;
  border: 1px solid rgba(70, 62, 52, .16);
  padding: clamp(28px, 5vw, 54px);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
}

.pricing-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 3;
  border: 0;
  margin-top: -6px;
  margin-right: -8px;
  padding: .2rem .35rem;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.pricing-header {
  margin-bottom: 30px;
  padding-right: 42px;
}

.pricing-kicker {
  display: block;
  margin-bottom: .55rem;
  color: var(--accent);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.pricing-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 400;
}

.pricing-header p {
  margin: .6rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.pricing-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.pricing-card {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.pricing-card h3 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
}

.pricing-size-group + .pricing-size-group {
  margin-top: 22px;
}

.pricing-size-group h4 {
  margin: 0 0 4px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: .05em;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 9px 0;
  border-bottom: 1px solid rgba(207, 199, 186, .7);
}

.pricing-row span {
  color: var(--muted);
  font-size: .86rem;
}

.pricing-row strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 400;
  text-align: right;
}

.pricing-row .pricing-individual {
  max-width: 180px;
  color: var(--muted);
  font-family: inherit;
  font-size: .78rem;
  line-height: 1.35;
}

.pricing-note {
  margin: 30px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}

.artwork-dialog {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: rgba(20, 19, 17, .96);
  color: #f7f4ee;
}

.artwork-dialog::backdrop { background: rgba(0,0,0,.86); }

.artwork-dialog[open] {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
}

.dialog-figure {
  width: min(100%, 1180px);
  height: min(92dvh, 920px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

/* Obraz zawsze pokazujemy w całości.
   Element IMG wypełnia dostępne pole, ale object-fit: contain
   pilnuje proporcji i NIE UCINA żadnej części pracy. */
.dialog-image-wrap {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.dialog-image {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  box-shadow: 0 22px 70px rgba(0,0,0,.4);
}

/* Opis leży POD obrazem, więc nie zasłania ani jednego piksela dzieła.
   Lekko "szklany" pasek daje czytelność bez ciężkiego panelu. */
.dialog-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 13px 16px 12px;
  margin-top: 8px;
  color: #f7f4ee;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.dialog-caption h2 {
  margin: 0 0 .28rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: #fff;
}

.dialog-caption p {
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: .8rem;
  line-height: 1.45;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  padding: .38rem .7rem;
  color: #f7f4ee;
  background: rgba(255,255,255,.045);
  font-size: .73rem;
  white-space: nowrap;
}

.dialog-close,
.dialog-nav {
  border: 0;
  color: #f7f4ee;
  background: transparent;
  cursor: pointer;
}

.dialog-close {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 2;
  font-size: 2rem;
  line-height: 1;
}

.dialog-nav {
  height: 100%;
  font-size: 1.5rem;
  opacity: .7;
}
.dialog-nav:hover { opacity: 1; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .brand-wrap {
    min-height: 128px;
    padding-right: 64px;
    padding-left: 64px;
  }

  .brand-subtitle {
    max-width: 520px;
    line-height: 1.6;
  }

  .artwork-dialog[open] {
    grid-template-columns: 52px 1fr 52px;
  }
}

@media (max-width: 620px) {
  .site-header,
  main,
  .site-footer {
    width: min(calc(100% - 22px), var(--max));
  }

  .site-header { padding-top: 16px; }

  .brand-wrap {
    min-height: 122px;
    padding: 8px 0 16px;
    place-items: start center;
  }

  .brand-title {
    letter-spacing: .075em;
    font-size: clamp(1.65rem, 9vw, 2.8rem);
  }

  .brand-name { font-size: 1rem; }

  .brand-subtitle {
    padding: 0 24px;
    font-size: .65rem;
    letter-spacing: .12em;
  }

  .lang-switch {
    position: static;
    margin-top: 12px;
  }

  .category-nav { padding: 15px 0 13px; }

  .category-list {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .category-list::-webkit-scrollbar { display: none; }
  .category-button { white-space: nowrap; }

  .controls {
    align-items: stretch;
    flex-direction: column;
    padding-top: 15px;
  }

  .filter-group {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .sort-wrap { align-self: flex-end; }

  .gallery-section { padding-top: 22px; }

  .gallery-heading-row {
    align-items: flex-start;
  }

  .gallery-heading-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: .45rem;
  }

  .pricing-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pricing-dialog {
    width: min(calc(100% - 18px), 980px);
  }

  .pricing-panel {
    padding: 32px 22px 26px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .artwork-card { margin-bottom: 0; }

  .site-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 28px;
  }

  .footer-copyright,
  .site-footer .footer-contact-button,
  .site-credit {
    align-self: flex-start;
  }

  .site-credit {
    white-space: normal;
  }

  .artwork-dialog[open] {
    grid-template-columns: 1fr;
    padding: 52px 12px 12px;
  }

  .dialog-figure {
    width: 100%;
    height: calc(100dvh - 70px);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .dialog-caption {
    align-items: flex-start;
    padding: 11px 12px;
    margin-top: 7px;
  }

  .dialog-caption h2 {
    font-size: 1.15rem;
  }

  .dialog-caption p {
    max-width: 72vw;
    font-size: .74rem;
  }

  .dialog-nav {
    position: fixed;
    z-index: 3;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
  }
  .dialog-prev { left: 16px; }
  .dialog-next { right: 16px; }
}

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


.social-links {
  position: absolute;
  left: 0;
  top: 2px;
  display: flex;
  align-items: center;
  gap: .45rem;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--muted);
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}

.social-links a:hover {
  color: var(--text);
  border-color: var(--line);
  transform: translateY(-1px);
}

.social-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.6;
}

.social-links svg rect,
.social-links svg circle:not(.icon-dot) {
  fill: none;
}

.social-links .icon-dot {
  fill: currentColor;
  stroke: none;
}





.about-dialog {
  width: min(calc(100% - 28px), 1120px);
  max-width: 1120px;
  max-height: 92dvh;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.about-dialog::backdrop {
  background: rgba(20, 19, 17, .78);
  backdrop-filter: blur(3px);
}

.about-modal-panel {
  position: relative;
  max-height: 92dvh;
  overflow: auto;
  padding: clamp(24px, 4vw, 48px);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
}

.about-modal-grid {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.45fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.about-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 4;
  border: 0;
  margin-top: -8px;
  margin-right: -8px;
  padding: .2rem .35rem;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.about-image-column {
  position: sticky;
  top: 0;
}

.about-image-wrap {
  overflow: hidden;
  background: #ddd6ca;
  box-shadow: var(--shadow);
}

.about-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-copy {
  max-width: 720px;
  padding-bottom: 8px;
}

.about-kicker {
  display: block;
  margin-bottom: .7rem;
  color: var(--accent);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.about-copy h2 {
  margin: 0 0 1.3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 400;
}

.about-copy p {
  margin: 0 0 1.05rem;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.98rem, 1.35vw, 1.12rem);
  line-height: 1.72;
}

.about-copy .about-motto-intro {
  margin-top: 1.6rem;
  margin-bottom: .5rem;
  color: var(--text);
  font-family: inherit;
  font-size: .84rem;
  letter-spacing: .02em;
}

.about-quote {
  margin: 0 0 1.7rem;
  padding: .2rem 0 .2rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-style: italic;
  line-height: 1.6;
}

.about-contact {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.about-contact p {
  margin-bottom: 1rem;
}

.about-contact-button {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: .72rem 1.05rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease;
}

.about-contact-button:hover {
  opacity: .9;
}

.about-contact-button:active {
  transform: translateY(1px);
}

@media (max-width: 700px) {
  .about-dialog {
    width: min(calc(100% - 18px), 1120px);
  }

  .about-modal-panel {
    padding: 42px 18px 24px;
  }

  .about-modal-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .about-image-column {
    position: static;
  }

  .about-image-wrap {
    width: min(100%, 430px);
    margin: 0 auto;
  }

  .about-copy h2 {
    font-size: clamp(2rem, 12vw, 3.1rem);
  }
}

/* =========================================================
   LIGHTBOX: FIXED ZOOM
   - jeden poziom powiększenia (2x)
   - brak zoomu rolką
   - przeciąganie jest ograniczone do granic obrazu
   - obraz nie może "uciec" poza viewport
   ========================================================= */

.dialog-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  transform-origin: center center;
  transform: translate3d(var(--pan-x, 0px), var(--pan-y, 0px), 0)
             scale(var(--zoom, 1));
  transition: transform .22s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}

.artwork-dialog.is-zoomed .dialog-figure {
  width: 100%;
  height: min(96dvh, 1200px);
  grid-template-rows: minmax(0, 1fr);
}

.artwork-dialog.is-zoomed .dialog-caption {
  display: none;
}

.artwork-dialog.is-zoomed .dialog-image-wrap {
  overflow: hidden;
  cursor: grab;
}

.artwork-dialog.is-zoomed .dialog-image {
  cursor: zoom-out;
}

.artwork-dialog.is-zoomed.is-panning .dialog-image-wrap,
.artwork-dialog.is-zoomed.is-panning .dialog-image {
  cursor: grabbing;
}

.artwork-dialog.is-zoomed.is-panning .dialog-image {
  transition: none;
}

.artwork-dialog.is-zoomed .dialog-nav {
  opacity: .32;
  transition: opacity .18s ease;
}

.artwork-dialog.is-zoomed .dialog-nav:hover {
  opacity: 1;
}

@media (max-width: 620px) {
  .artwork-dialog.is-zoomed {
    padding: 44px 8px 8px;
  }

  .artwork-dialog.is-zoomed .dialog-figure {
    height: calc(100dvh - 52px);
  }

  .artwork-dialog.is-zoomed .dialog-nav {
    bottom: 14px;
  }
}


/* =========================================================
   MOBILE HEADER FIX
   Social icons must not overlap the brand title.
   On small screens the header becomes a clean vertical stack:
   logo -> language switch -> social links.
   ========================================================= */
@media (max-width: 620px) {
  .brand-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
    padding: 8px 0 16px;
  }

  .brand {
    order: 1;
    width: 100%;
  }

  .lang-switch {
    order: 2;
    position: static;
    margin-top: 12px;
  }

  .social-links {
    order: 3;
    position: static;
    left: auto;
    top: auto;
    margin-top: 8px;
    gap: .55rem;
  }

  .social-links a {
    width: 32px;
    height: 32px;
  }
}
