/* =========================================================================
 * Curvita — Modern CSS Reset
 * -------------------------------------------------------------------------
 * Minimal, opinionated reset based on Josh Comeau's "The Custom Reset".
 * Strips default browser styling inconsistencies without being aggressive,
 * plays nicely with WooCommerce blocks, and respects accessibility
 * preferences like reduced motion.
 *
 * This file only resets. Typography / component styling lives in base.css.
 * =========================================================================
 */

/* Use border-box everywhere — intuitive sizing math */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Remove default margins — we add them back deliberately in base.css */
* {
	margin: 0;
}

/* Ensure full-height layout for sticky footer patterns */
html,
body {
	height: 100%;
}

/* Smooth scroll when jumping to anchors */
html {
	scroll-behavior: smooth;
}

/* Body gets its typography from base.css, but set rendering here so the
 * reset stage already has smooth text on all platforms */
body {
	line-height: var(--lh-base);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Media defaults — prevent images from breaking layouts */
img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Form controls inherit font — fixes Safari's weird defaults */
input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

/* Long words break instead of overflowing — critical for Greek text and URLs */
p,
h1,
h2,
h3,
h4,
h5,
h6,
li {
	overflow-wrap: break-word;
}

/* Isolate stacking context on the main app wrapper — prevents weird
 * z-index escapes from sticky headers or modals */
.page-wrap,
#page {
	isolation: isolate;
}

/* Buttons — flatten to an inline element that CAN be styled.
 * Component styles (.btn) in base.css opt in to visual styling */
button {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: inherit;
	font: inherit;
}

/* Links inherit color by default; .btn and component links opt in to
 * specific styling */
a {
	color: inherit;
	text-decoration: none;
}

/* Lists — strip default bullets and padding when used in navigation
 * or structural contexts. Content prose re-adds them in base.css */
ul,
ol {
	list-style: none;
	padding: 0;
}

/* Tables — basic collapse for any WP-generated tables */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* Respect prefers-reduced-motion — an accessibility requirement.
 * Users who have motion sickness, vestibular disorders, or who simply
 * prefer a calmer experience turn this on in their OS settings.
 * We cut all animations down to near-zero so the UI still works
 * but doesn't cause discomfort. */
@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;
	}
}

/* Remove the ugly default outline from Safari, Firefox, etc. — we
 * supply a prettier focus-visible outline in base.css */
:focus:not(:focus-visible) {
	outline: none;
}
