@font-face {
  font-family: 'Dancing Script';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../fonts/dancingscript.ttf) format('truetype');
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../fonts/raleway.ttf) format('truetype');
}

*,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  background: none;
  text-decoration: none;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  font-style: inherit;
  color: inherit;
  border: none;
  list-style: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --c-bg: hsl(1, 17%, 95%);
  --c-text: hsl(0, 15%, 55%);
  --c-link: hsl(150, 15%, 55%);
  --font-title: "Dancing Script", cursive;
  --font-body: "Raleway", sans-serif;
  --font-size: 17px;
  --font-lineheight: 26px;
  --font-weight: 400;
  --font-style: normal;
  --font-scale-xs: 0.79;
  --font-scale-s: 0.889;
  --font-scale-m: 1.125;
  --font-scale-l: 1.226;
  --font-scale-xl: 1.2;
  --font-scale-xxl: 3;
  --l-regular: 24rem;
  --l-wide: 36rem;
  --l-archive: 37rem;
  --l-archive-wide: 57rem;
  --l-text: 19rem;
  font-size: var(--font-lineheight);
  font-family: var(--font-body);
  font-weight: var(--font-weight);
  font-style: var(--font-style);
  background: var(--c-bg);
  color: var(--c-text);
}

@media (min-width: 36rem) {
  :root {
    --font-size: 22px;
    --font-lineheight: 33px;
  }
}

@media (min-width: 36rem) {
  :root {
    --font-scale-xl: 1.35;
  }
}

::-moz-selection {
  background: var(--c-text);
  color: var(--c-bg);
}

::selection {
  background: var(--c-text);
  color: var(--c-bg);
}

body,
html {
  width: 100%;
  height: 100%;
}

body *,
html * {
  font-size: var(--font-size);
  line-height: 1rem;
  letter-spacing: 0.05em;
}

body {
  overflow: auto;
}


nav, main {
  max-width: 36rem;
  margin: 0 auto;
}

nav ul {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  font-weight: bold;
  margin-top: 4em;
}

@media (max-width: 36rem) {
  nav ul {
    flex-direction: column;
  }
  nav li {
    margin: 0 auto;
  }
}

.opening {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
}

.opening::before,
.opening::after {
  content: "";
  display: block;
  width: 90%;
  height: 35%;
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  left: 0;
  right: 0;
  margin: 0 auto;
}

.opening::before {
  background-position: center bottom;
  top: 0;
  background-image: url("../images/opening-top.jpg");
}

.opening::after {
  background-position: center top;
  bottom: 0;
  background-image: url("../images/opening-bottom.jpg");
}

.opening-title {
  display: flex;
  text-align: center;
  margin: auto;
  font-family: var(--font-title);
  font-size: 10vmin;
  position: relative;
  padding-bottom: 10vmin;
}

.opening-title::after {
  font-size: 5vmin;
  width: 100%;
  text-align: center;
  position: absolute;
  top: 12.5vmin;
  content: attr(data-subtitle);
}

.opening-title span {
  display: inline;
  font-size: inherit;
  letter-spacing: 0.2em;
}

.opening-title span:nth-child(2) {
  margin: 0 .3em;
}

.title {
  font-family: var(--font-title);
}

.text {
  text-align: center;
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

@media (min-width: 36rem) {
  .text {
    margin-top: 4rem;
    margin-bottom: 4rem;
  }
}

/* FIXME: drop this, it's making lists look weird */
.text p:not(:last-child) {
  margin-bottom: 1rem;
}

ul {
  margin-bottom: 1.5rem;
}

li {
  margin-bottom: 1em;
}

.text-huge {
  font-size: calc(var(--font-size) * var(--font-scale-xxl));
  line-height: 1.2em;
  letter-spacing: 0.1em;
  letter-spacing: 0.1em;
}

.text-big {
  font-size: calc(var(--font-size) * var(--font-scale-xl));
  line-height: 1.2em;
  letter-spacing: 0.1em;
  letter-spacing: 0.1em;
}

.text-big:not(:last-child) {
  margin-bottom: .5rem;
}

a,
a:hover,
a:active,
a:visited {
  background: linear-gradient(to top, var(--c-link) 1px, transparent 1px);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-position: center center;
  transition-property: color, background-size;
  transition-duration: 300ms;
  transition-timing-function: ease-in-out;
  color: var(--c-link);
}

.text a:hover, nav a:hover {
  background-size: 100% 100%;
}

.date {
  margin-top: 4rem;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.date-image {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 36rem) {
  .date-image {
    height: 2rem;
    width: auto;
    margin: 0 auto;
  }
}

.date-caption {
  position: absolute;
  top: -999999px;
  left: -999999px;
}

.illustration-container {
  max-width: 22rem;
  margin: 2rem auto;
  padding: 0 1rem;
}

@media (min-width: 36rem) {
  .illustration-container {
    margin: 4rem auto;
  }
}

.illustration-container-small {
  max-width: 16rem;
}

.illustration-container-final {
  max-width: 8rem;
  margin-bottom: 0;
  padding-bottom: 2rem;
}

@media (min-width: 36rem) {
  .illustration-container-final {
    padding-bottom: 4rem;
  }
}

.illustration {
  display: block;
  width: 100%;
  height: auto;
}

[data-currency="EUR"]::before {
  content: "🇪🇺 EUR: ";
}

[data-currency="CHF"]::before {
  content: "🇨🇭 CHF: ";
}

[data-currency="GBP"]::before {
  content: "🇬🇧 GBP: ";
}

.photo {
  overflow: hidden;
  width: calc(36rem / 2 - 2rem);
  height: calc((36rem / 2 - 2rem) / 1346 * 994);
  display: inline-block;
  margin: 1em auto;
  background-image: var(--url);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  box-shadow: inset 0 0 1rem #888;
  border-radius: 1rem;
}

@media (max-width: 36rem) {
  .photo {
    width: calc(100vw - 2rem);
    height: calc((100vw - 2rem) / 1346 * 994);
    display: block;
  }
}
