/* Aankondigingspagina Cloud Web One: één opname, een zoeklicht en drie meetbanen. */
@font-face {
  font-family: Sora;
  src: url("/fonts/sora-700-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/inter-400-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* De plek en de kracht van het zoeklicht, in procenten van de opname. */
@property --lx { syntax: "<percentage>"; inherits: true; initial-value: 53%; }
@property --ly { syntax: "<percentage>"; inherits: true; initial-value: 34%; }
@property --kracht { syntax: "<number>"; inherits: true; initial-value: 1; }

:root {
  --nacht: #04050b;
  --lime: #d4ff60;
  --lila: #c9b6f4;
  --tekst: #f1ecff;
  --zacht: #b3a6cf;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sora: Sora, Inter, system-ui, sans-serif;
  --rand: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(.22,.67,.28,1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body {
  overflow: hidden;
  background: var(--nacht);
  color: var(--tekst);
  font: 400 1rem/1.55 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
.blad { position: fixed; inset: 0; overflow: hidden; isolation: isolate; }

/* De opname vult altijd het scherm en houdt haar verhouding van 16 op 10; het cijfer staat in het midden. */
.toneel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, 160vh);
  height: max(100vh, 62.5vw);
  translate: -50% -50%;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.035);
}
@supports (height: 100dvh) {
  .toneel { width: max(100vw, 160dvh); height: max(100dvh, 62.5vw); }
}
.laag { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.laag img { display: block; width: 100%; height: 100%; }

/* De tweede opname, met het voorlicht aan, is alleen zichtbaar waar het zoeklicht valt. */
.licht {
  --straal: clamp(14rem, 33vmax, 42rem);
  opacity: var(--kracht);
  --val: radial-gradient(circle at var(--lx) var(--ly), #000 0, rgb(0 0 0 / .86) calc(var(--straal) * .2), rgb(0 0 0 / .55) calc(var(--straal) * .42), rgb(0 0 0 / .2) calc(var(--straal) * .7), transparent var(--straal));
  -webkit-mask-image: var(--val);
  mask-image: var(--val);
}

/* Pulsen over de meetbanen en de sneden waar ze aankomen. Maten in beeldpunten van de opname. */
.tekening { overflow: visible; }
.puls, .snede { fill: none; opacity: 0; }
.puls {
  stroke: var(--lime);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-dasharray: 4.5 100;
  stroke-dashoffset: 5;
  filter: drop-shadow(0 0 7px rgb(212 255 96 / .85));
}
.snede {
  stroke: #f6ffd6;
  stroke-width: 5.5;
  filter: drop-shadow(0 0 12px rgb(212 255 96 / .95));
}

/* Fijne korrel over het geheel, zoals op een foto; houdt donkere verlopen rustig. */
.korrel {
  position: absolute;
  inset: -12%;
  z-index: 1;
  background: url("/korrel.svg") 0 0 / 240px 240px;
  opacity: .11;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.blad::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(125% 95% at 50% 42%, transparent 44%, rgb(2 3 8 / .74) 100%),
    linear-gradient(to top, rgb(2 3 8 / .86), transparent 36%);
  pointer-events: none;
}

.merk, .voet { position: absolute; z-index: 2; left: var(--rand); right: var(--rand); }
.merk { top: max(var(--rand), env(safe-area-inset-top)); }
.merk h1 {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font: 700 1.08rem/1 var(--sora);
  letter-spacing: -.035em;
  color: #f6f3ff;
}
.merk img { width: 2.15rem; height: 2.15rem; border-radius: .52rem; }
.merk b { font-weight: inherit; color: var(--lime); }

.voet {
  bottom: max(var(--rand), env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.4rem 2.5rem;
}
.leus {
  font: 700 clamp(1.95rem, 4.3vw, 4rem)/1.02 var(--sora);
  letter-spacing: -.055em;
  color: #f4f0ff;
}
.leus span { display: block; color: var(--lila); }
.regel, .uitleg summary {
  font: 500 .74rem/1.5 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.regel { margin-top: 1.15rem; color: var(--zacht); }
.regel i { margin-inline: .45em; font-style: normal; color: var(--lime); }

.uitleg { position: relative; }
.uitleg summary {
  position: relative;
  padding: .5rem 0 .35rem 1.5rem;
  border-bottom: 1px solid rgb(215 204 240 / .34);
  color: #ddd3f3;
  list-style: none;
  cursor: pointer;
}
.uitleg summary::-webkit-details-marker { display: none; }
.uitleg summary::before, .uitleg summary::after {
  content: "";
  position: absolute;
  left: .1rem;
  top: 50%;
  width: .72rem;
  height: 1.5px;
  background: var(--lime);
  transition: rotate 200ms var(--ease);
}
.uitleg summary::after { rotate: 90deg; }
.uitleg[open] summary::after { rotate: 0deg; }
.uitleg summary:hover { color: #fff; border-bottom-color: var(--lime); }
.uitleg-blad {
  position: absolute;
  right: 0;
  bottom: calc(100% + .95rem);
  width: min(27rem, calc(100vw - 2 * var(--rand)));
  padding: 1.3rem 1.4rem 1.35rem;
  border: 1px solid #2d2f4d;
  border-top: 2px solid var(--lime);
  background: #0b0d1b;
  box-shadow: 0 22px 60px rgb(0 0 0 / .65);
  color: #dbd5ec;
  font-size: .98rem;
}
.uitleg-blad p + p { margin-top: .85rem; }
.uitleg-blad a { color: var(--lime); text-underline-offset: .22em; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: .3rem; }

@media (max-width: 44rem) {
  .voet { flex-direction: column; align-items: flex-start; }
  .uitleg-blad { left: 0; right: auto; }
}
@media (max-height: 30rem) {
  .leus { font-size: clamp(1.5rem, 6vh, 2.2rem); }
  .regel { margin-top: .6rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .donker { animation: opkomst 3.4s var(--ease) both; }
  .licht { animation: zoeklicht 17s cubic-bezier(.45,.05,.3,1) 2.8s infinite both; }
  .volgt .licht { animation: none; }
  .puls { animation: puls 8s linear infinite both; }
  .snede { animation: flits 8s linear infinite both; }
  .puls-1, .snede-1 { animation-delay: 4.2s; }
  .puls-2, .snede-2 { animation-delay: 6.9s; }
  .puls-3, .snede-3 { animation-delay: 9.6s; }
  .korrel { animation: korrel 1.2s steps(1) infinite; }
  .merk { animation: tekst 1.3s var(--ease) 1.6s both; }
  .leus { animation: tekst 1.4s var(--ease) 3.2s both; }
  .regel { animation: tekst 1.2s var(--ease) 3.9s both; }
  .uitleg { animation: tekst 1.2s var(--ease) 4.5s both; }
}
@keyframes opkomst {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Het licht komt van links onder, vindt het cijfer, strijkt over het voorvlak en verdwijnt rechts. */
@keyframes zoeklicht {
  0% { --lx: -14%; --ly: 82%; --kracht: 0; }
  7% { --kracht: 1; }
  30% { --lx: 43%; --ly: 60%; }
  47% { --lx: 52%; --ly: 31%; }
  60% { --lx: 58%; --ly: 22%; }
  79% { --lx: 76%; --ly: 48%; --kracht: 1; }
  91%, 100% { --lx: 114%; --ly: 64%; --kracht: 0; }
}
@keyframes puls {
  0% { stroke-dashoffset: 5; opacity: 0; }
  3% { opacity: .95; }
  27% { stroke-dashoffset: -100; opacity: .95; }
  29%, 100% { stroke-dashoffset: -100; opacity: 0; }
}
@keyframes flits {
  0%, 26% { opacity: 0; }
  29% { opacity: 1; }
  44%, 100% { opacity: 0; }
}
@keyframes korrel {
  0% { translate: 0 0; }
  20% { translate: -3% 2%; }
  40% { translate: 2% -4%; }
  60% { translate: -4% -1%; }
  80% { translate: 3% 3%; }
}
@keyframes tekst {
  from { opacity: 0; translate: 0 .7rem; }
  to { opacity: 1; translate: 0 0; }
}

@media print {
  .toneel, .korrel, .blad::after { display: none; }
  body { overflow: visible; background: #fff; color: #000; }
  .blad, .merk, .voet { position: static; }
  .leus, .leus span, .merk h1, .regel { color: #000; }
  .uitleg-blad { position: static; width: auto; border: 0; background: none; box-shadow: none; color: #000; }
}
