/*
 * Base: reset-ish, element defaults, typography, accessibility primitives.
 * Consumes tokens.css.
 */

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

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

/* Off-canvas panels (cart drawer, filter/nav sheets) sit translated off-screen; clip
   the page so they never create horizontal scroll. `clip` keeps position:sticky working. */
html, body { overflow-x: clip; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--fs-300);
	line-height: var(--lh-body);
	color: var(--c-ink);
	background: var(--c-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-head);
	font-weight: 500;
	line-height: var(--lh-tight);
	color: var(--c-ink);
	margin: 0 0 var(--sp-4);
	letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-800); }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }
h4 { font-size: var(--fs-500); }

p { margin: 0 0 var(--sp-4); }

a { color: inherit; text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--c-primary); }

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

ul, ol { margin: 0; padding: 0; }

button { font: inherit; cursor: pointer; }

hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--sp-7) 0; }

/* Editorial helpers */
.eyebrow {
	font-family: var(--font-head);
	font-size: var(--fs-100);
	text-transform: uppercase;
	letter-spacing: var(--tracking-caps);
	color: var(--c-muted);
	font-weight: 500;
}

.lede { font-size: var(--fs-400); color: var(--c-ink-soft); }

/* Long-form legal / policy pages (Privacy, Terms, Refund & Return).
   Scoped to `.legal` so the global bullet-strip (ul,ol { padding:0 }) and
   inherited link colour don't flatten legal copy. */
.legal { text-align: left; }
.legal h2 { font-size: var(--fs-600); margin-top: var(--sp-7); }
.legal h3 { font-size: var(--fs-400); margin-top: var(--sp-5); }
.legal > h2:first-child, .legal > h3:first-child { margin-top: 0; }
.legal ul, .legal ol { padding-left: var(--sp-6); margin: 0 0 var(--sp-4); }
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal li + li { margin-top: var(--sp-2); }
.legal a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }
.legal table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 var(--sp-4);
	font-size: var(--fs-200);
}
.legal th, .legal td {
	border: 1px solid var(--c-line);
	padding: var(--sp-3);
	text-align: left;
	vertical-align: top;
}
.legal tr:first-child th, .legal thead th {
	background: var(--c-primary-soft);
	font-weight: 600;
}
@media (max-width: 640px) {
	.legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
	.legal tr { margin-bottom: var(--sp-3); }
	.legal td { border-top: 0; }
	.legal tr th:first-child { border-bottom: 0; }
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--sp-2);
	padding: var(--sp-3) var(--sp-6);
	font-family: var(--font-body);
	font-size: var(--fs-100);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	border: 1px solid var(--c-ink);
	background: var(--c-ink);
	color: #fff;
	border-radius: var(--radius-sm);
	transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-primary-ink); }
.btn--primary { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-primary-ink); }
.btn--primary:hover { background: var(--c-primary-dk); border-color: var(--c-primary-dk); }
.btn--ghost { background: transparent; color: var(--c-ink); }
.btn--ghost:hover { background: var(--c-ink); color: #fff; }

/* Accessibility */
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	width: 1px; height: 1px;
	overflow: hidden;
	white-space: nowrap;
}
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--c-ink);
	color: #fff;
	padding: var(--sp-3) var(--sp-4);
	z-index: 1000;
}
.skip-link:focus { left: var(--sp-4); top: var(--sp-4); color: #fff; }

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