/* Morta OBS overlays: shared brand tokens, fonts and motifs. */
@font-face { font-family: "Cinzel"; src: url(../assets/fonts/cinzel-latin-wght-normal.woff2) format("woff2"); font-weight: 400 900; font-display: block; }
@font-face { font-family: "Inter"; src: url(../assets/fonts/inter-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: block; }

@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
	--bg: #0f0b0a;
	--bg-2: #161110;
	--panel: #1c1513;
	--line: #3a2b25;
	--text: #f3e9df;
	--muted: #a8968a;
	--ember: #ff7a1a;
	--ember-2: #ffb46a;
	--ember-deep: #c2410c;
	--blood: #c8102e;
	--blood-deep: #7f1d1d;
	--gold: #e5d3b3;
	--bronze: #a68a5c;
	--steel: #d9d4cf;
	--display: "Cinzel", Georgia, serif;
	--font: "Inter", "Segoe UI", system-ui, sans-serif;
	--ease-out: cubic-bezier(.16, 1, .3, 1);
	--ease-in: cubic-bezier(.7, 0, .84, 0);
	--ease-blade: cubic-bezier(.77, 0, .18, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: var(--font); color: var(--text); background: transparent; -webkit-font-smoothing: antialiased; }
body.solid { background: var(--bg); }

.display { font-family: var(--display); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* Steel lettering with a bronze rim, like the logo. */
.steel {
	background: linear-gradient(180deg, #ffffff 0%, #e9e4de 38%, #9c958e 52%, #f2ede8 70%, #b9b1a8 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 2px 0 #2a1d16) drop-shadow(0 0 18px rgba(255, 122, 26, .25));
}
.ember-text {
	background: linear-gradient(180deg, #ffe2b8 0%, #ffb46a 35%, #ff7a1a 60%, #c2410c 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 0 14px rgba(255, 122, 26, .45));
}

/* Blade divider with the crest gem in the middle. */
.divider { position: relative; height: 18px; display: flex; align-items: center; justify-content: center; }
.divider::before, .divider::after {
	content: ""; flex: 1; height: 2px;
	background: linear-gradient(90deg, transparent, var(--bronze) 40%, var(--ember-2));
}
.divider::after { transform: scaleX(-1); }
.gem {
	width: 14px; height: 14px; margin: 0 14px; flex: none; transform: rotate(45deg);
	background: radial-gradient(circle at 35% 35%, #ff8a8a, var(--blood) 45%, #4a0610 100%);
	border: 1.5px solid #f3c9a0;
	box-shadow: 0 0 10px 2px rgba(200, 16, 46, .8), 0 0 28px 6px rgba(255, 90, 30, .35);
	animation: gem-pulse 2.6s ease-in-out infinite;
}
@keyframes gem-pulse {
	0%, 100% { box-shadow: 0 0 8px 1px rgba(200, 16, 46, .7), 0 0 20px 4px rgba(255, 90, 30, .25); }
	50% { box-shadow: 0 0 14px 4px rgba(255, 40, 60, 1), 0 0 40px 10px rgba(255, 110, 30, .5); }
}

/* Logo with a metal sheen that sweeps across it (masked to the logo's shape). */
.logo { position: relative; display: inline-block; line-height: 0; }
.logo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .7)) drop-shadow(0 0 30px rgba(200, 16, 46, .25)); }
.logo::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .85) 48%, rgba(255, 200, 150, .5) 52%, transparent 65%) no-repeat;
	background-size: 250% 100%; background-position: 150% 0;
	-webkit-mask: var(--logo-mask, url(../assets/logo.png)) center / 100% 100% no-repeat;
	mask: var(--logo-mask, url(../assets/logo.png)) center / 100% 100% no-repeat;
	mix-blend-mode: overlay; animation: sheen 7s ease-in-out 2.4s infinite;
}
@keyframes sheen { 0% { background-position: 150% 0; } 30%, 100% { background-position: -60% 0; } }

/* Logo forging in: white-hot and blurred, cooling to steel. */
@keyframes forge-in {
	0% { opacity: 0; transform: scale(1.18); filter: blur(18px) brightness(3) saturate(0); }
	45% { opacity: 1; filter: blur(2px) brightness(1.8) saturate(.6); }
	100% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1) saturate(1); }
}

/* Letters rising out of the embers (.split > span). */
.split > span { display: inline-block; white-space: pre; }
.play .split > span { animation: rise .9s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms + var(--d, 0ms)); }
@keyframes rise {
	0% { opacity: 0; transform: translateY(.6em) scale(.9); filter: blur(8px) brightness(2.5); }
	60% { filter: blur(0) brightness(1.4); }
	100% { opacity: 1; transform: none; filter: blur(0) brightness(1); }
}

/* Running fire border: add .fire-border to any positioned box. */
.fire-border::before {
	content: ""; position: absolute; inset: 0; border-radius: inherit; padding: var(--bw, 3px); pointer-events: none;
	background: conic-gradient(from var(--spin), var(--bronze) 0deg, #5a3d22 60deg, var(--ember) 110deg, #fff1d6 125deg, var(--ember) 140deg, #5a3d22 190deg, var(--bronze) 240deg, var(--blood) 300deg, var(--bronze) 360deg);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor; mask-composite: exclude;
	animation: spin 6s linear infinite;
}
@keyframes spin { to { --spin: 360deg; } }

.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
