/* Rondleiding. Twee pagina's delen dit bestand:
   - het scherm (public/rondleiding-scherm.html): de nagespeelde app, met de opmaak uit app.css;
   - de buitenpagina (public/rondleiding.html): het donkere toneel met voortgang, kader en ondertitel.
   De kleuren van het toneel liggen vast en volgen de dag- of nachtstand niet: het scherm in het
   kader laat die juist zien. */

/* ---------- Het scherm ---------- */

/* De pagina schuift hier op commando van de rondleiding, met een eigen beweging. */
html:has(> body.rl-scherm) { scrollbar-width: none; scroll-behavior: auto; }
html:has(> body.rl-scherm)::-webkit-scrollbar { display: none; }
body.rl-scherm { cursor: default; -webkit-user-select: none; user-select: none; }

/* De vinger laat zien waar getikt wordt. Een aanraking heeft geen aanwijzer die over
   het scherm reist: hij komt op de plek zelf op, drukt en verdwijnt. */
.rl-vinger {
  position: fixed; z-index: 200; left: 0; top: 0;
  width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  pointer-events: none; opacity: 0; transform: scale(1.5);
  background: rgba(31, 163, 196, .26); border: 2px solid rgba(31, 163, 196, .85);
  box-shadow: 0 6px 18px rgba(10, 40, 52, .18);
}
.rl-vinger--komt { opacity: 1; transform: scale(1); transition: opacity 260ms var(--ease), transform 380ms var(--ease); }
.rl-vinger--drukt { opacity: 1; transform: scale(.72); background: rgba(31, 163, 196, .44); transition: transform 140ms var(--ease), background 140ms var(--ease); }
.rl-vinger--veegt { opacity: 1; transform: scale(.82); background: rgba(31, 163, 196, .44); transition: left 340ms var(--ease), transform 140ms var(--ease); }
.rl-vinger--weg { opacity: 0; transform: scale(1.25); transition: opacity 320ms var(--ease), transform 320ms var(--ease); }

/* Een onderdeel waar de uitleg naar wijst: zachte achtergrond met een rand eromheen, zodat
   het ook opvalt op een vlak dat zelf al lichtblauw is. */
.rl-licht { border-radius: 6px; animation: rl-licht 700ms var(--ease) both; }
@keyframes rl-licht {
  from { background-color: transparent; box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent; }
  to { background-color: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 6px var(--accent-lit); }
}

/* ---------- Beelden die niet uit de app komen ----------
   Titelblad, groepsgesprek en beginscherm liggen over de app heen en vloeien in en uit. */
.rl-beeld {
  position: fixed; inset: 0; z-index: 150; background: var(--paper); color: var(--ink);
  opacity: 0; visibility: hidden; transition: opacity 420ms var(--ease), visibility 0s linear 420ms;
}
.rl-beeld.aan { opacity: 1; visibility: visible; transition: opacity 420ms var(--ease); }

.rl-titelblad {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px;
  padding: 0 34px 40px; text-align: center;
  background: radial-gradient(120% 70% at 0% 0%, var(--accent-soft), transparent 62%), var(--paper);
}
.rl-titelblad .merk-logo { width: 34px; height: 54px; margin-bottom: 6px; }
.rl-titelblad h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 31px; line-height: 1.14; text-wrap: balance; }
.rl-titelblad .microkop { margin: 0; }
.rl-titelblad .adres { display: none; margin: 14px 0 0; font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.rl-titelblad.slot .adres { display: block; }

/* Een groepsgesprek in de eigen huisstijl: het stelt de groepsapp voor, zonder die na te tekenen. */
.rl-gesprek { display: flex; flex-direction: column; background: var(--paper-2); }
.rl-gesprek .kop {
  display: flex; align-items: center; gap: 11px; padding: 16px 18px 13px;
  background: var(--paper); border-bottom: 1px solid var(--hairline);
}
.rl-gesprek .rond { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); flex: none; }
.rl-gesprek .rond .merk-logo { width: 12px; height: 19px; }
.rl-gesprek .kop .kolom { display: flex; flex-direction: column; line-height: 1.25; }
.rl-gesprek .kop strong { font-family: var(--ui); font-weight: 500; font-size: 15px; }
.rl-gesprek .kop .kolom span { font-size: 11.5px; color: var(--stone); }
.rl-gesprek .berichten { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 26px; scrollbar-width: none; }
.rl-gesprek .berichten::-webkit-scrollbar { display: none; }
.rl-gesprek .bel {
  max-width: 88%; padding: 10px 13px 12px; border-radius: 4px 15px 15px 15px;
  background: var(--paper); border: 1px solid var(--hairline); box-shadow: 0 2px 7px rgba(10, 40, 52, .05);
}
.rl-gesprek .van { display: block; margin-bottom: 3px; font-size: 11.5px; font-weight: 500; color: var(--accent); }
.rl-gesprek .bel p { margin: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.rl-gesprek .bel a { color: var(--accent); text-decoration: underline; text-underline-offset: 2.5px; }

/* Het beginscherm van een telefoon, schematisch: tegels zonder merken, met de app ertussen. */
.rl-thuis { background: linear-gradient(165deg, #DDEFF5, #F4F8FA 55%, #E6EEF2); padding: 74px 26px 0; }
.rl-thuis .raster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 18px; }
.rl-thuis .tegel { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.rl-thuis .tegel i { display: block; width: 58px; height: 58px; border-radius: 15px; background: rgba(255, 255, 255, .72); box-shadow: 0 2px 7px rgba(10, 40, 52, .06); }
.rl-thuis .tegel:nth-child(3n) i { background: rgba(196, 220, 230, .8); }
.rl-thuis .tegel:nth-child(4n + 1) i { background: rgba(225, 236, 241, .95); }
.rl-thuis .tegel em { display: block; width: 34px; height: 6px; border-radius: 3px; background: rgba(69, 89, 100, .2); font-style: normal; }
.rl-thuis .tegel--app img { display: block; width: 58px; height: 58px; border-radius: 15px; box-shadow: 0 5px 16px rgba(10, 40, 52, .2); }
.rl-thuis .tegel--app em { width: auto; height: auto; background: none; font-family: var(--ui); font-size: 11px; line-height: 1; color: #12212A; margin-top: -1px; }
.rl-thuis.aan .tegel--app { animation: rl-plop 520ms var(--ease) 520ms both; }
@keyframes rl-plop { from { opacity: 0; transform: scale(.4); } 70% { transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }

/* ---------- De buitenpagina ---------- */

html:has(> body.rl-buiten) { background: #0E1A20; }
body.rl-buiten {
  display: flex; justify-content: center; align-items: center;
  height: 100vh; height: 100dvh; overflow: hidden;
  background: #0E1A20; color: #E8F1F5;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.rl-toneel {
  position: relative; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: 100%; max-width: 440px; height: 100%; max-height: 930px;
  padding: calc(10px + env(safe-area-inset-top)) 14px calc(10px + env(safe-area-inset-bottom));
}

/* Voortgang: een streepje per scène. De scène die speelt is breder en laat haar momenten
   (de stukken uitleg) los van elkaar zien. */
.rl-voortgang { display: flex; gap: 4px; }
.rl-voortgang .groep { display: flex; gap: 0; flex: 1 1 0; min-width: 0; border-radius: 2px; overflow: hidden; transition: flex-grow 320ms var(--ease); }
.rl-voortgang .groep.nu { flex-grow: 4.5; gap: 3px; overflow: visible; }
.rl-voortgang span { flex: 1; height: 3px; background: rgba(232, 241, 245, .22); overflow: hidden; }
.rl-voortgang .groep.nu span { border-radius: 2px; }
.rl-voortgang i { display: block; width: 0; height: 100%; background: #E8F1F5; }

.rl-kop { position: relative; z-index: 4; display: flex; align-items: center; gap: 9px; padding: 11px 2px 12px; }
.rl-kop .merk-logo { width: 13px; height: 21px; background: #6FD0E8; }
.rl-kop .naam { font-family: var(--display); font-weight: 600; font-size: 15px; line-height: 1; }
.rl-kop .deel { font-family: var(--ui); font-size: 12.5px; color: #9FB4BE; }
.rl-kop .rl-knop {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin: -6px -6px -6px 0; border-radius: 50%;
  color: #C9D8DF; font-family: var(--ui); font-size: 21px; line-height: 1; text-decoration: none;
}
.rl-kop .rl-knop:first-of-type { margin-left: auto; }
.rl-kop .rl-knop:hover { color: #FFFFFF; text-decoration: none; }

/* Het kader: het scherm van de app. Het scherm is altijd 390 punten breed, zoals op een
   telefoon, en wordt als geheel op maat gebracht; zo ziet het er op elk toestel hetzelfde uit. */
.rl-kader { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 0; }
.rl-rand {
  position: relative; flex: none; overflow: hidden; border-radius: 20px; background: #FFFFFF;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .38), 0 0 0 1px rgba(232, 241, 245, .10);
}
.rl-rand iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; transition: opacity 220ms var(--ease); }
/* Tussen twee scènes met een echte pagina: het scherm is even weg tot de nieuwe pagina staat. */
.rl-rand.laadt iframe { opacity: 0; transition-duration: 120ms; }

.rl-ondertitel { min-height: 96px; padding: 15px 4px 0; }
.rl-ondertitel .rl-scene { margin: 0 0 5px; font-family: var(--ui); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6FD0E8; }
.rl-ondertitel .rl-tekst { margin: 0; font-family: var(--ui); font-size: 16.5px; line-height: 1.38; color: #F3F8FA; text-wrap: balance; transition: opacity 220ms var(--ease); }
.rl-ondertitel .rl-tekst.wissel { opacity: 0; }

/* Tikvlak over het hele venster (op een breed scherm ook naast het toneel): links terug,
   rechts verder, vasthouden is pauze. */
.rl-vlak { position: fixed; inset: 0; z-index: 3; }
.rl-pauze {
  position: absolute; z-index: 5; left: 50%; top: 46%; transform: translate(-50%, -50%);
  padding: 9px 16px; border-radius: 899px; background: rgba(14, 26, 32, .82); color: #E8F1F5;
  font-family: var(--ui); font-size: 12.5px; pointer-events: none; opacity: 0; transition: opacity 160ms var(--ease);
}
.rl-toneel.pauze .rl-pauze { opacity: 1; }

/* Begin- en eindscherm. */
.rl-blad {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 14px; padding: 30px; text-align: center; background: rgba(14, 26, 32, .93);
  transition: opacity 320ms var(--ease);
}
.rl-blad .merk-logo { width: 26px; height: 41px; background: #6FD0E8; margin-bottom: 4px; }
.rl-blad h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 31px; line-height: 1.12; color: #FFFFFF; }
.rl-blad p { margin: 0; max-width: 30ch; font-family: var(--ui); font-size: 14.5px; line-height: 1.5; color: #B4C6CF; }
.rl-blad .knop { margin-top: 10px; min-width: 150px; }
.rl-blad .uitleg { font-size: 12px; color: #84979F; }
.rl-blad .rl-link { font-family: var(--ui); font-size: 13.5px; color: #9ADFF2; }
.rl-blad .rl-andere { margin-top: 18px; font-size: 13px; color: #84979F; }
.rl-blad .rl-andere a { color: #9ADFF2; }
.rl-blad.weg { opacity: 0; pointer-events: none; }
#rl-eind { background: #0E1A20; }

/* Filmstand (?film=1): geen bediening in beeld, voor een schermopname. */
.rl-film .rl-kop .rl-knop, .rl-film .rl-pauze, .rl-film .rl-blad .uitleg { display: none; }

@media (min-width: 700px) {
  .rl-toneel { padding-top: 22px; padding-bottom: 18px; }
}
