/*
 * DME Bunker — Cinematic Sektor-Auswahl (Uebersicht).
 * Vollbild-Held-Bild des fokussierten Bunkers + Filmstreifen aller 6 Bunker.
 * Auswahl crossfadet den Hintergrund; "Rundgang starten" mountet den bestehenden
 * Viewer inline (window.DmbTour). Reines DOM/CSS (Crossfade + Ken-Burns), kein 3D/WebGL.
 * Ansichten (Klasse auf .dmb): is-view-console | is-view-tour.
 */

/* ---- Ansichts-Umschaltung ---- */
.dmb .dmb-tourmount { display: none; position: relative; }
.dmb.is-view-tour .dmb-cine { display: none; }
.dmb.is-view-tour .dmb-tourmount { display: block; }

/* ---- Buehne: 16:9 wie der Rundgang ---- */
.dmb .dmb-cine {
	position: relative; z-index: 1; overflow: hidden;
	width: min(100%, 82vh * 16 / 9);
	aspect-ratio: 16 / 9;
	margin-inline: auto;
	border: 1px solid var(--line-2);
	border-radius: var(--dmb-radius-lg);
	background: #05080a;
	box-shadow: var(--dmb-shadow-inset), 0 18px 50px rgba(0, 0, 0, .55), 0 0 40px rgba(34, 211, 238, .08);
	animation: dmb-cine-in .4s ease both;
	-webkit-tap-highlight-color: transparent; user-select: none;
}
@keyframes dmb-cine-in { from { opacity: 0; } to { opacity: 1; } }

/* ---- Hintergrund-Held-Bilder (zwei Layer fuer Crossfade) ---- */
.dmb .dmb-cine-bg {
	position: absolute; inset: 0; z-index: 0;
	background-size: cover; background-position: center;
	opacity: 0; transition: opacity .7s ease;
}
.dmb .dmb-cine-bg.is-on { opacity: 1; animation: dmb-cine-kb 26s ease-in-out infinite alternate; }
@keyframes dmb-cine-kb {
	from { transform: scale(1.06) translate(-1.2%, -.8%); }
	to   { transform: scale(1.15) translate(1.2%, .8%); }
}

/* ---- Scrim: cinematische Lesbarkeit + Akzentfarbton ---- */
.dmb .dmb-cine-scrim {
	position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background:
		linear-gradient(90deg, rgba(3, 6, 8, .94) 0%, rgba(3, 6, 8, .64) 30%, rgba(3, 6, 8, .12) 60%, transparent 80%),
		linear-gradient(0deg, rgba(3, 6, 8, .92) 0%, rgba(3, 6, 8, .32) 28%, transparent 54%),
		linear-gradient(90deg, color-mix(in srgb, var(--ac, var(--cyan)) 18%, transparent), transparent 52%);
}

/* ---- HUD oben ---- */
.dmb .dmb-cine-hud {
	position: absolute; z-index: 4; top: 0; left: 0; right: 0;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: clamp(14px, 1.8vw, 24px) clamp(16px, 2.4vw, 34px);
	pointer-events: none;
	background: linear-gradient(180deg, rgba(4, 8, 11, .6), transparent);
}
.dmb .dmb-cine-hud-title { font-family: 'Chakra Petch', sans-serif; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: clamp(.8em, 1.4vw, 1.05em); color: var(--txt); }
.dmb .dmb-cine-hud-title b { color: var(--cyan-br); }
.dmb .dmb-cine-hud-meta { font-family: 'Chakra Petch', sans-serif; letter-spacing: .14em; text-transform: uppercase; font-size: clamp(.6em, 1vw, .74em); color: var(--txt-dim); }

/* ---- Briefing-Inhalt (links/unten) ---- */
.dmb .dmb-cine-body {
	position: absolute; z-index: 3; left: 0; bottom: clamp(98px, 13vw, 156px);
	max-width: min(62%, 660px);
	padding: 0 clamp(18px, 3.4vw, 54px);
	animation: dmb-cine-body-in .5s ease both;
}
@keyframes dmb-cine-body-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dmb .dmb-cine-badge {
	display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px;
	padding: 4px 11px; border-radius: var(--dmb-pill);
	font-family: 'Chakra Petch', sans-serif; letter-spacing: .14em; text-transform: uppercase; font-size: .66em; font-weight: 700;
	background: rgba(4, 8, 11, .66); border: 1px solid var(--line-2); color: var(--ac, var(--cyan));
}
.dmb .dmb-cine-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
.dmb .dmb-cine-badge.is-offline { color: var(--txt-dim); }
.dmb .dmb-cine-badge.is-offline::before { box-shadow: none; }
.dmb .dmb-cine-kicker { font-family: 'Chakra Petch', sans-serif; letter-spacing: .3em; text-transform: uppercase; font-size: clamp(.6em, 1vw, .74em); color: var(--ac, var(--cyan)); margin-bottom: 8px; }
.dmb .dmb-cine-name { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: clamp(1.8em, 4.6vw, 3.3em); line-height: 1.03; color: #fff; margin: 0; text-shadow: 0 2px 30px rgba(0, 0, 0, .6); }
.dmb .dmb-cine-sub { margin-top: 10px; color: var(--txt); font-size: clamp(.92em, 1.5vw, 1.1em); opacity: .94; }
.dmb .dmb-cine-text { margin-top: 12px; color: #b6c6cc; max-width: 54ch; font-size: clamp(.88em, 1.25vw, 1.02em); line-height: 1.6; }
.dmb .dmb-cine-actions { margin-top: clamp(16px, 2.4vw, 28px); }

/* CTA */
.dmb .dmb-cine-start {
	display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px;
	border-radius: var(--dmb-pill); cursor: pointer; border: 1px solid var(--ac, var(--cyan)); color: #04181c;
	font-family: 'Chakra Petch', sans-serif; font-weight: 700; letter-spacing: .08em; font-size: .95em;
	background: linear-gradient(180deg, color-mix(in srgb, var(--ac, var(--cyan)) 92%, white), var(--ac, var(--cyan)));
	box-shadow: 0 0 26px color-mix(in srgb, var(--ac, var(--cyan)) 48%, transparent);
	transition: transform .15s ease, box-shadow .2s ease;
}
.dmb .dmb-cine-start svg { width: 18px; height: 18px; }
.dmb .dmb-cine-start:hover { transform: translateY(-1px); box-shadow: 0 0 40px color-mix(in srgb, var(--ac, var(--cyan)) 74%, transparent); }
.dmb .dmb-cine-locked {
	display: inline-flex; align-items: center; gap: 9px; min-height: 52px; padding: 0 20px;
	border-radius: var(--dmb-pill); border: 1px dashed var(--line-2); color: var(--txt-dim);
	font-family: 'Chakra Petch', sans-serif; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .76em;
	background: rgba(4, 8, 11, .4);
}
.dmb .dmb-cine-locked svg { width: 16px; height: 16px; }

/* ---- Filmstreifen unten ---- */
.dmb .dmb-cine-strip {
	position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
	display: flex; gap: clamp(8px, 1vw, 14px);
	padding: clamp(12px, 1.6vw, 18px) clamp(14px, 2.4vw, 28px);
	overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
	background: linear-gradient(0deg, rgba(3, 6, 8, .85), transparent);
}
.dmb .dmb-cine-strip::-webkit-scrollbar { display: none; }
.dmb .dmb-cine-thumb {
	position: relative; flex: 0 0 auto; width: clamp(98px, 11vw, 152px);
	border: 0; margin: 0; padding: 0; cursor: pointer; background: none; text-align: left;
	border-radius: var(--dmb-radius-sm); overflow: hidden;
	box-shadow: 0 0 0 1px var(--line-2);
	transition: transform .2s ease, box-shadow .2s ease;
}
.dmb .dmb-cine-thumb-img { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.dmb .dmb-cine-thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dmb .dmb-cine-thumb-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 8, 11, .92), transparent 68%); }
.dmb .dmb-cine-thumb-name { position: absolute; z-index: 2; left: 8px; right: 8px; bottom: 6px; font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: .66em; line-height: 1.12; color: #eef6f8; text-shadow: 0 1px 6px rgba(0, 0, 0, .85); }
.dmb .dmb-cine-thumb-dot { position: absolute; z-index: 2; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.dmb .dmb-cine-thumb.is-offline .dmb-cine-thumb-img img { filter: grayscale(.85) brightness(.58); }
.dmb .dmb-cine-thumb.is-offline .dmb-cine-thumb-dot { background: var(--txt-dim); box-shadow: none; }
.dmb .dmb-cine-thumb:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--txt-dim); }
.dmb .dmb-cine-thumb.is-active { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--ac, var(--cyan)), 0 0 20px color-mix(in srgb, var(--ac, var(--cyan)) 50%, transparent); }
.dmb .dmb-cine-thumb:focus-visible { box-shadow: 0 0 0 2px var(--cyan-br); }

/* ---- Ausstieg (im Rundgang) ---- */
.dmb .dmb-cine-exit {
	position: absolute; z-index: 8; top: clamp(12px, 1.6vw, 22px); right: clamp(12px, 1.6vw, 22px);
	display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
	border-radius: var(--dmb-pill); font-family: 'Chakra Petch', sans-serif; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .68em;
	cursor: pointer; color: var(--txt); background: rgba(6, 10, 13, .9); border: 1px solid var(--line-2);
	transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.dmb .dmb-cine-exit:hover { background: rgba(8, 14, 18, .96); border-color: var(--cyan); transform: translateY(-1px); }
.dmb .dmb-cine-exit svg { width: 15px; height: 15px; }

/* ---- Rundgang-Auswahl (Bunker mit mehreren walks) ---- */
.dmb .dmb-cine-chooser {
	position: absolute; inset: 0; z-index: 7;
	display: flex; align-items: center; justify-content: center;
	padding: clamp(16px, 4vw, 40px);
	background: radial-gradient(90% 90% at 50% 45%, rgba(4, 8, 11, .72), rgba(4, 8, 11, .9));
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	animation: dmb-cine-in .25s ease both;
}
.dmb .dmb-cine-chooser-panel {
	width: min(460px, 100%);
	padding: clamp(18px, 2.6vw, 28px);
	border-radius: var(--dmb-radius-lg);
	border: 1px solid var(--line-2);
	background: linear-gradient(180deg, rgba(14, 22, 28, .96), rgba(8, 13, 17, .96));
	box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 40px color-mix(in srgb, var(--ac, var(--cyan)) 18%, transparent);
}
.dmb .dmb-cine-chooser-kicker { font-family: 'Chakra Petch', sans-serif; letter-spacing: .26em; text-transform: uppercase; font-size: .66em; color: var(--ac, var(--cyan)); margin-bottom: 6px; }
.dmb .dmb-cine-chooser-title { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: clamp(1.2em, 2.4vw, 1.5em); color: #f2fdff; margin-bottom: 16px; }
.dmb .dmb-cine-chooser-list { display: flex; flex-direction: column; gap: 10px; }
.dmb .dmb-cine-choice {
	display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
	min-height: 64px; padding: 12px 16px; cursor: pointer;
	border-radius: var(--dmb-radius-md); border: 1px solid var(--line-2);
	background: rgba(110, 200, 210, .06); color: var(--txt);
	transition: transform .14s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.dmb .dmb-cine-choice:hover,
.dmb .dmb-cine-choice:focus-visible {
	transform: translateY(-1px); outline: none;
	border-color: var(--ac, var(--cyan));
	background: rgba(34, 211, 238, .12);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--ac, var(--cyan)) 40%, transparent), 0 0 22px color-mix(in srgb, var(--ac, var(--cyan)) 28%, transparent);
}
.dmb .dmb-cine-choice-tx { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.dmb .dmb-cine-choice-label { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: 1.02em; letter-spacing: .02em; color: #eafcff; }
.dmb .dmb-cine-choice-sub { font-size: .82em; color: var(--txt-dim); line-height: 1.4; }
.dmb .dmb-cine-choice-go { width: 20px; height: 20px; flex: 0 0 auto; fill: var(--ac, var(--cyan)); }
.dmb .dmb-cine-chooser-close {
	display: block; margin: 16px auto 0; min-height: 40px; padding: 0 20px; cursor: pointer;
	font-family: 'Chakra Petch', sans-serif; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .72em;
	border-radius: var(--dmb-pill); border: 1px solid var(--line); color: var(--txt-dim); background: rgba(7, 11, 14, .5);
	transition: color .15s ease, border-color .15s ease;
}
.dmb .dmb-cine-chooser-close:hover,
.dmb .dmb-cine-chooser-close:focus-visible { color: var(--cyan-br); border-color: var(--line-2); outline: none; }

/* ---- Mobil ---- */
@media (max-width: 640px) {
	.dmb .dmb-cine { aspect-ratio: auto; width: 100%; min-height: 80vh; border-radius: var(--dmb-radius-md); }
	.dmb .dmb-cine-body { max-width: none; bottom: clamp(112px, 32vw, 168px); padding: 0 18px; }
	.dmb .dmb-cine-name { font-size: 2.1em; }
	.dmb .dmb-cine-text { display: none; }
	.dmb .dmb-cine-thumb { width: 40vw; }
}

/* ---- prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
	.dmb .dmb-cine,
	.dmb .dmb-cine-bg.is-on,
	.dmb .dmb-cine-body,
	.dmb .dmb-cine-chooser { animation: none !important; }
	.dmb .dmb-cine-bg { transition: opacity .2s ease; }
}
