/*
 * Kod Malucha — strona główna (od 24.10.2026).
 * Układ: wyrównanie do lewej, jedna kolumna treści 1180px; jedyny mocny akcent to
 * „miarka wzrostu” w hero (wiek dziecka → półka). Reszta spokojna, w barwach marki.
 */
:root {
  color-scheme: light;
  --paper: #F6F4EE;      /* tło marki (ciepła biel papieru) */
  --card: #FFFFFF;
  --ink: #33352D;        /* tekst */
  --muted: #66685B;      /* tekst pomocniczy */
  --line: #E2DED3;       /* linie i obramowania */
  --sage: #5E7054;       /* akcja: przyciski, linki (kontrast AA na bieli) */
  --sage-brand: #7A8B6F; /* kolor logo */
  --wash: #E9EDE3;       /* tło pasów sekcji */
  --display: 'Quicksand', 'Trebuchet MS', sans-serif;
  --text: 'Nunito', 'Segoe UI', Arial, sans-serif;
  --r-sm: 10px;
  --r-md: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body {
  overflow-x: clip;
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--text); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--sage); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; color: var(--ink); }
h2 { font-size: clamp(26px, 3.2vw, 34px); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--sage-brand); outline-offset: 2px; border-radius: 6px; }

.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 700 15px/1 var(--text); color: #fff; background: var(--sage);
  border: 2px solid var(--sage); border-radius: 999px; padding: 10px 16px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: #4D5D44; border-color: #4D5D44; }
.btn--ghost { background: transparent; color: var(--sage); }
.btn--ghost:hover { background: var(--wash); color: var(--sage); }

/* ------------------------------------------------------------ nagłówek */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top__row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.top__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 19px var(--display); }
/* z logo pokazujemy samo serce z linii papilarnych */
.top__mark { width: 40px; height: 40px; overflow: hidden; flex: 0 0 auto; }
/* tło + izolacja: bez nich na telefonach mnożenie (multiply) mieszało logo
   z tekstem przewijanym pod półprzezroczystym nagłówkiem — litery „przejeżdżały” przez serce */
.top__mark { background: var(--paper); isolation: isolate; border-radius: 8px; }
.top__mark img {
  width: 40px; height: 40px; max-width: none; object-fit: cover; object-position: 50% 0;
  transform: scale(2.1); transform-origin: 50% 22%; mix-blend-mode: multiply;
}
.top__nav { display: flex; gap: 22px; margin-left: auto; }
.top__nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.top__nav a:hover { color: var(--sage); text-decoration: underline; }
.top__cart {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 700; font-size: 15px; color: var(--ink);
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px;
}
.top__cart svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.top__badge { background: var(--sage); color: #fff; border-radius: 999px; font-size: 12px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; }

.flash { background: var(--wash); border-bottom: 1px solid var(--line); padding: 12px 0; font-weight: 600; }

/* ------------------------------------------------------------ hero + miarka */
.hero { padding: 56px 0 64px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -.01em; max-width: 15ch; }
.hero__lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 54ch; }
.search { margin-top: 28px; display: flex; max-width: 520px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 16px var(--text); padding: 10px 16px; color: var(--ink); }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--sage-brand); box-shadow: 0 0 0 3px var(--wash); }
.search button { font: 700 15px var(--text); color: #fff; background: var(--sage); border: 0; border-radius: 999px; padding: 0 20px; cursor: pointer; }
.hero__more { margin-top: 18px; color: var(--muted); font-size: 15px; }
.hero__more a { font-weight: 700; }

/* Miarka wzrostu: taśma z podziałką + kreski etapów (kolor etapu = --hue) */
.ruler { position: relative; padding-left: 58px; }
.ruler::before {
  content: ""; position: absolute; left: 0; top: -8px; bottom: -8px; width: 42px;
  border-radius: 8px; background-color: #F3E7C9;
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 11px, rgba(51,53,45,.45) 11px 12px),
    repeating-linear-gradient(to bottom, transparent 0 59px, rgba(51,53,45,.7) 59px 60px);
  background-size: 14px 100%, 24px 100%;
  background-repeat: no-repeat;
  box-shadow: inset -1px 0 0 rgba(51,53,45,.12);
}
/* jak na framudze: najmłodszy na dole, najstarszy u góry (w HTML kolejność od najmłodszego) */
.ruler__marks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; gap: 6px; }
.ruler__marks a {
  position: relative; display: grid; grid-template-columns: 112px 1fr auto; align-items: baseline; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink);
  transition: background .15s;
}
/* kreska od taśmy do etykiety */
.ruler__marks a::before {
  content: ""; position: absolute; left: -58px; top: 50%; width: 52px; height: 4px; border-radius: 2px;
  background: var(--hue); transform: translateY(-50%); transform-origin: left; transition: transform .2s;
}
.ruler__marks a:hover, .ruler__marks a:focus-visible { background: color-mix(in srgb, var(--hue) 14%, var(--paper)); }
.ruler__marks a:hover::before { transform: translateY(-50%) scaleX(1.12); }
.ruler__age { font: 700 28px/1 var(--display); color: var(--ink); white-space: nowrap; }
.ruler__age small { font-size: 15px; color: var(--muted); font-weight: 600; }
.ruler__name { font-weight: 700; font-size: 17px; }
.ruler__count { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* ------------------------------------------------------------ półki */
.shelves { padding: 56px 0 72px; background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.shelves__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.shelves__head p { color: var(--muted); }
.tabs {
  margin-top: 24px; display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px;
  scrollbar-width: thin; scroll-snap-type: x proximity;
}
.tabs button {
  flex: 0 0 auto; scroll-snap-align: start; display: grid; gap: 2px; text-align: left;
  font: inherit; color: var(--ink); background: var(--paper); cursor: pointer;
  border: 1px solid var(--line); border-left: 4px solid var(--hue); border-radius: var(--r-sm);
  padding: 9px 16px 10px 12px;
}
.tabs button:hover { background: color-mix(in srgb, var(--hue) 10%, var(--paper)); }
.tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--hue) 20%, white); border-color: var(--hue); }
.tabs__age { font-size: 13px; color: var(--muted); font-weight: 600; }
.tabs__name { font: 700 16px var(--display); white-space: nowrap; }

.shelf { margin-top: 28px; }
.shelf__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-bottom: 18px; border-bottom: 3px solid var(--hue); }
.shelf__head h3 { font-size: 24px; }
.shelf__head p { color: var(--muted); }

.books { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 36px 28px; }
.book { display: flex; flex-direction: column; min-width: 0; }
.book__cover { display: block; text-decoration: none; aspect-ratio: 3 / 4; border-radius: 4px 10px 10px 4px; overflow: hidden; background: var(--paper);
  box-shadow: 0 1px 2px rgba(51,53,45,.12), 0 10px 22px -12px rgba(51,53,45,.45); transition: transform .2s; }
.book__cover:hover { transform: translateY(-3px); }
.book__cover img { width: 100%; height: 100%; object-fit: cover; }
.book__art {
  height: 100%; display: flex; align-items: flex-end; padding: 18px;
  font: 700 21px/1.15 var(--display); color: var(--ink);
  background: linear-gradient(160deg, color-mix(in srgb, var(--hue) 35%, white), color-mix(in srgb, var(--hue) 12%, white));
}
.book__body { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; flex: 1; }
.book__title { font-size: 18px; }
.book__title a { color: var(--ink); text-decoration: none; }
.book__title a:hover { color: var(--sage); text-decoration: underline; }
.book__series { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--sage); background: var(--wash); border-radius: 6px; padding: 2px 8px; }
.book__pages { font-size: 13px; color: var(--muted); }
.book__desc {
  font-size: 15px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.book__buy { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.price { font: 800 19px var(--text); font-variant-numeric: tabular-nums; }
.price s { font-weight: 600; font-size: 14px; color: var(--muted); }
.price--promo { color: #9C3D2E; }
.omnibus { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------ do druku */
.print { padding: 72px 0; }
.print__lead { margin-top: 12px; color: var(--muted); max-width: 62ch; }
.print__grid { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.print__tile {
  display: grid; grid-template-columns: 190px 1fr; gap: 24px; align-items: center;
  padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  text-decoration: none; color: var(--ink); transition: border-color .15s;
}
.print__tile:hover { border-color: var(--sage-brand); }
.print__fan { position: relative; height: 170px; }
.print__fan img {
  position: absolute; top: 8px; width: 112px; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px;
  box-shadow: 0 8px 18px -10px rgba(51,53,45,.5); background: var(--card);
}
.print__fan img:nth-child(1) { left: 0; transform: rotate(-7deg); }
.print__fan img:nth-child(2) { left: 38px; transform: rotate(-1deg); z-index: 1; }
.print__fan img:nth-child(3) { left: 76px; transform: rotate(6deg); z-index: 2; }
.print__text { display: grid; gap: 8px; }
.print__name { font: 700 24px var(--display); }
.print__note { color: var(--muted); font-size: 15px; }
.print__count { font-weight: 700; color: var(--sage); }
.print__tile:hover .print__count { text-decoration: underline; }

/* ------------------------------------------------------------ pakiety */
.bundles { padding: 0 0 72px; }
.bundles__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.bundles__head a { font-weight: 700; }
.bundles__list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.bundles__list a {
  display: grid; gap: 6px; height: 100%; padding: 22px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .15s;
}
.bundles__list a:hover { border-color: var(--sage-brand); }
.bundles__covers { display: flex; margin-bottom: 10px; }
.bundles__covers img { width: 70px; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; border: 2px solid var(--card); box-shadow: 0 6px 14px -8px rgba(51,53,45,.5); }
.bundles__covers img + img { margin-left: -22px; }
.bundles__name { font: 700 19px var(--display); }
.bundles__meta { color: var(--muted); font-size: 14px; }
.bundles__price { font: 800 19px var(--text); margin-top: 4px; }
.bundles__price s { font-weight: 600; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------ dla kogo / jak to działa */
.who { padding: 64px 0; background: var(--wash); }
.who__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.who__list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; }
.who__list dt { font: 700 19px var(--display); }
.who__list dd { margin: 6px 0 0; color: var(--muted); }

.how { padding: 72px 0; }
.how__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.how__steps { list-style: none; counter-reset: step; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; }
.how__steps li { counter-increment: step; position: relative; padding-left: 48px; color: var(--muted); }
.how__steps li strong { color: var(--ink); }
.how__steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font: 700 16px var(--display); color: var(--sage); background: var(--wash);
}
.how__values { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; color: var(--muted); }
.how__values strong { color: var(--ink); }

/* ------------------------------------------------------------ najczęstsze pytania */
.faq { padding: 0 0 72px; }
.faq__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.faq__list { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; position: relative; font: 700 17px var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 600 22px var(--text); color: var(--sage); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 70ch; }

/* ------------------------------------------------------------ newsletter */
.letter { padding: 56px 0; background: var(--sage); color: #fff; }
.letter h2 { color: #fff; }
.letter__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.letter__grid p { margin-top: 12px; color: rgba(255,255,255,.88); max-width: 52ch; }
.letter__form label { font-weight: 700; font-size: 15px; }
.letter__row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.letter__row input { flex: 1 1 220px; min-width: 0; font: 16px var(--text); padding: 12px 16px; border-radius: 999px; border: 0; color: var(--ink); }
.letter .btn { background: var(--ink); border-color: var(--ink); }
.letter .btn:hover { background: #1F201B; border-color: #1F201B; }
.letter__consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-weight: 400 !important; font-size: 14px !important; color: rgba(255,255,255,.9); }
.letter__consent input { margin-top: 4px; accent-color: var(--ink); }
.letter__err { margin-top: 8px; font-weight: 700; color: #FFE1D6; }

/* ------------------------------------------------------------ stopka */
.foot { padding: 48px 0 56px; font-size: 15px; color: var(--muted); }
.foot__grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 32px; align-items: start; }
.foot__grid img { width: 128px; height: auto; mix-blend-mode: multiply; margin-bottom: 10px; }
.foot nav { display: grid; gap: 6px; }
.foot nav a, .foot__link { color: var(--ink); text-decoration: none; font: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.foot nav a:hover, .foot__link:hover { color: var(--sage); text-decoration: underline; }
.foot address { font-style: normal; line-height: 1.7; justify-self: end; }

/* ------------------------------------------------------------ mobile */
@media (max-width: 900px) {
  .hero { padding: 36px 0 44px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero__copy, .ruler { min-width: 0; }
  /* miarka w poziomie: przewijany pasek etapów */
  .ruler { padding-left: 0; padding-top: 22px; margin: 0 calc(-1 * max(20px, env(safe-area-inset-left, 0px))); padding-right: 0; }
  .ruler::before {
    left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 14px; border-radius: 0;
    background-image:
      repeating-linear-gradient(to right, transparent 0 11px, rgba(51,53,45,.45) 11px 12px),
      repeating-linear-gradient(to right, transparent 0 59px, rgba(51,53,45,.7) 59px 60px);
    background-size: 100% 7px, 100% 12px;
  }
  .ruler__marks { display: flex; flex-direction: row; overflow-x: auto; gap: 8px; padding: 0 max(20px, env(safe-area-inset-left, 0px)) 6px; scroll-snap-type: x proximity; }
  .ruler__marks li { flex: 0 0 auto; scroll-snap-align: start; }
  .ruler__marks a { grid-template-columns: auto; gap: 2px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--hue); }
  .ruler__marks a::before { display: none; }
  .ruler__age { font-size: 22px; }
  .top__row { flex-wrap: wrap; gap: 0 16px; }
  .top__cart { margin-left: auto; }
  .top__nav { order: 3; width: 100%; margin: 0; padding: 4px 0 10px; overflow-x: auto; gap: 18px; white-space: nowrap; }
  .who__grid, .how__grid, .letter__grid, .faq__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .foot__grid { grid-template-columns: 1fr; }
  .foot address { justify-self: start; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .who__list { grid-template-columns: 1fr; }
  .books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .book__title { font-size: 16px; }
  .book__desc { display: none; }
  .book__buy .btn { width: 100%; }
  .book__buy form { width: 100%; }
  .print__tile { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Oznaczenie grafik AI (art. 50 AI Act) */
.ai-badge {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; pointer-events: none;
  font: 700 11px/1 system-ui, sans-serif; letter-spacing: .04em; color: #fff;
  background: rgba(20, 20, 20, .72); border-radius: 4px; padding: 4px 6px;
}
.book__cover { position: relative; }
.foot__ai { margin-top: 18px; font-size: 13px; color: var(--muted); }
