/* Präsentation: the brand in eleven slides. Every slide is its own
   container, so its type scales with it, from full screen to the overview. */

.deck {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: calc(100svh - var(--top));
  padding: clamp(0.75rem, 2vw, 1.5rem) var(--gutter) 1rem;
  background: var(--ink);
  color: var(--paper);
}

.deck__stage {
  position: relative;
  width: min(100%, calc((100svh - var(--top) - 6.5rem) * 16 / 9));
  aspect-ratio: 16 / 9;
  margin-inline: auto;
}

/* ---------- Slide ---------- */

.sl {
  container-type: size;
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0s 0.45s;
}

.sl.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s var(--ease);
}

.sl--white {
  background: var(--paper);
  color: var(--ink);
}

.sl--green {
  background: var(--accent);
  color: var(--ink);
}

.sl--ink {
  outline: 1px solid var(--line-inv);
  outline-offset: -1px;
}

.sl__in {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5cqw 5.5cqw;
}

.sl__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
}

.sl__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font: 500 1.7cqw/1 var(--sans);
  letter-spacing: -0.015em;
}

.sl__mark::before {
  content: "";
  width: 0.62em;
  height: 0.62em;
  background: var(--accent);
}

.sl--white .sl__mark::before {
  border: 1px solid var(--ink);
}

.sl--green .sl__mark::before {
  background: var(--ink);
}

.sl .label {
  font-size: max(9px, 1.15cqw);
  color: var(--muted-inv);
}

.sl--white .label {
  color: var(--muted);
}

.sl--green .label {
  color: rgba(12, 18, 16, 0.7);
}

.sl h1,
.sl h2 {
  font-weight: 400;
  font-size: 6.4cqw;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.sl .huge {
  font-size: 8.6cqw;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.sl p {
  font-size: 1.9cqw;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.sl .dim {
  color: var(--muted-inv);
}

.sl--white .dim {
  color: var(--muted);
}

.sl--green .dim {
  color: rgba(12, 18, 16, 0.7);
}

.sl canvas.sl__bg {
  position: absolute;
  left: 0;
  width: 100%;
  top: 14%;
  height: 50%;
}

.sl canvas.sl__full {
  position: absolute;
  top: 34%;
  left: 0;
  width: 100%;
  height: 62%;
}

.sl .sl__lead {
  margin-top: 3cqw;
  margin-bottom: auto;
}

/* Text stays above the canvases. */
.sl__in > :not(canvas) {
  position: relative;
  z-index: 1;
}

.sl__ratio .label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Three columns with a line on top */
.sl__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.4cqw;
}

.sl__cols > div {
  display: grid;
  align-content: start;
  gap: 1.1cqw;
  padding-top: 1.4cqw;
  border-top: 1px solid currentColor;
}

.sl__cols h3 {
  font-weight: 400;
  font-size: 2.6cqw;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.sl__cols--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.6cqw;
}

.sl__cols--5 h3 {
  font-size: 2.2cqw;
}

.sl__cols--5 p {
  font-size: 1.45cqw;
}

.sl__sym {
  width: 1.8cqw;
  height: 1.8cqw;
  border: 0.22cqw solid currentColor;
}

.sl__sym--agent {
  position: relative;
  display: grid;
  place-items: center;
}

.sl__sym--agent::after {
  content: "";
  width: 45%;
  height: 45%;
  background: currentColor;
}

.sl__sym--result {
  border-color: var(--ink);
  background: var(--accent);
}

/* The logo slide */
.sl__logo {
  display: grid;
  place-items: center;
  flex: 1;
}

.sl__logo img {
  width: 62cqw;
  height: auto;
}

/* The square in its states */
.sl__states {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.4cqw;
  align-items: end;
}

.sl__states > div {
  display: grid;
  gap: 1.6cqw;
}

.sl__state {
  width: 9cqw;
  height: 9cqw;
  border: 0.45cqw solid var(--paper);
}

.sl__state--agent {
  position: relative;
  border-color: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
}

.sl__state--agent::before {
  content: "";
  position: absolute;
  inset: -0.45cqw;
  border: 0.45cqw solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
}

.sl__state--agent::after {
  content: "";
  width: 45%;
  height: 45%;
  border: 0.45cqw solid var(--paper);
}

.sl__state--result {
  border: 0;
  background: var(--accent);
}

/* Colour */
.sl__ratio {
  display: flex;
  height: 44cqh;
  border-radius: 0.6cqw;
  overflow: hidden;
  outline: 1px solid var(--line);
}

.sl__ratio > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.6cqw;
}

.sl__ratio b {
  font-weight: 400;
  font-size: 4.6cqw;
  line-height: 1;
  letter-spacing: -0.04em;
}

.sl__ratio .r-white {
  flex: 50 1 0;
  background: var(--paper);
  color: var(--ink);
}

.sl__ratio .r-ink {
  flex: 40 1 0;
  background: var(--ink);
  color: var(--paper);
}

.sl__ratio .r-green {
  flex: 10 1 0;
  min-width: 11cqw;
  background: var(--accent);
  color: var(--ink);
}

.sl__ratio .r-ink .label {
  color: var(--muted-inv);
}

/* Type */
.sl__type {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3cqw;
}

.sl__type > div {
  display: grid;
  gap: 1cqw;
  padding-top: 1.4cqw;
  border-top: 1px solid currentColor;
}

.sl__type .aa {
  font-size: 15cqw;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.sl__type .aa.mono {
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

/* Portraits */
.sl__faces {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6cqw;
  width: 62%;
}

.sl__faces figure {
  display: grid;
  gap: 0.8cqw;
}

.sl__faces .frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 0.5cqw;
  overflow: hidden;
  background: var(--ink-2);
}

.sl__faces canvas,
.sl__faces img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sl__faces figcaption {
  font-size: 1.35cqw;
}

.sl__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3cqw;
}

/* ---------- Controls ---------- */

.deck__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(100%, calc((100svh - var(--top) - 6.5rem) * 16 / 9));
  margin-inline: auto;
}

.deck__nav {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.deck__count {
  min-width: 5.5rem;
  text-align: center;
  color: var(--muted-inv);
}

.deck__progress {
  position: relative;
  flex: 1;
  min-width: 6rem;
  height: 1px;
  background: var(--line-inv);
}

.deck__progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  background: var(--accent);
  transition: width 0.45s var(--ease);
}

.deck__keys {
  color: var(--muted-inv);
}

/* ---------- Overview ---------- */

.deck.is-overview .deck__stage {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: var(--max);
  aspect-ratio: auto;
}

.deck.is-overview .sl {
  position: relative;
  inset: auto;
  aspect-ratio: 16 / 9;
  opacity: 1;
  visibility: visible;
  cursor: pointer;
  transition: outline-color 0.2s var(--ease);
  outline: 1px solid var(--line-inv);
  outline-offset: 0;
}

.deck.is-overview .sl:hover,
.deck.is-overview .sl:focus-visible {
  outline: 2px solid var(--accent);
}

.deck.is-overview .sl.is-on {
  outline: 2px solid var(--paper);
}

/* ---------- Full screen ---------- */

.deck:fullscreen {
  justify-content: center;
  padding: 0;
}

.deck:fullscreen .deck__stage {
  width: min(100vw, calc(100vh * 16 / 9));
}

.deck:fullscreen .sl {
  border-radius: 0;
}

.deck:fullscreen .deck__bar {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  width: auto;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: rgba(12, 18, 16, 0.8);
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.deck:fullscreen .deck__bar:hover,
.deck:fullscreen.is-moving .deck__bar {
  opacity: 1;
}

.deck:fullscreen .deck__progress,
.deck:fullscreen .deck__keys {
  display: none;
}

@media (max-width: 700px) {
  .deck__keys {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sl,
  .sl.is-on {
    transition: none;
  }
}

.deck__back {
  transform: rotate(180deg);
}
