/* Literata Variable */
@font-face {
  font-family: "Literata Variable";
  font-style: normal;
  font-weight: 200 900;
  src: url("./fonts/literata/Literata-Roman.woff2") format("woff2 supports variations"), url("./fonts/literata/Literata-Roman.woff2") format("woff2-variations");
  font-display: swap;
}
@font-face {
  font-family: "Literata Variable";
  font-style: italic;
  font-weight: 200 900;
  src: url("./fonts/literata/Literata-Italic.woff2") format("woff2 supports variations"), url("./fonts/literata/Literata-Italic.woff2") format("woff2-variations");
  font-display: swap;
}
/* Fraunces Variable */
@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-weight: 100 900;
  src: url("./fonts/fraunces/Fraunces-Roman-VF.woff2") format("woff2 supports variations"), url("./fonts/fraunces/Fraunces-Roman-VF.woff2") format("woff2-variations");
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Variable";
  font-style: italic;
  font-weight: 100 900;
  src: url("./fonts/fraunces/Fraunces-Italic-VF.woff2") format("woff2 supports variations"), url("./fonts/fraunces/Fraunces-Italic-VF.woff2") format("woff2-variations");
  font-display: swap;
}
/* Name Sans Variable */
@font-face {
  font-family: "Name Sans Variable";
  font-style: normal;
  font-weight: 1 1000;
  src: url("./fonts/name-sans/name_sans-variable.woff2") format("woff2 supports variations"), url("./fonts/name-sans/name_sans-variable.woff2") format("woff2-variations");
  font-display: swap;
}
.padded {
  padding: 2.5vh 2.5vw;
}

html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: "Name Sans Variable";
}

h1 {
  font-family: "Fraunces Variable";
  font-size: calc(8vw + 1rem);
  font-weight: 800;
  font-variation-settings: "opsz" 144, "SOFT" 1, "WONK" 1;
  line-height: 1;
  margin: 1rem 0;
  text-align: left;
}

h2 {
  font-family: "Fraunces Variable";
  font-size: calc(3vw + 1rem);
  font-variation-settings: "opsz" 96, "SOFT" 75, "WONK" 1;
  font-weight: 650;
  line-height: 1;
  margin: 1rem 0;
  text-align: left;
}

h3 {
  font-family: "Fraunces Variable";
  font-size: calc(2vw + 1rem);
  font-variation-settings: "opsz" 48, "SOFT" 15, "WONK" 0;
  font-weight: 450;
  line-height: 1;
  margin: 1rem 0;
  text-align: left;
}

.device {
  --margin-w: 10vw;
  --margin-t: 10vh;
  border: solid 0.025rem #252525;
  border-radius: 1rem;
  background-color: #404456;
  margin: var(--margin-t) var(--margin-w);
  padding: 1.5rem 1.5rem 2rem 1.5rem;
  width: calc(100vw - 2 * var(--margin-w));
  height: calc(100vh - 2 * var(--margin-t));
  transition: all 0.2s ease-in;
}
.mobile .device {
  --margin-w: 35vw;
  --margin-t: 5vh;
  border-radius: 2rem;
  padding-bottom: 4rem;
}

.section-title.current-fragment {
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  align-items: center;
  justify-content: center;
  display: flex;
  left: 0;
  height: 100vh;
  position: absolute;
  top: 0;
  transition: all 0.2s ease-in;
  width: 100vw;
  z-index: 10;
}
.section-title.current-fragment h1 {
  letter-spacing: 1px;
}

.screen {
  border: solid 0.025rem #353535;
  border-radius: 0.25rem;
  background-color: #000;
  overflow: scroll;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: all 0.2s ease-in;
}
.mobile .screen {
  border-radius: 1rem;
}

.slides > * {
  background-color: #000;
  background-image: linear-gradient(150deg, rgba(2, 0, 36, 0.5) 0%, rgba(9, 69, 121, 0.5) 35%, rgba(0, 100, 170, 0.5) 100%);
  transition: all 0.2s ease-in;
}
.slides > *.dark:not(.remove-dark) {
  background-image: none;
}

.title-slide {
  background-color: #000;
  background-image: linear-gradient(150deg, rgba(2, 0, 36, 0.4) 0%, rgba(9, 69, 121, 0.4) 35%, rgba(0, 100, 170, 0.4) 100%);
  color: #ADADAD;
  height: 100%;
}
.title-slide h1 {
  margin-top: 25vh;
}
.title-slide h2 {
  line-height: 1.2;
}
.title-slide .cover {
  float: right;
  width: 40vw;
}

.closing-slide {
  background-color: #000;
  background-image: url("images/tristan_and_tillie.jpeg");
  background-size: cover;
  background-position: center -30vh;
  color: #fff;
  height: 100%;
  text-align: right;
}
.closing-slide h1 {
  margin-top: 57vh;
  text-align: right;
}
.closing-slide h2 {
  text-align: right;
}
.closing-slide h3 {
  text-align: right;
}

.book-frame {
  background-color: #000;
}

:root {
  --c-gray-dark: #333;
  --c-white: #fff;
  --book-fg: var(--c-gray-dark);
  --book-bg: var(--c-white);
}

.book {
  background-color: var(--book-bg);
  color: var(--book-fg);
  margin: 0;
  padding: 0;
  transition: all 0.2s ease-in;
}
.book.dark-mode:not(.remove-dark-mode) {
  --book-fg: var(--c-white);
  --book-bg: var(--c-gray-dark);
}
.book.dark-mode:not(.remove-dark-mode) p {
  font-weight: 375;
}

.chapter {
  font-family: "Literata Variable";
  font-size: 1rem;
  font-variation-settings: "opsz" 8;
  font-weight: 400;
  padding: 2vw;
}
.chapter > * {
  transition: all 0.35s ease-in;
}
.chapter h1 {
  font-family: "Literata Variable";
  font-size: 1rem;
  font-variation-settings: "opsz" 8;
  font-weight: 400;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  opacity: 0;
}
.legible .chapter h1:first-of-type {
  opacity: 1;
}
.type-size .chapter h1 {
  font-size: 3rem;
  line-height: 1.185;
}
.opsz .chapter h1 {
  font-variation-settings: "opsz" 72;
}
.line-length .chapter h1 {
  max-width: 44rem;
}
.chapter p {
  font-family: "Literata Variable";
  font-size: 1rem;
  font-variation-settings: "opsz" 8;
  font-weight: 400;
  line-height: 1.2;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  margin-bottom: 0;
  max-width: 100%;
  opacity: 0;
}
.legible .chapter p:first-of-type {
  opacity: 1;
}
.opsz-p:not(.remove-opsz-p) .chapter p {
  font-variation-settings: "opsz" 72;
}
.line-length .chapter p {
  max-width: 40rem;
}
.line-height .chapter p {
  line-height: 1.5;
}
.show-all-p .chapter p {
  opacity: 1;
}
.indent .chapter p {
  text-indent: 1.5em;
}
.indent-not-first .chapter p:first-of-type {
  text-indent: unset;
}
.chapter p:first-of-type:first-line {
  transition: all 0.2s ease-in;
}
.chapter p:first-of-type::first-letter {
  transition: all 0.2s ease-in;
}
.first-line .chapter p:first-of-type:first-line {
  font-weight: 650;
}
.first-letter .chapter p:first-of-type::first-letter {
  float: left;
  font-size: 3.125em;
  font-variation-settings: "opsz" 72;
  font-weight: 325;
  /* tweak vertical positioning in Chrome & Safari */
  line-height: 0.6;
  margin: 0;
  padding: 0 0.025em 0 0;
  /* tweak vertical positioning in Firefox */
  padding-top: 0.175em;
}
.first-letter .chapter p:last-of-type:after {
  content: " ";
  -webkit-mask: url(images/end_mark.svg);
  mask: url(images/end_mark.svg);
  -webkit-mask-size: cover;
  mask-size: cover;
  background-color: #333;
  height: 0.65em;
  width: 1em;
  display: inline-block;
  line-height: 0.5;
}
.hyphens .chapter p {
  -webkit-hyphens: auto;
  hyphens: auto;
}

.cols-1 .main-content {
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  overflow-y: hidden;
  height: 100%;
}
.cols-1 .chapter {
  columns: 100vw auto;
  column-gap: 0;
  height: 87vh;
  margin-top: 0;
  padding-top: 2vh;
  padding-bottom: 1vh;
  position: relative;
  widows: 2;
  orphans: 2;
}