/*
 * BeerHabits typography layer.
 *
 * Owns global fonts, body copy, headings and shared text roles. Section and
 * WooCommerce typography remains in the corresponding section or page owner.
 */

@font-face {
	font-family: "Manrope";
	src: url("../fonts/manrope/Manrope-VariableFont_wght.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Playfair Display";
	src:
		url("../fonts/playfair-display/PlayfairDisplay-VariableFont_wght.woff2") format("woff2"),
		url("../fonts/playfair-display/PlayfairDisplay-VariableFont_wght.ttf") format("truetype");
	font-weight: 400 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--bh-type-h1: 3.5rem;
	--bh-type-h2: 2.75rem;
	--bh-type-h3: 1.5rem;
	--bh-type-h4: 1.25rem;
	--bh-type-h5: 1rem;
	--bh-type-card-title: 1.25rem;
	--bh-type-panel-title: 1.5rem;
	--bh-type-body: 1.0625rem;
	--bh-type-caption: 0.875rem;
	--bh-leading-h1: 1.02;
	--bh-leading-h2: 1.08;
	--bh-leading-h3: 1.16;
	--bh-leading-h4: 1.2;
	--bh-leading-card-title: 1.28;
	--bh-leading-body-copy: 1.62;
	--bh-leading-caption: 1.45;
	--bh-weight-display: 700;
	--bh-weight-card-title: 700;
	--bh-weight-body: 400;
	--bh-weight-caption: 700;
}

html,
body {
	color: var(--bh-text-soft);
	font-family: var(--bh-font-body);
	line-height: var(--bh-leading-body-copy);
	letter-spacing: 0;
	text-rendering: geometricPrecision;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .entry-title,
body .site-title,
body .page-title,
body .woocommerce-products-header__title,
body .product_title,
body .bh-section-title,
body .bh-hero-title,
body .wc-block-components-title {
	color: var(--bh-text-strong);
	font-family: var(--bh-font-display);
	font-weight: var(--bh-weight-display);
	font-style: normal;
	line-height: 1.04;
	letter-spacing: 0;
	text-transform: none;
	text-wrap: balance;
}

body h2,
body h3,
body h4,
body h5,
body h6 {
	text-transform: none;
	letter-spacing: 0;
}

body h1,
body .entry-title,
body .page-title,
body .woocommerce-products-header__title,
body .product_title,
body .bh-hero-title {
	font-size: var(--bh-type-h1);
	line-height: var(--bh-leading-h1);
}

body h2,
body .bh-section-title {
	font-size: var(--bh-type-h2);
	line-height: var(--bh-leading-h2);
}

body h3 {
	font-size: var(--bh-type-h3);
	line-height: var(--bh-leading-h3);
}

body h4 {
	font-size: var(--bh-type-h4);
	line-height: var(--bh-leading-h4);
}

body h5,
body h6 {
	font-size: var(--bh-type-h5);
	line-height: var(--bh-leading-h4);
}

body p {
	font-size: var(--bh-type-body);
	line-height: var(--bh-leading-body-copy);
}

body button,
body input,
body select,
body textarea {
	font-family: var(--bh-font-body);
}

body a:not(.button):not(.bh-button):not(.bh-btn):not(.bh-cart-btn):not(.wp-element-button) {
	color: var(--bh-accent-strong);
}

body a:hover,
body a:focus {
	color: var(--bh-text-strong);
}

body .site-title,
body .site-title a,
body .entry-title,
body .bh-section-title,
body .bh-card-title,
body .bh-panel-title,
body .bh-product-title {
	color: var(--bh-text-strong);
	overflow-wrap: anywhere;
}

.bh-section-heading {
	max-width: 860px;
	margin: 12px auto 18px;
	padding-inline: 0;
}

.bh-section-title {
	max-width: 860px;
	margin: 12px auto 18px;
	padding-inline: 0;
	font-size: var(--bh-type-h2);
	line-height: var(--bh-leading-h2);
	letter-spacing: 0;
	text-transform: none;
	text-wrap: balance;
}

body h1.bh-section-title {
	font-size: var(--bh-type-h1);
	line-height: var(--bh-leading-h1);
}

/* Section or panel kicker. */
.bh-section-kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 18px;
	border: 0;
	border-color: var(--bh-surface-border);
	border-radius: 999px;
	background: var(--bh-surface-panel-soft);
	box-shadow: none;
	color: var(--bh-amber);
	font-family: var(--bh-font-body);
	font-size: var(--bh-type-caption);
	font-weight: var(--bh-weight-caption);
	line-height: var(--bh-leading-caption);
	letter-spacing: 0;
	text-transform: uppercase;
}

/* Section introduction below the main heading. */
.bh-section-intro {
	max-width: 720px;
	margin-inline: auto;
	padding-inline: 0;
	color: rgba(255, 255, 255, 0.68);
	font-size: var(--bh-type-body);
	line-height: var(--bh-leading-body-copy);
}

body p,
body li,
body dd,
body td,
body th,
body label,
body small,
body .woocommerce,
body .woocommerce-info,
body .woocommerce-message,
body .woocommerce-error,
body .wc-block-components-form,
body .wc-block-components-formatted-money-amount,
body .wc-block-components-totals-item__label,
body .wc-block-components-totals-item__description,
body .site,
body #wrapper,
body #inner-wrap,
body .wp-site-blocks,
body .site-content,
body .content-area,
body .site-main,
body .content-container,
body .content-wrap,
body .entry,
body .entry-content,
body .entry-content-wrap,
body .page-content,
body .content-bg {
	color: var(--bh-text-soft);
}

/* Card title. */
.bh-card-title {
	margin: 0 0 12px;
	font-family: var(--bh-font-display);
	font-size: var(--bh-type-card-title);
	font-weight: var(--bh-weight-display);
	font-style: normal;
	line-height: var(--bh-leading-card-title);
	letter-spacing: 0;
	text-transform: none;
	text-wrap: balance;
}

/* Card copy. */
.bh-card-text {
	margin: 0;
	font-size: var(--bh-type-body);
	line-height: var(--bh-leading-body-copy);
	text-wrap: pretty;
}

/* Panel title. */
.bh-panel-title {
	margin: 0 0 16px;
	font-family: var(--bh-font-display);
	font-size: var(--bh-type-panel-title);
	font-weight: var(--bh-weight-display);
	font-style: normal;
	line-height: var(--bh-leading-h3);
	letter-spacing: 0;
	text-transform: none;
	text-wrap: balance;
}

/* Panel copy. */
.bh-panel-text {
	margin: 0;
	font-size: var(--bh-type-body);
	line-height: var(--bh-leading-body-copy);
	text-wrap: pretty;
}

/* Labels and supporting metadata. */
.bh-meta-text {
	margin: 0;
	color: var(--bh-muted);
	font-family: var(--bh-font-body);
	font-size: var(--bh-type-caption);
	font-weight: var(--bh-weight-caption);
	letter-spacing: 0.08em;
	line-height: var(--bh-leading-caption);
	text-transform: uppercase;
}

@media (max-width: 1180px) {
	:root {
		--bh-type-h1: 3.25rem;
		--bh-type-h2: 2.5rem;
	}

	body h1,
	body .entry-title,
	body .page-title,
	body .woocommerce-products-header__title,
	body .product_title,
	body .bh-hero-title {
		font-size: var(--bh-type-h1);
	}

	body h2,
	body .bh-section-title {
		font-size: var(--bh-type-h2);
	}
}

@media (max-width: 960px) {
	:root {
		--bh-type-h1: 2.875rem;
		--bh-type-h2: 2.25rem;
		--bh-type-h3: 1.375rem;
		--bh-type-panel-title: 1.375rem;
	}

	body h1,
	body .entry-title,
	body .page-title,
	body .woocommerce-products-header__title,
	body .product_title,
	body .bh-hero-title {
		font-size: var(--bh-type-h1);
	}

	body h2,
	body .bh-section-title {
		font-size: var(--bh-type-h2);
	}

}

@media (max-width: 640px) {
	:root {
		--bh-type-h1: 2.25rem;
		--bh-type-h2: 1.875rem;
		--bh-type-h3: 1.25rem;
		--bh-type-h4: 1.125rem;
		--bh-type-card-title: 1.125rem;
		--bh-type-panel-title: 1.25rem;
	}

	body h1,
	body .entry-title,
	body .page-title,
	body .woocommerce-products-header__title,
	body .product_title,
	body .bh-hero-title {
		font-size: var(--bh-type-h1);
	}

	body h2,
	body .bh-section-title {
		font-size: var(--bh-type-h2);
	}
}
