/*
Theme Name: Forthem Handpainted
Description: Block theme for Forthem Handpainted, rebuilt from the approved Framer design.
Version: 0.3.9
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: forthem
*/

/*
 * Tokens live in theme.json. This file only holds what theme.json cannot express:
 * breakpoint switches, letter-spacing per type preset, focus and motion rules.
 * Breakpoints: phone < 810px, tablet 810–1199px, desktop >= 1200px.
 */

/* Outer margin: 20px on phone, 7.5% from tablet up (content = min(85%, 1280px)). */
@media (min-width: 810px) {
	html body {
		--wp--custom--outer: 7.5vw;
		--wp--custom--header-height: 88px;
	}
}

/* Line height and tracking that belong to each type preset. */
.has-hero-title-font-size { line-height: 1.05; letter-spacing: -0.03em; }
.has-hero-font-size { line-height: 1; letter-spacing: -0.035em; }
.has-heading-1-font-size { line-height: 1.05; letter-spacing: -0.03em; }
.has-heading-2-font-size { line-height: 1.12; letter-spacing: -0.025em; }
.has-heading-3-font-size { line-height: 1.2; letter-spacing: -0.015em; }
.has-subheading-font-size { line-height: 1.15; letter-spacing: -0.01em; }
.has-body-large-font-size { line-height: 1.55; letter-spacing: -0.005em; }
.has-small-font-size { line-height: 1.4; }
.has-field-font-size { line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase; }

/* Visible focus: Ink outline with a 2px gap; White when the element sits on a dark photo. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 2px;
}
.is-on-dark :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: var(--wp--preset--color--white);
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

/* Page regions sit flush: header, main and footer have no gap between them. */
.wp-site-blocks > * {
	margin-block: 0;
}

/* Header and footer container: min(85%, 1280px) from tablet up, 20px margins on phone. */
.fh-container {
	width: min(var(--wp--style--global--content-size, 1280px), 100% - 2 * var(--wp--custom--outer));
	margin-inline: auto;
}

/* Same-page anchors (e.g. Home's "Send an enquiry" → #enquiry) land below the sticky header. */
[id] {
	scroll-margin-top: var(--wp--custom--header-height);
}

/* Full-width blocks run almost to the window edges however deeply they're nested: they stop
   20px short each side (the frame), so photos never touch the edge of the screen. */
body {
	overflow-x: clip;
}

.wp-site-blocks .alignfull {
	width: calc(100vw - 2 * var(--wp--custom--frame));
	max-width: calc(100vw - 2 * var(--wp--custom--frame)) !important;
	margin-left: calc(50% - 50vw + var(--wp--custom--frame)) !important;
	margin-right: calc(50% - 50vw + var(--wp--custom--frame)) !important;
}
