/* =====================================================================
   Úvodní stránka „Dva světy“ – rozcestí a soumrak (převzato z návrhu 3,
   oblečeno do Moderního studia: Bricolage, sklo, modrý gradient / Cinzel a zlato).
   Načítá se jen na úvodní stránce.
   ===================================================================== */

/* ---------- Rozcestí: den | noc ---------- */
.mms-way {
	--split: 50%;
	--slant: 7vw;
	position: relative; isolation: isolate;
	display: flex;
	margin-top: calc(-1 * (var(--mm-header-h) + 14px));
	min-height: min(900px, 100svh);
	overflow: hidden;
	background: #141414;
	transition: --split .9s var(--mm-ease);
}
@property --split { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.mms-way:has(.mms-way__half--day:hover) { --split: 57%; }
.mms-way:has(.mms-way__half--night:hover) { --split: 43%; }

.mms-way__half {
	position: relative; isolation: isolate;
	display: flex; align-items: center;
	padding: calc(var(--mm-header-h) + 14px + clamp(40px, 6vw, 90px)) clamp(24px, 5vw, 84px) clamp(64px, 7vw, 110px);
	overflow: hidden;
}
.mms-way__half--day {
	flex: 0 0 calc(var(--split) + var(--slant) / 2);
	justify-content: flex-end;
	padding-right: calc(var(--slant) + clamp(24px, 4vw, 64px));
	background: linear-gradient(165deg, #F7FAFC 0%, #EAF6FC 50%, #cfe9f6 100%);
	color: var(--mm-ink);
	z-index: 1;
}
.mms-way__half--night {
	flex: 1 1 auto;
	margin-left: calc(var(--slant) * -1);
	padding-left: calc(var(--slant) + clamp(24px, 4vw, 64px));
	clip-path: polygon(var(--slant) 0, 100% 0, 100% 100%, 0 100%);
	background: #141414;
	color: #EDE3C8;
	z-index: 2;
}
.mms-way__body { position: relative; z-index: 3; max-width: 540px; }

.mms-way__title {
	margin: 0 0 22px; font-weight: 800; color: var(--mm-ink);
	font-size: clamp(40px, 5vw, 80px); line-height: .96; letter-spacing: -.04em;
	font-variation-settings: "opsz" 96;
}
body.mms .mms-way .mms-way__title--night {
	font-family: "Cinzel", Georgia, serif; font-weight: 600; letter-spacing: .01em; line-height: 1;
	font-size: clamp(44px, 6vw, 92px); color: #EDE3C8;
	text-shadow: 0 0 40px rgba(0, 0, 0, .8);
}
.mms-way__title--night em {
	display: block; font-style: normal;
	background: linear-gradient(135deg, #F3DC97 0%, #E2C878 40%, #C8A84B 75%, #9C7F2E 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 0 24px rgba(200, 168, 75, .4));
}
.mms-way__lead { margin: 0 0 22px; max-width: 46ch; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.65; }
.mms-way__half--day .mms-way__lead { color: var(--mm-slate); }
.mms-way__half--night .mms-way__lead { color: rgba(237, 227, 200, .86); font-family: Georgia, serif; font-style: italic; }

.mms-way__kicker {
	display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
	font: 600 13px/1.2 "Cinzel", Georgia, serif; letter-spacing: .26em; text-transform: uppercase; color: #C8A84B;
}
.mms-way__kicker .mms-ico { width: 18px; height: 18px; color: #E2C878; filter: drop-shadow(0 0 8px rgba(226, 200, 120, .7)); }

.mms-way__links { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mms-way__links a {
	display: inline-block; padding: 8px 15px; border-radius: 999px;
	font: 600 14px/1.2 var(--mm-f-body); text-decoration: none;
	transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--mm-ease);
}
.mms-way__half--day .mms-way__links a { background: rgba(255, 255, 255, .7); color: var(--mm-deep); border: 1px solid rgba(41, 171, 226, .25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.mms-way__half--day .mms-way__links a:hover { background: #fff; border-color: var(--mm-sky); transform: translateY(-2px); }
.mms-way__half--night .mms-way__links a { background: rgba(20, 20, 20, .5); color: #EDE3C8; border: 1px solid rgba(200, 168, 75, .35); }
.mms-way__half--night .mms-way__links a:hover { background: rgba(200, 168, 75, .12); color: #F3DC97; border-color: #C8A84B; transform: translateY(-2px); }

/* Den: aurora a mřížka z hero */
.mms-way__half--day .mms-aurora { z-index: 0; }
.mms-way__half--day .mms-grid-lines { z-index: 0; }
/* Den: „tmavítko“ – měkký stín mraku, který sleduje myš (obdoba pochodně v noci) */
.mms-way__shade {
	position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background:
		radial-gradient(circle 320px at var(--mx, 30%) var(--my, 45%), rgba(15, 38, 51, .34), rgba(27, 127, 168, .14) 42%, transparent 70%);
	mix-blend-mode: multiply;
	opacity: 0; transition: opacity .6s var(--mm-ease);
	animation: mmsCloud 5s ease-in-out infinite;
}
.mms-way__half--day:hover .mms-way__shade { opacity: 1; }
@keyframes mmsCloud { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* Noc: fotka šatlavy, pochodeň za myší, mlha */
.mms-way__photo {
	position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
	filter: grayscale(.3) brightness(.45) contrast(1.1) sepia(.25);
	transform: scale(1.05);
	-webkit-mask-image: linear-gradient(100deg, rgba(0, 0, 0, .15) 15%, #000 75%);
	mask-image: linear-gradient(100deg, rgba(0, 0, 0, .15) 15%, #000 75%);
	transition: transform 1.4s var(--mm-ease);
}
.mms-way__half--night:hover .mms-way__photo { transform: scale(1.09); }
.mms-way__torch {
	position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background:
		radial-gradient(circle 340px at var(--mx, 70%) var(--my, 40%), rgba(255, 176, 80, .26), rgba(200, 168, 75, .08) 45%, transparent 70%),
		radial-gradient(120% 90% at 50% 50%, transparent 40%, rgba(0, 0, 0, .78) 100%);
	mix-blend-mode: screen;
	animation: mmsFlame 3.4s ease-in-out infinite;
}
@keyframes mmsFlame { 0%, 100% { opacity: 1; } 30% { opacity: .82; } 55% { opacity: .95; } 75% { opacity: .78; } }
.mms-way__fog {
	position: absolute; left: -20%; right: -20%; bottom: -10%; height: 55%; z-index: 2; pointer-events: none;
	filter: blur(24px);
	background:
		radial-gradient(40% 60% at 25% 70%, rgba(210, 200, 180, .16), transparent 70%),
		radial-gradient(40% 60% at 70% 80%, rgba(210, 200, 180, .12), transparent 70%);
	animation: mmsFog 26s linear infinite alternate;
}
@keyframes mmsFog { from { transform: translateX(-8%); } to { transform: translateX(8%); } }

/* Pečeť na hranici: půl slunce, půl měsíce */
.mms-way__seal {
	position: absolute; z-index: 5; top: 56%;
	/* Střed přesně na šikmé dělicí čáře: ve výšce t je čára v x = split + slant · (0,5 − t) */
	left: calc(var(--split) - var(--slant) * .06);
	width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%;
	/* Předěl pečeti má stejný sklon jako řez (--tilt dopočítá skript podle výšky rozcestí) */
	background: linear-gradient(calc(90deg + var(--tilt, 4deg)), #fff 0 50%, #141414 50% 100%);
	box-shadow: 0 0 0 6px rgba(255, 255, 255, .14), 0 20px 50px -10px rgba(0, 0, 0, .6);
	pointer-events: none;
}
.mms-way__seal::before {
	content: ""; position: absolute; inset: -12px; border-radius: 50%;
	border: 1.5px dashed rgba(200, 168, 75, .7);
	animation: mmsSpin 40s linear infinite;
}
@keyframes mmsSpin { to { transform: rotate(360deg); } }
.mms-way__sun, .mms-way__moon { position: absolute; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; }
.mms-way__sun { left: 13px; box-shadow: 0 0 0 4px rgba(41, 171, 226, .15), 0 0 18px rgba(41, 171, 226, .55); background: var(--mm-grad); }
.mms-way__moon { right: 13px; background: radial-gradient(circle at 35% 35%, #fffbe9, #E2C878 70%); box-shadow: inset -6px -3px 0 rgba(156, 127, 46, .55), 0 0 16px rgba(226, 200, 120, .55); }

.mms-way__down {
	position: absolute; z-index: 6; left: 50%; bottom: 22px;
	width: 46px; height: 46px; margin-left: -23px; border-radius: 50%;
	display: grid; place-items: center;
	color: #fff !important; background: rgba(20, 20, 20, .5);
	border: 1px solid rgba(255, 255, 255, .25);
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
	animation: mmsBob 2.4s ease-in-out infinite;
}
.mms-way__down .mms-ico { width: 20px; height: 20px; }
@keyframes mmsBob { 50% { transform: translateY(6px); } }

/* Náběh */
.mms-way__body > * { animation: mmsRise .9s var(--mm-ease) both; }
.mms-way__body > *:nth-child(2) { animation-delay: .08s; }
.mms-way__body > *:nth-child(3) { animation-delay: .16s; }
.mms-way__body > *:nth-child(4) { animation-delay: .24s; }
.mms-way__body > *:nth-child(5) { animation-delay: .32s; }
.mms-way__half--night .mms-way__body > * { animation-name: mmsRiseNight; animation-duration: 1.3s; }
@keyframes mmsRise { from { opacity: 0; transform: translateY(18px); } }
@keyframes mmsRiseNight { from { opacity: 0; filter: blur(6px); transform: translateY(10px); } }

@media (max-width: 960px) {
	.mms-way { flex-direction: column; min-height: 0; --slant: 12vw; }
	.mms-way:has(.mms-way__half--day:hover), .mms-way:has(.mms-way__half--night:hover) { --split: 50%; }
	.mms-way__half--day { flex: none; justify-content: flex-start; padding-right: clamp(20px, 5vw, 40px); padding-bottom: calc(var(--slant) + 48px); }
	.mms-way__half--night {
		flex: none; margin-left: 0; margin-top: calc(var(--slant) * -1);
		padding: calc(var(--slant) + 44px) clamp(20px, 5vw, 40px) 64px;
		clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
	}
	.mms-way__seal, .mms-way__down { display: none; }
	.mms-way__title { font-size: clamp(38px, 10vw, 56px); }
	.mms-way__title--night { font-size: clamp(42px, 12vw, 64px); }
}

/* Plakát Řetězů osudu v „Aktuálně nabízíme“ = vstup do noci: zlatý rám */
body.mms-front .mms-current a[href*="retezy-osudu"] img {
	box-shadow: 0 0 0 1px rgba(200, 168, 75, .6), 0 0 0 7px #141414, 0 30px 60px -24px rgba(0, 0, 0, .7) !important;
}

/* ---------- Soumrak: scrollem se den převalí do noci ---------- */
.mms-dusk { --p: 0; position: relative; height: 230vh; margin-top: clamp(40px, 6vw, 80px); }
/* Noc se na konci rozplyne do světlé patičky */
.mms-dusk { margin-bottom: 160px; }
.mms-dusk::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 160px; background: linear-gradient(180deg, #1b1b20 0%, var(--mm-mist) 100%); }
.mms-dusk__scene { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.mms-dusk__scene > * { position: absolute; }
.mms-dusk__sky { inset: 0; background: linear-gradient(180deg, #F7FAFC 0%, #EAF6FC 55%, #cde8f5 100%); }
.mms-dusk__sky::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, #4f7c9a 0%, #d58a68 62%, #f2c38a 100%);
	opacity: calc(min(var(--p) * 2.2, 2.2 - var(--p) * 2.2));
}
.mms-dusk__night {
	inset: 0;
	background: radial-gradient(70% 60% at 50% 100%, rgba(200, 168, 75, .16), transparent 70%), linear-gradient(180deg, #070708 0%, #121214 60%, #1a1917 100%);
	opacity: clamp(0, calc(var(--p) * 1.9 - .65), 1);
}
.mms-dusk__stars {
	inset: 0 0 35% 0;
	background-image:
		radial-gradient(1.6px 1.6px at 10% 20%, #fff, transparent), radial-gradient(1px 1px at 22% 48%, #fff, transparent),
		radial-gradient(1.4px 1.4px at 35% 12%, #fff, transparent), radial-gradient(1px 1px at 47% 35%, #fff, transparent),
		radial-gradient(1.7px 1.7px at 60% 18%, #fff, transparent), radial-gradient(1px 1px at 71% 44%, #fff, transparent),
		radial-gradient(1.3px 1.3px at 83% 10%, #fff, transparent), radial-gradient(1px 1px at 92% 32%, #fff, transparent),
		radial-gradient(1.2px 1.2px at 5% 60%, #fff, transparent), radial-gradient(1px 1px at 55% 62%, #fff, transparent);
	opacity: clamp(0, calc((var(--p) - .6) * 2.6), .9);
}
.mms-dusk__sun {
	width: 180px; height: 180px; border-radius: 50%; left: calc(50% - 90px); top: 14%;
	background: radial-gradient(circle, #fff7d6 0%, #ffd36b 45%, #f7a54a 100%);
	box-shadow: 0 0 120px 40px rgba(255, 200, 100, .45);
	transform: translateY(calc(var(--p) * 62vh));
	opacity: clamp(0, calc(1.25 - var(--p) * 1.4), 1);
}
.mms-dusk__moon {
	width: 96px; height: 96px; border-radius: 50%; right: 14%; top: 10%;
	background: radial-gradient(circle at 35% 35%, #fffbe9, #E2C878 70%);
	box-shadow: 0 0 60px 10px rgba(230, 205, 130, .35), inset -18px -10px 0 0 rgba(160, 130, 60, .35);
	transform: translateY(calc((1 - var(--p)) * 55vh));
	opacity: clamp(0, calc((var(--p) - .45) * 2.4), 1);
}
.mms-dusk__castle { left: 0; bottom: 0; width: 100%; height: 46vh; }
.mms-dusk__hills { fill: color-mix(in srgb, #1b1b20 calc(var(--p) * 100%), #bfe0ef); }
.mms-dusk__keep { fill: color-mix(in srgb, #060607 calc(var(--p) * 100%), #7fb8d3); }
.mms-dusk__window { fill: #ffc861; opacity: clamp(0, calc((var(--p) - .55) * 3), 1); filter: drop-shadow(0 0 6px #ffb347); }

.mms-dusk__texts { position: relative !important; z-index: 3; display: grid; place-items: center; padding: 0 20px; margin-top: -12vh; text-align: center; }
.mms-dusk__texts > * { grid-area: 1 / 1; }
.mms-dusk__day {
	margin: 0; max-width: 20ch;
	font: 800 clamp(30px, 4.4vw, 60px)/1.05 var(--mm-f-display); letter-spacing: -.035em; color: var(--mm-ink);
	opacity: clamp(0, calc(1 - var(--p) * 2.6), 1);
	transform: translateY(calc(var(--p) * -60px));
}
.mms-dusk__nightcopy {
	opacity: clamp(0, calc((var(--p) - .45) * 3), 1);
	transform: translateY(calc((1 - var(--p)) * 40px));
	pointer-events: none;
}
.mms-dusk.is-night .mms-dusk__nightcopy { pointer-events: auto; }
.mms-dusk__kicker { margin: 0 0 14px; font: 600 13px/1.2 "Cinzel", Georgia, serif; letter-spacing: .26em; text-transform: uppercase; color: #C8A84B; }
.mms-dusk__title {
	margin: 0 0 34px;
	font: 600 clamp(34px, 5.4vw, 76px)/1.05 "Cinzel", Georgia, serif; color: #EDE3C8;
	text-shadow: 0 0 40px rgba(200, 168, 75, .35);
}
.mms-dusk .mms-actions { justify-content: center; }
.mms-btn--glass { background: rgba(255, 255, 255, .06); color: #EDE3C8 !important; border: 1px solid rgba(200, 168, 75, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mms-btn--glass:hover { background: rgba(200, 168, 75, .14); border-color: #C8A84B; }

/* Soumrak končí v noci – výzva nad patičkou se na úvodu neopakuje */
body.mms-front .mms-cta-band { display: none; }
body.mms-front .mms-dusk + * { margin-top: 0; }

/* Hlavička ztmavne, jakmile se při soumraku setmí */
.mms-header.is-night .mms-header__bar::before { background: rgba(16, 16, 16, .8); border-color: rgba(200, 168, 75, .25); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .9); }
.mms-header.is-night .mms-menu > li > a { color: #E6DCC2; }
.mms-header.is-night .mms-menu > li > a:hover { background: rgba(200, 168, 75, .1); color: #E2C878; }
.mms-header.is-night .mms-sub-toggle, .mms-header.is-night .mms-social a { color: #A89F8A !important; }
.mms-header.is-night .mms-burger { background: rgba(255, 255, 255, .05); border-color: rgba(200, 168, 75, .25); color: #E2C878; }
.mms-header .mms-menu > li > a { transition: background-color .5s, color .5s; }

@media (prefers-reduced-motion: reduce) {
	.mms-way__shade, .mms-way__torch, .mms-way__fog, .mms-way__seal::before, .mms-way__down, .mms-way__body > * { animation: none !important; }
	.mms-way { transition: none; }
	.mms-dusk { height: auto; }
	.mms-dusk__scene { position: relative; --p: 1; }
}
