/**
 * Base layer: resets, the small set of custom properties theme.json
 * cannot express natively (radii, shadows), and base typography.
 * Everything downstream (components.css) reads these tokens rather
 * than hard-coding new values.
 */

:root {
	--tgr-radius-sm: 0.5rem;
	--tgr-radius-md: 0.875rem;
	--tgr-radius-lg: 1.25rem;
	--tgr-radius-pill: 999px;
	--tgr-shadow-card: 0 1px 2px rgba(20, 30, 25, 0.04), 0 2px 8px rgba(20, 30, 25, 0.06);
	--tgr-shadow-raised: 0 4px 16px rgba(20, 30, 25, 0.10);
	--tgr-content-narrow: 36rem;
	--tgr-transition: 150ms ease;
	--tgr-header-height: 4.5rem;
}

/* Arabic gets its own font stack (Section 10) — applied by lang/dir,
   never assumed to inherit the English stack cleanly. */
html[lang="ar"] body,
html[dir="rtl"] body {
	font-family: var(--wp--preset--font-family--arabic);
}

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

img,
svg {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Predictable dimensions to avoid layout shift (Section 52). */
.wp-block-site-logo img,
.tgr-site-brand img {
	height: var(--tgr-header-height, 4.5rem);
	width: auto;
}

/* Skip link (Section 53). */
.skip-link {
	position: absolute;
	inset-inline-start: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--wp--preset--color--brand-primary);
	color: var(--wp--preset--color--white);
	padding: 0.75rem 1.25rem;
	border-radius: 0 0 var(--tgr-radius-sm) 0;
}

.skip-link:focus {
	inset-inline-start: 0;
}

/* Visible focus everywhere (Section 53) — never remove outline without replacing it. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
}

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

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