/* =====================================================================
   CCM Motorsport — Intro (2026-11-01): Startbildschirm → Sprecher + Kamerafahrt → fünf Startampeln → Lights out → Titel.
   Läuft beim ersten Besuch der Rennliga (oder über „Intro ansehen“). Ohne JavaScript bleibt es unsichtbar.
   ===================================================================== */
.rni { position: fixed; inset: 0; z-index: 2147483647; display: grid; place-items: center; overflow: hidden; background: #000; color: #fff; font-family: var(--lx-sans, system-ui, sans-serif); opacity: 0; transition: opacity .6s ease; }
.rni[hidden] { display: none; }
.rni.is-da { opacity: 1; }
.rni.is-weg { opacity: 0; transition: opacity 1s ease; }
.rni *, .rni *::before, .rni *::after { box-sizing: border-box; }

/* Bild mit langsamer Kamerafahrt */
.rni__bild { position: absolute; inset: -6%; background: var(--bild) center 58% / cover no-repeat; opacity: 0; filter: saturate(.9) brightness(.55); transform: scale(1.18) translateY(2%); transition: opacity 2.5s ease; }
.rni.is-laeuft .rni__bild { opacity: 1; animation: rniFahrt 16s cubic-bezier(.25, .6, .2, 1) forwards; }
@keyframes rniFahrt { to { transform: scale(1.02) translateY(-1%); } }
.rni::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 55%, transparent 30%, rgba(0, 0, 0, .85) 100%), linear-gradient(180deg, rgba(0, 0, 0, .6), transparent 30%, transparent 70%, rgba(0, 0, 0, .8)); }
/* Kinobalken */
.rni__balken { position: absolute; left: 0; right: 0; height: 9vh; background: #000; z-index: 3; transition: transform 1.2s cubic-bezier(.7, 0, .2, 1); }
.rni__balken--oben { top: 0; transform: translateY(-100%); }
.rni__balken--unten { bottom: 0; transform: translateY(100%); }
.rni.is-laeuft .rni__balken { transform: none; }
/* Filmkorn */
.rni__korn { position: absolute; inset: -50%; z-index: 2; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: rniKorn .5s steps(4) infinite; }
@keyframes rniKorn { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-1%, -2%); } }

/* Startbildschirm */
.rni__start { position: relative; z-index: 5; display: grid; justify-items: center; gap: 1.6rem; padding: 2rem; text-align: center; transition: opacity .5s ease, transform .5s ease; }
.rni.is-laeuft .rni__start { opacity: 0; transform: scale(.96); pointer-events: none; }
.rni__kicker { display: flex; align-items: center; gap: .8rem; margin: 0; color: var(--lx-red-2, #E0233F); font-size: .7rem; font-weight: 600; letter-spacing: .4em; text-transform: uppercase; }
.rni__kicker::before, .rni__kicker::after { content: ""; width: 2.4rem; height: 1px; background: currentColor; }
.rni__start h2 { margin: 0; font: 300 clamp(2.4rem, 6vw, 4.6rem)/1 var(--lx-serif, Georgia, serif); }
.rni__start h2 em { font-style: italic; color: rgba(255, 255, 255, .7); }
body.ccm-public-body .rni button.rni__play { display: inline-flex; align-items: center; gap: 1rem; min-height: 4rem; padding: 0 2.2rem 0 1.2rem !important; border: 1px solid #fff !important; border-radius: 0 !important; background: #fff !important; color: #050505 !important; font: 600 .78rem/1 var(--lx-sans, system-ui) !important; letter-spacing: .22em !important; text-transform: uppercase; box-shadow: 0 0 0 0 rgba(255, 255, 255, .4) !important; cursor: pointer; animation: rniPuls 2.2s ease-out infinite; }
body.ccm-public-body .rni button.rni__play:hover { background: var(--lx-red, #C8102E) !important; border-color: var(--lx-red, #C8102E) !important; color: #fff !important; }
.rni__play i { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid currentColor; font-style: normal; font-size: .9rem; }
.rni__play small { font-size: .6rem; letter-spacing: .16em; opacity: .6; }
@keyframes rniPuls { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35); } 100% { box-shadow: 0 0 0 22px rgba(255, 255, 255, 0); } }
body.ccm-public-body .rni button.rni__skip { min-height: 0 !important; padding: .4rem .2rem !important; border: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, .3) !important; border-radius: 0 !important; background: none !important; color: rgba(255, 255, 255, .6) !important; font: 600 .62rem/1 var(--lx-sans, system-ui) !important; letter-spacing: .2em !important; text-transform: uppercase; box-shadow: none !important; cursor: pointer; }
body.ccm-public-body .rni button.rni__skip:hover { color: #fff !important; border-color: #fff !important; }
.rni__x { position: absolute; z-index: 6; right: clamp(1rem, 3vw, 2rem); bottom: calc(9vh + 1rem); opacity: 0; transition: opacity .4s; }
.rni.is-laeuft .rni__x { opacity: 1; }

/* Bühne: Zeilen nacheinander */
.rni__buehne { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; }
.rni__zeile { position: absolute; margin: 0; padding: 0 1.5rem; text-align: center; font: 300 clamp(1.6rem, 4.2vw, 3.4rem)/1.1 var(--lx-serif, Georgia, serif); letter-spacing: .01em; opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2, .8, .2, 1), filter .9s ease; }
.rni__zeile b { font-weight: 400; color: #fff; }
.rni__zeile em { font-style: italic; color: var(--lx-red-2, #E0233F); }
.rni__zeile--gross { font-size: clamp(2.2rem, 6vw, 5rem); }
.rni__zeile.is-an { opacity: 1; transform: none; filter: none; }
.rni__zeile.is-raus { opacity: 0; transform: translateY(-14px); filter: blur(6px); transition-duration: .6s; }

/* Startampel: 5 Lampenkästen mit je zwei Lampen */
.rni__ampel { position: absolute; display: flex; gap: clamp(.6rem, 2vw, 1.4rem); padding: clamp(.8rem, 2vw, 1.4rem) clamp(1rem, 2.6vw, 1.8rem); background: linear-gradient(180deg, #121214, #050506); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .08); opacity: 0; transform: translateY(-40px) scale(.96); transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.rni__ampel::before { content: ""; position: absolute; left: 50%; top: -40vh; width: 6px; height: 40vh; margin-left: -3px; background: linear-gradient(180deg, transparent, #1a1a1d); }
.rni__ampel.is-an { opacity: 1; transform: none; }
.rni__kasten { display: grid; gap: clamp(.4rem, 1vw, .7rem); padding: clamp(.4rem, 1vw, .6rem); background: #0a0a0b; border: 1px solid rgba(255, 255, 255, .08); }
.rni__lampe-dot { display: block; width: clamp(2.2rem, 5.4vw, 4.2rem); height: clamp(2.2rem, 5.4vw, 4.2rem); border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3a1416, #1a0607 60%, #0d0304); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .9); transition: background .08s linear, box-shadow .08s linear; }
.rni__kasten.is-rot .rni__lampe-dot { background: radial-gradient(circle at 40% 35%, #ffd0d0 0%, #ff3b3b 22%, #d10a0a 55%, #6d0303 100%); box-shadow: 0 0 22px 6px rgba(255, 30, 30, .75), 0 0 70px 18px rgba(255, 0, 0, .35), inset 0 -3px 8px rgba(0, 0, 0, .4); }
.rni.is-aus .rni__kasten .rni__lampe-dot { background: radial-gradient(circle at 40% 35%, #3a1416, #1a0607 60%, #0d0304); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .9); }
.rni.is-aus .rni__ampel { opacity: 0; transform: translateY(-60px); transition-delay: .25s; }

/* Lights out: Blitz + Titel */
.rni__blitz { position: absolute; inset: 0; z-index: 5; background: #fff; opacity: 0; pointer-events: none; }
.rni.is-aus .rni__blitz { animation: rniBlitz .7s ease-out; }
@keyframes rniBlitz { 0% { opacity: .9; } 100% { opacity: 0; } }
.rni.is-aus .rni__bild { filter: saturate(1.1) brightness(.75); transition: filter .3s; }
.rni__titel { position: absolute; display: grid; justify-items: center; gap: .3rem; text-align: center; opacity: 0; }
.rni__titel b { display: block; font: 600 clamp(1rem, 2.4vw, 1.6rem)/1 var(--lx-sans, system-ui); letter-spacing: 1.2em; margin-right: -1.2em; color: var(--lx-red-2, #E0233F); }
.rni__titel strong { display: block; font: 300 clamp(3rem, 11vw, 9rem)/.9 var(--lx-serif, Georgia, serif); letter-spacing: -.01em; }
.rni__titel i { display: block; width: 0; height: 2px; margin-top: .8rem; background: var(--lx-red-2, #E0233F); box-shadow: 0 0 18px rgba(224, 35, 63, .9); transition: width 1.2s cubic-bezier(.2, .8, .2, 1) .5s; }
.rni__titel small { margin-top: .9rem; color: rgba(255, 255, 255, .7); font-size: .72rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; opacity: 0; transition: opacity .8s ease 1.1s; }
.rni.is-aus .rni__titel { animation: rniSlam .9s cubic-bezier(.16, 1.2, .3, 1) forwards; }
.rni.is-aus .rni__titel i { width: min(70vw, 34rem); }
.rni.is-aus .rni__titel small { opacity: 1; }
@keyframes rniSlam { 0% { opacity: 0; transform: scale(1.6); letter-spacing: .2em; filter: blur(10px); } 60% { opacity: 1; filter: none; } 100% { opacity: 1; transform: none; } }
.rni.is-aus .rni__buehne { animation: rniWackel .5s ease-out .05s; }
@keyframes rniWackel { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(2px, -1px); } }

/* Untertitel (Sprecher) */
.rni__ut { position: absolute; z-index: 6; left: 50%; bottom: calc(9vh + 1.4rem); transform: translateX(-50%); max-width: min(90vw, 42rem); text-align: center; color: rgba(255, 255, 255, .55); font-size: .78rem; letter-spacing: .06em; opacity: 0; transition: opacity .4s; }
.rni.is-laeuft .rni__ut:not(:empty) { opacity: 1; }

/* „Intro ansehen“ im Kopf der Rennliga */
body.ccm-public-body .rn-intro-knopf { display: inline-flex; align-items: center; gap: .55rem; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; color: rgba(255, 255, 255, .7) !important; font: 600 .64rem/1 var(--lx-sans, system-ui) !important; letter-spacing: .18em !important; text-transform: uppercase; box-shadow: none !important; cursor: pointer; }
body.ccm-public-body .rn-intro-knopf:hover { color: #fff !important; }
.rn-intro-knopf i { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border: 1px solid currentColor; font-style: normal; font-size: .6rem; }

@media (prefers-reduced-motion: reduce) {
  .rni__bild, .rni__korn { animation: none !important; }
  .rni.is-aus .rni__buehne { animation: none; }
}

/* Während das Intro läuft: alles andere (Kopfleiste, Hinweis- und Umfrage-Fenster, Milo) unsichtbar */
html.rni-offen body > *:not(.rni) { visibility: hidden !important; }

/* Ton-Knopf (stumm/an) */
.rni__ton { position: absolute; z-index: 6; left: clamp(1rem, 3vw, 2rem); bottom: calc(9vh + 1rem); display: grid; place-items: center; width: 2.6rem; height: 2.6rem; padding: 0; border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .35); color: #fff; cursor: pointer; opacity: 0; transition: opacity .4s; }
.rni.is-laeuft .rni__ton { opacity: 1; }
.rni__ton svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rni__ton .rni__ton-aus { display: none; }
.rni__ton.is-stumm .rni__ton-an { display: none; }
.rni__ton.is-stumm .rni__ton-aus { display: block; }
