/**
 * Beauvit — main stylesheet.
 *
 * Design tokens, base layout, typography and shared UI (buttons, badges).
 * Section-specific rules live in assets/css/components/.
 *
 * The site-wide (inner pages, WooCommerce) palette stays in :root as a warm
 * light theme. The home page opts into a scoped "night luxury" dark palette by
 * overriding the same custom properties on `body.home`, so every component that
 * reads var(--bv-*) recolours automatically without touching the shop, cart or
 * single-product pages.
 *
 * @package Beauvit
 */

/* -------------------------------------------------------------------------
 * Design tokens — light theme (rest of the site + WooCommerce)
 * ---------------------------------------------------------------------- */
:root {
	/* Palette. */
	--bv-bg: #faf6ef;          /* warm milk background */
	--bv-surface: #fffdf9;     /* warm white cards */
	--bv-ink: #262019;         /* graphite text */
	--bv-muted: #74695b;       /* muted taupe */
	--bv-line: #ebe1d2;        /* soft beige hairlines */
	--bv-beige: #f2e9db;       /* soft beige panels */
	--bv-accent: #a9722e;      /* amber glass */
	--bv-accent-strong: #8a5a20;
	--bv-amber-tint: #f3e6cf;  /* pale amber wash */

	/* Glass / glow (light fallbacks; overridden on home). */
	--bv-glass: var(--bv-surface);
	--bv-glass-border: var(--bv-line);
	--bv-glow: rgba(169, 114, 46, 0.35);
	--bv-media-tile: radial-gradient(120% 90% at 50% 15%, #ffffff 0%, var(--bv-beige) 100%);

	/* Typography. */
	--bv-font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--bv-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	/* Rhythm. */
	--bv-container: 1200px;
	--bv-section-y: clamp(3.5rem, 7vw, 6.5rem);
	--bv-radius: 8px;
	--bv-radius-lg: 18px;
	--bv-radius-xl: 26px;

	/* Motion. */
	--bv-ease: cubic-bezier(0.2, 0.6, 0.2, 1);
	--bv-shadow: 0 18px 40px -26px rgba(38, 32, 25, 0.45);
	--bv-shadow-lg: 0 40px 90px -50px rgba(20, 14, 6, 0.6);
}

/* -------------------------------------------------------------------------
 * Design tokens — home only: warm graphite "night luxury" + amber glass
 * ---------------------------------------------------------------------- */
body.home {
	--bv-bg: #0f0b07;          /* warm near-black */
	--bv-surface: #17110b;     /* elevated dark surface */
	--bv-ink: #f5ede1;         /* warm cream text */
	--bv-muted: #b3a68f;       /* warm taupe muted */
	--bv-line: rgba(240, 208, 150, 0.14); /* faint warm hairline */
	--bv-beige: #f0e7d9;       /* stays light — used by the product spotlight tile */
	--bv-accent: #dc9f52;      /* luminous amber gold */
	--bv-accent-strong: #f2c581; /* brighter gold for hover on dark */
	--bv-amber-tint: rgba(220, 159, 82, 0.14);

	--bv-glass: rgba(28, 21, 13, 0.55);
	--bv-glass-border: rgba(240, 208, 150, 0.16);
	--bv-glow: rgba(220, 159, 82, 0.55);
	--bv-media-tile: radial-gradient(120% 90% at 50% 12%, #fffdf7 0%, #efe4d2 100%);

	--bv-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.75);
	--bv-shadow-lg: 0 50px 120px -50px rgba(0, 0, 0, 0.85);

	background-color: var(--bv-bg);
	color: var(--bv-ink);
	/* Ambient warm glows so the dark page has depth behind the sections. */
	background-image:
		radial-gradient(60% 45% at 82% 8%, rgba(220, 159, 82, 0.12) 0%, transparent 60%),
		radial-gradient(55% 50% at 10% 82%, rgba(150, 78, 30, 0.12) 0%, transparent 62%);
	background-attachment: fixed;
}

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

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

body {
	margin: 0;
	background-color: var(--bv-bg);
	color: var(--bv-ink);
	font-family: var(--bv-font-sans);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden; /* safety net against any decorative overflow */
}

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

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s var(--bv-ease);
}

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

h1,
h2,
h3 {
	font-family: var(--bv-font-serif);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.01em;
	margin: 0 0 0.5em;
	color: var(--bv-ink);
}

p {
	margin: 0 0 1em;
}

/* -------------------------------------------------------------------------
 * Layout helpers — shared centered container
 * ---------------------------------------------------------------------- */
.content-area__inner,
.hero__inner,
.why-beauvit__inner,
.benefits__inner,
.product-grid__inner,
.cta__inner,
.site-header__inner,
.site-footer__inner {
	width: 100%;
	max-width: var(--bv-container);
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Shared section eyebrow (kicker) ------------------------------------- */
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 1.1rem;
	font-family: var(--bv-font-sans);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--bv-accent);
}

.eyebrow::before {
	content: "";
	width: 26px;
	height: 1px;
	background: linear-gradient(90deg, var(--bv-accent), transparent);
}

/* -------------------------------------------------------------------------
 * Buttons
 * ---------------------------------------------------------------------- */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.95rem 1.8rem;
	font-family: var(--bv-font-sans);
	font-size: 0.94rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	border: 1px solid transparent;
	border-radius: 999px;
	cursor: pointer;
	text-align: center;
	transition: background-color 0.25s var(--bv-ease), color 0.25s var(--bv-ease),
		border-color 0.25s var(--bv-ease), box-shadow 0.25s var(--bv-ease),
		transform 0.12s var(--bv-ease);
}

.button:active {
	transform: translateY(1px);
}

.button--primary {
	background-color: var(--bv-accent);
	color: #1a1206;
	border-color: var(--bv-accent);
}

.button--primary:hover {
	background-color: var(--bv-accent-strong);
	border-color: var(--bv-accent-strong);
	color: #1a1206;
	box-shadow: 0 12px 30px -12px var(--bv-glow);
}

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

.button--ghost:hover {
	border-color: var(--bv-accent);
	color: var(--bv-ink);
}

/* On the light inner-page palette the amber primary reads better with white. */
:root .button--primary,
body:not(.home) .button--primary {
	color: #fff;
}

body:not(.home) .button--primary:hover {
	color: #fff;
}

/* -------------------------------------------------------------------------
 * Premium badges — shared pill row (hero, and reusable elsewhere)
 * ---------------------------------------------------------------------- */
.badges {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.95rem;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--bv-ink);
	background: var(--bv-glass);
	border: 1px solid var(--bv-glass-border);
	border-radius: 999px;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.badge::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--bv-accent);
	box-shadow: 0 0 10px 1px var(--bv-glow);
}

/* -------------------------------------------------------------------------
 * Generic content / blog (index.php)
 * ---------------------------------------------------------------------- */
.content-area {
	padding-block: var(--bv-section-y);
}

.page-header__title {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	margin-bottom: 1.5rem;
}

.post-list__item {
	padding-block: 1.5rem;
	border-bottom: 1px solid var(--bv-line);
}

.post-list__title {
	font-size: 1.5rem;
}

.content-area__empty,
.product-grid__empty {
	color: var(--bv-muted);
	font-style: italic;
}

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

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	z-index: 1000;
	background: var(--bv-accent);
	color: #1a1206;
	padding: 0.75rem 1.25rem;
	border-radius: 0 0 var(--bv-radius) 0;
}

.skip-link:focus {
	left: 0;
	top: 0;
	color: #1a1206;
}

:focus-visible {
	outline: 2px solid var(--bv-accent);
	outline-offset: 3px;
}

/* -------------------------------------------------------------------------
 * Motion preferences — decorative motion is opt-out friendly
 * ---------------------------------------------------------------------- */
@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;
	}

	body.home {
		background-attachment: scroll;
	}
}
