/* Księga: rozkładówka, zakładki u góry, przekładanie kart między podstronami.
   Czcionki: Cormorant Garamond i Eagle Lake (SIL OFL 1.1, licencje w fonts/), pliki lokalne. */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-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: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-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; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-latin-ext-500-italic.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: italic; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-latin-500-italic.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: 700; font-display: swap; src: url('../fonts/cormorant-garamond-latin-ext-700-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: 700; font-display: swap; src: url('../fonts/cormorant-garamond-latin-700-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: 'Eagle Lake'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/eagle-lake-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: 'Eagle Lake'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/eagle-lake-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; }

:root {
  --paper: #f8f7f3; --stone: #e7e6e0; --sage: #5f6d5c; --sage-deep: #4b5849; --sage-light: #a3ad9f;
  --forest: #2e3a2f; --ink: #2b2a28; --muted: #5f5e59; --on-dark: #f1f0ea;
  --serif: "Cormorant Garamond", Garamond, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --pismo: 'Eagle Lake', var(--serif); --pismo-kursywa: normal; --pismo-skala: .8;
  --rubryka: var(--sage-deep);
  --faktura: url('faktura.svg');
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(ellipse 90% 70% at 50% 35%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .4) 100%), #2a1f17 url('drewno.svg');
  color: var(--ink); font-family: var(--serif); font-size: 20px; line-height: 1.5; font-weight: 500;
  font-variant-numeric: oldstyle-nums; -webkit-text-size-adjust: 100%;
}
::selection { background: var(--sage); color: var(--on-dark); }
a { color: var(--sage-deep); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--forest); }
p { margin: 0 0 .8em; text-wrap: pretty; }
h1, h2 { font-family: var(--pismo); font-weight: 400; line-height: 1.15; margin: 0; font-variant-ligatures: none; text-wrap: balance; }
a[href^="tel:"], footer a { display: inline-block; padding: 9px 3px; margin: -9px -3px; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 40; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 3px; }
.skip:focus { left: 12px; }

.desk { flex: 1; padding: 26px 24px 64px; }

/* Zakładki: paski papieru wetknięte między karty, wystające nad górną krawędź księgi */
.tabs { max-width: 1180px; margin: 0 auto -15px; padding: 0 44px; position: relative; z-index: 0; }
.tabs ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tabs li { flex: 1 1 auto; filter: drop-shadow(0 -1px 2px rgba(0, 0, 0, .55)); }
.tabs a {
  display: block; padding: 11px 16px 27px; text-decoration: none; color: var(--ink); text-align: center;
  font-family: var(--pismo); font-size: calc(1.05rem * var(--pismo-skala)); line-height: 1.15; font-variant-ligatures: none;
  background: #e6e2d6 var(--faktura); background-blend-mode: multiply;
  clip-path: polygon(0 16%, 5% 7%, 16% 3%, 34% 6%, 52% 1%, 71% 5%, 88% 2%, 97% 8%, 100% 18%, 100% 100%, 0 100%);
  transition: transform .2s;
}
.tabs li:nth-child(1) a { transform: rotate(-1.4deg); background-color: #ece9df; }
.tabs li:nth-child(2) a { transform: rotate(.9deg) translateY(4px); background-color: #dfdbcd; clip-path: polygon(0 10%, 8% 2%, 27% 6%, 46% 3%, 63% 7%, 82% 1%, 95% 6%, 100% 15%, 100% 100%, 0 100%); }
.tabs li:nth-child(3) a { transform: rotate(-.6deg) translateY(1px); background-color: #e9e5d9; }
.tabs li:nth-child(4) a { transform: rotate(1.3deg) translateY(5px); background-color: #e2decf; clip-path: polygon(0 12%, 10% 4%, 30% 1%, 49% 6%, 68% 2%, 86% 7%, 100% 12%, 100% 100%, 0 100%); }
.tabs li:nth-child(5) a { transform: rotate(-1deg) translateY(2px); background-color: #ebe8de; clip-path: polygon(0 10%, 8% 2%, 27% 6%, 46% 3%, 63% 7%, 82% 1%, 95% 6%, 100% 15%, 100% 100%, 0 100%); }
.tabs li:nth-child(6) a { transform: rotate(.7deg) translateY(4px); background-color: #ddd9ca; }
.tabs li a:hover, .tabs li a:focus-visible { transform: translateY(-4px); color: var(--rubryka); outline: 0; text-decoration: underline; }
.tabs li a[aria-current="page"] { transform: translateY(-7px); background-color: var(--paper); color: var(--rubryka); }
.tabs small { display: block; font-family: var(--serif); font-style: italic; font-size: .92rem; color: var(--sage); }

/* Księga: gruba okładka z zaokrąglonymi rogami, blok kart widoczny z boków i od dołu, cień przy grzbiecie */
.book {
  position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 13px 17px 19px; border-radius: 16px 16px 20px 20px;
  background: #3b4539 var(--faktura); background-blend-mode: multiply;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35), inset 0 3px 3px rgba(255, 255, 255, .13), inset 0 -5px 6px rgba(0, 0, 0, .4),
              0 38px 60px -14px rgba(0, 0, 0, .8), 0 4px 12px rgba(0, 0, 0, .55);
}
.spread {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 600px; padding: 0 15px 12px; border-radius: 4px 4px 7px 7px;
  background:
    repeating-linear-gradient(to right, #f1efe8 0 1.5px, #aaa698 1.5px 2.6px) left top / 15px 100% no-repeat,
    repeating-linear-gradient(to left, #f1efe8 0 1.5px, #aaa698 1.5px 2.6px) right top / 15px 100% no-repeat,
    repeating-linear-gradient(to bottom, #f1efe8 0 1.5px, #aaa698 1.5px 2.6px) left bottom / 100% 12px no-repeat,
    #cfccc0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 3px 5px rgba(0, 0, 0, .5);
}
.page { position: relative; padding: 50px 58px 64px; background: var(--paper) var(--faktura); background-blend-mode: multiply; }
.page::after { content: ""; position: absolute; top: 0; bottom: 0; width: 13%; pointer-events: none; }
.page-left { border-radius: 2px 0 0 2px; box-shadow: -1px 0 2px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .3); }
.page-left::after { right: 0; background: linear-gradient(to left, rgba(43, 42, 40, .2), rgba(43, 42, 40, .06) 35%, rgba(43, 42, 40, 0)); }
.page-right { border-radius: 0 2px 2px 0; box-shadow: 1px 0 2px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .3); }
.page-right::after { left: 0; background: linear-gradient(to right, rgba(43, 42, 40, .2), rgba(43, 42, 40, .06) 35%, rgba(43, 42, 40, 0)); }
.dalej { position: absolute; right: 58px; bottom: 22px; z-index: 1; font-style: italic; font-size: 1.05rem; }

/* Treść kart */
.page-title { color: var(--rubryka); font-size: calc(clamp(2rem, 3.2vw, 2.7rem) * var(--pismo-skala)); margin-bottom: 26px; }
.note { font-style: italic; color: var(--muted); }

.page h1.imie { font-size: calc(clamp(2.6rem, 4.6vw, 3.9rem) * var(--pismo-skala)); margin: 40px 0 20px; }
.page h1.imie::first-letter { color: var(--rubryka); }
.page h1.imie em { display: block; font-style: var(--pismo-kursywa); color: var(--sage); font-size: .68em; }
.pwz { color: var(--muted); font-size: 1rem; margin-bottom: 18px; }
.places { font-size: 1.2rem; max-width: 26ch; margin-bottom: 30px; }
.btn { display: inline-flex; align-items: center; min-height: 50px; padding: 0 30px; border-radius: 3px; background: var(--sage-deep); color: var(--on-dark); text-decoration: none; font-family: var(--pismo); font-size: calc(1.2rem * var(--pismo-skala)); font-variant-ligatures: none; transition: background-color .2s; }
.btn:hover { background: var(--forest); color: var(--on-dark); }
.mind-box { aspect-ratio: 1 / 1; width: 100%; max-width: 440px; margin: 10px auto 0; }
#mind { width: 100%; height: 100%; display: block; }

.page-left .about-text p:first-child { font-family: var(--pismo); font-variant-ligatures: none; color: var(--rubryka); font-size: calc(1.5rem * var(--pismo-skala)); line-height: 1.4; margin-bottom: 1em; }
.page-left .about-text p:first-child::first-letter { float: left; font-size: 3.5em; line-height: .78; padding: .06em .1em 0 0; color: var(--forest); }
.page-right .about-text p:last-child { font-style: italic; margin-top: 1.4em; }
.photo { float: right; width: 42%; max-width: 210px; aspect-ratio: 3 / 4; object-fit: cover; margin: 6px 0 14px 26px; border-radius: 999px 999px 0 0; background: var(--stone); shape-outside: inset(0 round 999px 999px 0 0); }

.tags { list-style: none; margin: 0 0 1em; padding: 0; }
.tags li { font-size: 1.3rem; line-height: 1.3; padding: 8px 0; }
.page-right .tags { margin-top: 76px; }

.price-place { font-size: calc(1.55rem * var(--pismo-skala)); margin-bottom: 8px; }
.page-right .price-place { margin-top: 76px; }
.price-list { list-style: none; margin: 0 0 1.4em; padding: 0; }
.price-list li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; }
.price-list li > span:first-child { flex: 1; display: flex; align-items: baseline; gap: 10px; }
.price-list li > span:first-child::after { content: ""; flex: 1; min-width: 20px; border-bottom: 2px dotted var(--sage-light); transform: translateY(-4px); }
.price { font-family: var(--pismo); font-size: calc(1.4rem * var(--pismo-skala)); white-space: nowrap; font-variant-numeric: lining-nums; }
.price-text { font-family: var(--serif); font-style: italic; font-size: 1.05rem; white-space: normal; text-align: right; max-width: 11ch; color: var(--muted); }

.page-right .card { margin-top: 76px; }
.city { font-style: italic; color: var(--sage); font-size: 1.2rem; margin: 0 0 2px; }
.card h2 { font-size: calc(1.5rem * var(--pismo-skala)); color: var(--rubryka); margin-bottom: 12px; }
.card address { font-style: normal; font-size: 1.2rem; margin-bottom: 16px; }
.card p { margin-bottom: 8px; }

.contact-block p { margin-bottom: 1.2em; }
.crisis { margin-top: 76px; }
.crisis h2 { font-size: calc(1.5rem * var(--pismo-skala)); color: var(--rubryka); margin-bottom: 14px; }
.crisis a[href^="tel:"] strong { font-size: 1.3em; font-variant-numeric: lining-nums; }

/* Stopka: na blacie pod księgą, bez kreski */
footer { color: #d9d4cb; padding: 8px 24px 44px; font-size: 1rem; line-height: 1.55; }
footer .wrap { max-width: 1180px; margin: 0 auto; padding: 0 13px; display: flex; flex-direction: column; gap: 26px; }
footer p { margin: 0; }
footer a { color: var(--on-dark); text-decoration-color: rgba(241, 240, 234, .45); }
footer a:hover { color: #fff; }
footer :focus-visible { outline-color: var(--on-dark); }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1.3fr 1.3fr .8fr; gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-name { font-family: var(--pismo); font-size: calc(1.5rem * var(--pismo-skala)); color: var(--on-dark); font-variant-ligatures: none; }
.footer-label { font-family: var(--pismo); font-size: calc(1.15rem * var(--pismo-skala)); color: var(--sage-light); }
.footer-nav { display: flex; flex-direction: column; gap: 4px; }
.footer-nav a { text-decoration: none; margin: 0; padding: 2px 0; }
.footer-nav a:hover { text-decoration: underline; }
.footer-crisis { color: var(--on-dark); }
.footer-crisis a { font-weight: 700; }
footer .footer-legal { font-size: .9rem; color: var(--sage-light); margin-top: -14px; }

/* Przekładanie kart między podstronami (View Transitions). Naprzód: prawa karta przewraca się w lewo.
   Wstecz: lewa karta przewraca się w prawo. Bez obsługi w przeglądarce: zwykłe przejście. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .page-left { view-transition-name: karta-lewa; }
  .page-right { view-transition-name: karta-prawa; }
  ::view-transition-group(karta-lewa), ::view-transition-group(karta-prawa) { animation-duration: 1.2s; }
  ::view-transition-old(karta-lewa), ::view-transition-new(karta-lewa),
  ::view-transition-old(karta-prawa), ::view-transition-new(karta-prawa) { mix-blend-mode: normal; animation: none; opacity: 1; height: 100%; object-fit: fill; backface-visibility: visible; }

  ::view-transition-old(karta-prawa) { z-index: 2; transform-origin: left center; animation: 1.2s linear both karta-zamyka-w-lewo; }
  ::view-transition-new(karta-lewa) { z-index: 2; transform-origin: right center; animation: 1.2s linear both karta-otwiera-z-prawej; }

  html:active-view-transition-type(wstecz)::view-transition-old(karta-prawa),
  html:active-view-transition-type(wstecz)::view-transition-new(karta-lewa) { z-index: auto; animation: none; }
  html:active-view-transition-type(wstecz)::view-transition-new(karta-lewa) { z-index: 0; }
  html:active-view-transition-type(wstecz)::view-transition-old(karta-lewa) { z-index: 2; transform-origin: right center; animation: 1.2s linear both karta-zamyka-w-prawo; }
  html:active-view-transition-type(wstecz)::view-transition-new(karta-prawa) { z-index: 2; transform-origin: left center; animation: 1.2s linear both karta-otwiera-z-lewej; }
}
@keyframes karta-zamyka-w-lewo {
  0% { transform: perspective(2400px) rotateY(0); filter: brightness(1); animation-timing-function: ease-in; }
  50% { transform: perspective(2400px) rotateY(-90deg); filter: brightness(.72); opacity: 1; }
  50.1%, 100% { transform: perspective(2400px) rotateY(-90deg); opacity: 0; }
}
@keyframes karta-otwiera-z-prawej {
  0%, 49.9% { transform: perspective(2400px) rotateY(90deg); opacity: 0; }
  50% { transform: perspective(2400px) rotateY(90deg); filter: brightness(.72); opacity: 1; animation-timing-function: ease-out; }
  100% { transform: perspective(2400px) rotateY(0); filter: brightness(1); opacity: 1; }
}
@keyframes karta-zamyka-w-prawo {
  0% { transform: perspective(2400px) rotateY(0); filter: brightness(1); animation-timing-function: ease-in; }
  50% { transform: perspective(2400px) rotateY(90deg); filter: brightness(.72); opacity: 1; }
  50.1%, 100% { transform: perspective(2400px) rotateY(90deg); opacity: 0; }
}
@keyframes karta-otwiera-z-lewej {
  0%, 49.9% { transform: perspective(2400px) rotateY(-90deg); opacity: 0; }
  50% { transform: perspective(2400px) rotateY(-90deg); filter: brightness(.72); opacity: 1; animation-timing-function: ease-out; }
  100% { transform: perspective(2400px) rotateY(0); filter: brightness(1); opacity: 1; }
}

/* Telefon: jedna karta pod drugą, zakładki w dwóch rzędach */
@media (max-width: 900px) {
  body { font-size: 19px; }
  .desk { padding: 14px 8px 40px; }
  .tabs { padding: 0 10px; margin-bottom: -13px; }
  .tabs ul { flex-wrap: wrap; justify-content: flex-start; gap: 0 4px; }
  .tabs li:first-child { flex-basis: 100%; margin-bottom: -10px; }
  .tabs li:first-child a { display: inline-block; }
  .tabs li:not(:first-child) { flex: 1 1 auto; }
  .tabs a { padding: 10px 8px 24px; font-size: calc(1rem * var(--pismo-skala)); min-height: 44px; }
  .book { padding: 8px 8px 12px; border-radius: 10px 10px 13px 13px; }
  .spread { grid-template-columns: 1fr; min-height: 0; padding: 0 7px 8px; background-size: 7px 100%, 7px 100%, 100% 8px, auto; }
  .page { padding: 30px 22px 34px; }
  .page::after { display: none; }
  .page-right { padding-top: 0; padding-bottom: 64px; }
  .page-right .tags, .page-right .price-place, .page-right .card, .crisis { margin-top: 0; }
  .page-right .card, .crisis { margin-top: 20px; }
  .dalej { right: 22px; }
  .page h1.imie { margin-top: 10px; }
  .mind-box { max-width: 340px; }
  .photo { float: none; display: block; width: 60%; margin: 0 auto 22px; }
  footer { padding: 0 16px 36px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-nav a { padding: 9px 0; }
}
