/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */

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

html {
	font-size: 100%;
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	/* Anchors and the skip link must clear the fixed header. */
	scroll-padding-top: calc(var(--header-height) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	font-family: var(--font-body);
	font-size: var(--type-body-size);
	font-weight: 400;
	line-height: var(--type-line-height);
	letter-spacing: var(--type-letter-spacing);
	overflow-x: hidden;
	background: var(--se-white);
	color: var(--se-black);
	min-height: 100vh;
}

/* Page-level grounds. The homepage is black; shop, product and content pages
   sit on white. Set on <body> by inc/setup.php so a section never has to guess
   what it is sitting on. */
body.se-theme-dark {
	background: var(--se-black);
	color: var(--se-white);
}

body.se-theme-light {
	background: var(--se-white);
	color: var(--se-black);
}

/* Several components set display on themselves (flex dialogs, grid panels),
   which silently beats the [hidden] attribute. This makes hidden mean hidden. */
[hidden] {
	display: none !important;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

img,
video {
	height: auto;
}

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

/* Links inside running prose keep their underline — colour alone is not a
   sufficient distinction (WCAG 1.4.1). */
.se-prose a,
.se-entry__excerpt a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

ul,
ol {
	list-style: none;
}

.se-prose ul,
.se-prose ol {
	list-style: revert;
	padding-inline-start: 1.5em;
}

button {
	cursor: pointer;
	border: none;
	background: none;
	font: inherit;
	color: inherit;
}

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 400;
	text-transform: uppercase;
	line-height: var(--type-line-height);
}

/* ── Focus ───────────────────────────────────
   Every interactive element gets a visible ring. :focus-visible keeps it off
   mouse clicks; the :focus fallback covers engines without it. */

:focus-visible {
	outline: var(--se-focus-width) solid var(--se-focus);
	outline-offset: var(--se-focus-offset);
}

.se-theme-light :focus-visible,
.product-carousel--gold :focus-visible,
.forbidden-collection :focus-visible {
	--se-focus: var(--se-black);
}

/* ── Screen-reader utilities ─────────────── */

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

.sr-only-focusable:focus,
.sr-only-focusable:focus-visible {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
}

/* ── Skip link ───────────────────────────── */

.se-skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: calc(var(--z-modal) + 1);
	padding: 0.75rem 1.25rem;
	background: var(--se-gold);
	color: var(--se-black);
	font-family: var(--font-heading);
	font-size: 1rem;
	text-transform: uppercase;
	border-radius: 0 0 4px 4px;
	transition: top var(--transition-fast);
}

.se-skip-link:focus {
	top: var(--admin-bar, 0);
	position: fixed;
}

/* ── Layout primitives ───────────────────── */

.se-container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.se-main {
	display: block;
}

.se-main:focus {
	outline: none;
}

.se-prose {
	font-family: var(--font-body);
	line-height: var(--type-prose-lh);
	max-width: 68ch;
}

.se-prose > * + * {
	margin-top: 1em;
}

.se-prose h2,
.se-prose h3 {
	margin-top: 1.6em;
}

/* ── Selection ───────────────────────────── */

::selection {
	background: var(--se-pink);
	color: var(--se-white);
}

/* ── Body scroll locks ───────────────────── */

body.se-menu-open,
body.se-modal-open,
body.se-age-gate-open {
	overflow: hidden;
}
