/*
 * SIMOKS block typography system.
 *
 * This stylesheet uses only the font families already registered by the
 * active SIMOKS theme. It centralises type roles so editor and frontend block
 * typography stay aligned as individual blocks evolve.
 */
:root {
	--simoks-type-display: var(--wp--preset--font-family--display, "Iowan Old Style", Baskerville, "Times New Roman", serif);
	--simoks-type-body: var(--wp--preset--font-family--body, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif);
	--simoks-type-page-title: var(--wp--preset--font-size--display-lg, clamp(2.5rem, 5.4vw, 4.75rem));
	--simoks-type-hero-title: var(--wp--preset--font-size--display, clamp(2.25rem, 4.4vw, 4rem));
	--simoks-type-section-title: var(--wp--preset--font-size--xx-large, clamp(1.875rem, 3vw, 2.75rem));
	--simoks-type-card-title: clamp(1.125rem, 1.5vw, 1.375rem);
	--simoks-type-lead: clamp(1rem, 1.35vw, 1.125rem);
	--simoks-type-body-size: 1rem;
	--simoks-type-small: 0.875rem;
	--simoks-type-label: 0.75rem;
	--simoks-type-action: 0.78rem;
	--simoks-type-display-weight: 400;
	--simoks-type-label-weight: 700;
	--simoks-type-action-weight: 700;
	--simoks-type-display-tracking: -0.045em;
	--simoks-type-label-tracking: 0.12em;
	--simoks-type-action-tracking: 0.08em;
	--simoks-type-tight-leading: 0.98;
	--simoks-type-title-leading: 1.12;
	--simoks-type-body-leading: 1.7;
}

/*
 * Semantic heading baseline. A block may adjust width or colour, but heading
 * level always determines the scale. This prevents one h2 from reading like a
 * page title while another reads like a card label.
 */
[class*="wp-block-simoks-"] h1 {
	max-width: 14ch;
	margin-block-start: 0;
	font-family: var(--simoks-type-display);
	font-size: var(--simoks-type-page-title);
	font-weight: var(--simoks-type-display-weight);
	letter-spacing: -0.055em;
	line-height: 0.94;
	text-wrap: balance;
}

[class*="wp-block-simoks-"] h2 {
	max-width: 14ch;
	margin-block-start: 0;
	font-family: var(--simoks-type-display);
	font-size: var(--simoks-type-section-title);
	font-weight: var(--simoks-type-display-weight);
	letter-spacing: var(--simoks-type-display-tracking);
	line-height: var(--simoks-type-tight-leading);
	text-wrap: balance;
}

[class*="wp-block-simoks-"] h3[class]:not(.simoks-product-card__title):not(.simoks-collection-card__title):not(.simoks-empty-state__title) {
	margin-block-start: 0;
	font-family: var(--simoks-type-display);
	font-size: var(--simoks-type-card-title);
	font-weight: var(--simoks-type-display-weight);
	letter-spacing: -0.03em;
	line-height: var(--simoks-type-title-leading);
	text-wrap: balance;
}

[class*="wp-block-simoks-"] h4 {
	margin-block-start: 0;
	font-family: var(--simoks-type-body);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.35;
}

/* Page and hero display titles. */
:is(
.wp-block-simoks-hero,
.wp-block-simoks-brand-archive,
.wp-block-simoks-category-archive
) :is(
.simoks-hero__heading,
.simoks-brand-archive__title,
.simoks-category-archive__title
) {
	font-family: var(--simoks-type-display);
	font-weight: var(--simoks-type-display-weight);
	letter-spacing: -0.055em;
	line-height: 0.94;
	text-wrap: balance;
}

.wp-block-simoks-hero .simoks-hero__heading {
	font-size: var(--simoks-type-hero-title);
}

:is(
.wp-block-simoks-brand-archive .simoks-brand-archive__title,
.wp-block-simoks-category-archive .simoks-category-archive__title
) {
	font-size: var(--simoks-type-page-title);
}

/* Section headings share one editorial scale and rhythm. */
:is(
.wp-block-simoks-featured-products .simoks-featured-products__heading,
.wp-block-simoks-product-categories .simoks-product-categories__heading,
.wp-block-simoks-product-categories .simoks-product-categories__editorial-heading,
.wp-block-simoks-brands .simoks-brands__heading,
.wp-block-simoks-collections-showcase .simoks-collections-showcase__heading,
.wp-block-simoks-image-text .simoks-image-text__heading,
.wp-block-simoks-contact-showroom .simoks-contact-showroom__heading,
.wp-block-simoks-cta .simoks-cta__heading,
.wp-block-simoks-collection-products .simoks-collection-products__heading,
.wp-block-simoks-related-products .simoks-related-products__heading,
.wp-block-simoks-related-collections .simoks-related-collections__heading,
.wp-block-simoks-contact-enquiry .simoks-contact-enquiry__heading,
.wp-block-simoks-product-enquiry h2,
.wp-block-simoks-brand-archive .simoks-brand-products__heading,
.wp-block-simoks-category-archive .simoks-category-products__heading
) {
	max-width: 14ch;
	font-family: var(--simoks-type-display);
	font-size: var(--simoks-type-section-title);
	font-weight: var(--simoks-type-display-weight);
	letter-spacing: var(--simoks-type-display-tracking);
	line-height: var(--simoks-type-tight-leading);
	text-wrap: balance;
}

/* Eyebrows, field labels and compact metadata use one sans-serif role. */
:is(
.wp-block-simoks-hero .simoks-hero__eyebrow,
.wp-block-simoks-featured-products .simoks-featured-products__eyebrow,
.wp-block-simoks-product-categories .simoks-product-categories__eyebrow,
.wp-block-simoks-product-categories .simoks-product-categories__editorial-eyebrow,
.wp-block-simoks-brands .simoks-brands__eyebrow,
.wp-block-simoks-collections-showcase .simoks-collections-showcase__eyebrow,
.wp-block-simoks-collection-card .simoks-collection-card__label,
.wp-block-simoks-image-text .simoks-image-text__eyebrow,
.wp-block-simoks-contact-showroom .simoks-contact-showroom__eyebrow,
.wp-block-simoks-cta .simoks-cta__eyebrow,
.wp-block-simoks-collection-products .simoks-collection-products__eyebrow,
.wp-block-simoks-related-collections .simoks-related-collections__eyebrow,
.wp-block-simoks-category-archive .simoks-category-archive__eyebrow,
.wp-block-simoks-category-archive .simoks-category-children__label,
.wp-block-simoks-collection-identity .simoks-collection-identity__eyebrow,
.wp-block-simoks-collection-archive-meta .simoks-collection-archive-meta__eyebrow,
.wp-block-simoks-product-enquiry .simoks-product-enquiry__eyebrow,
.wp-block-simoks-contact-enquiry .simoks-contact-enquiry__context-label,
.wp-block-simoks-catalog-toolbar label,
.wp-block-simoks-product-meta .simoks-product-meta__label
) {
	font-family: var(--simoks-type-body);
	font-size: var(--simoks-type-label);
	font-weight: var(--simoks-type-label-weight);
	letter-spacing: var(--simoks-type-label-tracking);
	line-height: 1.35;
	text-transform: uppercase;
}

/* Introductory and descriptive copy. */
:is(
.wp-block-simoks-hero .simoks-hero__description,
.wp-block-simoks-featured-products .simoks-featured-products__description,
.wp-block-simoks-product-categories .simoks-product-categories__description,
.wp-block-simoks-product-categories .simoks-product-categories__editorial-copy,
.wp-block-simoks-brands .simoks-brands__description,
.wp-block-simoks-collections-showcase .simoks-collections-showcase__description,
.wp-block-simoks-image-text .simoks-image-text__description,
.wp-block-simoks-contact-showroom .simoks-contact-showroom__description,
.wp-block-simoks-cta .simoks-cta__description,
.wp-block-simoks-contact-enquiry .simoks-contact-enquiry__description,
.wp-block-simoks-product-enquiry .simoks-product-enquiry__description,
.wp-block-simoks-brand-archive .simoks-brand-archive__description,
.wp-block-simoks-category-archive .simoks-category-archive__description
) {
	font-family: var(--simoks-type-body);
	font-size: var(--simoks-type-lead);
	font-weight: 400;
	line-height: var(--simoks-type-body-leading);
}

/* Non-product card headings retain a consistent secondary hierarchy. */
:is(
.wp-block-simoks-product-categories .simoks-category-card__title,
.wp-block-simoks-brands .simoks-brand-card__title,
.wp-block-simoks-related-collections .simoks-related-collection__title,
.wp-block-simoks-brands-directory .simoks-brand-row__title
) {
	font-family: var(--simoks-type-display);
	font-size: var(--simoks-type-card-title);
	font-weight: var(--simoks-type-display-weight);
	letter-spacing: -0.03em;
	line-height: var(--simoks-type-title-leading);
	text-wrap: balance;
}

/* Counts, secondary metadata and helper copy. */
:is(
.wp-block-simoks-product-categories .simoks-category-card__count,
.wp-block-simoks-brands .simoks-brand-card__count,
.wp-block-simoks-collections-showcase .simoks-collection-card__count,
.wp-block-simoks-collection-card .simoks-collection-card__count,
.wp-block-simoks-collection-archive-meta .simoks-collection-archive-meta__count,
.wp-block-simoks-catalog-results,
.wp-block-simoks-product-meta .simoks-product-meta__value
) {
	font-family: var(--simoks-type-body);
	font-size: var(--simoks-type-small);
	line-height: 1.5;
}

/* Reusable block actions and compact buttons. */
:is(
.wp-block-simoks-featured-products .simoks-product-card__link,
.wp-block-simoks-product-categories .simoks-category-card__link,
.wp-block-simoks-brands .simoks-brand-card__link,
.wp-block-simoks-collections-showcase .simoks-collection-card__link,
.wp-block-simoks-collection-card .simoks-collection-card__link,
.wp-block-simoks-collection-products .simoks-product-card__link,
.wp-block-simoks-related-products .simoks-product-card__link,
.wp-block-simoks-related-collections .simoks-related-collection__link,
.wp-block-simoks-brand-archive .simoks-product-card__link,
.wp-block-simoks-category-archive .simoks-product-card__link,
.wp-block-simoks-product-enquiry .simoks-product-enquiry__button,
.wp-block-simoks-cta .simoks-cta__primary,
.wp-block-simoks-cta .simoks-cta__secondary
) {
	font-family: var(--simoks-type-body);
	font-size: var(--simoks-type-action);
	font-weight: var(--simoks-type-action-weight);
	letter-spacing: var(--simoks-type-action-tracking);
	line-height: 1.35;
	text-transform: uppercase;
}

/* Product cards sit on artwork, so their action label runs a step tighter. */
.simoks-product-card .simoks-product-card__link {
	font-size: 0.7rem;
}

@media (max-width: 600px) {

	:is(
	.wp-block-simoks-featured-products .simoks-featured-products__heading,
	.wp-block-simoks-product-categories .simoks-product-categories__heading,
	.wp-block-simoks-brands .simoks-brands__heading,
	.wp-block-simoks-collections-showcase .simoks-collections-showcase__heading,
	.wp-block-simoks-image-text .simoks-image-text__heading,
	.wp-block-simoks-contact-showroom .simoks-contact-showroom__heading,
	.wp-block-simoks-cta .simoks-cta__heading,
	.wp-block-simoks-collection-products .simoks-collection-products__heading,
	.wp-block-simoks-related-products .simoks-related-products__heading,
	.wp-block-simoks-related-collections .simoks-related-collections__heading,
	.wp-block-simoks-contact-enquiry .simoks-contact-enquiry__heading,
	.wp-block-simoks-product-enquiry h2
) {
		max-width: 12ch;
	}
}
