/*!
 * WDN Motion — base CSS for the bespoke cinematic runtime.
 * The Coffeeman (Warm Craft Roastery) Template Kit.
 *
 * Contract: build/design/03-motion-choreography.md §3 / §5.1.
 * Easing everywhere = "easeOutCraft" cubic-bezier(0.22, 1, 0.36, 1); reveal 24px / 800ms.
 * All visual change is transform / opacity only (compositor-friendly). No layout reveals.
 */

:root {
	--wdn-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--wdn-reveal-y: 24px;
	--wdn-reveal-dur: 800ms;
	--wdn-stagger: 90ms;
}

/* ---------------------------------------------------------------- reveal (base) */
/* Reserve box size: .elementor-invisible / .wdn-reveal use opacity+transform, never
   display:none — so hidden→visible causes ZERO layout shift (CLS budget < 0.05). */
.wdn-reveal {
	opacity: 0;
	transform: translate3d(0, var(--wdn-reveal-y), 0);
	transition: opacity var(--wdn-reveal-dur) var(--wdn-ease),
		transform var(--wdn-reveal-dur) var(--wdn-ease);
	will-change: opacity, transform;
}
.wdn-reveal.is-inview {
	opacity: 1;
	transform: none;
}

/* grouped stagger: --i set per child by JS, multiplied by --wdn-stagger */
.wdn-reveal-group .wdn-reveal {
	transition-delay: calc(var(--i, 0) * var(--wdn-stagger));
}

/* ---------------------------------------------------------------- parallax / pin */
.wdn-parallax {
	will-change: transform;
}
/* Pin: inner stage sticks within a tall host; spacer height comes from host padding. */
.wdn-pin-ready {
	position: relative;
}
.wdn-pin-ready .wdn-pin-stage {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.wdn-pin-ready [data-wdn-layer] {
	will-change: transform, opacity;
}

/* ---------------------------------------------------------------- marquee */
.wdn-marquee {
	overflow: hidden;
	width: 100%;
}
.wdn-marquee-track {
	display: flex;
	flex-wrap: nowrap;
	width: max-content;
	will-change: transform;
}
.wdn-marquee-track > * {
	flex: 0 0 auto;
}

/* ---------------------------------------------------------------- magnetic / tilt */
/* Use CSS vars so we never overwrite Elementor's panel _transform_* values. */
.wdn-magnetic {
	transform: translate(var(--mx, 0px), var(--my, 0px));
	transition: transform 220ms var(--wdn-ease);
}
.wdn-magnetic:hover {
	transition: transform 80ms linear;
}
.wdn-tilt {
	transform: perspective(600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
	transition: transform 220ms var(--wdn-ease);
	transform-style: preserve-3d;
}

/* ---------------------------------------------------------------- custom cursor */
.wdn-has-cursor,
.wdn-has-cursor * {
	cursor: none;
}
.wdn-cursor-dot,
.wdn-cursor-ring {
	position: fixed;
	top: 0;
	left: 0;
	pointer-events: none;
	z-index: 99999;
	border-radius: 50%;
	transform: translate3d(-50%, -50%, 0);
	margin-left: -0px;
	opacity: 0;
	transition: opacity 200ms linear;
	mix-blend-mode: difference;
}
.wdn-cursor-on .wdn-cursor-dot,
.wdn-cursor-on .wdn-cursor-ring {
	opacity: 1;
}
.wdn-cursor-dot {
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	background: #f4ece1;
}
.wdn-cursor-ring {
	width: 32px;
	height: 32px;
	margin: -16px 0 0 -16px;
	border: 1.5px solid #f4ece1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: width 260ms var(--wdn-ease), height 260ms var(--wdn-ease),
		opacity 200ms linear, background-color 260ms var(--wdn-ease);
}
.wdn-cursor-ring.is-grow {
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
}
.wdn-cursor-label {
	font-size: 11px;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #f4ece1;
	opacity: 0;
	transform: scale(0.8);
	transition: opacity 200ms var(--wdn-ease), transform 200ms var(--wdn-ease);
}
.wdn-cursor-ring.has-label .wdn-cursor-label {
	opacity: 1;
	transform: scale(1);
}

/* ---------------------------------------------------------------- smooth scroll */
.wdn-smooth-on {
	overflow: hidden;
}
.wdn-smooth-wrap {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	will-change: transform;
}

/* ---------------------------------------------------------------- intro veil */
.wdn-veil {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background-color: #fffaf2;
	/* film-grain noise (data-URI SVG, no extra request) */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
	opacity: 1;
	transition: opacity 700ms var(--wdn-ease), transform 700ms var(--wdn-ease);
	pointer-events: none;
}
.wdn-intro-lift .wdn-veil {
	opacity: 0;
	transform: translate3d(0, -2%, 0);
}

/* ---------------------------------------------------------------- header shrink */
/* Hook only — the kit's generated header CSS reacts to body.wdn-header-shrink.
   We provide a sane default transition so it never "pops". */
.wdn-header-shrink header,
.wdn-header-shrink .ekit-sticky--active {
	transition: padding 300ms var(--wdn-ease), background-color 300ms var(--wdn-ease);
}

/* ================================================================ REDUCED MOTION */
/* Elementor free does NOT respect prefers-reduced-motion — so we neutralise both
   its animate.css entrances AND every wdn-* effect to a calm, legible static page. */
@media (prefers-reduced-motion: reduce) {
	.elementor-invisible { visibility: visible !important; }
	.animated, [class*="animated"] { animation: none !important; }

	.wdn-reveal,
	.wdn-reveal.is-inview {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	.wdn-parallax { transform: none !important; }
	.wdn-marquee-track { transform: none !important; }
	.wdn-magnetic { transform: none !important; transition: none !important; }
	.wdn-tilt { transform: none !important; transition: none !important; }
	.wdn-pin-ready .wdn-pin-stage { position: static; height: auto; }

	.wdn-header-shrink header,
	.wdn-header-shrink .ekit-sticky--active,
	.elementor-button { transition: none !important; }

	/* keep :active tap affordance on magnetic CTAs */
	.wdn-magnetic:active { transform: scale(0.97) !important; }

	.wdn-cursor-dot, .wdn-cursor-ring { display: none !important; }
	.wdn-has-cursor, .wdn-has-cursor * { cursor: auto !important; }

	.wdn-veil { display: none !important; }
}

/* mobile / touch: cursor & magnetic press fallback (JS already gates creation) */
@media (pointer: coarse) {
	.wdn-has-cursor, .wdn-has-cursor * { cursor: auto; }
	.wdn-magnetic:active { transform: scale(0.97); }
}

/* ================================================================ WOOCOMMERCE THEME
 * Warm Craft Roastery skin for raw default WooCommerce (buttons, prices, notices,
 * product cards, ratings). Default Woo ships blue notices + grey buttons; this
 * scopes everything to .woocommerce so it re-skins commerce without leaking out.
 * Palette: ember #C4471C · cream #F4ECE1 · espresso #2A1A12 · caramel #B07A48
 *          surface #FBF7EF · border #E3D6C2. Type: Fraunces (display) / Manrope (body).
 */
:root {
	--cm-ember: #C4471C;
	--cm-cream: #F4ECE1;
	--cm-espresso: #2A1A12;
	--cm-caramel: #B07A48;
	--cm-surface: #FBF7EF;
	--cm-border: #E3D6C2;
}

/* ---- buttons (add-to-cart, place order, submit, block buttons) ---- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce .woocommerce-message a.button,
.woocommerce ul.products li.product .button,
.woocommerce div.product form.cart .button,
.wp-block-button__link {
	background-color: var(--cm-ember) !important;
	color: var(--cm-cream) !important;
	border: 0 !important;
	border-radius: 10px !important;
	font-family: "Manrope", sans-serif !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em;
	padding: 0.85em 1.6em !important;
	text-transform: none;
	transition: background-color 240ms var(--wdn-ease), transform 240ms var(--wdn-ease);
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.wp-block-button__link:hover {
	background-color: var(--cm-espresso) !important;
	color: var(--cm-cream) !important;
	transform: translateY(-1px);
}

/* ---- prices ---- */
.woocommerce .price,
.woocommerce-Price-amount,
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--cm-espresso) !important;
	font-family: "Manrope", sans-serif !important;
	font-weight: 600 !important;
}
.woocommerce .price del,
.woocommerce-Price-amount del {
	color: var(--cm-caramel) !important;
	opacity: 0.75;
	font-weight: 400 !important;
}

/* ---- notices (info / message / error) — caramel accent, not Woo blue ---- */
.woocommerce-info,
.woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-message {
	background-color: var(--cm-cream) !important;
	border-top-color: var(--cm-caramel) !important;
	color: var(--cm-espresso) !important;
}
.woocommerce-info::before,
.woocommerce-message::before {
	color: var(--cm-caramel) !important;
}
.woocommerce-error {
	border-top-color: var(--cm-ember) !important;
	background-color: var(--cm-cream) !important;
	color: var(--cm-espresso) !important;
}
.woocommerce-error::before {
	color: var(--cm-ember) !important;
}

/* ---- product cards ---- */
.woocommerce ul.products li.product {
	background-color: var(--cm-surface);
	border: 1px solid var(--cm-border);
	border-radius: 16px;
	padding: 18px 18px 22px;
	box-shadow: 0 1px 0 rgba(42, 26, 18, 0.03);
	transition: transform 280ms var(--wdn-ease), box-shadow 280ms var(--wdn-ease);
}
.woocommerce ul.products li.product:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 32px rgba(42, 26, 18, 0.10);
}
.woocommerce ul.products li.product img {
	border-radius: 10px;
	margin-bottom: 14px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product h3 {
	color: var(--cm-espresso) !important;
	font-family: "Fraunces", Georgia, serif !important;
	font-weight: 600;
	font-size: 1.15rem;
	line-height: 1.25;
}

/* ---- single-product showcase: let a solo li.product fill its container ---- */
.woocommerce div.product .woocommerce-product-gallery,
.woocommerce div.product .summary {
	float: none;
}
.woocommerce ul.products[class*="columns-1"] li.product,
.woocommerce-page ul.products[class*="columns-1"] li.product {
	width: 100%;
	max-width: none;
	float: none;
	margin-left: 0;
	margin-right: 0;
}

/* ---- star ratings — caramel ---- */
.woocommerce .star-rating span::before,
.woocommerce .star-rating::before,
.woocommerce p.stars a::before {
	color: var(--cm-caramel) !important;
}
