/**
 * Base: reset, typography, layout primitives, sections, focus, motion.
 * Values come from tokens.css only.
 */

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

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

body {
	margin: 0;
	background: var(--color-paper);
	color: var(--color-body);
	font-family: var(--font-family);
	font-size: var(--fs-body);
	font-weight: var(--weight-regular);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Footer sits at the bottom on short pages (cart, empty states): main takes the slack. */
body {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

.site-main {
	flex: 1 0 auto;
}

body.is-menu-open {
	overflow: hidden;
}

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

/* ---- Headings: 700, uppercase, 1.2, ink ---- */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
	margin: 0 0 var(--heading-gap);
	color: var(--on-surface-strong);
	font-weight: var(--weight-bold);
	line-height: var(--lh-heading);
	text-transform: uppercase;
}

h1,
.h1 {
	font-size: var(--fs-h1);
	line-height: var(--lh-h1);
}
h2,
.h2 {
	font-size: var(--fs-h2);
}
h3,
.h3 {
	font-size: var(--fs-h3);
}
h4,
.h4 {
	font-size: var(--fs-h4);
}
h5,
.h5 {
	font-size: var(--fs-h5);
}
h6,
.h6 {
	font-size: var(--fs-h6);
}

p,
ul,
ol,
dl,
figure,
blockquote {
	margin: 0 0 var(--space-15);
}

a {
	color: var(--on-surface-strong);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--motion-fast) var(--ease-out);
}

a:hover {
	color: var(--on-surface);
}

strong,
b {
	color: var(--on-surface-strong);
	font-weight: var(--weight-bold);
}

hr {
	height: 1px;
	margin: var(--space-30) 0;
	border: 0;
	background: var(--line);
}

/* ---- Text roles ---- */
.eyebrow {
	display: block;
	margin: 0 0 var(--space-10);
	color: inherit;
	font-size: var(--fs-eyebrow);
	font-weight: var(--weight-medium);
	line-height: var(--lh-eyebrow);
	letter-spacing: var(--tracking-eyebrow);
	text-transform: uppercase;
}

.text-lead {
	font-size: var(--fs-body-lg);
}

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

/* Campaign display: live text, condensed italic, never an image. */
.display {
	margin: 0 0 var(--space-20);
	color: var(--on-surface-strong);
	font-size: var(--fs-display);
	font-stretch: var(--display-stretch);
	font-style: italic;
	font-weight: var(--display-weight);
	line-height: 0.92;
	letter-spacing: -0.005em;
	text-transform: uppercase;
}

.display .accent,
.number-accent {
	color: var(--on-surface-number);
}

.overlay-display {
	color: var(--color-paper);
	font-size: var(--fs-overlay);
	font-weight: var(--weight-bold);
	line-height: var(--lh-heading);
	text-transform: uppercase;
}

/* ---- Layout ---- */
.container,
.container-page,
.container-reading {
	width: 100%;
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.container {
	max-width: calc(var(--container) + 2 * var(--container-pad));
}

.container-page {
	max-width: var(--container-page);
}

.container-reading {
	max-width: calc(var(--container-reading) + 2 * var(--container-pad));
}

/* ---- Sections: fewer, taller sections at 80-110 ---- */
.section {
	padding-block: var(--section-md);
	background: var(--surface);
	color: var(--on-surface);
}

.section--sm {
	padding-block: var(--section-sm);
}

.section--lg {
	padding-block: var(--section-lg);
}

.section--flush {
	padding-block: 0;
}

.section-heading {
	margin-bottom: var(--space-30);
}

.section-heading--center {
	text-align: center;
}

.section-heading--rule {
	padding-bottom: var(--space-10);
	border-bottom: 1px solid var(--line);
}

.section-heading__intro {
	max-width: var(--container-reading);
	margin: 0;
	font-size: var(--fs-body-lg);
}

.section-heading--center .section-heading__intro {
	margin-inline: auto;
}

.grid {
	display: grid;
	gap: var(--gutter-lg) var(--gutter);
}

@media (min-width: 768px) {
	.grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.grid--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ---- Overlays ---- */
.media-frame {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.media-frame > img,
.media-frame > picture img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.media-frame::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

/* Short titles: flat 10% wash plus a soft radial shadow behind the text block. */
.overlay--wash::after {
	background: var(--overlay-radial), var(--overlay-wash);
}

/* Body copy over photos: bottom-up black 0 to 55%. */
.overlay--gradient::after {
	background: var(--overlay-gradient);
}

.media-frame__content {
	position: absolute;
	inset: 0;
	z-index: 2;
}

/* ---- Accessibility ---- */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: var(--space-10);
	left: var(--space-10);
	z-index: 1000;
	width: auto;
	height: auto;
	margin: 0;
	padding: var(--space-10) var(--space-20);
	clip: auto;
	background: var(--color-paper);
	color: var(--color-ink);
	font-weight: var(--weight-semibold);
}

:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

:focus:not(:focus-visible) {
	outline: none;
}

/* ---- Motion: 0.6s fade-up on scroll. Only hidden once JS has run. ---- */
.js [data-reveal] {
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity var(--motion-reveal) var(--ease-out),
		transform var(--motion-reveal) var(--ease-out);
}

.js [data-reveal].is-revealed {
	opacity: 1;
	transform: none;
}

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

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

	.js [data-reveal] {
		opacity: 1;
		transform: none;
	}
}

.section-actions {
	margin: var(--space-40) 0 0;
}

.section-block {
	margin-bottom: var(--space-60);
}

/* ---- Content pages (rules, legal, account) ---- */
.page-header {
	margin-bottom: var(--space-30);
	padding-bottom: var(--space-10);
	border-bottom: 1px solid var(--line);
}

.entry-content > * + * {
	margin-top: var(--space-15);
}

.entry-content h2,
.entry-content h3 {
	margin-top: var(--space-40);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.2em;
}
