/**
 * Biel-Fliz – style szablonu strony „Biel-Fliz – strona główna”
 * (page-templates/template-bielfliz.php).
 *
 * Wszystkie reguły są zawężone do wrappera .bf (specyficzność min. 0,2,0),
 * dzięki czemu style motywu – np. a:hover, a:visited, h1, p – nie nadpisują designu.
 */

/* ==========================================================================
   Zmienne i baza
   ========================================================================== */

body.bf-page {
	margin: 0;
	padding: 0;
	background: #123170;
}

.bf {
	--bf-ink: #050f26;
	--bf-blue: #0b47a6;
	--bf-cyan: #1ee2f0;
	--bf-muted: #4a5573;
	--bf-line: #e1e6f0;
	--bf-soft: #eef2f8;
	--bf-mono: 'IBM Plex Mono', monospace;
	--bf-ease: cubic-bezier(.2, .8, .2, 1);
	--bf-gradient: linear-gradient(160deg, #0a3a8f 0%, #0b47a6 40%, #1478c9 75%, #1ee2f0 120%);

	color: #fff;
	font-family: 'Archivo', Helvetica, sans-serif;
	font-size: 16px;
	line-height: normal;
	-webkit-font-smoothing: antialiased;
}

.bf * {
	box-sizing: border-box;
}

/* Reset elementów, które motywy zwykle stylują globalnie. */
.bf :where(h1, h2, p) {
	margin: 0;
	font: inherit;
	color: inherit;
	text-transform: none;
}

.bf a {
	color: inherit;
	text-decoration: none;
	transition: none;
}

.bf a:is(:hover, :focus, :active) {
	text-decoration: none;
}

/* Zwykły link: kolor rodzica, cyjan na hover (w designie było to globalne a:hover). */
.bf .bf-link {
	color: inherit;
}

.bf .bf-link:hover {
	color: var(--bf-cyan);
}

.bf .bf-container {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding-right: 32px;
	padding-left: 32px;
}

@keyframes bfDown {
	from {
		transform: translateY(-50%);
	}
	to {
		transform: translateY(0);
	}
}

@keyframes bfGlow {
	0%,
	100% {
		opacity: .35;
	}
	50% {
		opacity: .7;
	}
}

/* ==========================================================================
   Nagłówek
   ========================================================================== */

.bf .bf-header {
	position: relative;
	z-index: 3;
	border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.bf .bf-header__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: center;
	padding-top: 18px;
	padding-bottom: 18px;
}

.bf .bf-header__brand {
	display: flex;
	gap: 12px;
	align-items: center;
}

.bf .bf-header__logo {
	display: block;
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 10px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .25);
}

.bf .bf-header__name {
	font-size: 19px;
	font-weight: 800;
	font-stretch: 118%;
	letter-spacing: -.01em;
}

/* Przycisk menu jest potrzebny dopiero na mobile (≤ 860 px). */
.bf .bf-header__toggle {
	display: none;
}

/* Na desktopie wrapper nie istnieje dla układu – nav i telefon są elementami flex nagłówka. */
.bf .bf-header__menu {
	display: contents;
}

.bf .bf-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	margin: 0 auto;
	font-family: var(--bf-mono);
	font-size: 13px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.bf .bf-nav__link {
	padding: 6px 0;
	color: rgba(255, 255, 255, .78);
	border-bottom: 2px solid transparent;
	transition: color .2s, border-color .2s;
}

.bf .bf-nav__link:hover {
	color: #fff;
	border-bottom-color: rgba(255, 255, 255, .6);
}

/* Aktywna pozycja nie zmienia się na hover. */
.bf .bf-nav__link[aria-current="page"] {
	color: #fff;
	border-bottom-color: var(--bf-cyan);
}

.bf .bf-header__phone {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 10px 18px;
	font-size: 15px;
	font-weight: 700;
	color: var(--bf-blue);
	background: #fff;
	border-radius: 12px;
	transition: transform .2s, background .2s;
}

.bf .bf-header__phone:hover {
	color: var(--bf-ink);
	background: var(--bf-cyan);
	transform: translateY(-2px);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.bf .bf-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	overflow: hidden;
	background: linear-gradient(160deg, #0a3a8f 0%, #0b47a6 38%, #1478c9 72%, #1ee2f0 118%);
}

.bf .bf-hero__glow {
	position: absolute;
	inset: -10%;
	pointer-events: none;
	background:
		radial-gradient(40% 35% at 25% 20%, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0)),
		radial-gradient(35% 30% at 80% 35%, rgba(30, 226, 240, .22), rgba(30, 226, 240, 0));
	will-change: transform;
}

.bf .bf-hero__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 7vh;
	text-align: center;
	will-change: transform, opacity;
}

.bf .bf-hero__badge {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	padding: 8px 16px;
	font-family: var(--bf-mono);
	font-size: 13px;
	color: #e6fbfd;
	background: rgba(255, 255, 255, .12);
	border-radius: 999px;
}

.bf .bf-hero__title {
	max-width: 1200px;
	margin-top: 28px;
	font-size: clamp(52px, 10vw, 156px);
	font-weight: 900;
	font-stretch: 115%;
	line-height: .86;
	letter-spacing: -.045em;
	text-wrap: balance;
}

.bf .bf-hero__lead {
	max-width: 560px;
	margin-top: 28px;
	font-size: clamp(17px, 1.5vw, 20px);
	line-height: 1.55;
	color: #dbe6f7;
	text-wrap: pretty;
}

.bf .bf-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 36px;
}

.bf .bf-btn {
	padding: 17px 28px;
	font-size: 16px;
	font-weight: 700;
	border-radius: 999px;
}

.bf .bf-btn--primary {
	display: flex;
	gap: 10px;
	align-items: center;
	color: var(--bf-ink);
	background: #fff;
}

.bf .bf-btn--primary:hover {
	background: var(--bf-cyan);
}

.bf .bf-btn__arrow {
	font-size: 18px;
}

.bf .bf-btn--ghost {
	padding: 17px 26px;
	font-weight: 600;
	color: inherit;
	background: rgba(5, 15, 38, .4);
	border: 1px solid rgba(255, 255, 255, .25);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.bf .bf-btn--ghost:hover {
	color: var(--bf-cyan);
	border-color: var(--bf-cyan);
}

/* Scena z podłogą – przesuwana przez parallax w assets/js/bielfliz.js. */
.bf .bf-hero__stage {
	position: relative;
	flex: 1;
	min-height: max(420px, 44vh);
	margin-top: 4vh;
	will-change: transform;
}

/* ==========================================================================
   Animowana podłoga z płytkami (kafle generuje assets/js/bielfliz.js)
   ========================================================================== */

.bf .bf-floor {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	perspective: 1000px;
	perspective-origin: 50% 0%;
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
	mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
}

/*
 * Szerokość 180% sceny, ale min. 1600 px: na wąskich ekranach płytki nie robią się drobne,
 * a siatka (24 rzędy) jest dość wysoka, żeby w żadnym momencie animacji nie było widać jej końca.
 */
.bf .bf-floor__plane {
	position: absolute;
	top: 0;
	left: calc(50% - max(90%, 800px));
	width: max(180%, 1600px);
	height: 300%;
	overflow: hidden;
	transform: rotateX(58deg); /* nachylenie podłogi – w edytorze designu 30–75° */
	transform-origin: 50% 0%;
}

.bf .bf-floor__grid {
	display: grid;
	grid-template-columns: repeat(30, 1fr);
	gap: 3px;
	padding: 3px;
	background: rgba(200, 215, 235, .55);
	animation: bfDown 60s linear infinite; /* 60 s = prędkość 1 z edytora designu */
	will-change: transform;
}

.bf .bf-floor__tile {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	padding: 8%;
	background: #eef2f7;
	border-radius: 1px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), inset 0 -6px 12px rgba(11, 71, 166, .06);
}

.bf .bf-floor__tile--light {
	background: #fff;
}

.bf .bf-floor__tile img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.bf .bf-floor__glow {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 50%;
	background: radial-gradient(60% 80% at 50% 100%, rgba(30, 226, 240, .18), transparent);
	animation: bfGlow 6s ease-in-out infinite;
}

/* ==========================================================================
   Marki
   ========================================================================== */

.bf .bf-brands {
	color: var(--bf-ink);
	background: #f3f5f9;
}

.bf .bf-brands__inner {
	padding-top: 96px;
	padding-bottom: 104px;
}

.bf .bf-brands__head {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 44px;
}

.bf .bf-brands__title {
	max-width: 640px;
	font-size: clamp(34px, 4.6vw, 64px);
	font-weight: 900;
	font-stretch: 112%;
	line-height: .95;
	letter-spacing: -.035em;
	text-wrap: balance;
}

.bf .bf-brands__lead {
	max-width: 360px;
	font-size: 16px;
	line-height: 1.55;
	color: var(--bf-muted);
}

.bf .bf-brands__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px;
}

/* Karta marki – :hover zastępuje dawny stan Reacta (onMouseEnter / onMouseLeave). */
.bf .bf-brand {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 18px;
	justify-content: space-between;
	min-height: 150px;
	padding: 22px;
	overflow: hidden;
	color: var(--bf-ink);
	background: #fff;
	border: 1px solid var(--bf-line);
	border-radius: 18px;
	box-shadow: 0 0 0 rgba(0, 0, 0, 0);
	transition: transform .45s var(--bf-ease), box-shadow .45s var(--bf-ease), color .3s, border-color .3s;
}

.bf .bf-brand:hover {
	color: #fff;
	border-color: transparent;
	box-shadow: 0 18px 40px -12px rgba(11, 71, 166, .45);
	transform: translateY(-6px);
}

.bf .bf-brand__fill {
	position: absolute;
	inset: 0;
	background: var(--bf-gradient);
	transform: translateY(101%);
	transition: transform .5s var(--bf-ease);
}

.bf .bf-brand:hover .bf-brand__fill {
	transform: translateY(0);
}

.bf .bf-brand__top {
	position: relative;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	justify-content: space-between;
}

.bf .bf-brand__label {
	min-width: 0;
	font-family: var(--bf-mono);
	font-size: 12px;
	opacity: .6;
	transition: opacity .3s;
}

.bf .bf-brand:hover .bf-brand__label {
	opacity: .9;
}

.bf .bf-brand__arrow {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	font-size: 16px;
	color: var(--bf-blue);
	background: var(--bf-soft);
	border-radius: 50%;
	transition: transform .45s var(--bf-ease), background .3s;
}

.bf .bf-brand:hover .bf-brand__arrow {
	background: #fff;
	transform: rotate(45deg) scale(1.08);
}

.bf .bf-brand__name {
	position: relative;
	font-size: clamp(20px, 2vw, 26px);
	font-weight: 800;
	font-stretch: 118%;
	letter-spacing: -.01em;
	overflow-wrap: anywhere;
	transition: letter-spacing .45s var(--bf-ease), transform .45s var(--bf-ease);
}

.bf .bf-brand:hover .bf-brand__name {
	letter-spacing: .04em;
	transform: translateX(4px);
}

/* ==========================================================================
   Mapa i karta kontaktowa
   ========================================================================== */

.bf .bf-map {
	position: relative;
	width: 100%;
	height: clamp(600px, 70vh, 720px);
	overflow: hidden;
	color: var(--bf-ink);
	background: var(--bf-ink);
}

.bf .bf-map__frame {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	filter: grayscale(1) contrast(1.05);
}

.bf .bf-map__fade {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(90deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, 0) 40%);
}

.bf .bf-card {
	position: absolute;
	top: 50%;
	left: max(24px, calc((100% - 1400px) / 2 + 32px));
	width: 360px;
	max-width: calc(100% - 48px);
	overflow: hidden;
	color: var(--bf-ink);
	background: #fff;
	border-radius: 22px;
	box-shadow: 0 30px 60px -20px rgba(5, 15, 38, .35), 0 0 0 1px rgba(5, 15, 38, .06);
	transform: translateY(-50%);
}

.bf .bf-card__head {
	position: relative;
	height: 92px;
	background: var(--bf-gradient);
}

.bf .bf-card__logo {
	position: absolute;
	bottom: -30px;
	left: 24px;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 16px;
	box-shadow: 0 0 0 4px #fff, 0 8px 20px rgba(5, 15, 38, .25);
}

.bf .bf-card__badge {
	position: absolute;
	top: 16px;
	right: 18px;
	padding: 5px 10px;
	font-family: var(--bf-mono);
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(255, 255, 255, .16);
	border-radius: 999px;
}

.bf .bf-card__body {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 44px 24px 24px;
}

.bf .bf-card__title {
	font-size: 24px;
	font-weight: 800;
	font-stretch: 115%;
	letter-spacing: -.02em;
}

.bf .bf-card__subtitle {
	margin-top: 4px;
	font-size: 14px;
	color: var(--bf-muted);
}

.bf .bf-card__rows {
	display: flex;
	flex-direction: column;
	border-top: 1px solid #e9edf4;
}

.bf .bf-card__row {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 12px;
	padding: 12px 0;
	font-size: 15px;
	border-bottom: 1px solid #e9edf4;
}

.bf .bf-card__label {
	padding-top: 3px;
	font-family: var(--bf-mono);
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #7a849c;
}

/* Telefon w karcie nie zmienia koloru na hover. */
.bf .bf-card__phone {
	font-weight: 700;
	color: var(--bf-blue);
}

.bf .bf-card__socials {
	display: flex;
	gap: 8px;
}

.bf .bf-card__social {
	flex: 1;
	padding: 11px;
	font-size: 14px;
	font-weight: 600;
	color: inherit;
	text-align: center;
	background: var(--bf-soft);
	border-radius: 12px;
	transition: background .2s, color .2s;
}

.bf .bf-card__social:hover {
	color: #fff;
	background: var(--bf-blue);
}

/* ==========================================================================
   Stopka
   ========================================================================== */

.bf .bf-footer {
	color: var(--bf-ink);
	background: #f3f5f9;
	border-top: 1px solid var(--bf-line);
}

.bf .bf-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
	padding-top: 22px;
	padding-bottom: 22px;
	font-size: 14px;
	color: var(--bf-muted);
}

.bf .bf-footer__links {
	display: flex;
	gap: 22px;
}

/* ==========================================================================
   Tablet i telefon (≤ 860 px): menu pod przyciskiem, mapa nad kartą kontaktu
   ========================================================================== */

@media (max-width: 860px) {
	.bf .bf-header__inner {
		flex-wrap: nowrap;
		gap: 16px;
		padding-top: 14px;
		padding-bottom: 14px;
	}

	.bf .bf-header__toggle {
		position: relative;
		display: block;
		flex: none;
		width: 44px;
		height: 44px;
		margin: 0 0 0 auto;
		padding: 0;
		color: #fff;
		background: rgba(255, 255, 255, .08);
		border: 1px solid rgba(255, 255, 255, .25);
		border-radius: 12px;
		box-shadow: none;
		cursor: pointer;
		transition: background .2s;
	}

	.bf .bf-header__toggle:hover {
		background: rgba(255, 255, 255, .16);
	}

	.bf .bf-header__toggle:focus-visible {
		outline: 2px solid var(--bf-cyan);
		outline-offset: 2px;
	}

	/* Trzy kreski (span + ::before / ::after), po otwarciu menu krzyżyk. */
	.bf .bf-header__toggle-icon {
		position: absolute;
		top: 50%;
		left: 50%;
		width: 18px;
		height: 2px;
		margin: -1px 0 0 -9px;
		background: currentColor;
		border-radius: 1px;
		transition: background .2s;
	}

	.bf .bf-header__toggle-icon::before,
	.bf .bf-header__toggle-icon::after {
		position: absolute;
		left: 0;
		width: 100%;
		height: 100%;
		content: '';
		background: currentColor;
		border-radius: inherit;
		transition: transform .3s var(--bf-ease);
	}

	.bf .bf-header__toggle-icon::before {
		transform: translateY(-6px);
	}

	.bf .bf-header__toggle-icon::after {
		transform: translateY(6px);
	}

	.bf .bf-header__toggle[aria-expanded="true"] .bf-header__toggle-icon {
		background: transparent;
	}

	.bf .bf-header__toggle[aria-expanded="true"] .bf-header__toggle-icon::before {
		transform: rotate(45deg);
	}

	.bf .bf-header__toggle[aria-expanded="true"] .bf-header__toggle-icon::after {
		transform: rotate(-45deg);
	}

	/* Panel z menu i telefonem pod nagłówkiem; otwiera go aria-expanded przycisku (assets/js/bielfliz.js). */
	.bf .bf-header__menu {
		position: absolute;
		top: calc(100% + 1px);
		right: 0;
		left: 0;
		display: none;
		flex-direction: column;
		gap: 20px;
		padding: 4px 32px 24px;
		background: #0a3a8f;
		border-bottom: 1px solid rgba(255, 255, 255, .16);
		box-shadow: 0 24px 40px -24px rgba(5, 15, 38, .6);
	}

	.bf .bf-header__toggle[aria-expanded="true"] + .bf-header__menu {
		display: flex;
	}

	.bf .bf-nav {
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 0;
		margin: 0;
		font-size: 14px;
	}

	.bf .bf-nav__link {
		padding: 16px 0;
		border-bottom: 1px solid rgba(255, 255, 255, .12);
	}

	.bf .bf-header__phone {
		justify-content: center;
		padding: 14px 18px;
	}

	/* Mapa nad kartą zamiast karty na mapie – na wąskim ekranie karta zasłaniałaby pinezkę. */
	.bf .bf-map {
		height: auto;
		padding-bottom: 40px;
		overflow: visible;
		background: #f3f5f9;
	}

	.bf .bf-map__frame {
		position: relative;
		inset: auto;
		height: clamp(280px, 60vw, 420px);
	}

	.bf .bf-map__fade {
		display: none;
	}

	.bf .bf-card {
		position: relative;
		top: auto;
		left: auto;
		width: calc(100% - 64px);
		max-width: 480px;
		margin: 24px auto 0;
		transform: none;
	}
}

/* ==========================================================================
   Telefon (≤ 600 px)
   ========================================================================== */

@media (max-width: 600px) {
	.bf .bf-container,
	.bf .bf-header__menu {
		padding-right: 20px;
		padding-left: 20px;
	}

	.bf .bf-hero__content {
		padding-top: 40px;
	}

	/* W jednej linii od 375 px; wężej zawija się w dwie równe linie. */
	.bf .bf-hero__badge {
		padding: 7px 12px;
		font-size: 12px;
		border-radius: 16px;
		text-wrap: balance;
	}

	.bf .bf-hero__title {
		margin-top: 22px;
		font-size: clamp(40px, 13.3vw, 60px);
	}

	.bf .bf-hero__lead {
		margin-top: 20px;
	}

	.bf .bf-hero__actions {
		flex-direction: column;
		width: 100%;
		max-width: 400px;
		margin-top: 28px;
	}

	.bf .bf-btn {
		justify-content: center;
	}

	/*
	 * Podłoga na telefonie: niższa scena o stałej wysokości (zamiast min. 420 px) i większe płytki
	 * (~60 px). Hero nie wypełnia już całego ekranu – inaczej scena (flex: 1) rosłaby na wysokich telefonach.
	 */
	.bf .bf-hero {
		min-height: 0;
	}

	.bf .bf-hero__stage {
		flex: none;
		height: 280px;
		min-height: 0;
		margin-top: 20px;
	}

	.bf .bf-floor__plane {
		left: calc(50% - 950px);
		width: 1900px;
	}

	.bf .bf-brands__inner {
		padding-top: 64px;
		padding-bottom: 72px;
	}

	.bf .bf-brands__head {
		gap: 14px;
		margin-bottom: 28px;
	}

	.bf .bf-brands__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.bf .bf-brand {
		gap: 14px;
		min-height: 124px;
		padding: 16px;
		border-radius: 16px;
	}

	.bf .bf-brand__label {
		font-size: 11px;
	}

	.bf .bf-brand__arrow {
		width: 28px;
		height: 28px;
		font-size: 14px;
	}

	/* Najdłuższa nazwa („MECHANIC”) mieści się w karcie od 320 px szerokości ekranu. */
	.bf .bf-brand__name {
		font-size: clamp(14px, 4.6vw, 22px);
	}

	.bf .bf-card {
		width: calc(100% - 40px);
	}
}
