/* Buenas Buenas Films – style sekcji strony filmu. Kolory/fonty: theme.json. */

:root {
	--tv-ink: var(--wp--preset--color--czarny);
	--tv-paper: var(--wp--preset--color--krem);
	--tv-pink: var(--wp--preset--color--roz);
	--tv-yellow: var(--wp--preset--color--zolty);
	--tv-header-h: 4.25rem;
}

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

[id] { scroll-margin-top: calc(var(--tv-header-h) + var(--wp-admin--admin-bar--height, 0px) + 0.5rem); }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

img { max-width: 100%; height: auto; }

/* Fokus widoczny na każdym tle */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--tv-ink);
	outline-offset: 3px;
}
.wp-element-button:focus-visible {
	outline: 3px solid var(--tv-ink);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--tv-paper);
}
.tv-contact :focus-visible,
.tv-site-footer :focus-visible { outline-color: var(--tv-paper); }

/* Sekcje stykają się bez przerw */
.wp-site-blocks > * { margin-block: 0; }
.tv-page > .wp-block-post-content > .alignfull { margin-block: 0; }

/* ---------- Nagłówek ---------- */
.tv-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	background: var(--tv-paper);
	border-bottom: 2px solid var(--tv-ink);
}
.tv-header {
	max-width: var(--wp--style--global--wide-size);
	min-height: var(--tv-header-h);
	margin-inline: auto;
	padding-inline: var(--wp--style--root--padding-left);
	gap: 1rem;
}
.tv-header__logo {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.75rem);
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}
.tv-header__logo a { text-decoration: none; }
.tv-nav { gap: clamp(1.25rem, 3vw, 3.25rem); }
.tv-nav .wp-block-navigation-item__content {
	padding-block: 0.4rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.15rem, 1rem + 0.5vw, 1.5rem);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-decoration: none;
}
.tv-nav .wp-block-navigation-item__content:hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 3px; }
@media (max-width: 599px) {
	.tv-nav .tv-nav__secondary { display: none; }
}

/* ---------- Ekran otwierający ---------- */
.tv-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(2rem, 5vw, 3.5rem);
}
.tv-hero::before,
.tv-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
}
.tv-hero::before { background: var(--tv-pink); clip-path: polygon(0 0, 6% 0, 0 52%); }
.tv-hero::after { background: var(--tv-yellow); clip-path: polygon(49% 100%, 100% 100%, 100% 0, 95% 0); }

.tv-hero__cols { gap: clamp(2rem, 4vw, 4rem); }
.tv-hero__text { container-type: inline-size; }
.tv-hero__text > * { margin-block: 0; }
.tv-hero__title { margin: 0; letter-spacing: -0.01em; font-size: clamp(3.5rem, 21.5cqi, 10rem) !important; }
.tv-hero__director {
	margin-top: 0.6rem !important;
	font-family: var(--wp--preset--font-family--condensed);
	font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem);
	font-weight: 500;
	line-height: 1.1;
}
.tv-hero__premiere {
	margin-top: clamp(1.25rem, 3vw, 2.5rem) !important;
	font-family: var(--wp--preset--font-family--condensed);
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
	font-weight: 500;
	line-height: 1.1;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.tv-hero__buttons { margin-top: clamp(1.75rem, 3vw, 2.5rem) !important; gap: 1rem 1.25rem; }
.tv-hero__poster .tv-poster { margin: 0 0 0 auto; max-width: 440px; }
.tv-poster img,
.tv-still img { display: block; width: 100%; box-shadow: 0 1.25rem 2.5rem rgb(17 17 17 / 0.22); }
.tv-poster img { aspect-ratio: 1100 / 1585; object-fit: cover; }

/* Pędzelkowe podkreślenie */
.tv-underline { width: fit-content; max-width: 100%; }
.tv-underline::after {
	content: "";
	display: block;
	width: min(100%, 22rem);
	height: 5px;
	margin-top: 0.55em;
	border-radius: 3px 6px 2px 5px;
	background: var(--tv-pink);
	transform: rotate(-0.6deg);
}
.tv-hero__premiere.tv-underline::after { width: 100%; }

@media (max-width: 781px) {
	.tv-hero::before { clip-path: polygon(0 0, 13% 0, 0 30%); }
	.tv-hero::after { clip-path: polygon(6% 100%, 100% 100%, 100% 22%); }
	.tv-hero__text { text-align: center; }
	.tv-hero__text .tv-underline { margin-inline: auto; }
	.tv-hero__buttons { flex-direction: column; align-items: stretch; max-width: 32rem; margin-inline: auto; }
	.tv-hero__buttons .wp-block-button { width: 100%; }
	.tv-hero__buttons .wp-block-button__link { width: 100%; }
	.tv-hero__poster .tv-poster { margin-inline: auto; max-width: 380px; }
}

/* ---------- Sekcje ---------- */
.tv-section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.tv-section h2 { margin: 0; }

/* Seanse */
.tv-seanse { background: var(--tv-pink); }
.tv-seanse__inner > * { margin: 0 !important; }
.tv-seanse__inner { display: grid; gap: 1.5rem; }
.tv-seanse__title { text-align: center; }
@media (min-width: 1000px) {
	.tv-seanse__inner { grid-template-columns: auto minmax(0, 1fr); gap: 0; align-items: start; }
	.tv-seanse__title { padding-right: clamp(2rem, 3vw, 3rem); text-align: left; }
	.tv-seanse .wp-block-bbf-seanse { padding-left: clamp(2rem, 3vw, 3rem); border-left: 2px solid var(--tv-ink); min-height: 100%; }
}

/* O filmie */
.tv-about__title { margin-bottom: clamp(1.25rem, 3vw, 2rem) !important; }
.tv-about__cols { gap: clamp(1.5rem, 4vw, 3.5rem); margin-block-start: 0 !important; }
.tv-still { margin: 0; }
.tv-still img { aspect-ratio: 484 / 332; object-fit: cover; box-shadow: none; }
.tv-about__text { align-self: center; }
.tv-lead {
	margin: 0;
	font-family: var(--wp--preset--font-family--condensed);
	font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.9rem);
	font-weight: 400;
	line-height: 1.3;
}
.tv-lead.tv-underline::after { width: min(100%, 11rem); margin-top: 0.9em; }
.tv-meta {
	margin-top: 1.5rem !important;
	font-family: var(--wp--preset--font-family--condensed);
	font-size: clamp(1.15rem, 1rem + 0.4vw, 1.4rem);
	letter-spacing: 0.01em;
}
.tv-about > .tv-about__body { max-width: var(--wp--style--global--content-size) !important; margin-top: clamp(2rem, 4vw, 3rem) !important; font-size: 1.125rem; }
.tv-about__body > * { max-width: 68ch; }
@media (min-width: 782px) {
	.tv-about__text { padding-left: clamp(1.5rem, 3vw, 3rem); border-left: 2px solid var(--tv-ink); }
}

/* Piosenka */
.tv-song { background: var(--tv-yellow); padding-block: clamp(2rem, 4vw, 3rem); }
.tv-song__inner > * { margin: 0 !important; }
.tv-song__inner { display: grid; gap: 1rem; justify-items: center; text-align: center; }
.tv-section h2.tv-song__title {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	line-height: 1.1;
	text-transform: none;
}
.tv-song__info {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
	line-height: 1.3;
}
.tv-song__aside { display: grid; gap: 0.75rem; justify-items: center; }
.tv-song__aside > * { margin: 0 !important; }
.tv-song__info, .bbf-spotify__info { margin: 0; }
.bbf-spotify__info {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
	line-height: 1.3;
}
.bbf-spotify__info strong { font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.wp-block-bbf-spotify .wp-block-button__link { min-width: min(100%, 18rem); text-align: center; }
@media (min-width: 782px) {
	.tv-song__aside { justify-items: start; }
}
.tv-song__buttons .wp-block-button__link { min-width: min(100%, 20rem); }
@media (min-width: 782px) {
	.tv-song__inner { grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; justify-items: start; align-items: center; text-align: left; }
	.tv-song__title { padding-right: 2.5rem; border-right: 2px solid var(--tv-ink); justify-self: stretch; }
}

/* Dostępność filmu */
.tv-about > .tv-access {
	max-width: var(--wp--style--global--content-size) !important;
	margin-top: clamp(2rem, 4vw, 3rem) !important;
}
.tv-access > * { max-width: 68ch; }
.tv-access {
	padding: clamp(1.25rem, 3vw, 2rem);
	border: 2px solid var(--tv-ink);
	background: var(--wp--preset--color--bialy);
}
.tv-access > * + * { margin-top: 0.75rem !important; }
.tv-access > .tv-access__title { margin: 0; }
.tv-access__note { font-size: 0.95rem; }

/* Seanse – zaproszenie dla kin */
.tv-seanse__invite { font-size: 1.05rem; overflow-wrap: anywhere; text-align: center; }
@media (min-width: 1000px) {
	.tv-seanse__invite { grid-column: 2; padding: 1.5rem 0 0 clamp(2rem, 3vw, 3rem); border-left: 2px solid var(--tv-ink); text-align: left; }
}

/* Partnerzy */
.tv-partners { background: var(--wp--preset--color--bialy); padding-block: clamp(2rem, 4vw, 3rem); }
.tv-partners__inner > *, .tv-partners__group > * { margin: 0 !important; }
.tv-partners__inner { display: grid; gap: 2rem clamp(2rem, 5vw, 5rem); }
.tv-partners__group { display: grid; gap: 1rem; min-width: 0; }
.tv-section h2.tv-partners__title {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: 1.1rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.08em;
}
.tv-partners__logos img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
@media (min-width: 900px) {
	.tv-partners__inner { grid-template-columns: 735fr 1065fr; align-items: end; }
}

/* Kontakt + stopka */
.tv-contact, .tv-site-footer { background: var(--tv-ink); color: var(--tv-paper); }
.tv-contact a, .tv-site-footer a { color: var(--tv-paper); }
.tv-contact__head > *, .tv-contact__grid > * { margin: 0 !important; }
.tv-contact__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; }
.tv-section h2.tv-contact__title { font-size: clamp(3rem, 2rem + 4vw, 5rem); }
.tv-contact__brand {
	padding-left: 2rem;
	border-left: 2px solid currentColor;
	font-family: var(--wp--preset--font-family--condensed);
	font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.tv-contact__grid {
	overflow-wrap: anywhere;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	gap: 1.75rem 2.5rem;
	margin-top: clamp(1.75rem, 4vw, 2.75rem) !important;
	font-size: 1.05rem;
	line-height: 1.6;
}
.tv-contact__grid strong {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: 1.3rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.tv-footer { padding-block: 1.25rem 1.75rem; border-top: 1px solid rgb(247 239 227 / 0.3); }
.tv-footer__copy { margin: 0; font-size: 0.9rem; }

/* Strony zwykłe (404, ewentualne podstrony) */
.tv-plain { padding-block: 3rem 5rem; }

@media (max-width: 599px) {
	.tv-contact__brand { padding-left: 0; border-left: 0; }
}
