/**
 * Cultured Dairy — motion (letter drip via GSAP).
 * Image mask experiments removed. Button blob hovers stay in brand.css / main.js.
 */

/* Launch: FX preview FAB off unless body is explicitly opted in. */
body:not(.atm-show-motion-switcher) .atm-motion-switcher {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.atm-motion-switcher {
	position: fixed;
	left: 0.85rem;
	bottom: 0.85rem;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.45rem;
	max-width: calc(100vw - 1.5rem);
	font-family: var(--atm-font-body, system-ui, sans-serif);
}

.atm-motion-switcher__fab {
	appearance: none;
	width: 2.65rem;
	height: 2.65rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 245, 224, 0.4);
	background: rgba(24, 60, 81, 0.94);
	color: #fff5e0;
	box-shadow: 0 10px 28px rgba(15, 24, 41, 0.32);
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 0;
	backdrop-filter: blur(8px);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.atm-motion-switcher__fab:hover,
.atm-motion-switcher__fab:focus-visible {
	transform: scale(1.06);
	outline: none;
	box-shadow: 0 12px 32px rgba(15, 24, 41, 0.4);
}

.atm-motion-switcher__fab-icon {
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1;
	text-transform: uppercase;
}

.atm-motion-switcher__panel {
	display: none;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
	max-width: min(22rem, calc(100vw - 1.5rem));
	padding: 0.45rem 0.55rem;
	border-radius: 1.1rem;
	background: rgba(24, 60, 81, 0.94);
	border: 1px solid rgba(255, 245, 224, 0.35);
	box-shadow: 0 12px 32px rgba(15, 24, 41, 0.28);
	backdrop-filter: blur(8px);
}

.atm-motion-switcher.is-open .atm-motion-switcher__panel {
	display: flex;
}

.atm-motion-switcher__label {
	padding: 0 0.55rem;
	color: rgba(255, 245, 224, 0.75);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.atm-motion-switcher__btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 0.4rem 0.75rem;
	background: transparent;
	color: #fff5e0;
	font: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	cursor: pointer;
	text-decoration: none;
}

.atm-motion-switcher__btn:hover,
.atm-motion-switcher__btn:focus-visible {
	border-color: rgba(255, 245, 224, 0.45);
	outline: none;
}

.atm-motion-switcher__btn.is-active {
	background: #fff5e0;
	color: #183c51;
}

.atm-motion-switcher__hint {
	display: none;
	width: 100%;
	padding: 0.15rem 0.55rem 0.25rem;
	color: rgba(255, 245, 224, 0.65);
	font-size: 0.65rem;
	text-align: left;
}

@media (min-width: 768px) {
	.atm-motion-switcher__hint {
		display: block;
	}
}

/* Page polish — gallery cards */
.atm-brand--cultured-dairy .atm-gallery--masonry .atm-gallery__item,
.atm-brand--cultured-dairy .atm-gallery--editorial-feature .atm-gallery__item {
	transform-origin: 50% 70%;
	will-change: transform, opacity;
	backface-visibility: hidden;
}

.atm-brand--cultured-dairy .atm-hero-line {
	display: block;
	will-change: transform, opacity;
}

.atm-brand--cultured-dairy .atm-drip-word {
	display: inline-flex;
	flex-wrap: nowrap;
	justify-content: center;
	white-space: nowrap;
}

.atm-brand--cultured-dairy .atm-drip-char {
	display: inline-block;
	will-change: transform, opacity, filter;
}

/* Cheese-edge drip — full-panel stage; drips fall, splash, clear. */
.atm-brand--cultured-dairy .atm-cheese-edge-host {
	isolation: isolate;
}

.atm-brand--cultured-dairy .atm-cheese-edge {
	position: absolute;
	inset: 0;
	z-index: 6;
	pointer-events: none;
	overflow: hidden;
}

.atm-brand--cultured-dairy .atm-cheese-edge__lip {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: clamp(1.55rem, 3.1vw, 2.4rem);
	opacity: 0;
	transform-origin: top center;
	overflow: visible;
}

.atm-brand--cultured-dairy .atm-cheese-edge__lip-svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
	filter: drop-shadow(0 4px 10px rgba(180, 120, 20, 0.3));
}

.atm-brand--cultured-dairy .atm-cheese-strand {
	position: absolute;
	top: -0.15rem; /* nest into lip so stretch reads as coming from the base cheese */
	height: var(--atm-drip-h, 5rem);
	transform-origin: 50% 0%;
	will-change: transform, opacity;
	filter: drop-shadow(0 2px 5px rgba(150, 95, 10, 0.22));
}

.atm-brand--cultured-dairy .atm-cheese-strand__pull {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
	transform-origin: 50% 0%;
	will-change: transform, opacity, clip-path;
}

/* Free chunk — hidden until break-off; only then does it read as a drip. */
.atm-brand--cultured-dairy .atm-cheese-chunk {
	position: absolute;
	top: 0;
	z-index: 2;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	will-change: transform, opacity;
	filter: drop-shadow(0 3px 5px rgba(140, 90, 10, 0.28));
}

.atm-brand--cultured-dairy .atm-cheese-chunk__svg {
	display: block;
	width: 100%;
	height: auto;
}

.atm-brand--cultured-dairy .atm-cheese-splash {
	position: absolute;
	bottom: 0.15rem;
	height: 1.1rem;
	border-radius: 55% 45% 50% 50% / 65% 60% 40% 45%;
	background:
		radial-gradient(ellipse 75% 85% at 30% 55%, #f7d27a 0%, transparent 58%),
		radial-gradient(ellipse 70% 80% at 72% 50%, #f3c55c 0%, transparent 55%),
		radial-gradient(ellipse at center, #e5a93a 0%, rgba(229, 169, 58, 0) 68%);
	opacity: 0;
	transform: scale(0.2);
	transform-origin: 50% 80%;
	pointer-events: none;
	will-change: transform, opacity;
}

.atm-brand--cultured-dairy .atm-cheese-splash::before,
.atm-brand--cultured-dairy .atm-cheese-splash::after {
	content: "";
	position: absolute;
	bottom: 0;
	border-radius: 55% 45% 50% 50%;
	background: #f3c55c;
	opacity: 0.92;
}

.atm-brand--cultured-dairy .atm-cheese-splash::before {
	left: 6%;
	width: 0.55rem;
	height: 0.7rem;
}

.atm-brand--cultured-dairy .atm-cheese-splash::after {
	right: 8%;
	width: 0.7rem;
	height: 0.5rem;
}

/* Cheese wall — organic slippery blob (no straight edges) */
.atm-brand--cultured-dairy .atm-cheese-wall-host {
	isolation: isolate;
}

.atm-brand--cultured-dairy .atm-cheese-wall {
	position: absolute;
	inset: 0;
	z-index: 8;
	pointer-events: none;
	overflow: hidden;
}

.atm-brand--cultured-dairy .atm-cheese-wall__svg {
	position: absolute;
	inset: -12% -6% -30%;
	width: 112%;
	height: 142%;
	display: block;
	overflow: visible;
	/* Soft contact shadow + warm rim so mass reads wet on glass */
	filter:
		drop-shadow(0 18px 28px rgba(120, 80, 10, 0.28))
		drop-shadow(0 2px 10px rgba(255, 236, 180, 0.35));
}

.atm-brand--cultured-dairy .atm-cheese-wall__blob {
	will-change: d;
}

.atm-brand--cultured-dairy .atm-cheese-wall__mass {
	isolation: isolate;
}

.atm-brand--cultured-dairy .atm-cheese-wall__matter {
	pointer-events: none;
}

.atm-brand--cultured-dairy .atm-cheese-wall__tex {
	mix-blend-mode: soft-light;
}

.atm-brand--cultured-dairy .atm-cheese-wall__mottle {
	mix-blend-mode: multiply;
}

.atm-brand--cultured-dairy .atm-cheese-wall__bubble {
	mix-blend-mode: soft-light;
}

.atm-brand--cultured-dairy .atm-cheese-wall__glass-fill {
	pointer-events: none;
}

.atm-brand--cultured-dairy .atm-cheese-wall__hole-lip {
	pointer-events: none;
	fill: none;
	stroke: rgba(120, 75, 15, 0.5);
	stroke-width: 3.5;
	mix-blend-mode: multiply;
}

.atm-brand--cultured-dairy .atm-cheese-wall__rim {
	pointer-events: none;
	fill: none;
	stroke: rgba(160, 100, 20, 0.35);
	stroke-width: 7;
	stroke-linejoin: round;
	mix-blend-mode: multiply;
}

.atm-brand--cultured-dairy .atm-cheese-wall__sheen-path {
	pointer-events: none;
	mix-blend-mode: soft-light;
}

.atm-brand--cultured-dairy .atm-cheese-wall__sheen-path--2 {
	mix-blend-mode: overlay;
	opacity: 0.45;
}

.atm-brand--cultured-dairy .atm-cheese-wall__sheen-band {
	pointer-events: none;
	mix-blend-mode: soft-light;
}

.atm-brand--cultured-dairy .atm-cheese-wall__sheen-band--2 {
	mix-blend-mode: overlay;
}

.atm-brand--cultured-dairy .atm-cheese-wall__spec {
	pointer-events: none;
	mix-blend-mode: screen;
}

/* Packet pour scene — shreds empty onto panel floor */
.atm-brand--cultured-dairy .atm-cheese-pour-host {
	isolation: isolate;
}

.atm-brand--cultured-dairy .atm-cheese-pour {
	position: absolute;
	inset: 0;
	z-index: 7;
	pointer-events: none;
	overflow: hidden;
}

.atm-brand--cultured-dairy .atm-cheese-pour__pack {
	position: absolute;
	left: 50%;
	top: 0;
	/* Cut-open pack — ~25% peeks in (flipped; yPercent set in GSAP). */
	width: min(42rem, 88vw);
	max-width: 560px;
	height: auto;
	margin-left: 0;
	transform-origin: 50% 50%;
	filter: drop-shadow(0 14px 28px rgba(24, 60, 81, 0.32));
	will-change: transform, opacity;
	object-fit: contain;
	object-position: center center;
}

.atm-brand--cultured-dairy .atm-cheese-pour__shreds {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.atm-brand--cultured-dairy .atm-cheese-pour__shred {
	position: absolute;
	left: 0;
	top: 0;
	border-radius: 0.12rem;
	/* Strip silhouette — depth comes from inline gradient + shadow. */
	transform-origin: 50% 50%;
	will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
	.atm-motion-switcher {
		display: none !important;
	}

	.atm-brand--cultured-dairy .atm-cheese-edge,
	.atm-brand--cultured-dairy .atm-cheese-pour,
	.atm-brand--cultured-dairy .atm-cheese-wall {
		display: none !important;
	}

	.atm-brand--cultured-dairy .atm-hero-line {
		opacity: 1 !important;
		transform: none !important;
	}
}
