/* ==========================================================================
   Strona główna
   ========================================================================== */

/* ---- Hero ---- */
/* Tytuł ukryty do startu animacji GSAP (klasę .hero-ready dodaje home.js; zabezpieczenie w <head>). */
.js:not(.hero-ready) .hero__title { opacity: 0; }
/* Rozmiar tytułu: 27vw dla słowa o 8 znakach (Granline); dłuższe tytuły są zmniejszane proporcjonalnie (--n = liczba znaków),
   a js/main.js dodatkowo dopasowuje go pomiarem (--fs-js), żeby zawsze mieścił się w jednej linii. */
.hero, .hero2 { --fs: var(--fs-js, min(27vw, calc(27vw * 8 / var(--n, 8)))); }
.hero { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; overflow-x: clip; }
.hero__title {
	margin: 0 0 calc(var(--fs) * -.185); font-size: var(--fs); font-weight: 400; line-height: 1; letter-spacing: -.0463em; white-space: nowrap; color: #000;
	will-change: transform, opacity;
}

/* Tytuły z literami schodzącymi poniżej linii (g, j, p, q, y, ą, ę) – bez nachodzenia białego tła na dół liter. */
.hero--desc .hero__title { margin-bottom: 0; padding-bottom: .12em; }
.hero2 { position: relative; background: #fff; }
.hero2__inner {
	display: flex; justify-content: center; align-items: flex-end; gap: 12px;
	max-width: calc(var(--w-container) + 2 * var(--pad)); margin-inline: auto; padding: 20px;
}
.hero2__media { flex: none; width: 33vw; max-width: 33vw; margin-top: calc(var(--fs) * -.74); }
.hero2__img { width: 100%; height: auto; }
.hero2__text { order: -1; flex: 0 0 20%; width: 20%; max-width: 20%; margin: 0; font-weight: 400; letter-spacing: .1px; }
.btn--hero { flex: 0 0 20%; width: 20%; max-width: 20%; padding: 32px; border-radius: 0; }

/* ---- Kategorie ---- */
.cats { position: relative; display: flex; flex-wrap: wrap; gap: 12px; padding: 12px; }
.cats__count { width: 100%; line-height: 1; font-weight: 400; color: var(--c-grey); letter-spacing: -.5px; }
.cats__title { width: 100%; font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: .1px; }
.cats__grid { flex: 1 1 calc(50% - 6px); min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.cats__media { position: relative; display: block; margin: 0 0 16px; overflow: hidden; }
.cats__custom .cats__media { margin: 0; }
.cats__img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border: 0; margin: 0; }
.cats__name { padding: 8px 0; font-size: 16px; font-weight: 600; line-height: 1.2; letter-spacing: .1px; }
.cats__num { font-weight: 400; }
.cats__lead { position: absolute; left: 12px; bottom: 24px; width: 450px; max-width: 450px; margin: 0; font-weight: 400; letter-spacing: .1px; }
.cats__custom { flex: 1 1 calc(50% - 6px); min-width: 0; margin: 0; }
.cats__custom a { display: block; width: 100%; }
.cats__custom-img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 0; }
.cats__custom figcaption { margin-top: 20px; font-size: 16px; font-weight: 600; letter-spacing: .25px; line-height: 1.4; }

/* ---- Produkty ---- */
.products { display: flex; flex-direction: column; gap: 20px; margin-top: 48px; padding: 12px; scroll-margin-top: 80px; }
.products__title { font-size: 40px; font-weight: 600; line-height: 1; }

/* ---- Filtr kategorii nad siatką produktów ---- */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.filter__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--c-line); background: #fff; font-size: 15px; font-weight: 500; letter-spacing: 0; color: #000; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.filter__btn:hover { border-color: #000; }
.filter__btn.is-active { background: #000; border-color: #000; color: #fff; }
.filter__count { font-size: 12px; font-weight: 400; opacity: .6; }
.grid .card[hidden] { display: none; }

/* ---- Sekcje tekstowe ---- */
.sect { padding-inline: 12px; }
.sect__inner { display: flex; max-width: var(--w-container); margin-inline: auto; padding-block: 120px; }
.sect__head { flex: 0 0 33.3333%; max-width: 33.3333%; display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.sect__kicker { font-size: 20px; font-weight: 400; line-height: 1.2; letter-spacing: .1px; margin: 0; }
.sect__title { font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: .1px; margin: 0; }
.sect__body { flex: 0 0 66.6666%; max-width: 66.6666%; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 20px; margin-top: 64px; padding: 20px; }
.sect__text { flex: 0 0 100%; max-width: 100%; letter-spacing: .25px; }
.sect__text p { margin-bottom: 1em; }
.sect__text p:last-child { margin-bottom: 0; }

.feature { display: flex; align-items: flex-start; gap: 12px; flex: 1 0 40%; }
.feature__icon { margin-top: 8px; color: var(--c-gold); width: 24px; height: 24px; }
.feature__title { margin: 8px 0 4px; font-size: 24px; font-weight: 600; line-height: 1.2; }
.feature__text { margin: 0; letter-spacing: .25px; }

/* ---- FAQ ---- */
.sect--faq .sect__body { flex-direction: column; flex-wrap: nowrap; margin-top: 36px; align-content: stretch; padding-top: 20px; }
.sect--faq .sect__kicker--h { font-size: 20px; }
.faq { display: flex; flex-direction: column; width: 100%; }
.faq__item { border: 0; }
.faq__q {
	display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 10px; list-style: none; cursor: pointer;
	font-size: 22px; font-weight: 400; line-height: 1.2; letter-spacing: -.5px; color: #1f2124;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__chev { transition: transform .2s ease; }
.faq__item:not(.js-faq)[open] .faq__chev, .faq__item.is-open .faq__chev { transform: rotate(180deg); }
.faq__a { overflow: hidden; padding: 0 10px; color: var(--c-grey); letter-spacing: .25px; }
.faq__a p { padding-bottom: 10px; }
.faq__more { width: 100%; max-width: 540px; margin: 20px 0 0; letter-spacing: .25px; }
.btn--faq { align-self: flex-start; padding: 24px 32px; margin-top: 20px; }
.btn--faq .icon { width: 16px; height: 16px; }

/* ---- Tablet ---- */
@media (max-width: 1024px) {
	.hero, .hero2 { --fs: var(--fs-js, min(28vw, calc(28vw * 8 / var(--n, 8)))); }
	.hero2__text { flex: 1 0 20%; font-size: 13px; }
	.btn--hero { flex: 1 0 20%; padding: 24px; }
	.cats__lead { width: 48%; max-width: 48%; bottom: 8px; font-size: 14px; }
	.cats__name { font-size: 14px; }
	.cats__num { font-size: 8px; }
	.sect__inner { gap: 12px; }
	.sect__head { padding: 0; }
	.sect__body { margin-top: 0; padding: 64px 0 0; }
	.sect--faq .sect__body { padding-top: 64px; margin-top: 0; }
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
	.hero { min-height: 15vh; }
	.hero__title { margin-bottom: calc(var(--fs) * -.45); }

	.hero2__inner { flex-wrap: wrap; padding: 12px; }
	.hero2__media { order: -1; width: 85%; max-width: 85%; margin-top: calc(var(--fs) * -1.18); }
	.hero2__text { order: 99; flex: 0 0 100%; width: 100%; max-width: 100%; margin-top: 48px; text-align: center; }
	.btn--hero { order: 100; flex: 0 0 100%; width: 100%; max-width: 100%; }

	.cats { padding: 12px 12px 144px; }
	.cats__grid { flex: 1 0 40%; max-width: 40%; grid-template-columns: 1fr; }
	.cats__custom { flex: 1 0 40%; max-width: 40%; }
	.cats__custom-img { aspect-ratio: 1 / 1; }
	.cats__custom figcaption { margin-top: 16px; font-size: 14px; }
	.cats__lead { width: 94%; max-width: 94%; }

	.products__title, .cats__title, .sect__title { font-size: 32px; }
	.sect__kicker { font-size: 14px; }
	.sect__inner { flex-direction: column; padding-block: 64px; }
	.sect__head, .sect__body { flex: 0 0 auto; max-width: 100%; }
	.sect__body { padding: 0; margin-top: 0; }
	.sect--faq .sect__body { padding: 0; }
	.sect__head { margin-bottom: 12px; }
	.feature { flex: 1 0 100%; max-width: 100%; }
	.faq__q { font-size: 18px; }
	.btn--faq { align-self: stretch; padding: 24px; }
}
