@font-face { font-family: "Young Serif"; src: url(fonts/young-serif-latin-400-normal.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Young Serif"; src: url(fonts/young-serif-latin-ext-400-normal.woff2) format("woff2"); font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF; }
@font-face { font-family: "Nunito"; font-weight: 400; src: url(fonts/nunito-latin-400-normal.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Nunito"; font-weight: 400; src: url(fonts/nunito-latin-ext-400-normal.woff2) format("woff2"); font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF; }
@font-face { font-family: "Nunito"; font-weight: 700; src: url(fonts/nunito-latin-700-normal.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Nunito"; font-weight: 700; src: url(fonts/nunito-latin-ext-700-normal.woff2) format("woff2"); font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF; }

:root {
  --mleko: #fbf7f1;
  --len: #f1e8dc;
  --roz: #ebc3bc;
  --malina: #b3404a;
  --grafit: #2e2824;
  --melanz: #6f665e;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Nunito", system-ui, sans-serif;
  --miara: min(1120px, 100% - 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--mleko);
  color: var(--grafit);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--malina); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 7vw, 4.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: 62ch; }

.wrap { width: var(--miara); margin-inline: auto; }
section { padding-block: clamp(56px, 9vw, 112px); }

/* Metka: the sewn-on name label from Zamotka's blankets, the page's one signature element. */
.metka {
  display: inline-block;
  padding: 0.35em 0.9em;
  background: #fff;
  color: var(--malina);
  font: 700 0.95rem/1.3 var(--sans);
  border-radius: 3px;
  outline: 1.5px dashed var(--malina);
  outline-offset: -5px;
  box-shadow: 0 1px 0 var(--len), 0 2px 6px rgb(46 40 36 / 0.08);
}
.metka--mala { font-size: 0.78rem; padding: 0.3em 0.75em; margin-left: 0.6em; vertical-align: 0.1em; }

/* Hero */
.hero { padding-block: clamp(24px, 4vw, 40px) clamp(48px, 7vw, 88px); }
.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero__logo { width: 116px; mix-blend-mode: multiply; margin-bottom: 28px; }
.hero h1 { margin-bottom: 20px; }
.hero__lead { font-size: 1.2rem; color: var(--melanz); margin-bottom: 32px; }
.hero__foto { border-radius: 6px; overflow: hidden; transform: rotate(1.2deg); box-shadow: 0 18px 40px -18px rgb(46 40 36 / 0.35); }
.przycisk {
  display: inline-block;
  padding: 0.8em 1.6em;
  background: var(--grafit);
  color: var(--mleko);
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
}
.przycisk:hover { background: var(--malina); }

@media (min-width: 860px) {
  .hero__grid { grid-template-columns: 5fr 6fr; gap: 64px; }
}

/* O Zamotce */
.o-nas { background: var(--len); }
.o-nas__grid { display: grid; gap: 40px; align-items: center; }
.o-nas h2 { margin-bottom: 24px; }
.o-nas__foto { border-radius: 6px; overflow: hidden; }
@media (min-width: 860px) { .o-nas__grid { grid-template-columns: 6fr 5fr; gap: 72px; } }

/* Co dziergamy */
.rzeczy h2 { margin-bottom: 32px; }
.rzeczy__lista {
  list-style: none; margin: 0 0 40px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 12px 14px;
}
.rzeczy__lista li {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  padding: 0.35em 0.9em;
  background: var(--len);
  border-radius: 999px;
}
.rzeczy__lista li:nth-child(3n+2) { background: var(--roz); }
.rzeczy__wlokna { color: var(--melanz); }

/* Od ręki / na zamówienie */
.tryby { background: var(--len); }
.tryby h2 { margin-bottom: 40px; }
.tryby__grid { display: grid; gap: 40px; }
.tryby__grid .metka { margin-bottom: 16px; }
.tryby__grid h3 { margin-bottom: 10px; }
@media (min-width: 760px) { .tryby__grid { grid-template-columns: 1fr 1fr; gap: 64px; } }

/* Galeria */
.galeria h2 { margin-bottom: 12px; }
.galeria__wstep { color: var(--melanz); margin-bottom: 40px; }
.galeria__siatka { columns: 1; column-gap: 20px; }
@media (min-width: 560px) { .galeria__siatka { columns: 2; } }
@media (min-width: 960px) { .galeria__siatka { columns: 3; column-gap: 28px; } }
.galeria figure { break-inside: avoid; margin: 0 0 28px; }
.galeria img { width: 100%; border-radius: 4px; background: var(--len); }
.galeria figcaption { margin-top: 10px; font-size: 0.98rem; }

/* Wkrótce */
.wkrotce { background: var(--roz); overflow-x: clip; }
.wkrotce h2 { margin-bottom: 32px; }
.wkrotce dl { display: grid; gap: 20px; margin: 0; }
.wkrotce dl div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 20px; border-bottom: 1.5px dashed rgb(46 40 36 / 0.25); }
.wkrotce dt { font-family: var(--serif); font-size: 1.35rem; }
.wkrotce dd { margin: 0; }
@media (min-width: 760px) { .wkrotce__grid { display: grid; grid-template-columns: 5fr 6fr; gap: 64px; align-items: start; } }

/* Stopka */
.stopka { padding-block: 40px; color: var(--melanz); font-size: 0.95rem; }
.stopka .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.stopka img { width: 56px; mix-blend-mode: multiply; }
.stopka p { margin: 0; }

/* Photo links */
a.foto { display: block; cursor: zoom-in; border-radius: 4px; }
a.foto img { transition: filter 0.2s; }
a.foto:hover img { filter: brightness(1.04) saturate(1.05); }

/* Archiwum: all photos */
.archiwum { background: var(--len); }
.archiwum h2 { margin-bottom: 12px; }
.archiwum__wstep { color: var(--melanz); margin-bottom: 32px; }
.archiwum__siatka {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(140px, 30%), 1fr));
}
.archiwum__siatka img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 4px; background: var(--mleko); }

/* Viewer */
#podglad {
  border: 0; padding: 0; background: transparent; color: var(--mleko);
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  display: none; place-items: center;
  opacity: 0; transition: opacity 0.25s, display 0.25s allow-discrete, overlay 0.25s allow-discrete;
}
#podglad[open] { display: grid; opacity: 1; }
@starting-style { #podglad[open] { opacity: 0; } }
#podglad::backdrop { background: rgb(46 40 36 / 0.88); }
#podglad figure { margin: 0; display: grid; justify-items: center; gap: 14px; padding: 56px 16px 24px; }
#podglad img { max-width: min(92vw, 1100px); max-height: 78dvh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.6); }
#podglad figcaption { font-family: var(--serif); font-size: 1.1rem; text-align: center; max-width: 60ch; }
#podglad button {
  position: fixed; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--mleko); color: var(--grafit); font: 400 1.9rem/1 var(--serif); cursor: pointer;
}
#podglad button:hover { background: var(--roz); }
.podglad__poprz { left: 12px; top: 50%; translate: 0 -50%; }
.podglad__nast { right: 12px; top: 50%; translate: 0 -50%; }
.podglad__zamknij { right: 12px; top: 12px; }

/* Scroll effects: only in browsers with scroll-driven animations, never with reduced motion.
   Without support the page is simply static. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    main h2, main p, .tryby__grid > div, .o-nas__foto {
      animation: wplyw linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    .galeria figure {
      animation: przypnij linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
    .galeria figure:nth-child(even) { --skret: 2deg; }
    .archiwum__siatka li {
      animation: wplyw linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
    .rzeczy__lista li {
      animation: motek linear both;
      animation-timeline: view();
    }
    .rzeczy__lista li:nth-child(odd) { animation-range: entry 10% entry 60%; }
    .rzeczy__lista li:nth-child(even) { animation-range: entry 30% entry 80%; }
    .wkrotce .metka {
      animation: przyszyj linear both;
      animation-timeline: view();
      animation-range: entry 20% entry 90%;
    }
    .hero__foto {
      animation: unies linear both;
      animation-timeline: scroll(root);
      animation-range: 0 90vh;
    }
  }
}
@keyframes wplyw { from { opacity: 0; translate: 0 28px; } }
@keyframes przypnij { from { opacity: 0; translate: 0 40px; rotate: var(--skret, -2deg); scale: 0.94; } }
@keyframes motek { from { opacity: 0; scale: 0.6; } 70% { scale: 1.05; } }
@keyframes przyszyj { from { opacity: 0; scale: 1.4; rotate: -8deg; } }
@keyframes unies { to { translate: 0 -60px; rotate: 3.5deg; } }
@media (max-width: 600px) {
  #podglad figure { padding-bottom: 84px; }
  .podglad__poprz, .podglad__nast { top: auto; bottom: 20px; translate: none; }
  .podglad__poprz { left: calc(50% - 60px); }
  .podglad__nast { right: calc(50% - 60px); }
}
