/*
 * Hubka Theme
 *
 * Phase: 11B.1 — CSS Architecture (reduced-motion support added in 11B.6)
 * Purpose: Global box-sizing reset, foundational browser-default
 * neutralization, and sitewide `prefers-reduced-motion` support.
 *
 * Rules:
 * - Reuse theme.json tokens.
 * - Use logical properties.
 * - Keep selectors shallow.
 * - Do not duplicate component styling.
 */

/*
 * Base reset — foundational, non-decorative rules only.
 * Neutralizes browser default box-model behavior before any other
 * base, component, or page-specific rule is applied.
 */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Phase 12A: smooth-scrolling for same-page anchor links (Hero's
 * "Browse by Genre" CTA jumps to #genre-grid) — pairs with the
 * `scroll-behavior: auto !important` override already below, so this
 * is automatically disabled for anyone with reduced-motion set. */
html {
	scroll-behavior: smooth;
}

/* Respect the visitor's reduced-motion preference sitewide. Several
 * components (Hero, Genre Grid, Book Card) use subtle hover transforms
 * and shadow transitions — this disables the motion for anyone who has
 * asked their system for it, without removing the underlying interaction
 * (color/outline changes on hover and focus are unaffected). */
@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;
	}
}
