/* TOPの演出と、作り手・お手紙・出店者のカード表示。 */
.p-front {
	--front-hover-duration: 220ms;
}

@media (hover: hover) {
	.p-front :where(a, button):hover {
		--front-interaction: 1;
	}
}

.p-front :where(a, button):is(:focus-visible, :active) {
	--front-interaction: 1;
}

.p-front .p-news__row {
	background-color: rgb(255 255 255 / calc(.1 * var(--front-interaction, 0)));
	transition: background-color var(--front-hover-duration) ease;
}

@media (prefers-reduced-motion: no-preference) {
	.p-front .c-frameButton--cta > .c-frameButton__arrow {
		transition-timing-function: cubic-bezier(.22, 1, .36, 1);
	}

	.p-front :is(.c-makerCard__link .c-makerCard__image, a.p-history__image img) {
		scale: calc(1 + .03 * var(--front-interaction, 0));
		transition: scale 360ms cubic-bezier(.22, 1, .36, 1);
	}

	.p-front .p-instagram__external {
		translate: calc(2px * var(--front-interaction, 0)) calc(-2px * var(--front-interaction, 0));
		transition: translate var(--front-hover-duration) cubic-bezier(.22, 1, .36, 1);
	}

	.kg-front-animation :is([data-front-reveal="waiting"]:not(.p-event__panels, :focus-within, :target), h2[data-front-reveal="waiting"] + .c-sectionHeading__dot) {
		opacity: 0;
	}

	.kg-front-animation :is([data-front-reveal="playing"]:not(.p-event__panels, :focus-within, :target), h2[data-front-reveal="playing"] + .c-sectionHeading__dot) {
		animation: kg-front-appear var(--front-reveal-duration, 820ms) cubic-bezier(.2, .65, .32, 1) var(--front-reveal-delay, var(--front-section-delay, 0ms)) both;
	}

	.kg-front-animation .p-front [data-front-reveal="letters"] :is(.front-reveal-letter, .p-event__dot) {
		animation: kg-front-letter 620ms cubic-bezier(.2, .65, .32, 1) var(--front-letter-delay, 0ms) both;
	}

	.p-front :is(.p-about__copy, .p-event__block, .p-event__notice, .p-makers__lead, .p-news__list, .p-supporters__lines) {
		--front-section-delay: 100ms;
	}

	.p-front :is(.p-event__photos, .p-history__image, .p-supporters__photo, .p-instagram__feed) {
		--front-section-delay: 120ms;
		--front-reveal-distance: 16px;
	}

	:is(.p-makers__card, .p-makersDirectory__grid > .c-makerCard, .ll-letter-grid > .ll-letter, .p-eventPage__makers > .p-eventPage__maker)[data-front-reveal] {
		--front-reveal-duration: 460ms;
		--front-reveal-distance: 18px;
	}

	.kg-front-animation .p-event__panels[data-front-reveal="waiting"]:not(:focus-within) .p-event__panel::before {
		clip-path: inset(0 100% 0 0);
	}

	.kg-front-animation .p-event__panels[data-front-reveal="playing"] .p-event__panel::before {
		animation: kg-front-frame 560ms cubic-bezier(.22, 1, .36, 1) both;
	}
}

@keyframes kg-front-appear {
	from { opacity: .08; translate: 0 var(--front-reveal-distance, 24px); }
	32% { opacity: .7; }
	to { opacity: 1; translate: none; }
}

@keyframes kg-front-letter {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes kg-front-frame {
	from { clip-path: inset(0 calc(100% - 1px) 0 0); }
	to { clip-path: inset(0); }
}

@media (prefers-reduced-motion: reduce) {
	.p-front {
		--front-hover-duration: 0ms;
	}

	.p-front .c-frameButton--cta {
		--kg-hover-distance: 0px;
	}
}
