/*
 * digiloom: global reset + element defaults.
 * Dependency root — every other theme stylesheet declares `digiloom-reset` as a dep
 * so cold-cache load order is deterministic. See root CLAUDE.md "cold cache" gotcha.
 */

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

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

b,
strong,
th {
	font-weight: var(--wp--custom--font-weight--semi-bold);
}

a,
button,
.wp-element-button {
	transition: all var(--wp--custom--transition--base);
}

/* Visible focus ring on every interactive element — WCAG 2.2 AA (2.4.11/2.4.13). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.wp-element-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--indigo);
	outline-offset: 2px;
	border-radius: var(--wp--custom--radius--sm);
}

/* Skip link */
.digiloom-skip-link {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	font-weight: var(--wp--custom--font-weight--bold);
	left: 8px;
	padding: 12px 20px;
	position: fixed;
	top: -100px;
	z-index: 999;
	border-radius: var(--wp--custom--radius--md);
	text-decoration: none;
	transition: top var(--wp--custom--transition--base);
}

.digiloom-skip-link:focus {
	top: 8px;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/* Forms — matches the prototype's rounded, tinted inputs. */
input,
select,
textarea {
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--slate-line);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: var(--wp--custom--line-height--medium);
	padding: 12px 16px;
	width: 100%;
}

input[type="checkbox"],
input[type="radio"],
input[type="image"] {
	width: auto;
}

::placeholder {
	color: var(--wp--preset--color--slate-muted);
	opacity: 1;
}

/* Images never overflow their container. */
img,
svg,
video {
	max-width: 100%;
	height: auto;
}

/* Sticky footer: main grows, footer settles at the bottom on short pages. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.digiloom-main {
	flex: 1 0 auto;
	padding-block: 40px 80px;
}
