* {
    margin: 0;
    box-sizing: border-box;
}

:root {
    --text-padding: 4vw;
    --text-padding-both-sides: 2.5vw 4vw;
    --text-size: 1.5vw;
    --text-size-large: 1.5em; /* as multiplier on base size */

    --color-dark: #1d1e1f;
    --color-light: #fff;
    --color-medium: #eceff2;
    --color-medium-2: #bbc5cf;
    --color-medium-3: #505254;

    --color-text: var(--color-dark);
    --color-background: var(--color-light);

    --gradient-midnight: radial-gradient(
            farthest-corner circle at 100% 0% in oklab,
            oklch(80% 0.4 222) 0%,
            oklch(35% 0.5 313) 100%
    );

    font-family: 'InterVariable', sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: var(--text-size);
    color: var(--color-text);
}

@font-face {
    font-family: InterVariable;
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('./assets/webfonts/InterVariable-subset.woff2') format('woff2');
}

body {
    min-height: 100vh;
    background-color: var(--color-medium-3);
}

body,
.slides,
.slide {
    display: grid;
}

/* Text */

a {
    color: currentColor;
}

p > code,
td > code {
    background-color: var(--color-medium);
    font-family: monospace;
    font-size: 1em;
    font-weight: 400;
    line-height: 1;
    padding: 0.3em 0.5em;
    display: inline-block;
    border-radius: 0.3em;
}

.h1 {
    font-weight: 800;
    font-size: 4vw;
    line-height: 1.3em;
    letter-spacing: -0.02em;
}

.h1 em {
    font-size: 7vw;
    font-style: normal;
}

.h2 {
    font-weight: 800;
    font-size: 6vw;
    line-height: 1.2em;
    letter-spacing: -0.01em;
    max-width: 25ch;
}

.h3 {
    font-weight: 800;
    font-size: 4vw;
    letter-spacing: -0.01em;
    line-height: 1.2em;
}

.h4 {
    font-weight: 600;
    font-size: 1.2em;
    letter-spacing: -0.01em;
    line-height: 1.2em;
}

p {
    line-height: 1.4em;
}

.h1 + p {
    padding-block-start: 2em;
}

.h2 + p,
.h3 + p,
.h3 + .list,
.h4 + p{
    padding-block-start: 1em;
}

p + p {
    padding-block-start: 1em;
}

p + .h1,
p + .h2,
p + .h3,
p + .h4 {
    padding-block-start: 1em;
}

.list + p,
p + .list {
    padding-block-start: 1em;
}

.large-text {
    font-size: var(--text-size-large);
}

.table {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

.table > thead > tr > th,
.table > tbody > tr > td {
    padding: 0 0 0.5em 0;
    line-height: 250%;
    text-align: left;
    align-content: baseline;
}

.table > thead > tr > th {
    font-weight: 800;
}


.list {
    list-style-type: disc;
    text-align: left;
    margin: 0;
    padding: 0 0 0 1em;
}

.list li {
    padding: 0 0 .5em 0;
}

.list--large {
    font-size: var(--text-size-large);
}

/* Slide Setup */

.slides {
    list-style: none;
    padding: 0;
    margin: 0;
}

.slide {
    --slide-height: 40rem;
    overflow: hidden;
    width: 100vw;
    height: var(--slide-height);
    max-height: var(--slide-height);
    background: var(--color-background);
}

.slide:not(:last-child) {
    margin-bottom: 2rem;
}

/* Center Image */

.center-image {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-image img {
    object-fit: contain;
    width: 90%;
    height: 90%;
}

/* Fit Image */

.fit-image {
    overflow: hidden;
}

.fit-image img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

/* Cover Image */

.cover-image {
    overflow: hidden;
}

.cover-image img {
    object-fit: cover;
    object-position: center center;
    width: 100%;
    height: 100%;
}

/* Content Title */

.content--title {
    padding: var(--text-padding);
    place-content: flex-end flex-start;
}

/* Content Center Image */
.content--center-image {
    display: grid;
    grid-template-rows: auto 1fr;
    max-height: 100%;
    overflow: hidden;
}

/* Content Subtitle */
.content--subtitle {
    padding: var(--text-padding);
    place-content: center center;
    text-align: center;
}

/* Content Example Code and iFrame */
.content--example-code-iframe {
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 50% 50%;
}

.content--example-code-iframe > :first-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: calc(var(--text-padding) * 0.5);
}

.content--example-code-iframe > :last-child {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content Default */

.content--default {
    display: grid;
    grid-template-rows: auto 1fr;
}

.content--default > div:first-child {
    padding: var(--text-padding);
}

.content--default > div:last-child {
    padding: 0 var(--text-padding);
}


/* Content Statement */

.content--statement {
    display: grid;
    grid-template-rows: 25% 55% 15%;
}

.content--statement > div {
    padding: var(--text-padding);
}

.content--statement > :nth-child(2) {
    display: flex;
    font-size: var(--text-size-large);
    justify-content: left;
    align-items: center;
    max-width: 42ch;
}

.content--statement > :last-child {
    align-content: flex-end;
}

/* Content 50-50  */

.content--50-50 {
    display: grid;
    grid-template-columns: repeat(2, 50%);
}

.content--50-50 > :first-child {
    display: grid;
}

.content--50-50 > :first-child > :first-child,
.content--50-50 > :first-child > :last-child {
    padding: var(--text-padding);
}

.content--50-50 > :first-child > :last-child {
    align-content: flex-end;
}

.content--50-50 > :last-child {
    height: var(--slide-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Content Test */

.content--3-split {
    display: grid;
    grid-template-areas:
    'a a'
    'b c';
    grid-template-columns: repeat(2, 50%);
    grid-template-rows: repeat(2, 50%);
}

.content--3-split > div {
    padding: var(--text-padding);
}

.content--3-split > div:nth-child(1) {
    grid-area: a;
}

.content--3-split > div:nth-child(2) {
    grid-area: b;
}

.content--3-split > div:nth-child(3) {
    grid-area: c;
}

.content--3-split > div:nth-child(2),
.content--3-split > div:nth-child(3) {
    place-content: center;
    display: grid;
    text-align: center;
}

/* Highlight */
.highlight {
    position: relative;
}

.highlight--element {
    opacity:                      1                 ;
    position: absolute;
    right: 8vw;
    bottom: 8vw;
    width: 24vw;
    height: 24vw;
    padding: 4vw;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: var(--text-size-large);
    font-weight: bold;
    rotate: 13deg;
}

/* Iframe with examples */
.example-iframe {
    resize: inline;
    overflow: auto;
    width: 95%;
    height: 95%;
    display: inline-block;
    border: 2px solid #222222;
    min-width: 300px;
}

.example-iframe iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}


/* Themes */

.theme {
    color: var(--color-text);
    background: var(--color-background);
}

.theme--dark {
    --color-text: var(--color-light);
    --color-background: var(--color-dark);
}

.theme--medium {
    --color-text: var(--color-text);
    --color-background: var(--color-medium);
    box-shadow: inset var(--color-medium-2) 0px 0px 3em -1em;
}

.theme--midnight {
    --color-text: var(--color-light);
    --color-background: var(--gradient-midnight);
}

/* Text Themes */
.theme-text {
    background-clip: text;
    color: transparent;
    width: fit-content;
}

.theme-text--midnight {
    background-image: var(--gradient-midnight);
}

/* Reveal animation */
@keyframes reveal {
    0% {
        scale: 0
    }
    80% {
        scale: 140%
    }
    100% {
        scale: 100%
    }
}

.reveal {
    position: relative;
}

.reveal .reveal__button,
.reveal .reveal__inner {
    position: absolute;
    top: 50%;
    left: 50%;
}

.reveal .reveal__button {
    z-index: 20;
    border: none;
    background-image: var(--gradient-midnight);
    font-family: 'InterVariable', sans-serif;
    font-weight: 800;
    font-size: 4vw;
    padding: var(--text-padding) calc(var(--text-padding) * 2);
    color: #fff;
    border-radius: 0.2em;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: 50% 50%;
    transition: transform 250ms ease-in;
}

.reveal.hide-button .reveal__button {
    transform: translate(-50%, -50%) scale(0);
}

.reveal .reveal__inner {
    z-index: 30;
    transition: transform 500ms cubic-bezier(0.2, 2, 0.8, 2);
    white-space: nowrap;
    transform: translate(-50%, -50%) scale(0);
}

.reveal.show-inner .reveal__inner {
    transform: translate(-50%, -50%) scale(1);
}

.reveal__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}


/* Adjustments wider Viewports */

@media screen and (min-width: 120ch) {
    body {
        background: var(--color-light);
    }

    .slides {
        grid-auto-flow: column;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
    }

    .slide {
        /* without the height of the scrollbar*/
        --slide-height: calc(100vh - 16px);
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .slide:not(:last-child) {
        margin-bottom: 0;
    }
}

/* QR Code */

.qr-code {
    display: inline-block;
    width: 70%;
}

/* Overwrite Prism styles */
code[class*=language-],
pre[class*=language-] {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    outline: none;
}