/* Motion layer: ambient animations and interactive effects. */

/* Scroll progress */
.scroll-progress {
	position: fixed;
	inset: 0 0 auto;
	z-index: 1000;
	height: 2px;
	background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold-light), var(--color-gold));
	transform: scaleX(var(--scroll-progress, 0));
	transform-origin: left center;
	pointer-events: none;
}

/* Cursor glow (desktop only, enabled by JS) */
.cursor-glow {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1;
	width: 520px;
	height: 520px;
	margin: -260px 0 0 -260px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(212, 175, 101, 0.07) 0%, rgba(184, 138, 61, 0.03) 35%, transparent 70%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.6s ease;
	mix-blend-mode: screen;
	will-change: transform;
}

.cursor-glow.is-active {
	opacity: 1;
}

/* Hero: slow zoom + mouse parallax */
.home-hero::before {
	transform: scale(1.06);
	translate: var(--hero-x, 0) var(--hero-y, 0);
	transition: translate 1.2s cubic-bezier(0.16, 1, 0.3, 1);
	animation: heroKenBurns 28s ease-in-out infinite alternate;
	will-change: transform;
}

@keyframes heroKenBurns {
	from { transform: scale(1.06); }
	to { transform: scale(1.16); }
}

.home-hero__particles {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.home-hero__content {
	position: relative;
	z-index: 1;
}

/* Hero intro: staggered blur-in */
.hero-word {
	display: inline-block;
}

.hero-word > span {
	display: inline-block;
	animation: heroIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
	animation-delay: calc(0.25s + var(--i, 0) * 0.11s);
}

.hero-intro .artist-name,
.hero-intro > p,
.hero-intro .hero-actions,
.hero-intro .hero-stats > div,
.home-hero__scroll {
	animation: heroIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-intro .artist-name { animation-delay: 0.1s; }
.hero-intro > p { animation-delay: 0.85s; }
.hero-intro .hero-actions { animation-delay: 1s; }
.hero-intro .hero-stats > div:nth-child(1) { animation-delay: 1.2s; }
.hero-intro .hero-stats > div:nth-child(2) { animation-delay: 1.3s; }
.hero-intro .hero-stats > div:nth-child(3) { animation-delay: 1.4s; }
.home-hero__scroll { animation-delay: 1.8s; }

@keyframes heroIn {
	from {
		opacity: 0;
		transform: translateY(0.45em);
		filter: blur(12px);
	}
	to {
		opacity: 1;
		transform: none;
		filter: blur(0);
	}
}

.hero-intro .artist-name::after {
	transform-origin: left center;
	animation: lineGrow 1.2s 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes lineGrow {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

/* Gold text sheen, travelling across words */
.hero-title .gold .hero-word > span {
	padding-bottom: 0.08em;
	background: linear-gradient(110deg, var(--color-gold-light) 0%, var(--color-gold-light) 40%, #fff3d6 50%, var(--color-gold-light) 60%, var(--color-gold-light) 100%);
	background-size: 300% 100%;
	background-position: 100% 0;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation-name: heroIn, goldSheen;
	animation-duration: 1.2s, 7s;
	animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1), ease-in-out;
	animation-iteration-count: 1, infinite;
	animation-fill-mode: both, none;
	animation-delay: calc(0.25s + var(--i, 0) * 0.11s), calc(2s + var(--i, 0) * 0.15s);
}

@keyframes goldSheen {
	0% { background-position: 100% 0; }
	30%, 100% { background-position: 0 0; }
}

/* Scroll cue */
.home-hero__scroll {
	position: absolute;
	bottom: 28px;
	left: 50%;
	z-index: 2;
	display: grid;
	justify-items: center;
	gap: 12px;
	margin-left: -30px;
	width: 60px;
	color: var(--color-text-muted);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	transition: color 0.3s ease;
}

.home-hero__scroll:hover {
	color: var(--color-gold-light);
}

.home-hero__scroll i {
	position: relative;
	display: block;
	width: 1px;
	height: 54px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.12);
}

.home-hero__scroll i::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 18px;
	background: var(--color-gold-light);
	animation: scrollCue 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollCue {
	from { transform: translateY(-18px); }
	to { transform: translateY(54px); }
}

/* Buttons: periodic shine + magnetic offset */
.btn {
	position: relative;
	overflow: hidden;
	translate: var(--mag-x, 0) var(--mag-y, 0);
	transition: color 0.35s ease, background 0.35s ease, border-color 0.35s ease, transform 0.35s ease, translate 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.btn-primary::after {
	content: "";
	position: absolute;
	top: 0;
	left: -60%;
	width: 40%;
	height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
	transform: skewX(-20deg);
	animation: btnShine 5s ease-in-out 2.5s infinite;
	pointer-events: none;
}

@keyframes btnShine {
	0% { left: -60%; }
	22%, 100% { left: 130%; }
}

/* Marquee band */
.marquee {
	position: relative;
	display: flex;
	overflow: hidden;
	padding: 22px 0;
	background: #060606;
	mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee::before,
.marquee::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(212, 175, 101, 0.45), transparent);
}

.marquee::before { top: 0; }
.marquee::after { bottom: 0; }

.marquee__track {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 48px;
	padding-right: 48px;
	animation: marquee 60s linear infinite;
}

.marquee__track span {
	color: var(--color-text-soft);
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.32em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.marquee__track i {
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	border: 1px solid var(--color-gold);
	transform: rotate(45deg);
}

.marquee__track i:nth-of-type(odd) {
	background: var(--color-gold);
}

@keyframes marquee {
	to { transform: translateX(-100%); }
}

/* Section labels: line draws in on reveal */
.js-reveal .reveal .section-label::after {
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 1.1s 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-reveal .reveal.is-visible .section-label::after {
	transform: scaleX(1);
}

/* Image curtain reveal.
   Clip the image inside, never the observed .reveal element itself:
   a fully clipped target never reports as intersecting, so it would stay hidden. */
.js-reveal .artist-preview__image.reveal > img,
.js-reveal .inspiration-card.reveal > img {
	clip-path: inset(0 0 100% 0);
	transition:
		transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
		opacity 0.35s ease,
		clip-path 1.4s 0.1s cubic-bezier(0.77, 0, 0.18, 1);
}

.js-reveal .artist-preview__image.reveal.is-visible > img,
.js-reveal .inspiration-card.reveal.is-visible > img {
	clip-path: inset(0 0 0 0);
}

/* Scroll parallax */
.split-band::before {
	inset: -14% 0;
	translate: 0 var(--parallax, 0);
	will-change: translate;
}

.artist-preview__image img {
	scale: 1.12;
	translate: 0 var(--parallax, 0);
	will-change: translate;
}

/* Cursor spotlight on cards */
.artwork-card,
.value-card,
.process-step,
.inspiration-card {
	position: relative;
}

.artwork-card::after,
.value-card::after,
.process-step::after,
.inspiration-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(212, 175, 101, 0.13), transparent 45%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.artwork-card:hover::after,
.value-card:hover::after,
.process-step:hover::after,
.inspiration-card:hover::after {
	opacity: 1;
}

/* Process: top line draws in, icons float */
.process-step {
	border-top-color: transparent;
}

.process-step::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	width: 100%;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
	transform: scaleX(0);
	transition: transform 1.4s 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-step.is-visible::before,
html:not(.js-reveal) .process-step::before {
	transform: scaleX(1);
}

.process-step__icon,
.value-card > svg {
	animation: float 6s ease-in-out infinite;
}

.process-step:nth-child(2) .process-step__icon,
.value-card:nth-child(2) > svg { animation-delay: -1.5s; }
.process-step:nth-child(3) .process-step__icon,
.value-card:nth-child(3) > svg { animation-delay: -3s; }
.value-card:nth-child(4) > svg { animation-delay: -4.5s; }

@keyframes float {
	0%, 100% { translate: 0 0; }
	50% { translate: 0 -7px; }
}

@media (max-width: 768px) {
	.home-hero__scroll {
		display: none;
	}

	.marquee {
		padding: 18px 0;
	}

	.marquee__track {
		gap: 28px;
		padding-right: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
	}

	.hero-word > span,
	.hero-intro *,
	.home-hero__scroll {
		opacity: 1 !important;
		filter: none !important;
		transform: none !important;
	}

	.js-reveal .artist-preview__image.reveal > img,
	.js-reveal .inspiration-card.reveal > img,
	.js-reveal .reveal .section-label::after,
	.process-step::before {
		clip-path: none;
		transform: none;
	}

	.cursor-glow,
	.home-hero__particles {
		display: none;
	}
}

/* ===== Subpages ===== */

/* Page hero: same living background as home */
.page-hero::before {
	transform: scale(1.06);
	translate: var(--hero-x, 0) var(--hero-y, 0);
	transition: translate 1.2s cubic-bezier(0.16, 1, 0.3, 1);
	animation: heroKenBurns 28s ease-in-out infinite alternate;
	will-change: transform;
}

.page-hero__content {
	position: relative;
	z-index: 1;
}

/* Page hero intro: children cascade in */
.js-reveal .page-hero__content.reveal {
	opacity: 1;
	transform: none;
}

.page-hero__content > *,
.hero-features > span {
	animation: heroIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-hero__content > :nth-child(1) { animation-delay: 0.1s; }
.page-hero__content > :nth-child(2) { animation-delay: 0.25s; }
.page-hero__content > :nth-child(3) { animation-delay: 0.45s; }
.page-hero__content > :nth-child(4) { animation-delay: 0.6s; }
.page-hero__content > :nth-child(5) { animation-delay: 0.75s; }
.page-hero__content > :nth-child(6) { animation-delay: 0.9s; }
.hero-features > span:nth-child(1) { animation-delay: 0.9s; }
.hero-features > span:nth-child(2) { animation-delay: 1s; }
.hero-features > span:nth-child(3) { animation-delay: 1.1s; }

.page-hero__content > .section-label::after {
	transform-origin: left center;
	animation: lineGrow 1.2s 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Page hero title: slow gold light passing through */
.page-hero h1 {
	background: linear-gradient(110deg, var(--color-text-main) 0%, var(--color-text-main) 42%, var(--color-gold-light) 50%, var(--color-text-main) 58%, var(--color-text-main) 100%);
	background-size: 300% 100%;
	background-position: 100% 0;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation-name: heroIn, goldSheen;
	animation-duration: 1.2s, 8s;
	animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1), ease-in-out;
	animation-iteration-count: 1, infinite;
	animation-fill-mode: both, none;
	animation-delay: 0.25s, 2s;
}

/* Hero feature chips */
.hero-features span {
	padding: 10px 16px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.03);
	backdrop-filter: blur(8px);
	transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.hero-features span:hover {
	border-color: rgba(184, 138, 61, 0.5);
	background: rgba(184, 138, 61, 0.08);
	color: var(--color-text-main);
}

.hero-features svg {
	width: 16px;
	height: 16px;
}

/* Signature: handwriting reveal */
.signature {
	clip-path: inset(-25% 100% -25% -10%);
	animation: signatureWrite 2.4s 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes signatureWrite {
	to { clip-path: inset(-25% -10% -25% -10%); }
}

/* Pulsing rings on contact icons */
.contact-details__icon,
.single-inquiry__icon {
	position: relative;
}

.contact-details__icon::after,
.single-inquiry__icon::after {
	content: "";
	position: absolute;
	inset: -1px;
	border: 1px solid var(--color-gold);
	border-radius: inherit;
	opacity: 0;
	animation: ringPulse 3.2s ease-out infinite;
	pointer-events: none;
}

.contact-details li:nth-child(2) .contact-details__icon::after { animation-delay: 1.05s; }
.contact-details li:nth-child(3) .contact-details__icon::after { animation-delay: 2.1s; }

@keyframes ringPulse {
	0% { opacity: 0.7; transform: scale(1); }
	70%, 100% { opacity: 0; transform: scale(1.55); }
}

.contact-details li {
	transition: translate 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-details li:hover {
	translate: 6px 0;
}

/* Spotlight on more surfaces */
.single-inquiry,
.single-status-card {
	position: relative;
	overflow: hidden;
}

.single-inquiry::after,
.single-status-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(212, 175, 101, 0.12), transparent 45%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.single-inquiry:hover::after,
.single-status-card:hover::after {
	opacity: 1;
}

/* Single artwork: image breathes in, thumbs lift */
.single-artwork__image img {
	transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.single-artwork__image:hover img {
	transform: scale(1.03);
}

.single-artwork__thumbs button {
	transition: translate 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.single-artwork__thumbs button:hover {
	translate: 0 -4px;
}

.js-reveal .single-artwork__media.reveal .single-artwork__image {
	clip-path: inset(0 0 100% 0);
	transition: clip-path 1.4s 0.1s cubic-bezier(0.77, 0, 0.18, 1);
}

.js-reveal .single-artwork__media.reveal.is-visible .single-artwork__image {
	clip-path: inset(0 0 0 0);
}

/* Section titles: soft blur-in on reveal */
.js-reveal .reveal .section-title {
	filter: blur(8px);
	transition: filter 1.2s 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-reveal .reveal.is-visible .section-title {
	filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
	.page-hero__content > *,
	.hero-features > span {
		opacity: 1 !important;
		filter: none !important;
		transform: none !important;
	}

	.signature,
	.js-reveal .single-artwork__media.reveal .single-artwork__image {
		clip-path: none;
	}

	.js-reveal .reveal .section-title {
		filter: none;
	}
}
