/* ==========================================================================
   Canary Design System — Layout
   Header, brand, mobile navigation, cinematic background, hero, cinematic
   sections (features, vocations, split), footer.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */
.page {
	position: relative;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.page__main {
	flex: 1;
	position: relative;
}

/* --------------------------------------------------------------------------
   Header — transparent over hero, glass when scrolled
   -------------------------------------------------------------------------- */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: var(--z-header);
	height: var(--header-height);
	display: flex;
	align-items: center;
	color: var(--text-primary);
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
	transition:
		height var(--duration-base) var(--ease-cine),
		background-color var(--duration-slow) var(--ease-cine),
		box-shadow var(--duration-slow) var(--ease-cine),
		transform var(--duration-base) var(--ease-cine);
}

.site-header::after {
	/* hairline that fades in when scrolled */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--border-default) 20%, var(--border-default) 80%, transparent);
	opacity: 0;
	transition: opacity var(--duration-slow) var(--ease-cine);
}

.site-header.is-scrolled {
	height: var(--header-height-scrolled);
	background: var(--surface-overlay);
	-webkit-backdrop-filter: blur(8px) saturate(1.1);
	backdrop-filter: blur(8px) saturate(1.1);
	box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.8);
}

.site-header.is-scrolled::after {
	opacity: 1;
}

/* solid mode for inner pages without hero */
.site-header--solid {
	position: sticky;
	background: var(--surface-overlay);
}

.site-header__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: var(--spacing-xl);
	width: 100%;
	max-width: var(--container-wide);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Brand — typographic wordmark + medallion */
.brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--bone);
	text-decoration: none;
	white-space: nowrap;
}

.brand__mark {
	width: 36px;
	height: 36px;
	color: var(--gold-primary);
	transition: transform var(--duration-slow) var(--ease-cine);
}

.brand:hover .brand__mark {
	transform: rotate(45deg);
}

.brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1;
}

.brand__name {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bone);
}

.brand__tag {
	margin-top: 4px;
	font-family: var(--font-ui);
	font-size: 0.625rem;
	font-weight: var(--weight-ui);
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--gold-muted);
}

.brand--logo {
	gap: 0;
}

.brand__logo {
	display: block;
	height: 72px;
	width: auto;
	max-width: min(200px, 46vw);
	object-fit: contain;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
	transition: height var(--duration-base) var(--ease-cine);
}

.site-header.is-scrolled .brand__logo,
.site-header--solid .brand__logo {
	height: 56px;
}

.site-footer .brand__logo {
	height: 104px;
	max-width: 280px;
}

/* Primary navigation */
.site-nav {
	display: flex;
	justify-content: center;
}

.site-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(1.25rem, 1rem + 1.2vw, 2.5rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Dropdown panels (hover / focus-within) */
.site-nav__item {
	position: relative;
}

.site-nav__dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 50%;
	min-width: 240px;
	padding: var(--spacing-sm) 0;
	background: var(--surface-overlay);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border: 1px solid var(--border-default);
	box-shadow: var(--shadow-deep);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 8px);
	transition:
		opacity var(--duration-base) var(--ease-cine),
		transform var(--duration-base) var(--ease-cine),
		visibility 0s linear var(--duration-base);
}

.site-nav__dropdown::before,
.site-nav__dropdown::after {
	content: "";
	position: absolute;
	width: 14px;
	height: 14px;
	border-color: var(--border-ornament);
	border-style: solid;
	pointer-events: none;
}

.site-nav__dropdown::before {
	top: -1px;
	left: -1px;
	border-width: 1px 0 0 1px;
}

.site-nav__dropdown::after {
	bottom: -1px;
	right: -1px;
	border-width: 0 1px 1px 0;
}

.site-nav__item:hover .site-nav__dropdown,
.site-nav__item:focus-within .site-nav__dropdown {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
	transition-delay: 0s;
}

.site-nav__sublist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__sublink {
	display: flex;
	align-items: center;
	gap: var(--spacing-md);
	padding: 10px var(--spacing-lg);
	font-size: var(--text-small);
	color: var(--text-secondary);
	white-space: nowrap;
	transition:
		color var(--duration-fast) var(--ease-cine),
		background-color var(--duration-fast) var(--ease-cine);
}

.site-nav__sublink .dlist__diamond {
	width: 6px;
	height: 6px;
	opacity: 0.5;
	transition: opacity var(--duration-fast) var(--ease-cine), background-color var(--duration-fast) var(--ease-cine);
}

.site-nav__sublink:hover,
.site-nav__sublink:focus-visible {
	color: var(--gold-bright);
	background: rgb(var(--gold-rgb) / 0.05);
}

.site-nav__sublink:hover .dlist__diamond {
	opacity: 1;
	background: var(--gold-primary);
	border-color: var(--gold-primary);
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: var(--spacing-lg);
}

.site-header__login {
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-sm);
	font-family: var(--font-ui);
	font-size: var(--text-nav);
	font-weight: var(--weight-ui);
	letter-spacing: var(--tracking-nav);
	text-transform: uppercase;
	color: var(--text-secondary);
}

.site-header__login:hover {
	color: var(--gold-primary);
}

.site-header__toggle {
	display: none;
}

/* Language switcher — two flags, segmented, gold on the active one */
.lang-switch {
	display: inline-flex;
	align-items: stretch;
	height: 36px;
	border: 1px solid rgb(var(--gold-rgb) / 0.22);
	background: rgba(0, 0, 0, 0.35);
	clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
	transition: border-color var(--duration-base) var(--ease-cine);
}

.lang-switch:hover {
	border-color: rgb(var(--gold-rgb) / 0.45);
}

.lang-switch__item {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-sm);
	padding: 0 var(--spacing-sm) 0 10px;
	color: var(--text-muted);
	font-family: var(--font-ui);
	font-size: 0.6875rem;
	font-weight: var(--weight-ui);
	letter-spacing: var(--tracking-nav);
	text-transform: uppercase;
	text-decoration: none;
	transition:
		color var(--duration-base) var(--ease-cine),
		background-color var(--duration-base) var(--ease-cine);
}

.lang-switch__item + .lang-switch__item {
	border-left: 1px solid rgb(var(--gold-rgb) / 0.16);
}

.lang-switch__item:hover {
	color: var(--text-primary);
}

.lang-switch__item.is-active {
	color: var(--gold-primary);
	background: rgb(var(--gold-rgb) / 0.1);
}

.lang-switch__item.is-active::after {
	/* thin gold hairline underneath the active language */
	content: "";
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: 0;
	height: 1px;
	background: var(--gold-primary);
}

.lang-switch__item:focus-visible {
	outline: 2px solid var(--gold-primary);
	outline-offset: -2px;
}

.lang-switch__flag {
	width: 20px;
	height: 14px;
	flex: none;
	filter: saturate(0.75) brightness(0.85);
	transition: filter var(--duration-base) var(--ease-cine);
}

.lang-switch__item:hover .lang-switch__flag,
.lang-switch__item.is-active .lang-switch__flag {
	filter: none;
}

/* Mobile: brand + toggle only */
@media (max-width: 1023.98px) {
	.site-header__inner {
		grid-template-columns: auto 1fr auto;
	}

	.site-nav {
		display: none;
	}

	.site-header__actions .fbtn,
	.site-header__login {
		display: none;
	}

	.site-header__actions {
		gap: var(--spacing-md);
	}

	/* flags only on phones */
	.lang-switch {
		height: 32px;
	}

	.lang-switch__item {
		padding: 0 8px;
	}

	.lang-switch__code {
		display: none;
	}

	.site-header__toggle {
		display: inline-flex;
	}

	.brand__name {
		font-size: 1.05rem;
	}

	.brand__logo {
		height: 56px;
	}

	.site-footer .brand__logo {
		height: 80px;
	}
}

/* Mobile navigation overlay */
.mobile-nav {
	position: fixed;
	inset: 0;
	z-index: var(--z-overlay);
	display: flex;
	flex-direction: column;
	padding: calc(var(--header-height) + var(--spacing-xl)) var(--gutter) var(--spacing-2xl);
	background: rgba(4, 4, 4, 0.96);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var(--duration-base) var(--ease-cine),
		visibility 0s linear var(--duration-base);
}

.mobile-nav.is-open {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

.mobile-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--spacing-xs);
}

.mobile-nav__link {
	display: flex;
	align-items: center;
	gap: var(--spacing-md);
	padding: var(--spacing-md) 0;
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: var(--weight-heading);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-primary);
	border-bottom: 1px solid var(--border-subtle);
	opacity: 0;
	transform: translateY(12px);
	transition:
		opacity var(--duration-slow) var(--ease-cine),
		transform var(--duration-slow) var(--ease-cine),
		color var(--duration-fast) var(--ease-cine);
	transition-delay: calc(var(--i, 0) * 50ms);
}

.mobile-nav.is-open .mobile-nav__link {
	opacity: 1;
	transform: none;
}

.mobile-nav__link:hover,
.mobile-nav__link.is-active {
	color: var(--gold-primary);
}

.mobile-nav__link .dlist__diamond {
	width: 7px;
	height: 7px;
}

.mobile-nav__link.is-active .dlist__diamond {
	background: var(--gold-primary);
	border-color: var(--gold-primary);
}

.mobile-nav__sublist {
	list-style: none;
	margin: 0;
	padding: var(--spacing-sm) 0 var(--spacing-sm) calc(7px + var(--spacing-md));
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-xs) var(--spacing-lg);
}

.mobile-nav__sublink {
	font-size: var(--text-small);
	color: var(--text-muted);
	padding: 4px 0;
	display: inline-block;
}

.mobile-nav__sublink:hover {
	color: var(--gold-primary);
}

.mobile-nav__actions {
	display: grid;
	gap: var(--spacing-md);
	margin-top: auto;
	padding-top: var(--spacing-xl);
}

@media (max-width: 767.98px) {
	.mobile-nav {
		overflow-y: auto;
	}

	.mobile-nav__link {
		font-size: 1.25rem;
	}
}

body.nav-open {
	overflow: hidden;
}

/* keep brand + close control reachable above the overlay */
body.nav-open .site-header {
	z-index: calc(var(--z-overlay) + 1);
	background: transparent;
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

body.nav-open .site-header::after {
	opacity: 0;
}

/* --------------------------------------------------------------------------
   CinematicBackground  (.cine-bg)
   -------------------------------------------------------------------------- */
.cine-bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: var(--bg-deep);
	z-index: 0;
}

.cine-bg picture {
	position: absolute;
	inset: 0;
	display: block;
}

.cine-bg__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--cine-focus, 50% 40%);
	transform: scale(1.04);
	filter: saturate(0.85) contrast(1.08) brightness(0.72);
	transition: opacity var(--duration-xslow) var(--ease-in-out);
}

/* Live atmosphere (home hero): a very slow push-in on the picture wrapper —
   the <img> keeps its own transform for parallax — plus two mist layers that
   drift in opposite directions. */
.cine-bg--live picture {
	transform: scale(1.1);
	transform-origin: var(--cine-focus, 50% 40%);
	animation: cine-kenburns 22s var(--ease-out-soft) forwards;
	will-change: transform;
}

@keyframes cine-kenburns {
	to {
		transform: scale(1);
	}
}

.cine-bg__mist {
	position: absolute;
	inset: -10% -30%;
	pointer-events: none;
	mix-blend-mode: screen;
	opacity: 0.55;
	will-change: transform;
}

.cine-bg__mist--a {
	background:
		radial-gradient(38% 30% at 22% 68%, rgba(212, 186, 140, 0.16), transparent 70%),
		radial-gradient(30% 24% at 74% 58%, rgba(190, 170, 130, 0.1), transparent 70%);
	animation: cine-mist-a 38s var(--ease-in-out) infinite alternate;
}

.cine-bg__mist--b {
	background:
		radial-gradient(26% 20% at 56% 76%, rgba(226, 204, 160, 0.12), transparent 70%),
		radial-gradient(34% 26% at 12% 40%, rgba(160, 150, 130, 0.08), transparent 70%);
	animation: cine-mist-b 46s var(--ease-in-out) infinite alternate;
}

@keyframes cine-mist-a {
	from {
		transform: translate3d(-3%, 0, 0);
	}
	to {
		transform: translate3d(4%, -2%, 0);
	}
}

@keyframes cine-mist-b {
	from {
		transform: translate3d(4%, 1%, 0);
	}
	to {
		transform: translate3d(-3%, -1%, 0);
	}
}

/* Map style (config.ini hero_style = "map", a 2D game-world artwork): the camera
   flies slowly over the world instead of pushing in, the grade stays brighter so
   the painted lanterns read, the light flickers and cloud shadows cross the map. */
.cine-bg--map picture {
	transform: translate3d(-2.5%, -1.5%, 0) scale(1.22);
	transform-origin: var(--cine-focus, 50% 40%);
	animation: cine-map-fly 90s var(--ease-in-out) infinite alternate;
	will-change: transform;
}

@keyframes cine-map-fly {
	0% {
		transform: translate3d(-2.5%, -1.5%, 0) scale(1.22);
	}
	50% {
		transform: translate3d(1%, 1.5%, 0) scale(1.14);
	}
	100% {
		transform: translate3d(3%, -1%, 0) scale(1.2);
	}
}

.cine-bg--map .cine-bg__media {
	filter: saturate(1) contrast(1.04) brightness(0.86);
	animation: cine-lantern 6s var(--ease-in-out) infinite;
}

/* lantern light: an uneven, barely-there breathing of the whole picture */
@keyframes cine-lantern {
	0%,
	100% {
		filter: saturate(1) contrast(1.04) brightness(0.86);
	}
	23% {
		filter: saturate(1) contrast(1.04) brightness(0.9);
	}
	41% {
		filter: saturate(1) contrast(1.04) brightness(0.84);
	}
	68% {
		filter: saturate(1) contrast(1.04) brightness(0.9);
	}
	83% {
		filter: saturate(1) contrast(1.04) brightness(0.87);
	}
}

.cine-bg--map .cine-bg__tint {
	opacity: 0.55;
}

.cine-bg--map .cine-bg__mist--a {
	background:
		radial-gradient(34% 26% at 22% 72%, rgba(190, 200, 230, 0.16), transparent 70%),
		radial-gradient(28% 22% at 74% 62%, rgba(212, 186, 140, 0.1), transparent 70%);
}

.cine-bg__clouds {
	position: absolute;
	inset: -20% -40%;
	pointer-events: none;
	mix-blend-mode: multiply;
	opacity: 0.55;
	filter: blur(28px);
	background:
		radial-gradient(26% 20% at 18% 32%, rgba(12, 14, 34, 0.7), transparent 70%),
		radial-gradient(20% 16% at 58% 62%, rgba(12, 14, 34, 0.6), transparent 70%),
		radial-gradient(30% 18% at 86% 22%, rgba(12, 14, 34, 0.55), transparent 70%);
	animation: cine-clouds 110s var(--ease-in-out) infinite alternate;
	will-change: transform;
}

.cine-bg__clouds--b {
	opacity: 0.4;
	background:
		radial-gradient(22% 16% at 40% 18%, rgba(12, 14, 34, 0.6), transparent 70%),
		radial-gradient(28% 20% at 78% 78%, rgba(12, 14, 34, 0.55), transparent 70%),
		radial-gradient(18% 14% at 8% 70%, rgba(12, 14, 34, 0.5), transparent 70%);
	animation-duration: 150s;
	animation-direction: alternate-reverse;
}

@keyframes cine-clouds {
	from {
		transform: translate3d(-10%, -2%, 0);
	}
	to {
		transform: translate3d(10%, 2%, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cine-bg--live picture,
	.cine-bg--map picture {
		transform: none;
		animation: none;
	}

	.cine-bg__mist,
	.cine-bg__clouds,
	.cine-bg--map .cine-bg__media {
		animation: none;
	}
}

.cine-bg__media--video {
	opacity: 0;
}

.cine-bg__media--video.is-ready {
	opacity: 1;
}

/* Parallax — extremely discreet, driven by JS (--parallax in px) */
.cine-bg--parallax .cine-bg__media {
	transform: translate3d(0, var(--parallax, 0px), 0) scale(1.08);
	will-change: transform;
}

.cine-bg__gradient {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0) 55%),
		linear-gradient(0deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0.85) 14%, rgba(9, 9, 9, 0) 48%);
}

.cine-bg__vignette {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.45) 100%);
}

.cine-bg__tint {
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, rgba(20, 16, 8, 0.28), rgba(0, 0, 0, 0) 60%);
	mix-blend-mode: multiply;
}

.cine-bg__grain {
	position: absolute;
	inset: 0;
	background-image: var(--texture-noise);
	background-size: 180px 180px;
	opacity: 0.06;
	mix-blend-mode: overlay;
}

/* Side-anchored: image lives on one side and dissolves into the page */
.cine-bg--right .cine-bg__gradient {
	background:
		linear-gradient(90deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0.9) 28%, rgba(9, 9, 9, 0.2) 60%, rgba(9, 9, 9, 0) 100%),
		linear-gradient(0deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0) 30%),
		linear-gradient(180deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0) 22%);
}

.cine-bg--left .cine-bg__gradient {
	background:
		linear-gradient(270deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0.9) 28%, rgba(9, 9, 9, 0.2) 60%, rgba(9, 9, 9, 0) 100%),
		linear-gradient(0deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0) 30%),
		linear-gradient(180deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0) 22%);
}

/* --------------------------------------------------------------------------
   Embers  (.embers — views/ui/embers.html.twig)
   Small warm sparks rising through a section (hero, vocations). Each <i> gets
   --x (left), --s (size), --d (duration) and --t (negative delay) inline; the
   host sets --ember-rgb to tint the glow (defaults to gold).
   -------------------------------------------------------------------------- */
.embers {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.embers i {
	position: absolute;
	left: var(--x, 50%);
	bottom: -4%;
	width: var(--s, 3px);
	height: var(--s, 3px);
	border-radius: 50%;
	background: #f1dcae;
	box-shadow:
		0 0 6px 1px rgb(var(--ember-rgb, var(--gold-rgb)) / 0.55),
		0 0 14px 4px rgb(var(--ember-rgb, var(--gold-rgb)) / 0.12);
	opacity: 0;
	animation: ember-rise var(--d, 18s) linear var(--t, 0s) infinite;
	will-change: transform, opacity;
}

@keyframes ember-rise {
	0% {
		transform: translate3d(0, 0, 0) scale(0.6);
		opacity: 0;
	}
	12% {
		opacity: 0.85;
	}
	50% {
		transform: translate3d(2.4vw, -48vh, 0) scale(1);
		opacity: 0.55;
	}
	82% {
		opacity: 0.35;
	}
	100% {
		transform: translate3d(-1.6vw, -96vh, 0) scale(0.4);
		opacity: 0;
	}
}

@media (max-width: 767.98px) {
	/* fewer sparks on small screens */
	.embers i:nth-child(even) {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.embers {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 100svh;
	min-height: max(92svh, 620px);
	padding-top: var(--header-height);
	padding-bottom: var(--spacing-3xl);
	color: var(--text-primary);
	isolation: isolate;
	overflow: hidden;
}

.hero--short {
	min-height: 72svh;
}

.hero__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--spacing-md);
	text-align: center;
	max-width: 900px;
	margin-inline: auto;
}

.hero--left .hero__content {
	align-items: flex-start;
	text-align: left;
	margin-inline: 0;
}

.hero__logo {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--spacing-xs);
	color: var(--bone);
}

.hero--left .hero__logo {
	align-items: flex-start;
}

.hero__logo-mark {
	width: 44px;
	height: 44px;
	margin-bottom: var(--spacing-xs);
	color: var(--gold-primary);
	filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6));
	animation: hero-mark-in 1.4s var(--ease-out-soft) both;
}

@keyframes hero-mark-in {
	from {
		transform: rotate(-90deg) scale(0.6);
		opacity: 0;
	}
}

.hero__logo-name {
	font-family: var(--font-display);
	font-size: clamp(1.25rem, 0.95rem + 1.2vw, 1.875rem);
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	line-height: 1;
	text-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.hero__logo-tag {
	font-family: var(--font-ui);
	font-size: 0.625rem;
	font-weight: var(--weight-ui);
	letter-spacing: 0.46em;
	text-transform: uppercase;
	color: var(--gold-muted);
	animation: hero-tag-in 1.6s var(--ease-out-soft) 0.35s both;
}

.hero__logo--art {
	gap: 0;
}

.hero__logo-art {
	display: block;
	width: min(100%, 28rem);
	height: auto;
	filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.72));
	animation: hero-logo-in 1.2s var(--ease-out-soft) both;
}

.hero--left .hero__logo-art {
	margin-inline: 0;
}

@keyframes hero-logo-in {
	from {
		transform: translateY(16px) scale(0.94);
		opacity: 0;
	}
}

@keyframes hero-tag-in {
	from {
		letter-spacing: 0.9em;
		opacity: 0;
	}
}

/* Ornamental rule — two lines draw outward from a diamond */
.hero__rule {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(260px, 60vw);
	height: 12px;
	margin-block: var(--spacing-2xs) var(--spacing-xs);
	color: var(--gold-primary);
}

.hero__rule::before,
.hero__rule::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgb(var(--gold-rgb) / 0.5) 45%, rgb(var(--gold-rgb) / 0.85));
	transform: scaleX(0);
	transform-origin: right center;
	animation: hero-rule-draw 1.1s var(--ease-cine) 0.55s forwards;
}

.hero__rule::after {
	background: linear-gradient(270deg, transparent, rgb(var(--gold-rgb) / 0.5) 45%, rgb(var(--gold-rgb) / 0.85));
	transform-origin: left center;
}

.hero__rule i {
	width: 7px;
	height: 7px;
	margin-inline: 10px;
	background: currentColor;
	transform: rotate(45deg) scale(0);
	box-shadow: 0 0 12px rgb(var(--gold-rgb) / 0.55);
	animation: hero-rule-gem 0.9s var(--ease-out-soft) 0.45s forwards;
}

@keyframes hero-rule-draw {
	to {
		transform: scaleX(1);
	}
}

@keyframes hero-rule-gem {
	to {
		transform: rotate(45deg) scale(1);
	}
}

.hero__title {
	/* compact display size: 36 → 76px (t-display goes to 100px) */
	font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.75rem);
	line-height: 1.04;
	max-width: 24ch;
	text-shadow: 0 10px 40px rgba(0, 0, 0, 0.75);
	text-wrap: balance;
}

/* word-by-word reveal: rise + blur → sharp. Non-splittable titles fade as one. */
.hero__word {
	display: inline-block;
	opacity: 0;
	transform: translateY(0.42em);
	filter: blur(8px);
	animation: hero-word-in 1.15s var(--ease-cine) calc(0.7s + var(--i, 0) * 110ms) forwards;
	will-change: transform, filter, opacity;
}

@keyframes hero-word-in {
	60% {
		filter: blur(0);
	}
	to {
		opacity: 1;
		transform: none;
		filter: blur(0);
	}
}

.hero__lede {
	max-width: 60ch;
	color: var(--text-secondary);
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--spacing-md) var(--spacing-lg);
	margin-top: var(--spacing-sm);
}

.hero--left .hero__actions {
	justify-content: flex-start;
}

/* primary CTA breathes a faint gold halo (box-shadow lives on the element,
   outside the clipped ::before fill) */
.hero__cta {
	animation: hero-cta-breathe 4.6s var(--ease-in-out) 2.4s infinite;
}

.hero__cta:hover,
.hero__cta:focus-visible {
	animation: none;
}

@keyframes hero-cta-breathe {
	0%,
	100% {
		box-shadow:
			0 10px 28px -10px rgb(var(--gold-cta-rgb) / 0.55),
			0 0 0 0 rgb(var(--gold-cta-rgb) / 0);
	}
	50% {
		box-shadow:
			0 12px 32px -10px rgb(var(--gold-cta-rgb) / 0.65),
			0 0 36px 4px rgb(var(--gold-cta-rgb) / 0.3);
	}
}

.hero__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--spacing-md) var(--spacing-xl);
	margin-top: var(--spacing-sm);
	font-family: var(--font-ui);
	font-size: var(--text-caption);
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
	color: var(--text-muted);
}

.hero__meta-item {
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-xs);
}

.hero__meta strong {
	color: var(--gold-primary);
	font-weight: var(--weight-ui);
}

/* live status dot */
.hero__pulse {
	position: relative;
	flex: none;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--gold-primary);
	box-shadow: 0 0 8px rgb(var(--gold-rgb) / 0.7);
}

.hero__pulse::after {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	border: 1px solid rgb(var(--gold-rgb) / 0.6);
	animation: hero-pulse 2.2s var(--ease-out-soft) infinite;
}

@keyframes hero-pulse {
	from {
		transform: scale(0.6);
		opacity: 1;
	}
	to {
		transform: scale(2.2);
		opacity: 0;
	}
}

/* embers: shared .embers block above (views/ui/embers.html.twig) */

@media (prefers-reduced-motion: reduce) {
	.hero__pulse::after {
		display: none;
	}

	.hero__cta {
		animation: none;
	}
}

/* Scroll hint — "↓ EXPLORE" */
.hero__scroll {
	position: absolute;
	left: 50%;
	bottom: var(--spacing-xl);
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--spacing-sm);
	transform: translateX(-50%);
	font-family: var(--font-ui);
	font-size: 0.6875rem;
	font-weight: var(--weight-ui);
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--text-muted);
	text-decoration: none;
	transition: color var(--duration-base) var(--ease-cine);
}

.hero__scroll:hover {
	color: var(--gold-primary);
}

.hero__scroll-line {
	position: relative;
	width: 1px;
	height: 44px;
	background: rgb(var(--gold-rgb) / 0.2);
	overflow: hidden;
}

.hero__scroll-line::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 40%;
	background: var(--gold-primary);
	animation: hero-scroll-line 2.4s var(--ease-in-out) infinite;
}

@keyframes hero-scroll-line {
	0% {
		transform: translateY(-100%);
	}
	60%,
	100% {
		transform: translateY(260%);
	}
}

/* Hero entrance choreography — blocks rise in sequence; the rule and the
   split title run their own animations (drawn lines / words). */
.hero__content > :not(.hero__rule):not(.hero__title--words) {
	opacity: 0;
	transform: translateY(18px);
	animation: hero-in 1s var(--ease-cine) var(--hero-delay, 0ms) forwards;
}

/* delays ride on a custom property so the shorthand above cannot reset them */
.hero__logo { --hero-delay: 80ms; }
.hero__title { --hero-delay: 700ms; }
.hero__lede { --hero-delay: 1350ms; }
.hero__actions { --hero-delay: 1550ms; }
.hero__meta { --hero-delay: 1800ms; }

@keyframes hero-in {
	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 767.98px) {
	.hero {
		min-height: max(84svh, 540px);
		padding-bottom: var(--spacing-3xl);
	}

	.hero__title {
		max-width: 14ch;
	}

	.hero__rule {
		width: min(200px, 56vw);
	}

	.hero__actions {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
	}

	.hero__actions .fbtn {
		width: 100%;
	}

	.hero__scroll {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Cinematic section (image + text, alternating) — .cine-section
   -------------------------------------------------------------------------- */
.cine-section {
	position: relative;
	isolation: isolate;
	min-height: 70vh;
	display: flex;
	align-items: center;
	padding-block: var(--section-gap);
}

.cine-section__content {
	position: relative;
	z-index: 1;
	display: grid;
	gap: var(--spacing-lg);
	max-width: 520px;
}

.cine-section--right .cine-section__content {
	margin-left: auto;
}

.cine-section__content .fbtn-group {
	margin-top: var(--spacing-sm);
}

/* --------------------------------------------------------------------------
   Features — diamond list + description + crossfading backgrounds
   -------------------------------------------------------------------------- */
.features {
	position: relative;
	isolation: isolate;
	min-height: 72vh;
	display: flex;
	align-items: center;
	padding-block: var(--section-gap-sm);
	overflow: hidden;
}

.features__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.features__bg .xfade__layer {
	background-size: cover;
	background-position: center;
	filter: saturate(0.85) brightness(0.85);
	transform: scale(1.03);
}

/* Per-feature artwork treatment. With a single artwork the layers differ by
   framing and grade so each crossfade still reads as a scene change. */
.feature-bg {
	background-image: var(--img);
}

.feature-bg--1 { background-position: 20% 40%; }
.feature-bg--2 { background-position: 50% 30%; filter: saturate(0.75) brightness(0.8) hue-rotate(-12deg); }
.feature-bg--3 { background-position: 80% 50%; filter: saturate(0.9) brightness(0.85) sepia(0.2); }
.feature-bg--4 { background-position: 65% 20%; filter: saturate(0.65) brightness(0.75) contrast(1.15); }
.feature-bg--5 { background-position: 35% 70%; filter: saturate(0.8) brightness(0.8) hue-rotate(10deg); }

.features__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0.9) 30%, rgba(9, 9, 9, 0.25) 65%, rgba(9, 9, 9, 0) 100%),
		linear-gradient(0deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0) 25%),
		linear-gradient(180deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0) 20%);
}

.features--right .features__bg::after {
	background:
		linear-gradient(270deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0.92) 30%, rgba(9, 9, 9, 0.35) 65%, rgba(9, 9, 9, 0.1) 100%),
		linear-gradient(0deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0) 25%),
		linear-gradient(180deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0) 20%);
}

.features__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(280px, 380px) minmax(0, 480px);
	gap: var(--spacing-3xl);
	align-items: center;
}

/* grid children must be allowed to shrink below the diamond list's intrinsic width */
.features__inner > * {
	min-width: 0;
}

.features--right .features__inner {
	justify-content: end;
}

.features__panels {
	position: relative;
	min-height: 240px;
}

.features__panel {
	position: absolute;
	inset: 0;
	display: grid;
	gap: var(--spacing-md);
	align-content: start;
	opacity: 0;
	transform: translateY(14px);
	visibility: hidden;
	transition:
		opacity var(--duration-slow) var(--ease-cine),
		transform var(--duration-slow) var(--ease-cine),
		visibility 0s linear var(--duration-slow);
}

.features__panel.is-active {
	position: relative;
	opacity: 1;
	transform: none;
	visibility: visible;
	transition-delay: 90ms, 90ms, 0s;
}

.features__panel .t-h2 {
	max-width: 14ch;
}

@media (max-width: 1023.98px) {
	.features__inner {
		grid-template-columns: 1fr;
		gap: var(--spacing-xl);
	}

	.features__bg::after,
	.features--right .features__bg::after {
		background:
			linear-gradient(0deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0.85) 45%, rgba(9, 9, 9, 0.5) 100%);
	}

	.dlist {
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: var(--spacing-md);
		padding-bottom: var(--spacing-sm);
		scrollbar-width: none;
	}

	.dlist::-webkit-scrollbar {
		display: none;
	}

	.dlist__item {
		width: auto;
		flex: none;
		font-size: var(--text-small);
		padding-inline: var(--spacing-xs);
		white-space: nowrap;
	}

	.dlist__item.is-active,
	.dlist__item[aria-selected="true"] {
		transform: none;
	}
}

/* --------------------------------------------------------------------------
   Vocations — key-art stage + class selector + details
   (views/layout/vocations.html.twig)
   -------------------------------------------------------------------------- */
.vocations {
	--voc-rgb: var(--gold-rgb);
	--ember-rgb: var(--voc-rgb);
	--voc-cut: 14px;
	position: relative;
	isolation: isolate;
	padding-block: var(--section-gap);
	overflow: hidden;
}

/* the accent (embers, highlights) follows the active class; the r g b values
   arrive as inline --voc-<key> from includes/home-content.php */
.vocations[data-active="knight"] { --voc-rgb: var(--voc-knight, var(--gold-rgb)); }
.vocations[data-active="paladin"] { --voc-rgb: var(--voc-paladin, var(--gold-rgb)); }
.vocations[data-active="sorcerer"] { --voc-rgb: var(--voc-sorcerer, var(--gold-rgb)); }
.vocations[data-active="druid"] { --voc-rgb: var(--voc-druid, var(--gold-rgb)); }
.vocations[data-active="monk"] { --voc-rgb: var(--voc-monk, var(--gold-rgb)); }

/* Backdrop — the active scene's thumbnail blurred full-bleed under a glow */
.vocations__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: var(--bg-primary);
}

.vocations__bg .xfade__layer {
	overflow: hidden;
	background: radial-gradient(ellipse at 50% 42%, var(--voc-glow, rgb(var(--gold-rgb) / 0.16)) 0%, rgba(9, 9, 9, 0) 58%);
}

.vocations__bg .xfade__layer::before {
	content: "";
	position: absolute;
	inset: -8%;
	background: var(--voc-scene, none) center 30% / cover no-repeat;
	filter: blur(26px) saturate(0.8);
	opacity: 0.62;
	transform: scale(1.02);
	transition: transform 9s linear;
}

.vocations__bg .xfade__layer.is-active::before {
	transform: scale(1.1);
}

/* veil: dissolve into the page above and below, darken the middle, vignette */
.vocations__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, var(--bg-primary) 0%, rgba(9, 9, 9, 0.36) 16%, rgba(9, 9, 9, 0.36) 80%, var(--bg-primary) 100%),
		radial-gradient(ellipse at 50% 50%, rgba(9, 9, 9, 0) 38%, rgba(9, 9, 9, 0.82) 100%);
}

/* the title and the inner grid must paint above the absolutely positioned backdrop */
.vocations > .container,
.features > .container {
	position: relative;
	z-index: 1;
}

.vocations__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(300px, 420px);
	gap: var(--spacing-2xl);
	align-items: center;
}

.vocations__inner > * {
	min-width: 0;
}

/* --- stage: a chamfered frame that leans toward the pointer ------------- */
.vocations__stage {
	position: relative;
	width: min(100%, calc(min(680px, 78vh) * 2 / 3));
	aspect-ratio: 2 / 3;
	margin-inline: auto;
	transform: perspective(1400px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
	transform-style: preserve-3d;
	transition: transform 600ms var(--ease-cine);
	will-change: transform;
}

/* pedestal shadow under the frame */
.vocations__stage::before {
	content: "";
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: -6%;
	height: 18%;
	background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0) 70%);
	filter: blur(10px);
	transform: translateZ(-40px);
}

.vocations__frame {
	position: absolute;
	inset: 0;
	overflow: hidden;
	clip-path: polygon(
		var(--voc-cut) 0, calc(100% - var(--voc-cut)) 0, 100% var(--voc-cut),
		100% calc(100% - var(--voc-cut)), calc(100% - var(--voc-cut)) 100%, var(--voc-cut) 100%,
		0 calc(100% - var(--voc-cut)), 0 var(--voc-cut));
	/* the 1px edge: this gradient shows through the inset children */
	background: linear-gradient(160deg, rgb(var(--gold-rgb) / 0.7) 0%, rgb(var(--gold-rgb) / 0.22) 45%, rgb(var(--gold-rgb) / 0.5) 100%);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.vocations__frame .xfade__layer,
.vocations__vignette {
	inset: 1px;
	clip-path: polygon(
		calc(var(--voc-cut) - 1px) 0, calc(100% - var(--voc-cut) + 1px) 0, 100% calc(var(--voc-cut) - 1px),
		100% calc(100% - var(--voc-cut) + 1px), calc(100% - var(--voc-cut) + 1px) 100%, calc(var(--voc-cut) - 1px) 100%,
		0 calc(100% - var(--voc-cut) + 1px), 0 calc(var(--voc-cut) - 1px));
}

.vocations__frame .xfade__layer {
	overflow: hidden;
	background: var(--bg-deep);
	transform: scale(1);
}

/* each scene pushes back into place as it becomes active … */
.vocations__frame .xfade__layer.is-active {
	animation: voc-layer-in 1.6s var(--ease-cine) both;
}

@keyframes voc-layer-in {
	from {
		transform: scale(1.06);
	}
	to {
		transform: scale(1);
	}
}

/* … then sheens once, like light catching a varnished canvas */
.vocations__frame .xfade__layer::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(112deg, rgba(255, 255, 255, 0) 32%, rgba(255, 244, 214, 0.1) 44%, rgba(255, 244, 214, 0.28) 50%, rgba(255, 244, 214, 0.1) 56%, rgba(255, 255, 255, 0) 68%);
	transform: translateX(-120%);
	opacity: 0;
	pointer-events: none;
}

.vocations__frame .xfade__layer.is-active::after {
	animation: voc-sheen 1.8s var(--ease-cine) 260ms both;
}

@keyframes voc-sheen {
	0% {
		transform: translateX(-120%);
		opacity: 0;
	}
	20%,
	80% {
		opacity: 1;
	}
	100% {
		transform: translateX(120%);
		opacity: 0;
	}
}

.vocations__art {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 30%;
	filter: saturate(0.94);
	/* a very slow breathing drift while on stage */
	animation: voc-art-drift 22s ease-in-out infinite alternate;
	will-change: transform;
}

@keyframes voc-art-drift {
	from {
		transform: scale(1) translate3d(0, 0, 0);
	}
	to {
		transform: scale(1.045) translate3d(-1%, -1.2%, 0);
	}
}

/* fallback when a class has no scene — the cut-out sprite on a dark pedestal */
.vocations__layer--cutout {
	display: grid;
	place-items: end center;
	background:
		radial-gradient(ellipse at 50% 88%, rgb(var(--gold-rgb) / 0.14), rgba(9, 9, 9, 0) 60%),
		var(--bg-deep);
}

.vocations__art--cutout {
	width: auto;
	height: 88%;
	object-fit: contain;
	object-position: center bottom;
	margin-bottom: 6%;
	filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.8));
	animation: none;
}

/* inner grading + a fine mat line 10px inside the edge */
.vocations__vignette {
	position: absolute;
	z-index: 2;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(9, 9, 9, 0.28) 0%, rgba(9, 9, 9, 0) 22%, rgba(9, 9, 9, 0) 58%, rgba(9, 9, 9, 0.78) 100%);
	box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.55);
}

.vocations__vignette::after {
	content: "";
	position: absolute;
	inset: 10px;
	border: 1px solid rgb(var(--gold-rgb) / 0.16);
}

/* corner brackets floating just outside the frame */
.vocations__corners {
	position: absolute;
	inset: -10px;
	--corner-inset: 0;
	--corner-len: 26px;
	--corner-color: rgb(var(--gold-rgb) / 0.6);
	transform: translateZ(14px);
	pointer-events: none;
}

/* brass plate — "II · PALADIN", crossfading with the stage */
.vocations__plate {
	position: absolute;
	left: 50%;
	bottom: -17px;
	z-index: 3;
	min-width: 196px;
	height: 34px;
	transform: translateX(-50%) translateZ(28px);
	--plate-cut: 8px;
	clip-path: polygon(
		var(--plate-cut) 0, calc(100% - var(--plate-cut)) 0, 100% var(--plate-cut),
		100% calc(100% - var(--plate-cut)), calc(100% - var(--plate-cut)) 100%, var(--plate-cut) 100%,
		0 calc(100% - var(--plate-cut)), 0 var(--plate-cut));
	background: linear-gradient(180deg, rgb(var(--gold-rgb) / 0.85), rgb(var(--gold-rgb) / 0.35));
	filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.6));
}

.vocations__plate::before {
	content: "";
	position: absolute;
	inset: 1px;
	clip-path: polygon(
		calc(var(--plate-cut) - 1px) 0, calc(100% - var(--plate-cut) + 1px) 0, 100% calc(var(--plate-cut) - 1px),
		100% calc(100% - var(--plate-cut) + 1px), calc(100% - var(--plate-cut) + 1px) 100%, calc(var(--plate-cut) - 1px) 100%,
		0 calc(100% - var(--plate-cut) + 1px), 0 calc(var(--plate-cut) - 1px));
	background: linear-gradient(180deg, #241d11, #110d07);
}

.vocations__plate .xfade__layer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--spacing-sm);
	padding-inline: var(--spacing-md);
	font-family: var(--font-display);
	font-size: 0.8125rem;
	font-weight: var(--weight-heading);
	letter-spacing: 0.24em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--gold-primary);
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.vocations__plate i {
	font-style: normal;
	line-height: 1;
	padding-right: var(--spacing-sm);
	border-right: 1px solid rgb(var(--gold-rgb) / 0.35);
	color: var(--text-muted);
}

/* --- details --------------------------------------------------------------- */
.vocations__details {
	position: relative;
	min-height: 320px;
}

.vocations__detail {
	position: absolute;
	inset: 0;
	display: grid;
	gap: var(--spacing-md);
	align-content: start;
	opacity: 0;
	transform: translateY(14px);
	visibility: hidden;
	transition:
		opacity var(--duration-slow) var(--ease-cine),
		transform var(--duration-slow) var(--ease-cine),
		visibility 0s linear var(--duration-slow);
}

.vocations__detail.is-active {
	position: relative;
	opacity: 1;
	transform: none;
	visibility: visible;
	transition-delay: 120ms, 120ms, 0s;
}

.vocations__name {
	font-size: var(--text-h1);
	line-height: 1;
}

.vocations__meters {
	display: grid;
	gap: var(--spacing-sm);
	margin-top: var(--spacing-sm);
}

@media (max-width: 1279.98px) {
	.vocations__inner {
		grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(280px, 360px);
		gap: var(--spacing-xl);
	}
}

@media (max-width: 1023.98px) {
	.vocations__inner {
		grid-template-columns: 1fr;
		gap: var(--spacing-xl);
	}

	.vocations__stage {
		width: min(100%, calc(min(560px, 66vh) * 2 / 3));
		margin-bottom: var(--spacing-lg);
	}

	.vocations__details {
		min-height: 0;
	}

	/* the role line has no room in the horizontal tab strip */
	.dlist__sub {
		display: none;
	}

	.dlist--rich .dlist__item {
		align-items: center;
	}

	.dlist--rich .dlist__diamond {
		margin-top: 0;
	}

	[data-autoplay] .dlist__item.is-active::after {
		left: 0;
		right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vocations__stage {
		transform: none;
		transition: none;
	}

	.vocations__frame .xfade__layer.is-active,
	.vocations__frame .xfade__layer.is-active::after,
	.vocations__art {
		animation: none;
	}

	.vocations__bg .xfade__layer::before {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   Full-bleed image band with masked edges
   -------------------------------------------------------------------------- */
.image-band {
	position: relative;
	height: clamp(280px, 40vw, 560px);
	overflow: hidden;
}

.image-band img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(0.85) brightness(0.8);
	-webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
	mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
	position: relative;
	margin-top: var(--section-gap);
	padding-block: var(--spacing-3xl) var(--spacing-xl);
	background: linear-gradient(180deg, var(--bg-primary), var(--bg-deep));
	color: var(--text-secondary);
	font-size: var(--text-small);
}

.site-footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--border-default) 25%, var(--border-default) 75%, transparent);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr repeat(3, 1fr);
	gap: var(--spacing-2xl);
}

.site-footer__brand p {
	max-width: 34ch;
	color: var(--text-muted);
}

.site-footer__blurb {
	margin-top: var(--spacing-lg);
}

.site-footer__status {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	margin-top: var(--spacing-md);
}

.site-footer__heading {
	margin-bottom: var(--spacing-md);
	color: var(--gold-primary);
}

.site-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.site-footer__links a {
	color: var(--text-secondary);
	transition: color var(--duration-fast) var(--ease-cine), padding-left var(--duration-fast) var(--ease-cine);
}

.site-footer__links a:hover {
	color: var(--gold-primary);
	padding-left: 6px;
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--spacing-md);
	margin-top: var(--spacing-2xl);
	padding-top: var(--spacing-lg);
	border-top: 1px solid var(--border-subtle);
	color: var(--text-muted);
	font-size: var(--text-caption);
	letter-spacing: 0.04em;
}

@media (max-width: 1023.98px) {
	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* phones: a compact colophon instead of four stacked columns — brand row on
   top, the three link groups side by side in small type, tighter rhythm */
@media (max-width: 599.98px) {
	.site-footer {
		margin-top: var(--spacing-2xl);
		padding-block: var(--spacing-2xl) var(--spacing-lg);
	}

	.site-footer__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--spacing-xl) var(--spacing-md);
	}

	.site-footer__brand {
		grid-column: 1 / -1;
	}

	.site-footer__brand p {
		max-width: none;
		font-size: var(--text-caption);
	}

	.site-footer__blurb {
		margin-top: var(--spacing-md);
	}

	.site-footer__status {
		margin-top: var(--spacing-sm);
	}

	.site-footer__heading {
		margin-bottom: var(--spacing-sm);
		padding-bottom: 6px;
		border-bottom: 1px solid var(--border-subtle);
		font-size: 0.72rem;
		letter-spacing: 0.08em;
	}

	.site-footer__links {
		gap: 6px;
		font-size: 0.8rem;
		line-height: 1.3;
	}

	.site-footer__links a {
		display: block;
		padding-block: 2px;
	}

	.site-footer__links a:hover {
		padding-left: 0;
	}

	.site-footer__bottom {
		margin-top: var(--spacing-lg);
		padding-top: var(--spacing-md);
	}
}

/* very narrow phones: two link columns, the third group flows under the first */
@media (max-width: 359.98px) {
	.site-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* --------------------------------------------------------------------------
   Utilities for images as protagonists
   -------------------------------------------------------------------------- */
.bleed {
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

.fade-edges-y {
	-webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
}

.fade-edges-x {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
