/* ===========================================================================
   Bio Vedik, Design tokens & global primitives
   ---------------------------------------------------------------------------
   The palette and geometry specified in the brand brief, expressed once as
   custom properties so every component and pattern inherits the same system.
   =========================================================================== */

:root {
	/* ── Core palette ───────────────────────────────────────────────────── */
	--bv-green:        #1B3D2F;   /* deep forest green, primary */
	--bv-green-900:    #0E241B;
	--bv-green-800:    #132B21;
	--bv-green-700:    #1B3D2F;
	--bv-green-600:    #2A5442;
	--bv-green-400:    #5C8672;
	--bv-green-100:    #D6E3DB;
	--bv-green-50:     #E8EFEA;

	--bv-gold:         #C59B27;   /* warm earthy gold, accent */
	--bv-gold-700:     #8E6C14;
	--bv-gold-600:     #A8811C;
	--bv-gold-400:     #D9B759;
	--bv-gold-100:     #F2E4BC;
	--bv-gold-50:      #F9F2DE;

	--bv-cream:        #F7F9F6;   /* soft off-white ground */
	--bv-cream-dark:   #EEF2EC;
	--bv-white:        #FFFFFF;

	--bv-ink:          #1A1D1B;   /* body text */
	--bv-ink-soft:     #4A5350;
	--bv-ink-muted:    #6E7975;
	--bv-line:         rgba(27, 61, 47, 0.12);

	--bv-success:      #2E7D52;
	--bv-danger:       #B4432F;

	/* ── Geometry ───────────────────────────────────────────────────────── */
	--bv-radius-sm:    8px;
	--bv-radius:       12px;    /* the brief's signature radius */
	--bv-radius-lg:    20px;
	--bv-radius-xl:    28px;
	--bv-radius-pill:  999px;

	/* ── Elevation ──────────────────────────────────────────────────────── */
	--bv-shadow-xs:    0 1px 2px rgba(27, 61, 47, 0.06);
	--bv-shadow-sm:    0 2px 8px rgba(27, 61, 47, 0.06);
	--bv-shadow:       0 4px 24px rgba(27, 61, 47, 0.08);
	--bv-shadow-md:    0 12px 32px rgba(27, 61, 47, 0.10);
	--bv-shadow-lg:    0 24px 56px rgba(27, 61, 47, 0.14);
	--bv-shadow-gold:  0 10px 28px rgba(197, 155, 39, 0.28);

	/* ── Glassmorphism ──────────────────────────────────────────────────── */
	--bv-glass:        rgba(255, 255, 255, 0.65);
	--bv-glass-strong: rgba(255, 255, 255, 0.86);
	--bv-glass-dark:   rgba(27, 61, 47, 0.55);
	--bv-glass-border: rgba(255, 255, 255, 0.55);
	--bv-blur:         saturate(160%) blur(14px);

	/* ── Typography ─────────────────────────────────────────────────────── */
	--bv-font-display: "Fraunces", "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--bv-font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/* Fluid type scale, clamps keep headings readable from 360px to 1600px. */
	--bv-text-xs:      0.78rem;
	--bv-text-sm:      0.875rem;
	--bv-text-base:    1rem;
	--bv-text-lg:      clamp(1.05rem, 0.99rem + 0.30vw, 1.20rem);
	--bv-text-xl:      clamp(1.25rem, 1.12rem + 0.60vw, 1.55rem);
	--bv-h3:           clamp(1.35rem, 1.18rem + 0.80vw, 1.80rem);
	--bv-h2:           clamp(1.75rem, 1.35rem + 1.85vw, 2.85rem);
	--bv-h1:           clamp(2.30rem, 1.60rem + 3.20vw, 4.40rem);

	/* ── Rhythm ─────────────────────────────────────────────────────────── */
	--bv-section-y:    clamp(3.5rem, 2.2rem + 5vw, 7rem);
	--bv-gutter:       clamp(1rem, 0.45rem + 2.2vw, 2rem);
	--bv-maxw:         1200px;
	--bv-maxw-narrow:  760px;

	/* ── Motion ─────────────────────────────────────────────────────────── */
	--bv-ease:         cubic-bezier(0.22, 0.61, 0.36, 1);
	--bv-ease-out:     cubic-bezier(0.16, 1, 0.30, 1);
	--bv-dur:          320ms;
	--bv-dur-fast:     180ms;

	--bv-header-h:     76px;
}

/* ===========================================================================
   Base
   =========================================================================== */

html {
	scroll-behavior: smooth;
	/* Anchor targets must clear the sticky glass header. */
	scroll-padding-top: calc(var(--bv-header-h) + 16px);
}

body {
	background-color: var(--bv-cream);
	color: var(--bv-ink);
	font-family: var(--bv-font-body);
	font-size: var(--bv-text-base);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5,
.entry-title,
.bv-display {
	font-family: var(--bv-font-display);
	color: var(--bv-green);
	font-weight: 600;
	line-height: 1.14;
	letter-spacing: -0.015em;
}

h1 { font-size: var(--bv-h1); }
h2 { font-size: var(--bv-h2); }
h3 { font-size: var(--bv-h3); }

p { margin: 0 0 1rem; }

a {
	color: var(--bv-green-600);
	text-decoration-color: rgba(197, 155, 39, 0.45);
	text-underline-offset: 3px;
	transition: color var(--bv-dur-fast) var(--bv-ease);
}

a:hover { color: var(--bv-gold-600); }

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

::selection {
	background: var(--bv-gold-100);
	color: var(--bv-green-900);
}

/* Visible, on-brand focus ring for keyboard users. */
:focus-visible {
	outline: 2px solid var(--bv-gold);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ===========================================================================
   Layout helpers
   =========================================================================== */

.bv-section {
	position: relative;
	padding-block: var(--bv-section-y);
}

.bv-container {
	width: 100%;
	max-width: var(--bv-maxw);
	margin-inline: auto;
	/* Side padding lives here only, so no child can create a horizontal scroll. */
	padding-inline: var(--bv-gutter);
}

.bv-narrow { max-width: var(--bv-maxw-narrow); margin-inline: auto; }
.bv-center { text-align: center; }

.bv-grid { display: grid; gap: clamp(1rem, 0.6rem + 1.5vw, 1.75rem); }
/* Explicitly two columns: auto-fit with a min width let four ingredient cards
   reflow to 3 + 1 on a wide screen, which reads as a mistake rather than a
   grid. */
.bv-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 720px) {
	.bv-grid--2 { grid-template-columns: 1fr; }
}
.bv-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.bv-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ===========================================================================
   Section heading
   =========================================================================== */

.bv-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--bv-font-body);
	font-size: var(--bv-text-xs);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--bv-gold-700);
	margin-bottom: 0.85rem;
}

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

.bv-section__head { max-width: 640px; margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.25rem); }
.bv-section__head.bv-center { margin-inline: auto; }
.bv-section__head p { color: var(--bv-ink-soft); font-size: var(--bv-text-lg); margin-bottom: 0; }
.bv-section__head h2 { margin: 0 0 0.75rem; }

/* ===========================================================================
   Buttons
   =========================================================================== */

.bv-btn {
	--_bg: var(--bv-gold);
	--_fg: var(--bv-green-900);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 0.95rem 1.9rem;
	border: 1px solid transparent;
	border-radius: var(--bv-radius-pill);
	background: var(--_bg);
	color: var(--_fg);
	font-family: var(--bv-font-body);
	font-size: var(--bv-text-sm);
	font-weight: 650;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: transform var(--bv-dur) var(--bv-ease-out),
	            box-shadow var(--bv-dur) var(--bv-ease-out),
	            background-color var(--bv-dur-fast) var(--bv-ease),
	            color var(--bv-dur-fast) var(--bv-ease);
}

.bv-btn:hover {
	transform: translateY(-2px);
	box-shadow: var(--bv-shadow-gold);
	color: var(--_fg);
}

.bv-btn:active { transform: translateY(0); }

.bv-btn--primary { --_bg: var(--bv-gold); --_fg: var(--bv-green-900); }
.bv-btn--primary:hover { --_bg: var(--bv-gold-400); }

.bv-btn--dark { --_bg: var(--bv-green); --_fg: var(--bv-white); }
.bv-btn--dark:hover { --_bg: var(--bv-green-600); box-shadow: var(--bv-shadow-md); }

.bv-btn--ghost {
	--_bg: transparent;
	--_fg: var(--bv-green);
	border-color: var(--bv-green-100);
	backdrop-filter: var(--bv-blur);
	-webkit-backdrop-filter: var(--bv-blur);
	background: var(--bv-glass);
}

.bv-btn--ghost:hover {
	--_fg: var(--bv-green-900);
	border-color: var(--bv-gold);
	box-shadow: var(--bv-shadow-sm);
}

.bv-btn--light { --_bg: var(--bv-white); --_fg: var(--bv-green); }
.bv-btn--sm { padding: 0.65rem 1.25rem; font-size: var(--bv-text-xs); }
.bv-btn--block { width: 100%; }

/* ===========================================================================
   Card & glass primitives
   =========================================================================== */

.bv-card {
	position: relative;
	background: var(--bv-white);
	border: 1px solid var(--bv-line);
	border-radius: var(--bv-radius-lg);
	box-shadow: var(--bv-shadow-sm);
	padding: clamp(1.4rem, 1.1rem + 1vw, 2rem);
	transition: transform var(--bv-dur) var(--bv-ease-out),
	            box-shadow var(--bv-dur) var(--bv-ease-out),
	            border-color var(--bv-dur) var(--bv-ease);
	overflow: hidden;
}

/* The "satisfying" hover from the brief: lift, deepen, and sweep a gold edge. */
.bv-card--interactive:hover {
	transform: translateY(-6px);
	box-shadow: var(--bv-shadow-lg);
	border-color: rgba(197, 155, 39, 0.4);
}

.bv-card--interactive::after {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: linear-gradient(90deg, var(--bv-gold), var(--bv-gold-400), transparent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--bv-dur) var(--bv-ease-out);
}

.bv-card--interactive:hover::after { transform: scaleX(1); }

.bv-glass {
	background: var(--bv-glass);
	backdrop-filter: var(--bv-blur);
	-webkit-backdrop-filter: var(--bv-blur);
	border: 1px solid var(--bv-glass-border);
	border-radius: var(--bv-radius-lg);
	box-shadow: var(--bv-shadow);
}

/* ===========================================================================
   Badges & pills
   =========================================================================== */

.bv-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.4rem 0.9rem;
	border-radius: var(--bv-radius-pill);
	background: var(--bv-green-50);
	border: 1px solid var(--bv-green-100);
	color: var(--bv-green-700);
	font-size: var(--bv-text-xs);
	font-weight: 600;
	line-height: 1.3;
}

.bv-badge--gold {
	background: var(--bv-gold-50);
	border-color: var(--bv-gold-100);
	color: var(--bv-gold-700);
}

.bv-badge--glass {
	background: var(--bv-glass-strong);
	backdrop-filter: var(--bv-blur);
	-webkit-backdrop-filter: var(--bv-blur);
	border-color: var(--bv-glass-border);
	color: var(--bv-green-700);
	box-shadow: var(--bv-shadow-xs);
}

.bv-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--bv-gold);
	flex: none;
}

/* ===========================================================================
   Decorative leaf/grain background
   =========================================================================== */

.bv-bg-cream { background: var(--bv-cream); }
.bv-bg-white { background: var(--bv-white); }

.bv-bg-tint {
	background:
		radial-gradient(60% 55% at 12% 0%,  rgba(197, 155, 39, 0.09), transparent 62%),
		radial-gradient(55% 60% at 92% 12%, rgba(27, 61, 47, 0.07),  transparent 60%),
		var(--bv-cream);
}

.bv-bg-green {
	background:
		radial-gradient(70% 90% at 85% 0%, rgba(197, 155, 39, 0.16), transparent 60%),
		var(--bv-green);
	color: var(--bv-cream);
}

.bv-bg-green h2,
.bv-bg-green h3 { color: var(--bv-white); }
.bv-bg-green p  { color: rgba(247, 249, 246, 0.78); }

/* ===========================================================================
   Entry animations, the brief's "subtle entry animations".
   Opt-in via JS adding .is-visible, and fully disabled for reduced motion.
   =========================================================================== */

.bv-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 700ms var(--bv-ease-out), transform 700ms var(--bv-ease-out);
	transition-delay: var(--bv-delay, 0ms);
	will-change: opacity, transform;
}

.bv-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* No JS? Never leave content invisible. */
.no-js .bv-reveal { opacity: 1; transform: none; }

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

	.bv-reveal {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

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

/* Screen-reader-only utility. */
.bv-sr-only {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
