/* flat studio: ciepła, minimalistyczna, naturalna. Krem, czekolada, pomarańcz jako delikatny akcent. */
:root {
  color-scheme: light;
  --krem: #efeae1;
  --krem-jasny: #f7f4ee;
  --czekolada: #3a322d;
  --czekolada-2: #6f645c;
  --linia: #d9d1c4;
  --pomarancz: #c4562a;
  --pomarancz-ciemny: #a4441d;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: 10px;
}

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-ext-300-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-300-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap; src: url(/assets/fonts/jost-latin-ext-300-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap; src: url(/assets/fonts/jost-latin-300-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jost-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jost-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/jost-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/jost-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--krem); color: var(--czekolada); font: 300 16px/1.65 var(--sans); }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--pomarancz-ciemny); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--czekolada); color: var(--krem-jasny); padding: 8px 14px; z-index: 10; }
.skip:focus { top: 12px; }

/* nagłówek */
.site-head { display: grid; justify-items: center; gap: 18px; padding: clamp(28px, 5vw, 52px) var(--gutter) clamp(24px, 4vw, 40px); text-align: center; }
.wordmark { font: 400 clamp(30px, 4vw, 44px)/1 var(--serif); letter-spacing: .32em; padding-left: .32em; text-transform: lowercase; text-decoration: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; }
.site-nav a { font: 400 14px/1.4 var(--sans); letter-spacing: .06em; text-decoration: none; padding-bottom: 3px; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-color: var(--linia); }
.site-nav a[aria-current="page"] { color: var(--pomarancz-ciemny); border-color: currentColor; }

main { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) clamp(48px, 8vw, 96px); }
.section { display: grid; gap: 22px; margin-top: clamp(28px, 5vw, 56px); }
.section:first-child { margin-top: 0; }
.page-title { margin: 0; font: 300 clamp(36px, 5.5vw, 60px)/1.05 var(--serif); text-align: center; text-transform: lowercase; text-wrap: balance; }
.center { justify-items: center; text-align: center; }
.center p { margin: 0; max-width: 56ch; }

/* strona główna */
.hero { display: grid; gap: clamp(24px, 4vw, 40px); }
.hero-lead { margin: 0 auto; max-width: 32ch; text-align: center; font: 300 clamp(24px, 3.2vw, 38px)/1.25 var(--serif); text-wrap: balance; }
.show { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: var(--linia); }
.show .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.show .slide.is-on { opacity: 1; }
.show-dots { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); display: flex; }
/* przycisk 24 × 24 px (wygodny cel dotyku), widoczna kropka 9 px rysowana w środku */
.show-dots button { position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.show-dots button::before { content: ""; position: absolute; inset: 7.5px; border-radius: 50%; border: 1px solid #fff; }
.show-dots button[aria-current="true"]::before { background: #fff; }
/* pauza/wznów: dwie kreski albo trójkąt, 24 × 24 px w prawym dolnym rogu */
.show-toggle { position: absolute; right: 8px; bottom: 4px; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.show-toggle::before { content: ""; position: absolute; left: 8px; top: 7px; width: 8px; height: 10px; border: solid #fff; border-width: 0 2px; }
.show-toggle[data-paused]::before { left: 9px; width: 0; height: 0; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #fff; }
.show-dots button, .show-toggle { filter: drop-shadow(0 0 2px rgba(30, 24, 20, .55)); }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--linia); padding-bottom: 10px; }
.sec-h h2 { margin: 0; font: 400 clamp(26px, 3vw, 32px)/1.1 var(--serif); text-transform: lowercase; }
.sec-h a { font-size: 14px; color: var(--pomarancz-ciemny); text-decoration: none; }
.sec-h a:hover { text-decoration: underline; }

/* kafelki: nazwa na środku zdjęcia */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.tile { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--linia); color: #fff; text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(30, 24, 20, .42), rgba(30, 24, 20, .22) 70%); transition: opacity .4s ease; }
.tile-name { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 16px; text-align: center; font: 400 clamp(22px, 2.6vw, 34px)/1.1 var(--serif); text-wrap: balance; text-shadow: 0 1px 3px rgba(30, 24, 20, .45), 0 0 18px rgba(30, 24, 20, .45); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.035); }
.tile:hover::after, .tile:focus-visible::after { opacity: .75; }

/* podstrona projektu */
.crumb { margin: 0; text-align: center; font-size: 14px; color: var(--czekolada-2); }
.crumb a { color: var(--czekolada-2); }
.item-meta { margin: -8px 0 0; text-align: center; font-size: 14px; letter-spacing: .04em; color: var(--czekolada-2); }
.item-opis { margin: 0 auto; max-width: 62ch; text-align: center; }
.photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photos .ph { display: block; aspect-ratio: 2 / 3; overflow: hidden; background: var(--linia); cursor: zoom-in; }
.photos img { width: 100%; height: 100%; object-fit: cover; }

/* lightbox */
.lightbox { padding: 0; border: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(30, 24, 20, .95); color: var(--krem-jasny); }
.lightbox::backdrop { background: rgba(30, 24, 20, .95); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 86dvh; width: auto; height: auto; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--krem-jasny); font: 300 34px/1 var(--sans); padding: 14px 18px; cursor: pointer; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 6px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-size: 13px; letter-spacing: .08em; }

/* teksty */
.prose { max-width: 66ch; margin-inline: auto; }
.prose h2 { font: 400 30px/1.15 var(--serif); margin: 12px 0 0; }
.prose p, .prose ul { margin: 0; }
.prose a { color: var(--pomarancz-ciemny); }

/* publikacje */
.pubs { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; width: 100%; }
.pub a { display: grid; gap: 2px; padding: 18px 0; border-bottom: 1px solid var(--linia); text-decoration: none; }
.pub-title { font: 400 26px/1.2 var(--serif); }
.pub-meta { font-size: 14px; color: var(--czekolada-2); }
.pub a:hover .pub-title { color: var(--pomarancz-ciemny); }

/* kontakt */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(28px, 5vw, 72px); }
.c-info { margin: 0; display: grid; gap: 18px; align-content: start; }
.c-info dt { font: 500 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--czekolada-2); margin-bottom: 6px; }
.c-info dd { margin: 0; font-size: 17px; }
.c-info a { text-decoration: none; border-bottom: 1px solid var(--linia); }
.c-info a:hover { border-color: var(--pomarancz-ciemny); }
.c-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.f { display: grid; gap: 4px; min-width: 0; align-content: start; }
.f.wide { grid-column: 1 / -1; }
.f > label { font-size: 13.5px; color: var(--czekolada-2); letter-spacing: .02em; }
.f .hint { display: block; font-size: 12.5px; }
.f input:not([type="checkbox"]):not([type="file"]), .f select, .f textarea { width: 100%; font: 300 16px/1.4 var(--sans); color: var(--czekolada); background: transparent; border: 0; border-bottom: 1px solid var(--linia); border-radius: 0; padding: 8px 0; }
.f textarea { resize: vertical; min-height: 110px; }
.f input:not([type="checkbox"]):not([type="file"]):focus, .f select:focus, .f textarea:focus { outline: none; border-bottom-color: var(--pomarancz-ciemny); }
.f input[type="file"] { font: 300 14px/1.4 var(--sans); padding: 12px; border: 1px dashed var(--linia); background: var(--krem-jasny); width: 100%; }
.file-list { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13.5px; color: var(--czekolada-2); }
.consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--czekolada-2); }
.consent input { margin-top: 4px; accent-color: var(--pomarancz-ciemny); }
.consent a { color: var(--pomarancz-ciemny); }
.err { font-size: 13px; color: var(--pomarancz-ciemny); min-height: 0; }
.err:empty { display: none; }
[aria-invalid="true"] { border-bottom-color: var(--pomarancz-ciemny) !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; margin: 0; font-size: 14.5px; }
.form-msg { display: none; grid-column: 1 / -1; margin: 0; padding: 12px 14px; border-left: 2px solid var(--pomarancz-ciemny); background: var(--krem-jasny); font-size: 14.5px; }
.form-msg:target { display: block; }
.form-status:empty { display: none; }
.send { grid-column: 1 / -1; justify-self: start; font: 400 15px/1 var(--sans); letter-spacing: .1em; text-transform: lowercase; background: var(--pomarancz-ciemny); color: var(--krem-jasny); border: 0; padding: 15px 34px; cursor: pointer; }
.send:hover { background: var(--czekolada); }
.send:disabled { opacity: .6; cursor: progress; }

/* stopka */
.site-foot { border-top: 1px solid var(--linia); margin: 0 var(--gutter); padding: 26px 0 34px; display: grid; gap: 4px; justify-items: center; text-align: center; font-size: 13.5px; color: var(--czekolada-2); }
.site-foot p { margin: 0; }
.site-foot a { text-decoration: none; border-bottom: 1px solid var(--linia); }

@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tiles, .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .show { aspect-ratio: 4 / 3; }
  .c-form { grid-template-columns: minmax(0, 1fr); }
  .site-nav ul { gap: 4px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .show .slide, .tile img, .tile::after { transition: none; }
}
