/*
 * Homepage "Expert-Led Care" section — copy column plus a 3-card photo
 * cluster that tilts toward the pointer. Mirrors .tilt-card in
 * website_reference/homepage_6.html.
 *
 * The tilt itself is driven by assets/js/log-hp-tilt.js, which writes
 * --tilt-x/--tilt-y/--shine-x/--shine-y onto each card.
 *
 * @package log-core
 */

.hp-expert {
	padding: 80px 0;
	background: var(--paper-50);
}

.hp-expert-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 64px;
	align-items: center;
}

.hp-expert-copy {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ── Two supporting feature cards ── */
.hp-expert-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	padding-top: 24px;
}

.hp-ec {
	background: var(--surface);
	padding: 24px;
	border-radius: var(--r-sm);
	border: 1px solid rgba(238, 238, 238, .8);
	transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.hp-ec:hover {
	border-color: var(--gold-600);
	box-shadow: var(--shadow-md);
}

.hp-ec-icon {
	display: inline-flex;
	margin-bottom: 12px;
	color: var(--gold-600);
	transition: transform .3s var(--ease);
}

.hp-ec:hover .hp-ec-icon {
	transform: scale(1.1);
}

.hp-ec-icon .icon {
	width: 24px;
	height: 24px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.hp-ec h4 {
	font-family: var(--display);
	font-size: 16px;
	font-weight: 700;
	color: var(--ink-900);
	margin: 0 0 8px;
}

.hp-ec p {
	font-size: 14px;
	line-height: 20px;
	color: var(--gray-mid);
	margin: 0;
}

/* ── Tilt card cluster ── */
.hp-tilt-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	perspective: 1200px;
}

.hp-tilt-col {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hp-tilt {
	position: relative;
	border-radius: var(--r-sm);
	overflow: hidden;
	transform-style: preserve-3d;
	will-change: transform;
	box-shadow: var(--shadow-md);
	transition: box-shadow .15s ease, transform .4s var(--ease);
	transform: perspective(1200px)
		rotateX(var(--tilt-x, 0deg))
		rotateY(var(--tilt-y, 0deg));
}

.hp-tilt:hover {
	box-shadow: 0 30px 60px rgba(10, 10, 10, .25), 0 8px 20px rgba(0, 0, 0, .15);
	/* Pointer-driven frames land every rAF, so drop the easing while hovering
	   or each frame fights the previous transition and the tilt lags. */
	transition: box-shadow .15s ease;
}

.hp-tilt--tall { height: 408px; }
.hp-tilt--short { height: 192px; }
.hp-tilt--stat { height: 192px; }

.hp-tilt-inner {
	position: relative;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
}

.hp-tilt-inner img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hp-tilt-gloss {
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: var(--r-sm);
	background: linear-gradient(135deg, rgba(255, 255, 255, .18) 0%, transparent 60%);
}

/* Specular highlight that tracks the pointer. */
.hp-tilt-shine {
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: var(--r-sm);
	opacity: 0;
	transition: opacity .3s ease;
	background: radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 50%),
			rgba(255, 255, 255, .22) 0%,
			transparent 55%);
}

.hp-tilt:hover .hp-tilt-shine {
	opacity: 1;
}

/* ── Stat card ── */
.hp-tilt--stat {
	background: var(--ink-900);
	color: #fff;
}

.hp-tilt--stat .hp-tilt-inner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 32px;
}

.hp-tilt--stat h3 {
	position: relative;
	z-index: 1;
	font-family: var(--display);
	font-size: 30px;
	font-weight: 700;
	margin: 0 0 4px;
	color: #fff;
}

.hp-tilt--stat p {
	position: relative;
	z-index: 1;
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .05em;
	text-transform: uppercase;
	opacity: .7;
	margin: 0;
}

.hp-stat-orb {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	background: rgba(212, 175, 55, .12);
}

.hp-stat-orb--a {
	top: -30px;
	right: -30px;
	width: 120px;
	height: 120px;
}

.hp-stat-orb--b {
	bottom: -20px;
	left: -20px;
	width: 80px;
	height: 80px;
	background: rgba(212, 175, 55, .08);
}

@media (max-width: 1024px) {
	.hp-expert-grid {
		grid-template-columns: 1fr;
		gap: 48px;
	}
}

@media (max-width: 767px) {
	.hp-expert {
		padding: 60px 0;
	}

	.hp-expert-cards {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.hp-tilt--tall { height: 300px; }
	.hp-tilt--short,
	.hp-tilt--stat { height: 142px; }

	.hp-tilt--stat .hp-tilt-inner { padding: 20px; }
	.hp-tilt--stat h3 { font-size: 24px; }
}

/* Tilt is pointer-only; touch devices get the static cluster. */
@media (hover: none), (prefers-reduced-motion: reduce) {
	.hp-tilt {
		transform: none;
		transition: none;
	}

	.hp-tilt-shine {
		display: none;
	}
}
