@font-face {
  font-family: Fraunces;
  src: url("/font/Fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("/font/Barlow-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url("/font/Nunito.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}

* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --ink: #1d3136;
  --carmine: #285d68;
  --paper: #fcfbf7;
  color: var(--ink);
  background: var(--paper);
  font: 100%/1.72 system-ui, sans-serif;
}
body { margin: 0; }
a { color: #285d68; text-underline-offset: .2em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid var(--carmine); outline-offset: 4px; }
.skip { position: absolute; z-index: 1; top: .5rem; left: .5rem; padding: .5rem 1rem; background: white; }
.skip:not(:focus) { transform: translateY(-160%); }
.masthead { background: #fcfbf7; border-bottom: 1px solid #cdd4ce; }
.masthead-inner {
  max-width: 84rem;
  margin: auto;
  padding: .7rem clamp(1.25rem, 5vw, 5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
}
.masthead a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.masthead a:hover { color: var(--carmine); text-decoration: underline; }
.signature img { width: auto; height: 2.45rem; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0 1.2rem; font: 600 1.05rem/1.25 Barlow, system-ui, sans-serif; }
main {
  --portrait: url("/obrazy/pracownia/orbitalny-szrot-pion.webp");
  --wash: #d3e2e4;
  position: relative;
  width: min(calc(100% - 3rem), 58rem);
  margin: auto;
  padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(4rem, 9vw, 7rem);
  font: 475 1.125rem/1.7 Nunito, system-ui, sans-serif;
  overflow-wrap: break-word;
}
body:has(.masthead a[href="/zaczarowana-polana/"]) main {
  --portrait: url("/obrazy/pracownia/zaczarowana-polana-pion.webp");
  --wash: #f0dfc7;
}
h1, h2 { font-family: Fraunces, Georgia, serif; text-wrap: balance; font-weight: 460; }
h1 {
  max-width: 70%;
  margin: 0;
  font-size: clamp(2.35rem, 5.3vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -.045em;
}
main::before {
  content: "";
  position: absolute;
  top: clamp(2.375rem, 6vw, 5rem);
  right: 0;
  width: 29%;
  max-height: 12.5rem;
  aspect-ratio: 1.45;
  background: var(--portrait) center / contain no-repeat;
  mix-blend-mode: multiply;
  pointer-events: none;
}
h1 + p {
  color: #4a6062;
  margin: 1.375rem 0 2.25rem;
  font: 600 1rem/1.45 Barlow, system-ui, sans-serif;
}
h1 + p::after {
  display: block;
  content: "";
  width: 8rem;
  height: 1.1rem;
  margin-top: 1.3rem;
  background: url("/obrazy/smuga-piora.webp") left center / 100% 100% no-repeat;
  mix-blend-mode: multiply;
}
h2 {
  color: #213e43;
  margin: 2.3rem 0 .6rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -.024em;
  line-height: 1.2;
}
main > :is(p, ul, ol, h2) { max-width: 69ch; }
p { margin: .7rem 0; }
main a { text-decoration-color: #698d93; text-decoration-thickness: .075em; }
main a:hover { background-color: var(--wash); }
main > a { display: inline-block; margin-top: 1rem; }

@media (max-width: 38rem) {
  main { width: calc(100% - 2.5rem); padding-top: 1.5rem; font-size: 1.0625rem; }
  main::before {
    position: static;
    display: block;
    width: 7rem;
    margin: 0 0 .9rem -.6rem;
  }
  h1 { max-width: 100%; }
  h1 + p { margin: .9rem 0 1.6rem; }
  h1 + p::after { margin-top: .9rem; }
}

@media print {
  @page { margin: 17mm; }
  :root, body { color: black; background: white; }
  .masthead, .skip, main::before, h1 + p::after { display: none; }
  main { padding: 0; width: 100%; font: 10.5pt/1.48 Georgia, serif; }
  main > :is(p, ul, ol, h1, h2) { max-width: none; }
  h1 { font-size: 21pt; }
  h1 + p { color: black; font-size: 10pt; margin: .5em 0 1em; padding-bottom: .65em; }
  h2 { color: black; font-size: 14pt; margin-top: 1.25em; }
  h1, h2 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  a { color: black; }
}
