/**
 * Home Hero — Q graphic, timeline nav, panel swap.
 */

.home-hero {
	--home-hero-accent: var(--color-primary, #0f9ed5);
	background: #000;
	color: #fff;
	display: block;
	isolation: isolate;
	min-height: min(100dvh, 56rem);
	overflow: hidden;
	position: relative;
	width: 100%;
}

.home-hero__media {
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 0;
}

.home-hero__media-default {
	background-color: #000;
	inset: 0;
	position: absolute;
}

/* Panel background image disabled
.home-hero__panel-bg {
	inset: 0;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	position: absolute;
	transition: opacity 0.45s ease;
	width: 100%;
}

.home-hero.has-active-panel .home-hero__panel-bg.is-active {
	opacity: 1;
}
*/

.home-hero__overlay {
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 1;
}

.home-hero__overlay-top {
	background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 100%);
	height: 20%;
	left: 0;
	pointer-events: none;
	position: absolute;
	right: 0;
	top: 0;
	z-index: 1;
}

.home-hero__overlay-bottom {
	background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 100%);
	bottom: 0;
	height: 50%;
	left: 0;
	pointer-events: none;
	position: absolute;
	right: 0;
	z-index: 1;
}

.home-hero__overlay::after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: var(--home-hero-dots);
	background-position: center;
	background-repeat: repeat;
	background-size: auto;
	opacity: 0.7;
	pointer-events: none;
}

.home-hero__inner {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	margin: 0 auto;
	max-width: var(--content-max-width, 90rem);
	min-height: inherit;
	padding: 7rem var(--content-gutter, 1.25rem) 2rem;
	position: relative;
	z-index: 2;
	gap: 2rem;
}

.home-hero__stage {
	align-items: center;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	justify-content: center;
	position: relative;
	text-align: center;
	width: 100%;
}

.home-hero__q {
	display: block;
	left: 50%;
	max-width: min(24rem, 72vw);
	pointer-events: none;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -52%);
	transition: opacity 0.4s ease;
	width: 100%;
	z-index: 1;
}

.home-hero.has-active-panel .home-hero__q-front-wrap {
	opacity: 0;
}

.home-hero__q-hitarea {
	height: auto;
	left: 50%;
	max-width: min(24rem, 72vw);
	overflow: visible;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -52%);
	width: 100%;
	z-index: 2;
}

.home-hero__q-img {
	display: block;
	height: auto;
	width: 100%;
}

.home-hero__default {
	max-width: 60rem;
	position: relative;
}

.home-hero__headline--layer {
	position: relative;
	z-index: 2;
}

.home-hero__q-front-wrap {
	aspect-ratio: 880 / 817;
	left: 50%;
	max-width: min(24rem, 72vw);
	pointer-events: none;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -52%);
	width: 100%;
	z-index: 3;
}

.home-hero__q-front-wrap::before {
	content: '';
	position: absolute;
	inset: 0;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	-webkit-mask-image: var(--home-hero-q-mask);
	mask-image: var(--home-hero-q-mask);
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	transition: backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease;
	z-index: 0;
	transform: scale(1.06);
}

@media (max-width: 1023px) {
	.home-hero__q-front-wrap::before {
		-webkit-backdrop-filter: blur(0.5px);
		backdrop-filter: blur(0.5px);
	}
	.home-hero__intro{
		color: #efefef;
	}
}

.home-hero.is-q-hover .home-hero__q-front-wrap::before {
	-webkit-backdrop-filter: blur(1px);
	backdrop-filter: blur(1px);
}

.home-hero.has-active-panel .home-hero__q-front-wrap {
	opacity: 0;
}

.home-hero__intro--layer {
	position: relative;
	z-index: 4;
}

.home-hero__headline {
	color: #fff;
	font-family: var(--font-heading-family, var(--font-family-heading));
	font-size: clamp(1.875rem, 4.2vw, 6rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.08;
	margin: 0 auto;
	max-width: 12em;
	text-shadow: 0 0 0.35em rgb(0 0 0 / 0.65);
	white-space: pre-line;
}

.home-hero__intro {
	color: #ABABAB;
	text-align: center;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	max-width: 40rem;
	margin: 0.5rem auto 0;
	text-shadow: 0 0 2px black;
}

.home-hero__timeline-copy {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.875rem;
	left: 0;
	line-height: 1.5;
	margin: 0;
	max-width: 16rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
	visibility: hidden;
}

.home-hero__timeline-btn.is-active .home-hero__timeline-copy,
.home-hero__timeline-item:has(.home-hero__timeline-btn:hover) .home-hero__timeline-copy,
.home-hero__timeline-item:has(.home-hero__timeline-btn:focus-visible) .home-hero__timeline-copy {
	opacity: 1;
	visibility: visible;
}

.home-hero__panel-cta {
	margin-top: 1.5rem;
}

.home-hero__timeline {
	margin-top: clamp(2rem, 6vh, 4rem);
	padding-bottom: 0.5rem;
	width: 100%;
}

.home-hero__timeline-list {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: 1fr;
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.home-hero__timeline-list > * {
	position: relative;
}

.home-hero__timeline-list::before {
	background: rgb(255 255 255 / 0.2);
	content: '';
	display: none;
	height: 1px;
	left: 0;
	position: absolute;
	right: 0;
	top: 0.85rem;
}

.home-hero__timeline-btn {
	align-items: flex-start;
	background: transparent;
	border: 0;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 0.5rem 0.25rem;
	text-align: left;
	text-decoration: none;
	transition: color 0.25s ease;
	width: 100%;
}

.home-hero__timeline-btn:hover,
.home-hero__timeline-btn:focus-visible,
.home-hero__timeline-btn.is-active {
	color: #fff;
}

.home-hero__timeline-btn:focus-visible {
	outline: 2px solid var(--home-hero-accent);
	outline-offset: 0.25rem;
}

.home-hero__timeline-number {
	font-family: var(--font-heading-family, var(--font-family-heading));
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1;
}

/* Default: show short label, hide headline + copy */
.home-hero__timeline-label {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	max-height: 5rem;
	max-width: 20rem;
	opacity: 1;
	overflow: hidden;
	transition: max-height 0.35s ease, opacity 0.2s ease;
}

.home-hero__timeline-headline {
	font-family: var(--font-heading-family, var(--font-family-heading));
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1.2;
	max-width: 20rem;
	opacity: 0;
	transition: max-height 0.4s ease, opacity 0.3s ease;
}

.home-hero__timeline-copy {
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.5;
	margin: 0.25rem 0 0;
	max-height: 0;
	max-width: 20rem;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, opacity 0.3s ease;
}

.home-hero__timeline-panel {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

/* Hover / active: swap label → headline, reveal copy */
.home-hero__timeline-btn:hover .home-hero__timeline-label,
.home-hero__timeline-btn:focus-visible .home-hero__timeline-label,
.home-hero__timeline-btn.is-active .home-hero__timeline-label {
	max-height: 0;
	opacity: 0;
}

.home-hero__timeline-btn:hover .home-hero__timeline-headline,
.home-hero__timeline-btn:focus-visible .home-hero__timeline-headline,
.home-hero__timeline-btn.is-active .home-hero__timeline-headline {
	max-height: 6rem;
	opacity: 1;
}

.home-hero__timeline-btn:hover .home-hero__timeline-copy,
.home-hero__timeline-btn:focus-visible .home-hero__timeline-copy,
.home-hero__timeline-btn.is-active .home-hero__timeline-copy {
	max-height: 8rem;
	opacity: 0.75;
}

@media (width >= 768px) and (width < 1024px) {
	.home-hero__timeline-headline {
		font-size: 1.25rem;
		line-height: 1.25;
	}

	.home-hero__timeline-copy {
		font-size: 0.8125rem;
		line-height: 1.4;
	}

	.home-hero__timeline-btn:hover .home-hero__timeline-headline,
	.home-hero__timeline-btn:focus-visible .home-hero__timeline-headline,
	.home-hero__timeline-btn.is-active .home-hero__timeline-headline {
		max-height: 4rem;
	}

	.home-hero__timeline-btn:hover .home-hero__timeline-copy,
	.home-hero__timeline-btn:focus-visible .home-hero__timeline-copy,
	.home-hero__timeline-btn.is-active .home-hero__timeline-copy {
		max-height: 5.5rem;
	}
}

/* Arrow button — inside the tab.
   Shared arrow pill: geometry from the global --arrow-pill-* tokens (theme
   app.css), fixed at every breakpoint. The pill used to be drawn inside the
   SVG (a lime <rect> plus a black arrow), which is why it never matched the
   rest of the site — it's now the same element in the hero's accent
   colourway. */
.home-hero__timeline-arrow {
	--arrow-pill-bg: var(--color-accent, #dfff00);
	--arrow-pill-color: var(--color-black, #000);

	align-items: center;
	justify-content: center;
	display: inline-flex;
	flex: 0 0 auto;
	inline-size: var(--arrow-pill-inline-size, 2.625rem);
	block-size: var(--arrow-pill-block-size, 1.9375rem);
	border-radius: var(--arrow-pill-radius, 999rem);
	background: var(--arrow-pill-bg);
	color: var(--arrow-pill-color);
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, opacity 0.3s ease, background 0.25s ease;
	margin-top: 1.1rem;
}

.home-hero__timeline-arrow svg {
	inline-size: var(--arrow-pill-icon-size, 0.875rem);
	block-size: var(--arrow-pill-icon-size, 0.875rem);
}

.home-hero__timeline-btn:hover .home-hero__timeline-arrow,
.home-hero__timeline-btn:focus-visible .home-hero__timeline-arrow,
.home-hero__timeline-btn.is-active .home-hero__timeline-arrow {
	opacity: 1;
}

@media (width < 768px) {
	.home-hero__timeline-list {
		padding-left: 1.1rem;
	}

	.home-hero__timeline-list::before {
		bottom: 0;
		display: block;
		height: auto;
		left: 0.25rem;
		right: auto;
		top: 0;
		width: 1px;
	}

	.home-hero__timeline-indicator {
		height: 44px;
		left: -2.6rem;
		opacity:0;
		pointer-events: none;
		position: relative;
		top: 3rem;
		transform: translateY(-50%) scale(0.9);
		transition: opacity 0.25s ease;
		width: 48px;
		z-index: 1;
	}

	.home-hero__timeline-item:has(.home-hero__timeline-btn.is-active) .home-hero__timeline-indicator,
	.home-hero__timeline-item:has(.home-hero__timeline-btn:focus-visible) .home-hero__timeline-indicator {
		opacity: 1;
	}

	.home-hero__timeline-btn {
		position: relative;
	}

	.home-hero__timeline-panel {
		left: 0;
		opacity: 1;
		pointer-events: none;
		position: relative;
		right: 0;
		top: 100%;
		transform: translateY(0.25rem);
	}

	.home-hero__timeline-btn.is-active .home-hero__timeline-panel,
	.home-hero__timeline-btn:focus-visible .home-hero__timeline-panel {
		opacity: 1;
		pointer-events: auto;
		position: relative;
		right: auto;
		left: auto;
		top: auto;
		transform: none;
		visibility: visible;
	}

	.home-hero__timeline-btn {
		color: var(--color-white, #fff);
	}

	.home-hero__timeline-headline,
	.home-hero__timeline-btn:hover .home-hero__timeline-headline,
	.home-hero__timeline-btn:focus-visible .home-hero__timeline-headline,
	.home-hero__timeline-btn.is-active .home-hero__timeline-headline {
		max-height: none;
		opacity: 1;
		transform: none;
	}

	.home-hero__timeline-label {
		display: none;
	}

	.home-hero__timeline-btn .home-hero__timeline-copy {
		max-height: none;
		opacity: 1;
		visibility: visible;
	}

	.home-hero__timeline-btn .home-hero__timeline-arrow {
		opacity: 1;
	}
}

@media (width >= 768px) {
	.home-hero__inner {
		padding: 9rem var(--content-gutter-md, 2rem) 2.5rem;
	}

	.home-hero__timeline-list {
		gap: 1rem;
		grid-auto-rows: 12rem;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.home-hero__timeline-list::before {
		display: block;
	}

	/* Active/hover indicator sits on the line */
	.home-hero__timeline-indicator {
		height: 50px;
		left: -0.8rem;
		opacity: 0;
		pointer-events: none;
		position: absolute;
		top: 1.25rem;
		transform: translateY(-50%);
		transition: opacity 0.25s ease;
		width: 55px;
		z-index: 1;
	}

	.home-hero__timeline-item:hover .home-hero__timeline-indicator,
	.home-hero__timeline-item:has(.home-hero__timeline-btn:focus-visible) .home-hero__timeline-indicator,
	.home-hero__timeline-item:has(.home-hero__timeline-btn.is-active) .home-hero__timeline-indicator {
		opacity: 1;
	}

	/* Number floats above the line */
	.home-hero__timeline-number {
		position: absolute;
		top: -12px;
		left: 0.25rem;
	}

	.home-hero__timeline-btn {
		position: relative;
		overflow: visible;
		padding-top: 1.65rem;
		width: 100%;
	}

	.home-hero__timeline-panel {
		left: 0.25rem;
		opacity: 0;
		pointer-events: none;
		position: absolute;
		right: 0.25rem;
		top: 2.75rem;
		transform: translateY(0.35rem);
		transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s step-end;
		visibility: hidden;
		z-index: 2;
	}

	.home-hero__timeline-btn:hover .home-hero__timeline-panel,
	.home-hero__timeline-btn:focus-visible .home-hero__timeline-panel,
	.home-hero__timeline-btn.is-active .home-hero__timeline-panel {
		opacity: 1;
		pointer-events: auto;
		transform: translateY(0);
		transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s step-start;
		visibility: visible;
	}

	.home-hero__timeline-headline,
	.home-hero__timeline-copy {
		max-height: none;
	}

	.home-hero__timeline-arrow {
		margin-top: 0.75rem;
		position: relative;
	}
}

@media (width >= 1024px) {
	.home-hero__timeline-btn::after {
		content: '';
		height: 2rem;
		left: 0;
		position: absolute;
		right: 0;
		top: 100%;
	}

	.home-hero__timeline-headline {
		font-size: 1.45rem;
		line-height: 1.22;
	}

	.home-hero__timeline-copy {
		font-size: 0.85rem;
		line-height: 1.45;
	}

	.home-hero__timeline-btn:hover .home-hero__timeline-headline,
	.home-hero__timeline-btn:focus-visible .home-hero__timeline-headline,
	.home-hero__timeline-btn.is-active .home-hero__timeline-headline {
		max-height: 5rem;
	}

	.home-hero__timeline-btn:hover .home-hero__timeline-copy,
	.home-hero__timeline-btn:focus-visible .home-hero__timeline-copy,
	.home-hero__timeline-btn.is-active .home-hero__timeline-copy {
		max-height: 6.5rem;
	}

	.home-hero {
		min-height: 100dvh;
	}

	.home-hero__inner {
		gap: 0;
		justify-content: flex-start;
		padding: 0 var(--content-gutter-lg, 3rem) 2rem;
	}

	.home-hero__stage {
		flex: 0 0 auto;
		justify-content: flex-start;
		min-height: 77dvh;
		padding-top: 26dvh;
	}

	.home-hero__q,	.home-hero__q-hitarea,	.home-hero__q-front-wrap {
		max-width: min(43vw, 76dvh);
		top: 43.8dvh;
		transform: translate(-50%, -50%);
	}

	.home-hero__default {
		max-width: 100%;
	}

	.home-hero__headline {
		font-size: clamp(1.875rem, min(5.2vw, 12dvh), 8rem);
	}

	.home-hero__timeline {
		margin-top: 0;
	}

	.home-hero__timeline-list {
		grid-auto-rows: max(16rem, 20dvh);
	}

	.home-hero__timeline-list::before {
		top: 1.25rem;
	}

	.home-hero__timeline-btn {
		padding-top: 2.25rem;
	}

	.home-hero__timeline-panel {
		top: 2.25rem;
	}
}

@media (width >= 1280px) {
	.home-hero__timeline-headline {
		font-size: 1.75rem;
		line-height: 1.2;
	}

	.home-hero__timeline-copy {
		font-size: 0.875rem;
		line-height: 1.5;
	}

	.home-hero__timeline-btn:hover .home-hero__timeline-headline,
	.home-hero__timeline-btn:focus-visible .home-hero__timeline-headline,
	.home-hero__timeline-btn.is-active .home-hero__timeline-headline {
		max-height: 6rem;
	}

	.home-hero__timeline-btn:hover .home-hero__timeline-copy,
	.home-hero__timeline-btn:focus-visible .home-hero__timeline-copy,
	.home-hero__timeline-btn.is-active .home-hero__timeline-copy {
		max-height: 8rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.home-hero__q,
	.home-hero__q-front-wrap,
	.home-hero__q-front-wrap::before,
	.home-hero__timeline-btn {
		transition: none;
	}
}
