/**
 * Base complements that theme.json cannot express.
 *
 * Every value is a token from theme.json (docs/sistema-estils.md).
 * .screen-reader-text is not redefined: WordPress core already ships it (block-library common.css).
 *
 * Breakpoints, for reference (media queries cannot read custom properties):
 *   small  640px  (mobile → tablet)
 *   medium 1024px (tablet → desktop)
 *   large  1440px (desktop; fluid sizes reach their maximum)
 *   xlarge 1920px (Figma artboard; the full header menu fits from here)
 */

/*
 * Touch screens paint a translucent cyan over what is tapped, which looks green on the cream
 * backgrounds: the theme's soft brown instead, the colour of the rest of the interactions.
 */
html {
	-webkit-tap-highlight-color: var(--wp--preset--color--interactive-soft);
}

/*
 * Bold at 600 all over the site, as in the Figma: the font is only loaded up to 600 (theme.json),
 * so the browser's default 700 for <strong> and <b> was a synthetic bold, heavier than the design.
 */
b,
strong {
	font-weight: var(--wp--custom--font-weight--semibold);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--border-width--2) solid var(--wp--preset--color--border-strong);
	outline-offset: var(--wp--custom--border-width--2);
}

/* Template parts and main sit edge to edge, as in Figma: no root block gap between them. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

/*
 * Phones and tablets (below 1024px): every full-width section of the section pages (Home, corporate pages,
 * treatments, Magazine) has the 32px top and bottom of the mobile Figma, whatever padding it has in
 * the editor, where the fluid scale leaves 49 to 123px. A section of the Figma with another padding
 * sets --pa-section-padding-mobile (40px on some pages, 24px in the Home hero…). The full-width
 * content that holds the sections of the corporate pages has none. Breakpoint in
 * numbers: media queries cannot read tokens.
 */
@media (max-width: 1023px) {

	:is(.pa-front, .pa-sections) .wp-block-post-content > .alignfull,
	.pa-sections > .alignfull:not(.wp-block-post-content) {
		padding-block: var(--pa-section-padding-mobile, var(--wp--preset--spacing--32)) !important; /* Over the padding saved in the editor. */
	}
}

/* A phrase in a heading that stays on one line whenever it fits. If it does not, it breaks evenly. */
.pa-keep-together {
	display: inline-block;
	text-wrap: balance;
}

::selection {
	background-color: var(--wp--preset--color--interactive);
	color: var(--wp--preset--color--text-inverse);
}

/* Accessibility reset: the only !important allowed outside overrides/ (docs/sistema-estils.md §7). */
@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0s !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0s !important;
	}
}
