/**
 * Premium welcome splash — mobile-first CSS animations.
 */

.rim-welcome-splash {
	--rim-ws-gold: var(--go-accent, #d4af37);
	--rim-ws-gold-soft: #e8c76a;
	--rim-ws-wine: var(--go-primary, #6b0f18);
	--rim-ws-ink: #fff8ec;
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: grid;
	place-items: stretch;
	background: #1a0508;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.55s ease;
}

.rim-welcome-splash[hidden] {
	display: none !important;
}

.rim-welcome-splash.is-visible {
	opacity: 1;
	pointer-events: auto;
}

.rim-welcome-splash.is-leaving {
	opacity: 0;
	pointer-events: none;
}

.rim-welcome-splash__stage {
	position: relative;
	overflow: hidden;
	min-height: 100%;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
	box-sizing: border-box;
}

.rim-welcome-splash__bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.rim-welcome-splash__bg-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 58%;
	transform: scale(1.08);
	opacity: 0;
	filter: saturate(1.05) contrast(1.02);
	will-change: transform, opacity;
}

.rim-welcome-splash.is-visible .rim-welcome-splash__bg-img {
	animation: rim-ws-bg 3.2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.rim-welcome-splash__veil {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 55% at 50% 38%, transparent 0%, rgba(20, 4, 6, 0.35) 55%, rgba(12, 2, 4, 0.72) 100%),
		linear-gradient(180deg, rgba(40, 8, 12, 0.45) 0%, transparent 28%, transparent 58%, rgba(12, 2, 4, 0.7) 100%);
	pointer-events: none;
}

.rim-welcome-splash__food-glow {
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: 8%;
	height: 42%;
	background: radial-gradient(ellipse at 50% 70%, rgba(212, 175, 55, 0.22) 0%, transparent 68%);
	opacity: 0;
	pointer-events: none;
	mix-blend-mode: screen;
}

.rim-welcome-splash.is-visible .rim-welcome-splash__food-glow {
	animation: rim-ws-glow 2.8s ease-in-out 0.7s infinite alternate;
}

.rim-welcome-splash__credit {
	position: absolute;
	top: max(0.75rem, env(safe-area-inset-top));
	left: max(0.75rem, env(safe-area-inset-left));
	z-index: 5;
	margin: 0;
	padding: 0.28rem 0.55rem;
	border-radius: 999px;
	background: rgba(18, 4, 6, 0.62);
	border: 1px solid color-mix(in srgb, var(--rim-ws-gold) 45%, transparent);
	color: color-mix(in srgb, var(--rim-ws-ink) 92%, #fff);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.2;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	pointer-events: none;
	opacity: 0;
}

.rim-welcome-splash.is-visible .rim-welcome-splash__credit {
	animation: rim-ws-fade-up 0.55s ease 0.15s forwards;
}

.rim-welcome-splash__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.55rem;
	max-width: 22rem;
	margin-top: -6vh;
	padding: 0 0.5rem;
}

.rim-welcome-splash__logo,
.rim-welcome-splash__mark {
	width: 4.5rem;
	height: 4.5rem;
	object-fit: contain;
	opacity: 0;
	filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.rim-welcome-splash__mark {
	border-radius: 999px;
	border: 1.5px solid var(--rim-ws-gold);
	background:
		radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rim-ws-gold) 35%, transparent), transparent 70%),
		rgba(20, 4, 6, 0.35);
}

.rim-welcome-splash.is-visible .rim-welcome-splash__logo,
.rim-welcome-splash.is-visible .rim-welcome-splash__mark {
	animation: rim-ws-fade-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.35s forwards;
}

.rim-welcome-splash__brand {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.45rem, 5.2vw, 1.85rem);
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--rim-ws-gold-soft);
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
	opacity: 0;
}

.rim-welcome-splash.is-visible .rim-welcome-splash__brand {
	animation: rim-ws-fade-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.5s forwards;
}

.rim-welcome-splash__rule {
	width: 4.5rem;
	height: 1px;
	margin: 0.15rem 0 0.1rem;
	background: linear-gradient(90deg, transparent, var(--rim-ws-gold), transparent);
	opacity: 0;
}

.rim-welcome-splash.is-visible .rim-welcome-splash__rule {
	animation: rim-ws-fade-up 0.55s ease 0.7s forwards;
}

.rim-welcome-splash__headline {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.05rem, 4.2vw, 1.28rem);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rim-ws-ink);
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
	opacity: 0;
}

.rim-welcome-splash.is-visible .rim-welcome-splash__headline {
	animation: rim-ws-fade-up 0.75s cubic-bezier(0.22, 0.61, 0.36, 1) 0.85s forwards;
}

.rim-welcome-splash__subtitle {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--rim-ws-gold-soft) 80%, #fff);
	opacity: 0;
}

.rim-welcome-splash.is-visible .rim-welcome-splash__subtitle {
	animation: rim-ws-fade-up 0.7s ease 1.05s forwards;
}

.rim-welcome-splash__footer {
	position: absolute;
	left: 1.5rem;
	right: 1.5rem;
	bottom: max(1.35rem, env(safe-area-inset-bottom));
	z-index: 2;
	display: flex;
	justify-content: center;
}

.rim-welcome-splash__progress {
	display: block;
	width: min(11rem, 55vw);
	height: 2px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--rim-ws-gold) 22%, transparent);
	overflow: hidden;
	opacity: 0;
}

.rim-welcome-splash.is-visible .rim-welcome-splash__progress {
	animation: rim-ws-fade-up 0.4s ease 0.4s forwards;
}

.rim-welcome-splash__progress-bar {
	display: block;
	height: 100%;
	width: 0%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--rim-ws-gold), var(--rim-ws-gold-soft));
	transform-origin: left center;
}

.rim-welcome-splash.is-visible .rim-welcome-splash__progress-bar {
	animation: rim-ws-progress var(--rim-ws-duration, 3s) linear 0.2s forwards;
}

.rim-welcome-splash__skip {
	position: absolute;
	right: max(0.75rem, env(safe-area-inset-right));
	bottom: max(0.85rem, env(safe-area-inset-bottom));
	z-index: 6;
	margin: 0;
	padding: 0.45rem 0.8rem;
	border: 1px solid color-mix(in srgb, var(--rim-ws-gold) 40%, transparent);
	border-radius: 999px;
	background: rgba(18, 4, 6, 0.45);
	color: var(--rim-ws-ink);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	opacity: 0;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.rim-welcome-splash.is-visible .rim-welcome-splash__skip {
	animation: rim-ws-fade-up 0.4s ease 1.2s forwards;
}

.rim-welcome-splash__skip:focus-visible {
	outline: 2px solid var(--rim-ws-gold);
	outline-offset: 2px;
}

@keyframes rim-ws-bg {
	0% {
		opacity: 0;
		transform: scale(1.08);
	}
	35% {
		opacity: 1;
	}
	100% {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes rim-ws-fade-up {
	from {
		opacity: 0;
		transform: translateY(0.7rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes rim-ws-glow {
	from {
		opacity: 0.25;
		transform: scale(0.96);
	}
	to {
		opacity: 0.7;
		transform: scale(1.04);
	}
}

@keyframes rim-ws-progress {
	from {
		width: 0%;
	}
	to {
		width: 100%;
	}
}

@media (min-width: 901px) {
	.rim-welcome-splash__content {
		max-width: 28rem;
		margin-top: -4vh;
	}

	.rim-welcome-splash__logo,
	.rim-welcome-splash__mark {
		width: 5.25rem;
		height: 5.25rem;
	}

	.rim-welcome-splash__bg-img {
		object-position: center 38%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rim-welcome-splash,
	.rim-welcome-splash__bg-img,
	.rim-welcome-splash__credit,
	.rim-welcome-splash__logo,
	.rim-welcome-splash__mark,
	.rim-welcome-splash__brand,
	.rim-welcome-splash__rule,
	.rim-welcome-splash__headline,
	.rim-welcome-splash__subtitle,
	.rim-welcome-splash__progress,
	.rim-welcome-splash__progress-bar,
	.rim-welcome-splash__food-glow,
	.rim-welcome-splash__skip {
		animation: none !important;
		transition: opacity 0.2s ease !important;
	}

	.rim-welcome-splash.is-visible .rim-welcome-splash__bg-img,
	.rim-welcome-splash.is-visible .rim-welcome-splash__credit,
	.rim-welcome-splash.is-visible .rim-welcome-splash__logo,
	.rim-welcome-splash.is-visible .rim-welcome-splash__mark,
	.rim-welcome-splash.is-visible .rim-welcome-splash__brand,
	.rim-welcome-splash.is-visible .rim-welcome-splash__rule,
	.rim-welcome-splash.is-visible .rim-welcome-splash__headline,
	.rim-welcome-splash.is-visible .rim-welcome-splash__subtitle,
	.rim-welcome-splash.is-visible .rim-welcome-splash__progress,
	.rim-welcome-splash.is-visible .rim-welcome-splash__skip {
		opacity: 1;
		transform: none;
	}

	.rim-welcome-splash.is-visible .rim-welcome-splash__bg-img {
		transform: scale(1);
	}

	.rim-welcome-splash.is-visible .rim-welcome-splash__food-glow {
		opacity: 0.35;
	}

	.rim-welcome-splash.is-visible .rim-welcome-splash__progress-bar {
		width: 100%;
	}
}

html.rim-welcome-splash-active,
html.rim-welcome-splash-active body {
	overflow: hidden;
}
