/*
Theme Name: BFSale Kadence
Description: Das Titelblatt von BFSale.de auf Basis von Kadence und Gutenberg.
Template: kadence
Version: 1.1.6
Text Domain: bfsale-kadence
*/

@font-face {
	font-family: "Barlow Condensed";
	src: url("assets/barlow-condensed-800.woff2") format("woff2");
	font-style: normal;
	font-weight: 800;
	font-display: swap;
}

@font-face {
	font-family: "DM Sans";
	src: url("assets/dm-sans.woff2") format("woff2");
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
}

/* Titelblatt-Farben und gemeinsame Kanten für Header, Inhalt und Footer. */
:root,
.editor-styles-wrapper {
	--bfs-black: #0b0a09;
	--bfs-panel: #151310;
	--bfs-ink: #fff8ef;
	--bfs-muted: #b8b0a6;
	--bfs-line: #37302a;
	--bfs-orange: #ff661f;
	--bfs-flare: #ff965f;
	--bfs-display: "Barlow Condensed", "Arial Narrow", sans-serif;
	--bfs-text: "DM Sans", Arial, sans-serif;
	--bfs-max: 80rem;
	--bfs-gutter: clamp(1rem, 4.4vw, 4.5rem);
	--bfs-shell: calc(var(--bfs-max) + var(--bfs-gutter) * 2);
}

body:not(.wp-admin),
.editor-styles-wrapper {
	color-scheme: dark;
	background: var(--bfs-black);
	color: var(--bfs-ink);
	font-family: var(--bfs-text);
}

body:not(.wp-admin) :is(#wrapper, #inner-wrap, .entry.single-entry) {
	background-color: var(--bfs-black);
}

::selection {
	background: var(--bfs-orange);
	color: var(--bfs-black);
}

:where(.site-header, .site-footer, #mobile-drawer, .entry-content)
	:where(a, button, summary, input, select, textarea):focus-visible {
	outline: 2px solid var(--bfs-flare);
	outline-offset: 3px;
}

:is(#masthead, #colophon) .site-container {
	box-sizing: border-box;
	max-inline-size: var(--bfs-shell);
	padding-inline: var(--bfs-gutter);
}

/* Kadence rendert die Navigation und den mobilen Drawer. */
#masthead .site-header-row-container-inner {
	background: var(--bfs-black);
}

#masthead .site-main-header-wrap .site-header-row-container-inner,
#masthead .site-mobile-header-wrap .site-header-row-container-inner {
	border-bottom: 1px solid var(--bfs-line);
}

#masthead .site-branding .site-title {
	color: var(--bfs-ink);
	font: 800 clamp(2.15rem, 4vw, 2.75rem)/.93 var(--bfs-display);
	letter-spacing: -.025em;
}

#masthead .site-branding a:hover .site-title {
	color: var(--bfs-flare);
}

#masthead .header-navigation .header-menu-container > ul > li.menu-item > a {
	min-block-size: 2.75rem;
	color: var(--bfs-ink);
	font-family: var(--bfs-text);
	font-weight: 700;
}

#masthead .header-navigation .header-menu-container > ul > li.menu-item > a:hover,
#masthead .header-navigation .header-menu-container > ul > li.current-menu-item > a {
	color: var(--bfs-flare);
}

#masthead :is(.header-button, .mobile-header-button) {
	display: inline-flex;
	align-items: center;
	min-block-size: 2.75rem;
	border: 1px solid var(--bfs-orange);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--bfs-flare);
	font-weight: 800;
}

#masthead :is(.header-button, .mobile-header-button):hover {
	background: var(--bfs-orange);
	color: var(--bfs-black);
}

#masthead .menu-toggle-open,
#mobile-drawer .drawer-header .drawer-toggle {
	min-inline-size: 2.75rem;
	min-block-size: 2.75rem;
	border: 1px solid #93522e;
	border-radius: 0;
	background: var(--bfs-black);
	color: var(--bfs-flare);
}

#mobile-drawer .drawer-inner {
	max-inline-size: 100%;
	background: #21150f;
	color: var(--bfs-ink);
}

#mobile-drawer .mobile-navigation ul li {
	font-family: var(--bfs-text);
	font-weight: 700;
}

#mobile-drawer .mobile-navigation ul li a {
	box-sizing: border-box;
	min-block-size: 3rem;
	color: var(--bfs-ink);
}

#mobile-drawer .mobile-navigation ul li a:hover,
#mobile-drawer .mobile-navigation ul li.current-menu-item > a {
	color: var(--bfs-flare);
}

/* Volle Breite nur für die Landingpage mit Titelblatt-Blöcken. */
.home .entry-content:has(> .bfs-hero) {
	margin-block: 0;
}

.home :is(.content-container, .entry-content-wrap):has(.entry-content > .bfs-hero) {
	max-inline-size: none;
	margin-block: 0;
	padding: 0;
}

.home .content-area:has(.entry-content > .bfs-hero) {
	margin-block: 0;
}

.entry-content > :is(.bfs-hero, .bfs-worlds, .bfs-section, .bfs-guide, .bfs-footer) {
	box-sizing: border-box;
	max-inline-size: none;
	margin: 0;
	padding-inline: max(var(--bfs-gutter), calc((100% - var(--bfs-max)) / 2));
}

/* Kadence supplies the gutters outside the full-width front page. */
body:not(.home) .entry-content > .bfs-section {
	inline-size: 100%;
	max-inline-size: 100%;
	margin-inline: 0;
	padding-inline: 0;
}

.entry-content .rank-math-breadcrumb p {
	margin-block: 0 1.25rem;
	color: var(--bfs-muted);
	font-size: .875rem;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.rank-math-breadcrumb .separator {
	margin-inline: .35em;
	color: var(--bfs-flare);
}

.rank-math-breadcrumb .last {
	color: var(--bfs-ink);
}

:where(.entry-content, .editor-styles-wrapper) :is(
	.bfs-hero-copy, .bfs-feature-copy, .bfs-section, .bfs-guide, .bfs-deal, .bfs-teaser
) :where(h1, h2, h3) {
	color: var(--bfs-ink);
	font-family: var(--bfs-display);
	font-weight: 800;
	letter-spacing: -.024em;
	line-height: .96;
	text-wrap: balance;
}

:where(.entry-content, .editor-styles-wrapper) :is(
	.bfs-hero-copy, .bfs-feature-copy, .bfs-section, .bfs-guide, .bfs-deal, .bfs-teaser
) :where(p) {
	color: var(--bfs-muted);
}

:where(.entry-content, .editor-styles-wrapper) :is(
	.bfs-feature-copy, .bfs-deal, .bfs-teaser
) .bfs-meta {
	color: var(--bfs-flare);
}

/* Asymmetrischer Aufmacher aus Spalten, Bild und editierbarem Inhalt. */
.bfs-hero {
	background: var(--bfs-black);
	padding-block: clamp(1.75rem, 4vw, 3.5rem);
}

.bfs-hero .bfs-hero-columns.wp-block-columns {
	display: grid;
	grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
	align-items: center;
	gap: clamp(1.25rem, 3vw, 3.25rem);
	max-inline-size: none;
	margin: 0;
}

.bfs-hero .bfs-hero-copy {
	min-inline-size: 0;
	padding-block: 1rem;
}

.bfs-hero-right:has(> .bfs-hero-feature:not(.bfs-feature-fallback)) > .bfs-feature-fallback {
	display: none;
}

.bfs-hero h1.bfs-display {
	max-inline-size: 100%;
	margin-block: 0;
	font: 800 clamp(5rem, 10.3vw, 9.5rem)/.79 var(--bfs-display);
	letter-spacing: -.024em;
	overflow-wrap: normal;
	text-wrap: initial;
}

.bfs-hero .bfs-display em {
	color: var(--bfs-orange);
	font-style: normal;
}

.bfs-hero-copy > p:not(.bfs-meta) {
	max-inline-size: 37ch;
	margin-block: 1.35rem;
	font-size: clamp(1rem, 1.55vw, 1.22rem);
	line-height: 1.5;
}

.bfs-meta {
	color: var(--bfs-flare);
	font-size: .8125rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.bfs-hero-copy > .bfs-meta {
	margin-block: 0 1.35rem;
	color: var(--bfs-muted);
}

.bfs-hero .bfs-hero-feature {
	position: relative;
	isolation: isolate;
	display: grid;
	align-content: end;
	min-inline-size: 0;
	min-block-size: clamp(23rem, 39vw, 32rem);
	overflow: hidden;
	border-bottom: 2px solid var(--bfs-orange);
	background: var(--bfs-panel);
}

.bfs-feature-photo.wp-block-image {
	position: absolute;
	z-index: -2;
	inset: 0;
	margin: 0;
}

.bfs-feature-photo :is(a, img) {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center;
}

.bfs-hero-feature::after {
	position: absolute;
	z-index: -1;
	inset: 0;
	background: linear-gradient(0deg, #0b0a09 1%, #0b0a09d9 24%, #0b0a0929 69%, transparent);
	content: "";
}

.bfs-hero-feature .bfs-feature-copy {
	box-sizing: border-box;
	inline-size: 100%;
	max-inline-size: none;
	margin: 0;
	padding: clamp(1rem, 3vw, 2.5rem);
}

.bfs-feature-copy p:not(.bfs-meta) {
	color: var(--bfs-ink);
}

.bfs-feature-copy h2 {
	max-inline-size: 18ch;
	margin-block: .3rem .85rem;
	font-size: clamp(2.1rem, 4.4vw, 4rem);
}

/* Gutenberg-Schaltflächen und das orange Themenband. */
:is(.bfs-hero, .bfs-worlds, .bfs-section, .bfs-guide) .wp-block-button .wp-block-button__link {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 2.75rem;
	padding: .55rem .9rem;
	border: 1px solid var(--bfs-orange);
	border-radius: 0;
	background: var(--bfs-orange);
	box-shadow: none;
	color: var(--bfs-black);
	font: 800 .875rem/1.25 var(--bfs-text);
	text-align: center;
	text-decoration: none;
}

:is(.bfs-hero, .bfs-section, .bfs-guide) .wp-block-button .wp-block-button__link:hover {
	border-color: var(--bfs-flare);
	background: var(--bfs-flare);
}

.bfs-hero-copy .wp-block-button .wp-block-button__link {
	min-block-size: 3.15rem;
	padding-inline: 1.15rem;
	font-size: .9375rem;
}

.bfs-worlds {
	padding-block: 1.15rem 1.45rem;
	background: var(--bfs-orange);
	color: var(--bfs-black);
}

.bfs-worlds h2 {
	margin-block: 0 .6rem;
	color: var(--bfs-black);
	font: 800 clamp(1.65rem, 3vw, 2rem)/1 var(--bfs-display);
}

.bfs-worlds .bfs-world-grid {
	gap: .45rem;
	margin-block: 0;
}

.bfs-worlds .wp-block-button .wp-block-button__link {
	border-color: #572309;
	background: transparent;
}

.bfs-worlds .wp-block-button .wp-block-button__link:is(:hover, [aria-current="page"]) {
	background: var(--bfs-black);
	color: var(--bfs-ink);
}

.bfs-worlds .wp-block-button .wp-block-button__link:focus-visible {
	outline-color: var(--bfs-black);
}

/* Angebotstitel, Beschreibungen, Gültigkeit und Bedingungen bleiben Core-Blöcke. */
:is(.bfs-section, .bfs-guide) {
	padding-block: clamp(2.65rem, 5.7vw, 5.3rem);
}

:is(.bfs-section, .bfs-guide) > h2 {
	margin-block: 0 1.1rem;
	font-size: clamp(2.5rem, 6.15vw, 5.35rem);
}

:is(.bfs-section, .bfs-guide) > p {
	max-inline-size: 68ch;
}

.bfs-section[id],
.bfs-worlds[id],
.bfs-guide[id] {
	scroll-margin-top: 1rem;
}

:is(.bfs-deal-grid, .bfs-launch-grid) > .wp-block-group__inner-container,
.bfs-deal > .wp-block-group__inner-container {
	display: contents;
}

:is(.bfs-deal-grid, .bfs-launch-grid) {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: clamp(.75rem, 1.4vw, 1.25rem);
	margin-block-start: 1.4rem;
}

.bfs-deal-grid:has(> :where(.bfs-lead), > :where(.wp-block-group__inner-container) > :where(.bfs-lead)) {
	grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
}

.bfs-deal-grid:has(> :where(.bfs-deal:only-child), > :where(.wp-block-group__inner-container) > :where(.bfs-deal:only-child)) {
	grid-template-columns: minmax(0, 41rem);
}

:is(.bfs-deal-grid, .bfs-launch-grid) > :is(.bfs-deal, .bfs-teaser),
:is(.bfs-deal-grid, .bfs-launch-grid) > .wp-block-group__inner-container > :is(.bfs-deal, .bfs-teaser) {
	box-sizing: border-box;
	inline-size: 100%;
	max-inline-size: none;
	min-inline-size: 0;
	margin: 0;
}

.bfs-deal {
	--bfs-card-pad: clamp(.9rem, 1.55vw, 1.35rem);
	display: flex;
	flex-direction: column;
	gap: .7rem;
	overflow: hidden;
	padding: var(--bfs-card-pad);
	border: 1px solid var(--bfs-line);
	background: var(--bfs-panel);
}

.bfs-deal > *,
.bfs-deal > .wp-block-group__inner-container > * {
	max-inline-size: 100%;
	margin-block: 0;
}

.bfs-deal h3 {
	margin-block: 0;
	font-size: clamp(1.6rem, 3.2vw, 2.9rem);
	overflow-wrap: anywhere;
}

.bfs-deal.bfs-lead h3 {
	font-size: clamp(2.1rem, 4vw, 3.85rem);
}

.bfs-deal .bfs-deal-image {
	position: relative;
	aspect-ratio: 1.9;
	overflow: hidden;
	max-inline-size: none;
	margin: calc(-1 * var(--bfs-card-pad)) calc(-1 * var(--bfs-card-pad)) .15rem;
	background: #211814;
}

.bfs-deal-image figcaption {
	position: absolute;
	inset: auto .5rem .5rem auto;
	margin: 0;
	padding: .18rem .4rem;
	background: var(--bfs-black);
	color: var(--bfs-ink);
	font: 600 .68rem/1.3 var(--bfs-text);
}

.bfs-deal-grid .bfs-deal {
	gap: .55rem;
}

.bfs-deal .bfs-deal-shop {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: .16em;
}

.bfs-deal .bfs-deal-shop:hover {
	color: var(--bfs-ink);
}

.bfs-anbieter-seite .entry-content :is(.bfs-section, .bfs-section > .wp-block-group__inner-container) > h1 {
	margin-block: 0 1rem;
	font-size: clamp(2.35rem, 5vw, 4.5rem);
	overflow-wrap: anywhere;
}

.bfs-anbieter-seite .entry-content :is(.bfs-section, .bfs-section > .wp-block-group__inner-container) > h2 {
	margin-block: clamp(1.65rem, 3vw, 3rem) .85rem;
	font-size: clamp(1.75rem, 3.2vw, 2.9rem);
}

.bfs-anbieter-seite .entry-content :is(.bfs-section, .bfs-section > .wp-block-group__inner-container) > p {
	max-inline-size: 67ch;
}

.entry-content ul.bfs-anbieter-liste {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
	column-gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bfs-anbieter-liste a {
	display: flex;
	align-items: center;
	min-block-size: 2.75rem;
	padding: .35rem .25rem;
	border-bottom: 1px solid var(--bfs-line);
	color: var(--bfs-ink);
	overflow-wrap: anywhere;
}

.bfs-anbieter-liste a:hover {
	color: var(--bfs-flare);
}

.entry-content .bfs-deal-grid .bfs-deal p {
	margin-block: 0;
}

.bfs-deal.bfs-lead .bfs-deal-image {
	aspect-ratio: 1.7;
}

.bfs-deal-image :is(a, img) {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.bfs-deal .bfs-price {
	color: var(--bfs-orange);
	font: 800 clamp(1.75rem, 3.5vw, 3.25rem)/.97 var(--bfs-display);
}

.bfs-deal :is(.wp-block-details, details) {
	border-block: 1px solid var(--bfs-line);
	font-size: .925rem;
}

.bfs-deal details summary {
	box-sizing: border-box;
	min-block-size: 2.75rem;
	padding-block: .65rem;
	color: var(--bfs-flare);
	font-weight: 700;
	cursor: pointer;
}

.bfs-deal details > :last-child:not(summary) {
	margin-block-end: .75rem;
}

.bfs-deal > .wp-block-buttons:last-child,
.bfs-deal > .wp-block-group__inner-container > .wp-block-buttons:last-child {
	margin-block-start: auto;
	padding-block-start: .25rem;
}

/* Der Blur liegt ausschließlich auf dem separat gelieferten, neutralen Motiv. */
.bfs-section:has(.bfs-launch-grid) {
	border-block: 1px solid var(--bfs-line);
	background: #13100d;
}

.bfs-teaser {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(.9rem, 2.2vw, 1.55rem);
	border: 1px solid #674631;
	background: #21150e;
}

.bfs-teaser:has(.bfs-teaser-photo)::after {
	position: absolute;
	z-index: -1;
	inset: 0;
	background: #130a05cf;
	content: "";
}

.bfs-teaser .bfs-teaser-photo {
	position: absolute;
	z-index: -2;
	inset: -.75rem;
	max-inline-size: none;
	margin: 0;
	filter: blur(.75rem);
}

.bfs-teaser-photo img {
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.bfs-teaser h3 {
	margin-block: .3rem .6rem;
	font-size: clamp(1.7rem, 3.4vw, 3rem);
}

.bfs-teaser :is(.bfs-meta, time) {
	color: var(--bfs-flare);
	font-variant-numeric: tabular-nums;
}

.bfs-clock {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: .55rem;
	max-inline-size: 22rem;
	margin-block-start: .8rem;
	font-variant-numeric: tabular-nums;
}

.bfs-clock-part {
	display: grid;
	gap: .22rem;
	border-top: 1px solid #ab693f;
	padding-top: .35rem;
	color: var(--bfs-muted);
}

.bfs-clock-part strong {
	color: var(--bfs-orange);
	font: 800 clamp(1.6rem, 3.8vw, 2.9rem)/.9 var(--bfs-display);
}

.bfs-clock-part small,
.bfs-clock-ended {
	font-size: .75rem;
}

.bfs-guide {
	max-inline-size: none;
	background: var(--bfs-black);
}

.bfs-guide a:not(.wp-block-button__link),
:is(.bfs-footer, #colophon) a {
	color: var(--bfs-flare);
	text-underline-offset: .22em;
}

:is(.bfs-footer, #colophon) {
	border-top: 1px solid var(--bfs-line);
	background: var(--bfs-black);
	color: var(--bfs-muted);
}

#colophon .footer-navigation .menu {
	flex-wrap: wrap;
}

#colophon .footer-navigation a {
	display: inline-flex;
	align-items: center;
	min-block-size: 2.75rem;
}

@media (max-width: 56rem) {
	.bfs-hero h1.bfs-display {
		font-size: clamp(4.3rem, 10vw, 6rem);
	}

	.bfs-hero .bfs-hero-feature {
		min-block-size: clamp(19.5rem, 40vw, 24rem);
	}

	.bfs-deal-grid,
	.bfs-deal-grid:has(.bfs-lead),
	.bfs-launch-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 44rem) {
	.bfs-hero .bfs-hero-columns.wp-block-columns {
		grid-template-columns: minmax(0, 1fr);
	}

	.bfs-hero .bfs-hero-copy {
		padding-block: 0;
	}

	.bfs-hero h1.bfs-display {
		font-size: clamp(4.25rem, 18vw, 7.5rem);
	}

	.bfs-hero-copy > p:not(.bfs-meta) {
		margin-block: 1rem;
	}

	.bfs-hero .bfs-hero-feature {
		min-block-size: clamp(12.5rem, 53vw, 19rem);
	}
}

@media (max-width: 31rem) {
	.bfs-deal-grid,
	.bfs-deal-grid:has(.bfs-lead),
	.bfs-launch-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
