/**
 * RESET
 *
 * Flattens browser defaults without imposing any design decisions.
 * Nothing here should reference a colour or size token — that's 04-base's job.
 */

@layer reset {
	*, *::before, *::after { box-sizing: border-box; }

	/* Remove default margins; spacing is opt-in via layout primitives. */
	body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
		margin: 0;
	}

	/* Lists only lose their markers when they're being used for layout. */
	ul[role="list"], ol[role="list"] {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	html { -webkit-text-size-adjust: none; }

	html:focus-within { scroll-behavior: smooth; }

	body { min-block-size: 100vh; min-block-size: 100svh; }

	/* Media behaves like a block and never overflows its container. */
	img, picture, video, canvas, svg, iframe {
		display: block;
		max-inline-size: 100%;
	}
	img, video { block-size: auto; }

	/* Form controls should inherit typography rather than fight it. */
	input, button, textarea, select {
		font: inherit;
		color: inherit;
	}
	button { background: none; border: none; }

	/* Avoid text overflows. */
	p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

	/* Anchor targets clear any sticky header. */
	:target { scroll-margin-block-start: 2ex; }

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

/*
 * ⚠ DELIBERATELY OUTSIDE @layer — the one place in this theme that is.
 *
 * WordPress prints this inline as part of wp-block-library:
 *
 *     :where(figure) { margin: 0 0 1em; }
 *
 * Unlayered rules beat EVERY layer no matter the specificity, so the figure
 * entry in the reset above never actually applies and every <figure> in the
 * theme silently gains an 18px bottom margin — the gallery items, the
 * who-we-are portrait, the lounge media, the testimonial.
 *
 * A layered rule cannot win this, so this one sits outside. `figure` (0,0,1)
 * beats `:where(figure)` (0,0,0) and nothing else here needs the escape hatch.
 * Keep it that way: if something else needs to outrank core, it goes in this
 * block with a note saying which core rule it is fighting, or not at all.
 */
figure { margin: 0; }
