/* Homepage attention + motion layer (front page only). Signal system: sharp edges, one cobalt accent, no gradients or glows. */

/* ---- Hero load-in ---- */
@keyframes dermyra-rise {
	from { opacity: 0; transform: translateY(26px); }
	to { opacity: 1; transform: none; }
}
@keyframes dermyra-line {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}
.hero-content > * {
	animation: dermyra-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-content > :nth-child(1) { animation-delay: 0.1s; }
.hero-content > :nth-child(2) { animation-delay: 0.25s; }
.hero-content > :nth-child(3) { animation-delay: 0.4s; }
.hero-content > :nth-child(4) { animation-delay: 0.55s; }
.hero-content > :nth-child(5) { animation-delay: 0.7s; }
.hero-content .eyebrow__line {
	transform-origin: left center;
	animation: dermyra-line 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s both;
}
.hero-accent { color: var(--color-accent); }

/* ---- Marquee strip ---- */
@keyframes dermyra-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
.marquee {
	overflow: hidden;
	background: var(--color-black);
	border-top: 1px solid var(--color-gray-dark);
	border-bottom: 1px solid var(--color-gray-dark);
	padding: 22px 0;
}
.marquee__track {
	display: flex;
	width: max-content;
	animation: dermyra-marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
	display: flex;
	align-items: center;
	gap: 36px;
	padding-right: 36px;
	flex-shrink: 0;
}
.marquee__group span {
	font-family: var(--font-heading);
	font-size: 40px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--color-off-white);
}
.marquee__group span.is-outline {
	color: transparent;
	-webkit-text-stroke: 1px var(--color-off-white);
}
.marquee__group i {
	display: block;
	width: 10px;
	height: 10px;
	flex-shrink: 0;
	background: var(--color-accent);
}
@media (min-width: 768px) {
	.marquee { padding: 30px 0; }
	.marquee__group { gap: 56px; padding-right: 56px; }
	.marquee__group span { font-size: 64px; }
}

/* ---- Benefit cards: stagger + hover accent ---- */
.benefits-grid .benefit:nth-child(2) { transition-delay: 0.12s; }
.benefits-grid .benefit:nth-child(3) { transition-delay: 0.24s; }
.benefit {
	position: relative;
	padding-top: 28px;
	border-top: 1px solid var(--color-gray-light);
}
.benefit::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--color-accent);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.benefit .icon { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) {
	.benefit:hover::before { transform: scaleX(1); }
	.benefit:hover .icon { transform: translateY(-4px); }
}

/* ---- Stats row (count-up) ---- */
.stats-row {
	max-width: var(--container-max);
	margin: 72px auto 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 36px;
	text-align: center;
}
.stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding-top: 24px;
	border-top: 2px solid var(--color-black);
}
.stat__num {
	font-family: var(--font-heading);
	font-size: 56px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	color: var(--color-accent);
}
.stat__label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--color-gray-dark);
}
@media (min-width: 768px) {
	.stats-row { grid-template-columns: repeat(3, 1fr); gap: 32px; }
	.stat__num { font-size: 80px; }
}

@media (prefers-reduced-motion: reduce) {
	.hero-content > *,
	.hero-content .eyebrow__line { animation: none; }
	.marquee__track { animation: none; }
	.benefit::before, .benefit .icon { transition: none; }
}

/* Anchor target for the hero's "How it works" button: leave room for the sticky header. */
#how-it-works { scroll-margin-top: 104px; }

/* Hero: poster image paints first; the video (desktop, good connection only) fades in over it. */
.hero-poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.08);
	will-change: transform;
}
.hero-video {
	opacity: 0;
	transition: opacity 0.8s ease;
}
.hero-video.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
	.hero-video { transition: none; }
}

/* Hero image sequence (scrubbed by scroll). The poster shows until the first frame is drawn. */
.hero-frames {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: scale(1.08);
	will-change: transform;
	opacity: 0;
	transition: opacity 0.4s ease;
}
.hero-frames.is-ready { opacity: 1; }
