/**
 * Mirayas Decor — base element styles.
 *
 * Reset and default typography. No component-specific selectors belong
 * here; those live in components.css / woocommerce.css.
 */

/* Box sizing and margin reset. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Offset sticky header when jumping to anchors. */
html {
	scroll-padding-top: calc(var(--header-height) + var(--space-lg));
}

body {
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: var(--leading-body);
	color: var(--color-text);
	background-color: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Typography ----------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-display);
	font-weight: 500;
	line-height: var(--leading-tight);
	letter-spacing: var(--tracking-tight);
	color: var(--color-text);
	overflow-wrap: break-word;
}

h1 {
	font-size: var(--text-3xl);
}

h2 {
	font-size: var(--text-2xl);
}

h3 {
	font-size: var(--text-xl);
}

h4 {
	font-size: var(--text-lg);
}

h5 {
	font-size: var(--text-md);
}

h6 {
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: 600;
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

p,
li {
	overflow-wrap: break-word;
}

p + p {
	margin-block-start: var(--space-md);
}

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--duration-fast) var(--ease);
}

a:hover {
	color: var(--color-accent-ink);
}

strong,
b {
	font-weight: 600;
}

em,
i {
	font-style: italic;
}

small {
	font-size: var(--text-sm);
}

ul,
ol {
	padding-inline-start: var(--space-lg);
}

li + li {
	margin-block-start: var(--space-2xs);
}

hr {
	height: 1px;
	border: 0;
	background-color: var(--color-border);
	margin-block: var(--space-xl);
}

blockquote {
	border-inline-start: 2px solid var(--color-accent);
	padding-inline-start: var(--space-lg);
	font-family: var(--font-display);
	font-size: var(--text-lg);
	font-style: italic;
	line-height: var(--leading-snug);
	color: var(--color-text);
}

code,
kbd,
pre,
samp {
	font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
	font-size: 0.9em;
}

code {
	background-color: var(--color-surface-alt);
	border-radius: var(--radius-sm);
	padding: 0.1em 0.35em;
}

pre {
	background-color: var(--color-surface-alt);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--space-lg);
	overflow-x: auto;
	line-height: 1.5;
}

pre code {
	background: none;
	padding: 0;
}

table {
	border-collapse: collapse;
	width: 100%;
}

th {
	text-align: inline-start;
	font-weight: 600;
}

th,
td {
	padding: var(--space-sm) var(--space-md);
	border-block-end: 1px solid var(--color-border);
}

/* Accessibility --------------------------------------------------------------- */

:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 3px;
	border-radius: var(--radius-sm);
}

::selection {
	background-color: var(--color-accent);
	color: #fff;
}

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

.skip-link:focus-visible {
	position: fixed;
	z-index: 200;
	inset-block-start: var(--space-sm);
	inset-inline-start: var(--space-sm);
	display: block;
	width: auto;
	height: auto;
	clip-path: none;
	padding: 0.6em 1em;
	background-color: var(--color-primary);
	color: var(--color-on-primary);
	border-radius: var(--radius-pill);
	font-size: var(--text-sm);
	font-weight: 600;
}

/* Media ----------------------------------------------------------------------- */

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

figure {
	margin-block: var(--space-lg);
}

figcaption {
	font-size: var(--text-sm);
	color: var(--color-muted);
	margin-block-start: var(--space-xs);
}

/* WordPress alignment and caption classes (block library kept active). */
.alignleft {
	float: inline-start;
	margin-block: var(--space-sm);
	margin-inline-end: var(--space-lg);
}

.alignright {
	float: inline-end;
	margin-block: var(--space-sm);
	margin-inline-start: var(--space-lg);
}

.aligncenter {
	margin-inline: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	font-size: var(--text-sm);
	color: var(--color-muted);
}

/* Forms ------------------------------------------------------------------------ */

input,
select,
textarea {
	font: inherit;
	color: inherit;
}

input[type='text'],
input[type='email'],
input[type='url'],
input[type='password'],
input[type='search'],
input[type='tel'],
input[type='number'],
input[type='date'],
select,
textarea {
	width: 100%;
	background-color: var(--color-surface);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-sm);
	padding: 0.7em 0.9em;
	transition: border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}

input:focus,
select:focus,
textarea:focus {
	outline: 0;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--color-primary-soft);
}

input[type='checkbox'],
input[type='radio'] {
	width: auto;
	margin: 0;
	accent-color: var(--color-primary);
}

textarea {
	min-height: 8lh;
	resize: vertical;
}

label {
	display: block;
	font-size: var(--text-sm);
	font-weight: 500;
	color: var(--color-text);
	margin-block-end: var(--space-2xs);
}

button {
	font: inherit;
	color: inherit;
	cursor: pointer;
}

/* Placeholder SVG (aspect comes from its viewBox). */
.placeholder {
	width: 100%;
	height: auto;
	color: var(--color-text);
}

/* Motion ------------------------------------------------------------------------ */

@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;
	}
}