/**
 * Beauvit — main.css
 * Design-system foundation: tokens, reset, base typography, container, buttons,
 * hero, front-page sections, page/blog templates and accessibility helpers.
 */

/* -------------------------------------------------------------------------
 * Design tokens
 * ---------------------------------------------------------------------- */
:root {
	/* Colour */
	--bv-bg: #ffffff;
	--bv-ink: #141414;         /* primary text / buttons */
	--bv-ink-soft: #595959;    /* muted secondary text (AAA on white) */
	--bv-line: #e6e6e6;        /* thin hairlines */
	--bv-btn-bg: #141414;
	--bv-btn-ink: #ffffff;
	--bv-btn-bg-hover: #000000;

	/* Layout */
	--bv-wrap: 1340px;
	--bv-wrap-narrow: 760px;
	--bv-gutter: clamp(1.25rem, 5vw, 3rem);

	/* Shape */
	--bv-radius: 4px;
	--bv-radius-pill: 999px;

	/* Type */
	--bv-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;

	/* Motion */
	--bv-transition: 0.2s ease;
}

/* -------------------------------------------------------------------------
 * Reset (minimal)
 * ---------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--bv-bg);
	color: var(--bv-ink);
	font-family: var(--bv-font-sans);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden; /* guard against accidental horizontal scroll */
}

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--bv-font-sans);
	color: var(--bv-ink);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.02em;
	margin: 0 0 0.75em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.375rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; }

p { margin: 0 0 1.25rem; }

a {
	color: var(--bv-ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--bv-transition);
}

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

ul, ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }

/* -------------------------------------------------------------------------
 * Layout container
 * ---------------------------------------------------------------------- */
.bv-wrap {
	width: 100%;
	max-width: var(--bv-wrap);
	margin-inline: auto;
	padding-inline: var(--bv-gutter);
}

.bv-main {
	display: block;
	outline: none; /* focused only programmatically via skip link */
}

/* -------------------------------------------------------------------------
 * Buttons
 * ---------------------------------------------------------------------- */
.bv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.9em 1.9em;
	background: var(--bv-btn-bg);
	color: var(--bv-btn-ink);
	border: 1px solid var(--bv-btn-bg);
	border-radius: var(--bv-radius-pill);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background var(--bv-transition), color var(--bv-transition), border-color var(--bv-transition);
}

.bv-btn:hover {
	background: var(--bv-btn-bg-hover);
	color: var(--bv-btn-ink);
	border-color: var(--bv-btn-bg-hover);
}

.bv-btn--ghost {
	background: transparent;
	color: var(--bv-ink);
	border-color: var(--bv-ink);
}

.bv-btn--ghost:hover {
	background: var(--bv-ink);
	color: #ffffff;
}

/* -------------------------------------------------------------------------
 * Accessibility
 * ---------------------------------------------------------------------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	position: absolute !important;
	word-wrap: normal !important;
}

.bv-skip-link {
	position: absolute;
	left: 1rem;
	top: 1rem;
	z-index: 1000;
}

.bv-skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	padding: 0.75rem 1.25rem;
	background: var(--bv-ink);
	color: #ffffff;
	border-radius: var(--bv-radius);
	text-decoration: none;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--bv-ink);
	outline-offset: 2px;
	border-radius: 2px;
}

/* -------------------------------------------------------------------------
 * Hero (front page) — text hero for front-page.php
 * (The shop slider is styled in shop.css: .bv-shop-slider.)
 * ---------------------------------------------------------------------- */
.bv-hero {
	padding-block: clamp(3.5rem, 9vw, 8rem);
}

.bv-hero__eyebrow {
	margin: 0 0 1.5rem;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--bv-ink-soft);
}

.bv-hero__title {
	max-width: 900px;
	margin: 0 0 1.5rem;
	font-size: clamp(2.5rem, 6.5vw, 4.75rem);
	line-height: 1.04;
	letter-spacing: -0.025em;
}

.bv-hero__desc {
	max-width: 560px;
	margin: 0 0 2.5rem;
	font-size: clamp(1.05rem, 1.6vw, 1.3rem);
	line-height: 1.6;
	color: var(--bv-ink-soft);
}

.bv-hero__actions {
	margin: 0;
}

/* -------------------------------------------------------------------------
 * Front-page product section header
 * ---------------------------------------------------------------------- */
.bv-products-section {
	padding-block: 0 clamp(4rem, 9vw, 8rem);
}

.bv-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	margin: 0 0 clamp(2rem, 4vw, 3rem);
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--bv-line);
}

.bv-section-head__title {
	margin: 0;
	font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.bv-section-head__link {
	white-space: nowrap;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--bv-ink);
	text-decoration: none;
	border-bottom: 1px solid var(--bv-ink);
	padding-bottom: 2px;
}

.bv-section-head__link:hover {
	color: var(--bv-ink-soft);
	border-color: var(--bv-ink-soft);
}

/* -------------------------------------------------------------------------
 * Page template
 * ---------------------------------------------------------------------- */
.bv-page {
	padding-block: clamp(3rem, 6vw, 6rem);
}

.bv-page__header {
	margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.bv-page__title {
	margin: 0;
}

.bv-page__content > :where(p, h2, h3, h4, h5, h6, ul, ol, blockquote, pre, table) {
	max-width: var(--bv-wrap-narrow);
}

.bv-page__content .alignwide {
	max-width: var(--bv-wrap);
}

.bv-page__content .alignfull {
	max-width: none;
}

.bv-page__content img {
	height: auto;
}

/* -------------------------------------------------------------------------
 * Blog index / archive / search
 * ---------------------------------------------------------------------- */
.bv-list {
	padding-block: clamp(3rem, 6vw, 6rem);
}

.bv-list__header {
	margin: 0 0 clamp(2.5rem, 5vw, 4rem);
}

.bv-list__title {
	margin: 0;
}

.bv-posts {
	display: grid;
	gap: clamp(2.5rem, 5vw, 4rem);
}

.bv-post {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 700px) {
	.bv-post {
		grid-template-columns: 320px 1fr;
		gap: 2.5rem;
		align-items: start;
	}
}

.bv-post__media {
	display: block;
}

.bv-post__media img {
	width: 100%;
	display: block;
}

.bv-post__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.bv-post__title a {
	text-decoration: none;
}

.bv-post__meta {
	margin: 0 0 1rem;
	color: var(--bv-ink-soft);
	font-size: 0.85rem;
}

.bv-post__more {
	display: inline-block;
	margin-top: 0.5rem;
	color: var(--bv-ink);
	text-decoration: none;
	border-bottom: 1px solid var(--bv-ink);
	padding-bottom: 2px;
}

.bv-empty {
	padding-block: 4rem;
	color: var(--bv-ink-soft);
}

/* Pagination (shared) */
.navigation.pagination {
	margin-top: clamp(3rem, 5vw, 4rem);
}

.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.navigation.pagination a,
.navigation.pagination .current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--bv-line);
	border-radius: var(--bv-radius-pill);
	color: var(--bv-ink);
	text-decoration: none;
}

.navigation.pagination .current {
	background: var(--bv-ink);
	color: #ffffff;
	border-color: var(--bv-ink);
}

/* -------------------------------------------------------------------------
 * Motion preferences
 * ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}
