/*
 * Baltussen Digital – interactive mouse effects (preview)
 * Colours from the logo: terracotta #B16944, sage #71906A / #A7BFA3, ochre #C9963F.
 */

/* ---------- 1. Page glow (homepage) ---------- */

/* Fixed layer behind all content (z-index -1 sits above the page background, below the content) */
.bd-page-glow {
	position: fixed;
	top: 0;
	left: 0;
	z-index: -1;
	width: 240px;
	height: 240px;
	margin: -120px 0 0 -120px; /* centre the glow on the mouse */
	border-radius: 50%;
	pointer-events: none;
	opacity: 0;
	will-change: transform;
	background: radial-gradient(circle closest-side, rgba(201, 150, 63, .10) 0%, rgba(177, 105, 68, .05) 45%, rgba(177, 105, 68, 0) 100%);
	transition: opacity .6s ease;
}
.bd-page-glow.is-visible { opacity: 1; }

/* ---------- 2. Magnetic buttons ---------- */

.bd-magnetic { transition-property: translate, transform, background-color, color, border-color, box-shadow !important; }
.bd-magnetic { transition-duration: .35s !important; transition-timing-function: cubic-bezier(.22, 1, .36, 1) !important; }

/* ---------- 3. Spotlight in hero and title bands ---------- */

.bd-fx-zone { position: relative; overflow: hidden; }

html .bd-fx-zone > .bd-spotlight {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	width: 260px;
	height: 260px;
	margin: -130px 0 0 -130px; /* centre on the mouse */
	border-radius: 50%;
	pointer-events: none;
	opacity: 0;
	will-change: transform;
	background:
		radial-gradient(circle closest-side, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 35%),
		radial-gradient(circle closest-side, rgba(201, 150, 63, .14) 0%, rgba(177, 105, 68, .07) 45%, rgba(177, 105, 68, 0) 100%);
	transition: opacity .5s ease;
}
html .bd-fx-active > .bd-spotlight { opacity: 1; }

/* Keep the text above the spotlight */
.bd-fx-zone .wp-block-cover__inner-container,
.bd-fx-zone > .hero-container { position: relative; z-index: 2; }

/* Hero colour blobs drift slightly away from the mouse ("translate" works alongside their own animation) */
.bd-colour .bd-hero.bd-fx-zone::before,
.bd-colour .bd-hero.bd-fx-zone::after { transition: translate 1.2s cubic-bezier(.22, 1, .36, 1); }
.bd-colour .bd-hero.bd-fx-zone::before { translate: calc(var(--px, 0) * -40px) calc(var(--py, 0) * -30px); }
.bd-colour .bd-hero.bd-fx-zone::after  { translate: calc(var(--px, 0) * 50px) calc(var(--py, 0) * 40px); }

/* ---------- Preview badge ---------- */

.bd-fx-badge {
	position: fixed;
	z-index: 99999;
	left: 16px;
	bottom: 16px;
	padding: .55rem .9rem;
	border-radius: 12px;
	background: #2A2521;
	color: #F1EAE1;
	font-size: 13px;
	box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
}
.bd-fx-badge a { margin-left: .6rem; color: #A7BFA3; }

/* Homepage: let the page background (and the glow) show in the "white" parts.
   Kadence's "body.content-style-unboxed .site" is more specific than the live colour CSS, so it stayed white. */
body.bd-colour.home.content-style-unboxed .site { background: transparent; }

/* Homepage background: nearly white, with only a hint of sage at the top and peach at the bottom */
body.bd-colour.home { background: linear-gradient(180deg, #F6F8F4 0%, #FDFCFA 35%, #FDFCFA 70%, #FAF3EE 100%); }

/* ---------- Glow colour variants (preview: compare via the badge) ---------- */

/* Sage: fresh green from the logo */
.bd-glow-sage .bd-page-glow {
	background: radial-gradient(circle closest-side, rgba(113, 144, 106, .16) 0%, rgba(113, 144, 106, .07) 45%, rgba(113, 144, 106, 0) 100%);
}
.bd-glow-sage .bd-fx-zone > .bd-spotlight {
	background:
		radial-gradient(circle closest-side, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 35%),
		radial-gradient(circle closest-side, rgba(113, 144, 106, .2) 0%, rgba(113, 144, 106, .08) 45%, rgba(113, 144, 106, 0) 100%);
}

/* Cycle: slowly moves through sage, ochre and terracotta */
@property --bd-glow-color { syntax: "<color>"; inherits: true; initial-value: rgba(113, 144, 106, .16); }
@keyframes bd-glow-cycle {
	0%, 100% { --bd-glow-color: rgba(113, 144, 106, .16); }
	33%      { --bd-glow-color: rgba(201, 150, 63, .14); }
	66%      { --bd-glow-color: rgba(177, 105, 68, .13); }
}
.bd-glow-cycle .bd-page-glow,
.bd-glow-cycle .bd-fx-zone > .bd-spotlight { animation: bd-glow-cycle 9s ease-in-out infinite; }
.bd-glow-cycle .bd-page-glow {
	background: radial-gradient(circle closest-side, var(--bd-glow-color) 0%, rgba(255, 255, 255, 0) 100%);
}
.bd-glow-cycle .bd-fx-zone > .bd-spotlight {
	background:
		radial-gradient(circle closest-side, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 35%),
		radial-gradient(circle closest-side, var(--bd-glow-color) 0%, rgba(255, 255, 255, 0) 100%);
}

.bd-fx-badge a[aria-current] { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
