/**
 * My Help Center — home.css (front page only).
 */

/* Hero ----------------------------------------------------------------------- */

.hc-home-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2.5rem, 1.5rem + 3vw, 4rem);
	text-align: center;
}

/* Soft color fields in the corner (Fresha-like), drifting very slowly. */
.hc-home-hero::before,
.hc-home-hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	border-radius: 50%;
	pointer-events: none;
}

.hc-home-hero::before {
	inset-block-start: -18rem;
	inset-inline-end: -12rem;
	inline-size: 42rem;
	block-size: 34rem;
	background:
		radial-gradient(closest-side at 40% 45%, color-mix(in srgb, #8b5cf6 22%, transparent), transparent),
		radial-gradient(closest-side at 70% 60%, color-mix(in srgb, #38bdf8 18%, transparent), transparent);
}

.hc-home-hero::after {
	inset-block-start: 4rem;
	inset-inline-start: -16rem;
	inline-size: 32rem;
	block-size: 26rem;
	background: radial-gradient(closest-side, color-mix(in srgb, #ff5a86 11%, transparent), transparent);
}

.hc-home-hero__inner {
	display: grid;
	justify-items: center;
	gap: var(--space-5);
}

.hc-home-hero__art img {
	inline-size: auto;
	max-block-size: 10rem;
}

.hc-home-hero__title {
	max-inline-size: 48rem;
	font-size: var(--text-4xl);
	font-weight: var(--weight-heading);
	line-height: var(--leading-display);
	letter-spacing: -0.01em;
}

.hc-home-hero__description {
	max-inline-size: 40rem;
	margin-block-start: calc(var(--space-2) * -1);
	font-size: var(--text-md);
	line-height: var(--leading-prose);
	color: var(--color-text-muted);
}

.hc-home-hero .hc-search--hero {
	margin-block-start: var(--space-2);
}

.hc-home-hero .hc-search__field {
	box-shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 12px 32px -16px rgb(16 24 40 / 0.18);
}

.hc-home-hero__links {
	inline-size: calc(100% + var(--container-padding) * 2);
}

@media (min-width: 40rem) {
	.hc-home-hero__links {
		inline-size: 100%;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.hc-home-hero::before {
		animation: hc-drift 26s ease-in-out infinite;
	}

	.hc-home-hero::after {
		animation: hc-drift 32s ease-in-out -9s infinite reverse;
	}

	.hc-home-hero__inner > * {
		animation: hc-fade-up 760ms var(--ease-emphasized) both;
	}

	.hc-home-hero__inner > .hc-home-hero__title {
		animation-name: hc-rise;
	}

	.hc-home-hero__inner > :nth-child(2) {
		animation-delay: 70ms;
	}

	.hc-home-hero__inner > :nth-child(3) {
		animation-delay: 140ms;
	}

	.hc-home-hero__inner > :nth-child(n + 4) {
		animation-delay: 210ms;
	}
}

/* Sections ------------------------------------------------------------------- */

.hc-home {
	padding-block-start: var(--space-2);
}

.hc-home-courses {
	gap: var(--grid-gap);
}

/* Entry cards: stacked rows on phones, side by side from tablets. */
.hc-home-entry {
	display: grid;
	gap: var(--space-3);
}

@media (min-width: 48rem) {
	.hc-home-entry {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--grid-gap);
	}
}

/* Banner: gradient card; the image is shown whole, floats and follows the pointer. ------
 * assets/js/tilt.js eases the pointer position into --_x / --_y (-1…1). */

.hc-home-banner {
	--_from: color-mix(in srgb, var(--color-primary) 55%, #7c3aed);
	--_to: color-mix(in srgb, var(--color-primary) 35%, #c026d3);
	--_x: 0;
	--_y: 0;

	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-areas:
		"media"
		"body";
	overflow: hidden;
	border-radius: var(--radius-xl);
	background: linear-gradient(160deg, var(--_from), var(--_to));
	color: #fff;
	transition:
		box-shadow var(--duration-slow) var(--ease-standard),
		transform var(--duration-slow) var(--ease-emphasized);
}

/* Light sheen across the top. */
.hc-home-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(60% 50% at 80% 0%, rgb(255 255 255 / 0.28), transparent 70%),
		radial-gradient(50% 60% at 0% 100%, rgb(255 255 255 / 0.12), transparent 70%);
}

/* Glass orbs behind the image move against the pointer for depth. */
.hc-home-banner__orb {
	position: absolute;
	z-index: -1;
	border: 1px solid rgb(255 255 255 / 0.35);
	border-radius: 999px;
	background: linear-gradient(145deg, rgb(255 255 255 / 0.32), rgb(255 255 255 / 0.04));
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4);
	pointer-events: none;
	transform: translate3d(calc(var(--_x) * var(--_depth)), calc(var(--_y) * var(--_depth)), 0);
}

.hc-home-banner__orb--one {
	--_depth: -28px;

	inset-block-start: -4rem;
	inset-inline-end: 18%;
	inline-size: clamp(7rem, 4rem + 9vw, 12rem);
	aspect-ratio: 1;
}

.hc-home-banner__orb--two {
	--_depth: -44px;

	inset-block-end: 18%;
	inset-inline-end: -3rem;
	inline-size: clamp(9rem, 6rem + 14vw, 20rem);
	block-size: clamp(3.5rem, 2.5rem + 4vw, 6rem);
	rotate: -24deg;
}

/* Soft light that follows the pointer. */
.hc-home-banner__glare {
	position: absolute;
	inset-block-start: calc(50% - 20rem);
	inset-inline-start: calc(50% - 20rem);
	z-index: -1;
	inline-size: 40rem;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgb(255 255 255 / 0.22), transparent);
	opacity: 0;
	pointer-events: none;
	transform: translate3d(calc(var(--_x) * 45%), calc(var(--_y) * 30%), 0);
	transition: opacity 600ms var(--ease-standard);
}

.hc-home-banner.is-tilting .hc-home-banner__glare {
	opacity: 1;
}

.hc-home-banner__media {
	grid-area: media;
	display: grid;
	place-items: center;
	padding: clamp(1.25rem, 0.5rem + 3vw, 2.5rem) clamp(1rem, 0.5rem + 3vw, 3rem) 0;
	perspective: 1400px;
}

.hc-home-banner__float {
	inline-size: 100%;
	transform-style: preserve-3d;
}

.hc-home-banner__image {
	display: block;
	inline-size: 100%;
	block-size: auto;
	border-radius: var(--radius-lg);
	filter: drop-shadow(0 24px 32px rgb(20 10 60 / 0.22));
	backface-visibility: hidden;
	transform:
		rotateX(calc(var(--_y) * -7deg))
		rotateY(calc(var(--_x) * 9deg))
		translate3d(calc(var(--_x) * 14px), calc(var(--_y) * 10px), 0);
}

.hc-home-banner__body {
	grid-area: body;
	position: relative;
	align-self: center;
	padding: clamp(1.25rem, 0.9rem + 1.5vw, 2rem) clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
}

.hc-home-banner__title {
	font-size: var(--text-3xl);
	line-height: var(--leading-heading);
	color: inherit;
}

.hc-home-banner__title a {
	color: inherit;
	text-decoration: none;
}

.hc-home-banner__text {
	margin-block-start: var(--space-1);
	font-size: var(--text-md);
	color: rgb(255 255 255 / 0.88);
}

@media (prefers-reduced-motion: no-preference) {
	.hc-home-banner__float {
		animation: hc-banner-float 7s ease-in-out infinite;
	}

	.hc-home-banner__orb--one {
		animation: hc-float 9s ease-in-out -3s infinite;
	}

	.hc-home-banner__orb--two {
		animation: hc-float 11s ease-in-out -6s infinite;
	}
}

@keyframes hc-banner-float {
	0%,
	100% {
		translate: 0 0;
	}

	50% {
		translate: 0 -12px;
	}
}

@media (hover: hover) {
	.hc-home-banner.hc-card--interactive:hover {
		box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--_from) 70%, transparent);
		transform: translateY(-3px);
	}
}

.hc-home-banner:has(.hc-stretched-link:focus-visible) {
	outline: 2px solid var(--color-primary);
	outline-offset: 3px;
}

/* Side by side on large screens: text at the start, the image beside it. */
@media (min-width: 64rem) {
	.hc-home-banner {
		grid-template-areas: "body media";
		grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
		align-items: center;
	}

	.hc-home-banner__media {
		padding-block: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
		padding-inline: 0 clamp(1rem, 0.5rem + 1vw, 2rem);
	}

	.hc-home-banner__body {
		padding-inline: clamp(2rem, 1rem + 2.5vw, 3.5rem) var(--space-4);
	}

	.hc-home-banner__title {
		font-size: var(--text-4xl);
	}
}
