@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; }

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; }


/* 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__grid { display: grid; gap: 40px; align-items: center; }
.hero__logo { width: 160px; margin-bottom: 24px; }
.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;
}

@media (min-width: 860px) {
  .hero__grid { grid-template-columns: 5fr 6fr; 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; }

/* 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; }
.stopka p { margin: 0; }

/* Photo links */
a.foto { display: block; cursor: zoom-in; border-radius: 4px; }

/* 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__poprz { left: 12px; top: 50%; translate: 0 -50%; }
.podglad__nast { right: 12px; top: 50%; translate: 0 -50%; }
.podglad__zamknij { right: 12px; top: 12px; }

@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); }
}

/* Layout: four screens (intro, o mnie, moje prace, kontakt) with a sticky menu */
html { scroll-snap-type: y proximity; scroll-padding-top: 64px; }
.hero, main > section {
  min-height: 100svh;
  display: grid; align-content: center;
  padding-block: 96px 64px;
  scroll-snap-align: start;
}
.galeria { align-content: start; }

.menu {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(16px, (100% - 1120px) / 2);
  background: rgb(251 247 241 / 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px dashed rgb(179 64 74 / 0.25);
}
.menu__logo img { width: 44px; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(14px, 4vw, 36px); }

.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero__logo { width: 160px; margin-bottom: 24px; }
.hero h1 { margin-bottom: 20px; }
.hero__lead { font-size: 1.2rem; color: var(--melanz); margin-bottom: 32px; }
.hero__foto { border-radius: 6px; overflow: hidden; rotate: 1.2deg; box-shadow: 0 18px 40px -18px rgb(46 40 36 / 0.35); }
@media (min-width: 860px) { .hero__grid { grid-template-columns: 5fr 6fr; gap: 64px; } }

.o-mnie { background: var(--len); }
.o-mnie__grid { display: grid; gap: 40px; align-items: center; }
.o-mnie h2 { margin-bottom: 24px; }
.o-mnie__foto { border-radius: 6px; overflow: hidden; }
@media (min-width: 860px) { .o-mnie__grid { grid-template-columns: 5fr 6fr; gap: 72px; } }

.kontakt { background: var(--roz); overflow-x: clip; }
.kontakt__srodek { display: grid; justify-items: center; gap: 28px; text-align: center; }
.kontakt h2 { font-size: clamp(2.4rem, 6vw, 3.6rem); }

/* Page load: a yarn ball rolls across the already visible page, leaving a thread that fades out;
   the intro only slides a little, it is never hidden (keeps LCP fast). Skipped with reduced motion. */
.nitka { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .nitka {
    display: block; position: absolute; z-index: 0; pointer-events: none;
    background: transparent;
    /* full viewport width, starting at the left edge of the screen, just under the button */
    bottom: 0; height: 84px; width: 100vw;
    left: calc((min(1120px, 100vw - 32px) - 100vw) / 2);
    animation: znika 0.68s ease-out 2.12s both;
  }
  .nitka__sciezka {
    position: absolute; left: 0; top: calc(50% - 60px); width: 100%; height: 120px; overflow: visible;
  }
  .nitka__sciezka path {
    fill: none; stroke: var(--malina); stroke-width: 2.2; stroke-linecap: round;
    stroke-dasharray: 1 2; stroke-dashoffset: 1;
    animation: snuj 2.2s cubic-bezier(0.45, 0, 0.35, 1) both;
  }
  /* The ball rolls left to right along the thread, spinning and shrinking as it unwinds */
  .klebek {
    position: absolute; left: 0; top: calc(50% - 36px); width: 72px; height: 72px;
    animation: toczy 2.2s cubic-bezier(0.45, 0, 0.35, 1) both;
  }
  .klebek svg { width: 100%; height: 100%; animation: kreci 2.2s cubic-bezier(0.45, 0, 0.35, 1) both; }
  .hero__tekst > *, .hero__foto, .menu {
    animation: spada 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .menu { animation-delay: 0s; }
  .hero__logo { animation-delay: 0s; }
  .hero h1 { animation-delay: 0.06s; }
  .hero__lead { animation-delay: 0.12s; }
  .przycisk { animation-delay: 0.18s; }
  .hero__foto { animation-delay: 0.1s; }

  /* Scroll effects, only where scroll-driven animations exist */
  @supports (animation-timeline: view()) {
    main h2, main p, main .metka, .o-mnie__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; }
    .kontakt .metka {
      animation: przyszyj linear both;
      animation-timeline: view();
      animation-range: entry 20% entry 90%;
    }
  }
}
@keyframes snuj { to { stroke-dashoffset: 0; } }
@keyframes toczy { from { translate: calc(-2vw - 56px) 0; scale: 1; } to { translate: calc(104vw - 56px) 0; scale: 0.4; } }
@keyframes kreci { to { rotate: 900deg; } }
@keyframes znika { to { opacity: 0; visibility: hidden; } }
@keyframes spada { from { translate: 0 -18px; } }
@keyframes wplyw { from { opacity: 0; translate: 0 28px; } }
@keyframes przypnij { from { opacity: 0; translate: 0 40px; rotate: var(--skret, -2deg); scale: 0.94; } }
@keyframes przyszyj { from { opacity: 0; scale: 1.4; rotate: -8deg; } }

/* Crochet and knitting: every interactive element is made of stitches.
   --oczka: knit "V" stitches, --lancuszek: crochet chain loops. Both are tiny inline SVG tiles. */
:root {
  --oczka: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M1.5 1Q3 8.5 6 11M10.5 1Q9 8.5 6 11' stroke='%23fbf7f1' stroke-opacity='.22' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  --lancuszek: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3E%3Cellipse cx='7' cy='4' rx='5.4' ry='2.5' fill='none' stroke='%23b3404a' stroke-width='1.7'/%3E%3C/svg%3E");
}

:focus-visible { outline: 2px dashed var(--malina); outline-offset: 4px; border-radius: 6px; }

/* Main button: a knitted swatch with a seam stitched around the edge */
.przycisk {
  position: relative;
  background: var(--grafit) var(--oczka) 0 0 / 12px 12px;
  outline: 1.5px dashed rgb(251 247 241 / 0.55);
  outline-offset: -6px;
  box-shadow: 0 3px 0 rgb(46 40 36 / 0.18);
  transition: background-color 0.25s, rotate 0.25s, scale 0.12s;
}
.przycisk:hover { background-color: var(--malina); rotate: -1.5deg; animation: dzianie 0.9s steps(6) infinite; }
.przycisk:active { scale: 0.96 1.02; }
.przycisk:focus-visible { outline: 2px dashed var(--malina); outline-offset: 4px; }
@keyframes dzianie { to { background-position: 0 -12px; } }

/* Menu: a crochet chain grows under the link, one loop at a time */
.menu ul a {
  position: relative; text-decoration: none; font-weight: 700; font-size: 0.98rem;
  padding-block: 6px 12px;
}
.menu ul a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 8px; width: 0;
  background: var(--lancuszek) 0 0 / 14px 8px round no-repeat;
  transition: width 0.45s steps(7);
}
.menu ul a:hover::after, .menu ul a:focus-visible::after { width: 100%; }
.menu ul a:focus-visible { outline: none; }
.menu__logo img { transition: rotate 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
.menu__logo:hover img { rotate: -12deg; }

/* Viewer buttons: little crochet doilies with a stitched rim, they twist like a yarn ball */
#podglad button {
  background:
    radial-gradient(circle, transparent 52%, rgb(235 195 188 / 0.55) 53% 60%, transparent 61%),
    var(--mleko);
  outline: 1.5px dashed var(--malina);
  outline-offset: -5px;
  box-shadow: 0 0 0 3px rgb(251 247 241 / 0.25);
  transition: rotate 0.35s cubic-bezier(0.3, 1.5, 0.5, 1), background-color 0.2s;
}
@media (hover: hover) {
  #podglad button:hover { background-color: var(--roz); }
  .podglad__zamknij:hover { rotate: 90deg; }
}
#podglad button:focus-visible { outline: 2px dashed var(--mleko); outline-offset: 3px; }

/* Gallery photos: a stitched frame is sewn on when you point at a photo */
a.foto { outline: 2px dashed transparent; outline-offset: 12px; transition: outline-color 0.2s, outline-offset 0.3s cubic-bezier(0.3, 1.4, 0.5, 1); }
a.foto:hover, a.foto:focus-visible { outline-color: var(--malina); outline-offset: 5px; }

/* Metki wobble a little, as if pinned with a single stitch */
.metka { transition: rotate 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.metka:hover { rotate: -4deg; }

@media (prefers-reduced-motion: reduce) {
  .przycisk:hover { animation: none; rotate: none; }
  .menu ul a { transition: none; }
  .menu__logo:hover img, #podglad button:hover, .metka:hover { rotate: none; }
}

/* Footer credit: SmartPath logo (mark on its dark tile, Unbounded wordmark), light-background variant */
@font-face { font-family: "Unbounded"; font-weight: 700; src: url(fonts/unbounded-latin-700-normal.woff2) format("woff2"); font-display: swap; }
.autor { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.9rem; }
.smartpath {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: #121110;
  font: 700 0.95rem/1 "Unbounded", var(--sans);
  letter-spacing: -0.01em;
}
.smartpath b { color: #85680f; font-weight: 700; }
.smartpath svg { width: 28px; height: 28px; transition: rotate 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); }
.smartpath:hover svg { rotate: -8deg; }
@media (prefers-reduced-motion: reduce) { .smartpath:hover svg { rotate: none; } }

/* Content sits above the rolling thread: the yarn passes behind text and photos */
.hero__grid, main > section, .stopka { position: relative; z-index: 1; }

picture { display: block; }

.kontakt__mail { font-size: clamp(1rem, 4.2vw, 1.15rem); padding: 0.85em 1.6em; overflow-wrap: anywhere; }

/* Room under the hero button where the yarn ball rolls; the photo stays above the thread */
.hero__tekst { position: relative; padding-bottom: 96px; }
.hero__foto { position: relative; z-index: 1; }
.hero { overflow-x: clip; }

/* Order buttons in every section */
.przyciski { display: flex; flex-wrap: wrap; gap: 12px; }
.przycisk--jasny {
  background-color: var(--mleko);
  background-image: none;
  color: var(--grafit);
  outline-color: rgb(179 64 74 / 0.6);
  box-shadow: inset 0 0 0 2px var(--grafit), 0 3px 0 rgb(46 40 36 / 0.12);
}
.przycisk--jasny:hover { background-color: var(--roz); color: var(--grafit); animation: none; }
.o-mnie .przycisk { margin-top: 12px; }
.galeria__zamow { margin: 8px 0 0; text-align: center; max-width: none; }
.kontakt__srodek .przycisk--jasny { background-color: var(--mleko); }

/* Order form */
.zamowienie__grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 860px) { .zamowienie__grid { grid-template-columns: 5fr 6fr; gap: 72px; } }
.zamowienie h2 { margin-bottom: 20px; }
.zamowienie__formularz { display: grid; gap: 8px; }
.zamowienie__formularz label { font-weight: 700; margin-top: 10px; }
.zamowienie__formularz input, .zamowienie__formularz select, .zamowienie__formularz textarea {
  font: inherit; color: inherit; width: 100%;
  padding: 0.7em 0.9em;
  background: #fff;
  border: 1.5px solid var(--len);
  border-radius: 8px;
  outline: 1.5px dashed transparent; outline-offset: -6px;
  transition: outline-color 0.2s, border-color 0.2s;
}
.zamowienie__formularz input:focus, .zamowienie__formularz select:focus, .zamowienie__formularz textarea:focus {
  border-color: var(--roz); outline-color: var(--malina);
}
.zamowienie__formularz textarea { resize: vertical; }
.zamowienie__formularz button { justify-self: start; margin-top: 16px; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.zamowienie__zapas { margin: 8px 0 0; color: var(--melanz); }
.zamowienie__zapas:empty { display: none; }

/* Narrow phones: four menu links stay on one line */
.menu ul a { white-space: nowrap; }
@media (max-width: 420px) {
  .menu { gap: 10px; }
  .menu ul { gap: 13px; }
  .menu ul a { font-size: 0.88rem; }
  .menu__logo img { width: 36px; }
}
.pulapka { display: none; }
.zamowienie__formularz { position: relative; }
.zamowienie__rodo { margin: 4px 0 0; font-size: 0.85rem; color: var(--melanz); }
.zamowienie__formularz button:disabled { opacity: 0.6; cursor: progress; }

/* Buttons in yarn-ball colors: pink wool with raspberry stitches and seam (was dark grey) */
:root {
  --oczka-malina: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M1.5 1Q3 8.5 6 11M10.5 1Q9 8.5 6 11' stroke='%23b3404a' stroke-opacity='.18' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
.przycisk {
  background: var(--roz) var(--oczka-malina) 0 0 / 12px 12px;
  color: var(--grafit);
  outline: 1.5px dashed rgb(179 64 74 / 0.7);
  box-shadow: 0 3px 0 rgb(179 64 74 / 0.28);
}
.przycisk:hover {
  background-color: var(--malina);
  background-image: var(--oczka);
  color: var(--mleko);
  outline-color: rgb(251 247 241 / 0.6);
}
/* On the pink contact section the main button is raspberry so it does not melt into the background */
.kontakt .przycisk:not(.przycisk--jasny) {
  background-color: var(--malina); background-image: var(--oczka);
  color: var(--mleko); outline-color: rgb(251 247 241 / 0.6);
}
.kontakt .przycisk:not(.przycisk--jasny):hover { background-color: #8f2f38; }

/* Viewer on phones: image leaves room for the caption and the arrow row, nothing overlaps */
@media (max-width: 600px) {
  #podglad figure { padding: 64px 16px 92px; gap: 10px; }
  #podglad img { max-height: calc(100dvh - 64px - 92px - 4.5em); max-width: 100%; }
  #podglad figcaption { font-size: 1rem; }
}
/* Secondary button stays milk-white with a raspberry seam, so it reads as second next to the pink one */
.przycisk--jasny { background: var(--mleko) none; color: var(--grafit); outline-color: rgb(179 64 74 / 0.6); }
@media (hover: hover) { .przycisk--jasny:hover { background: var(--roz) var(--oczka-malina) 0 0 / 12px 12px; color: var(--grafit); } }
