:root {
  --mgn: oklch(0.6 0.25 330);
  --red: oklch(0.6 0.25 0);
  --pch: oklch(0.6 0.25 30);
  --orn: oklch(0.6 0.25 60);
  --ylw: oklch(0.6 0.25 90);
  --lim: oklch(0.6 0.25 120);
  --grn: oklch(0.6 0.25 150);
  --tqs: oklch(0.6 0.25 180);
  --sky: oklch(0.6 0.25 210);
  --blu: oklch(0.6 0.25 240);
  --ind: oklch(0.6 0.25 270);
  --prp: oklch(0.6 0.25 300);
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/karla.woff2") format("woff2 supports variations");
  src: url("../fonts/karla.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Karla";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/karla-italic.woff2")
    format("woff2 supports variations");
  src: url("../fonts/karla-italic.woff2") format("woff2-variations");
}
@keyframes peekaboo-bottom {
  0% { bottom: -25%; }
  40% { bottom: -2.5%; }
  60% { bottom: -2.5%; }
  100% { bottom: -25%; }
}
@keyframes peekaboo-left {
  0% { left: -25%; }
  40% { left: -0.5%; }
  60% { left: -0.5%; }
  100% { left: -25%; }
}
@keyframes peekaboo-top {
  0% { top: -100%; }
  30% { 
    top: -40%;
    rotate: 175deg;
  }
  45% { rotate: 185deg; }
  50% { rotate: 175deg; }
  55% { rotate: 185deg; }
  70% { 
    rotate: 175deg;
    top: -40%;
  }
  100% { top: -100%; }
}
@keyframes peekaboo-waggle {
  0% { bottom: -25%; }
  5% { bottom: -2.5%; }
  10% { rotate: -5deg; }
  15% { rotate: 5deg; }
  20% { rotate: -5deg; }
  25% { rotate: 5deg; }
  30% { rotate: -5deg; }
  35% { rotate: 5deg; }
  40% { rotate: -5deg; }
  45% { rotate: 5deg; }
  50% { rotate: -5deg; }
  55% { rotate: 5deg; }
  60% { rotate: -5deg; }
  65% { rotate: 5deg; }
  70% { rotate: -5deg; }
  75% { rotate: 5deg; }
  80% { rotate: -5deg; }
  85% { rotate: 5deg; }
  90% { rotate: -5deg; }
  95% {
    rotate: 5deg;
    bottom: -2.5%;
  }
  100% { bottom: -25%; }
}

@keyframes waviy {
  0%, 40%, 100% {
    transform: translateY(0)
  }
  20% {
    transform: translateY(-3vw)
  }
}

.shower {
  --dialogs: initial;
  --slide-ratio: calc(16 / 9);
  --hue: 220;
  --color-key: light-dark(oklch(37% 0.1 var(--hue)), oklch(70% 0.1 var(--hue)));
  --bright: oklch(50% 0.3 var(--hue));
  --bg-color: light-dark(oklch(85% 0.05 var(--hue)), oklch(25% 0.05 var(--hue)));
  --color-back: Canvas;
  --color-medium: light-dark(#777, #999);
  
  font-family: Karla, Inter, Roboto, "Helvetica Neue", "Arial Nova",
    "Nimbus Sans", Arial, sans-serif;
  font-size: 190%;
  line-height: 1.5;
  
  color: CanvasText;
  background-color: Canvas;

  .slide {
    background-color: var(--bg-color);
    padding: 2.5rem 2.5rem 0;

    border: 1rem solid var(--color-key);
    border-radius: 3vw;
    
    outline: 0.35rem solid var(--color-key);
    outline-offset: -1.55rem;

    p {
      margin: revert;
    }

    li {
      margin-block: 1.25rem;
    }

    &.textonly {
      white-space: pre-line;
    }
    &::after {
      display:none;
    }
    .nomargin {
      margin: 0;
    }
  }

  img {
    border-radius: 0.25rem;
  }
  iframe {
    position: absolute;
    inset: 1.5rem;
    width: calc(100% - 3rem);
    height: calc(100% - 3rem);
    border-radius: 1rem;
  }

  small,
  .small {
    font-size: 80%;
  }
  .smaller {
    font-size: 60%;
  }
  .smallerer {
    font-size: 50%;
  }
  .large {
    font-size: 140%;
  }
  .xlarge {
    font-size:250%;
  }
  .center {
    text-align: center;
  }
  .right {
    text-align: right;
  }
  
  section > div:has(style) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: -1rem;
    div, p { border-radius: 0.25rem }
    > div {
      padding: 1.5rem;
      > p {
        padding-inline: 0.5rem;
      }
      > :first-child { margin-block-start: 0;}
      > :last-child { margin-block-end: 0;}
      &:not(.system-demo) {
        background-color: Canvas;
      }
      div {
        margin-block: 0.5rem;
      }
    }
  }
  code, pre, style {
    outline: 0.1em solid #8886;
    color: CanvasText;
    background-color: Canvas;
    border-radius: 0.25em;
    padding: 0 0.2em;
  }
  pre, style {
    font-family: monospace;
    display: block;
    white-space: pre-wrap;
    padding: 0.5rem 1rem;
  }
  style {
    color-scheme: dark;
    font-size: 95%;
  }

  aside {
    font-size: 80%;
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 0.5em 0.75em;
  }

  dialog {
    display: var(--dialogs);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0; 
    box-sizing: border-box;
    background-color: var(--bg-color);

    &:not(.active) {
      display: none;
    }
    &:has(video, img) {
      padding: 0;
    }
    video {
      width: 100%;
      height: 100%;
    }
    img {
      width: 100%;
    }
  }

  blockquote {
    margin-inline-start: 5vw;
    &::before {
      color: var(--color-key);
    }
    & + & {
      margin-block-start: 0.5em;
    }
    cite {
      float:right;
    }
  }
  

  &.full {
    background-color: var(--color-key);
    .next {
      opacity: 0;
      transition: opacity 0.25s ease-in-out;

      &.slow {
        transition: opacity 1s ease-in-out;
      }
    }
    .next:is(.active, .visited) { opacity: 1 }

    .pfp {
      height: 75%;
      position: absolute;
      right: 0%;
      bottom: -75%;
      transition: bottom 1s ease-in-out;
    }
    .next:is(.active, .visited) .pfp {
      bottom: 0%;
    }
    .waiting {
      img:nth-of-type(1) {
        height: 25%;
        right: 10%;
        transform-origin: center bottom;
        animation:
          10s ease-in-out 30s peekaboo-bottom,
          20s ease-in-out 120s infinite peekaboo-waggle;
      }
      img:nth-of-type(2) {
        height: 25%;
        rotate: 90deg;
        top: 10%;
        left: -25%;
        animation: 5s ease-in-out 60s peekaboo-left;
      }
      img:nth-of-type(3) {
        height: 100%;
        rotate: 180deg;
        top: -100%;
        right: 20%;
        animation: 10s ease-in-out 90s peekaboo-top;
      }
    }
    .progress {
      box-shadow: calc(var(--slide-width) / 2) 0 0 calc(var(--slide-width) / 2) black;
    }
  }
}
a,
.caption h1,
h2,
h3,
h4,
.subheading,
.display-font {
  font-family: ui-rounded, "Hiragino Maru Gothic ProN", Quicksand,
    Comfortaa, Manjari, "Arial Rounded MT", "Arial Rounded MT Bold",
    Calibri, source-sans-pro, sans-serif;
}
.full h2, .slide h2 { color: var(--color-key) }
.badge {
  a {
    margin: 0;
  }
}
.flex {
  display: flex;
  justify-content: space-between;
}
.middle {
  display: grid;
  place-content: center;
}
.light { color-scheme: light }
.dark { color-scheme: dark }
.lowcontrast { filter: contrast(0.65) }

.col2 {
  columns: 2;
}

.newbadge::after {
  position: absolute;
  content: attr(data-badge);
  padding-inline: 0.25em;
  font-size: 50%;
  color: var(--bg-color);
  background-color: var(--bright);
  border-radius: 0.25em;
  rotate: 25deg;
  margin-left: -1.25em;
}


/* Slide-specific styles */

.ydark img {
  position: absolute;
  height: 18rem;
  width: auto;
  bottom: 5rem;
  &:nth-of-type(1) {
    left: 3rem;
  }
  &:nth-of-type(2) {
    right: 3rem;
  }
  &:nth-of-type(3) {
  height: 22rem;
    left: 50%;
    translate: -50%;
    bottom: 3rem;
  }
}
.ylight {
  .blur {
    position: absolute;
    top: 18.925rem;
    left: 1.6rem;
    color: white;
    background-color: black;
    border-radius: 0.25rem;
    padding: 0.5em;
    line-height: inherit;
    text-shadow:
      0.15rem -0.15rem 0.2rem white,
      -0.15rem 0.15rem 0.2rem white;
  }
  img {
    position: absolute;
    box-shadow: 0 0 1em -0.5em white;
    &:nth-of-type(1) {
      left: 3rem;
      bottom: 3rem;
      width: 25rem;
    }
    &:nth-of-type(2) {
      top: 3rem;
      right: 3rem;
      width: 35rem;
    }
    &:nth-of-type(3) {
      right: 2rem;
      bottom: 2rem;
      width: 55rem;
    }
    &:nth-of-type(4) {
      top: 2rem;
      left: 10rem;
      width: 45rem;
    }
    &:nth-of-type(5) {
      top: 5rem;
      left: 2rem;
      width: 50rem;
    }
    &:nth-of-type(n+6) {
      top: 55%;
      left: 50%;
      translate: -50% -50%;
      width: 50rem;
    }
  }
}

.both {
  p {
    position: absolute;
    font-size: 3vw;
    &:nth-of-type(1) {
      bottom: 10%;
      left: 80%;
    }
    &:nth-of-type(2) {
      top: 45%;
      left: 10%;
    }
    &:nth-of-type(3) {
      bottom: -7%;
      left: 3%;
    }
    &:nth-of-type(4) {
      top: 0;
      right: 20%;
    }
  }
  img {
    position: relative;
    border-radius: 0.5rem;
    left: 50%;
    translate: -50% 0;
    width: 40%;
  }
  
  div.waviy {
    text-align: center;
    margin-block: 3rem 0.5rem;
    font-size: 5rem;
  }
  .waviy span {
    color: var(--rgb, CanvasText);
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    animation: waviy 2s infinite;
    animation-delay: calc(0.1s  * var(--i));
  }
}

.what-css {
  .grid3 {
    display: grid;
    grid-template-rows: auto auto;
    grid-auto-flow: column;
  }
}

.themes .default, 
.themes .default > div {
  display: flex;
  gap: 2em;
}
.themes .default {
  font-size: 50%;
  justify-content: space-between;
  > div {
    width: 45%;
    color: CanvasText;
    background-color: Canvas;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem 0.5rem 2rem;
    ul, li, li::before {
      all: revert-layer
    }
    a:is(:active, :visited, :link) {
      color: revert-layer;
    }
  }
  > div:first-child {
    color-scheme: light;
  }
  > div:last-child {
    color-scheme: dark;
  }
  * {
    font-size: revert;
    font-family: initial;
    font-weight: revert;
    line-height: 1;
    color: inherit;
  }
}

.other-systemcolors {
  .system-demo2 {
    position: relative;
    a:link, a:visited, a:active {
      all: revert;
    }
  }
  img {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
  }
}

.coming-soon-images {
  pre {
    position: relative;
    img {
      position: absolute;
      inset: 0;
      height: 100%;
      width: auto;
      &:nth-of-type(2) {
        width: 100%;
      }
    }
  }
}
.coming-soon-if {
  > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    > div {
      padding: 0.5rem 1rem;
      background-color: Canvas;
      color: CanvasText; 
      border-radius: 0.5rem;

    }
  }
  img {
    position: absolute;
    top: 7rem;
    left: 2.25rem;
    height: auto;
    width: 93%;
  }
}

.choices .grid {
  display: grid;
  grid-template-columns: 10% 1fr 1fr 1fr;
  grid-template-rows: 10% 1fr 1fr;
  height: 77%;
  gap: 0.5rem;
  text-align: center;
  > * { place-content: center }

  div.light, div.dark {
    color: light-dark(Indigo, CornSilk);
    background: light-dark(CornSilk, Indigo);
    background-image: revert;
    font-size: 200%;
    border-radius: 1rem;
    
    &.highcontrast {
      color: CanvasText;
      background: Canvas;
    }
  }
}

.further {
  li::before {
    display: none;
  }
}

.ams-flag {
  display: inline-block;
  background-color: black;
  border-block: 0.55em solid red;
  padding-inline: 0.25em;
  line-height: 0.65;
  span {
    display: inline-block;
    font-weight: bolder;
    translate: 0 -0.1em;
    color: white;
  }
}