@font-face {
  font-family: "Moon";
  src: url("./Moon_Light.otf") format("opentype");
  font-weight: normal;
}
@font-face {
  font-family: "Moon";
  src: url("./Moon_Bold.otf") format("opentype");
  font-weight: bold;
}

@font-face {
  font-family: "DIN1451 Alt";
  src: url("./din1451alt.ttf") format("truetype");
  font-weight: normal;
}

:root {
  /* sizing */
  --size-content-width: min(1440px, max(920px, calc(100vmin * 1.2)));
  --size-row-margin: 3em;
  --size-content-padding: 1.5em;
  /* font sizes */
  --size-font-big: 45pt;
  --size-font-mid: 25pt;
  --size-font-small: 15pt;
  /* border outsets */
  --size-outset-box: 0px 3px 3px 0px;
  --size-outset-button: 2px 10px 10px 2px;
  --size-outset-progressbar-container: 2px;
  --size-outset-progressbar-bar: 2px;
  /* text colors*/
  --color-text-primary: #151e47;
  --color-text-footer: #ed2c7b;
  --color-text-button-blue: var(--color-text-primary);
  --color-text-fieldset-header: var(--color-text-button-blue);
  /* texture colors */
  --color-background-primary: #ffffff;
  --color-background-darkbox: #000000d0;
  font-family: "Moon", "sans-serif";
  font-size: var(--size-font-mid);
  color: var(--color-text-primary);
}

/*
 * image preload hack
 */

body::after {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  z-index: -1;
  content: url("./dotgrid.png") url("./box.png")
    url("./button_blue_default.png") url("./button_blue_hover.png")
    url("./button_blue_down.png") url("./button_purple_default.png");
}

.background {
  position: fixed;
  width: 100vw;
  height: 100vh;
  content: "";
}

.center-wrapper .consent-box {
  max-width: var(--size-content-width);
}

.center-wrapper .logo-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0px;
  padding: 0.4em;
  max-width: calc(var(--size-content-width) * 0.5);
  z-index: 100;
}

.center-wrapper .logo-box > img {
  max-width: 100%;
  max-height: 100%;
}

/*
 * Cookie Consent
 */
.cookie-consent-box {
  width: var(--size-content-width);
  z-index: 9999999;
}

.cookie-consent-box legend {
  font-size: calc(var(--size-font-mid) * 0.8) !important;
  line-height: 1.2em !important;
}

.cookie-consent-box__content {
  padding: calc(var(--size-content-padding) * 0.7);
}

.cookie-consent-box__content .consent-text {
  font-size: var(--size-font-small);
  font-family: "DIN1451 Alt";
  line-height: 1.2em;
}

.cookie-consent-box__content .action-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6em;
}

.cookie-consent-box__content .action-bar .buttons {
  display: flex;
  flex-direction: row;
}

.cookie-consent-box__content .action-bar .buttons > * {
  margin-right: 1.4em;
}

.cookie-consent-box__content a {
  font-size: var(--size-font-small);
  color: var(--color-text-footer);
}

/*
 * white box component
 */

.box {
  /* custom border */
  border-image-slice: 27 27 27 27 fill;
  border-image-width: 20px 20px 20px 20px;
  border-image-outset: var(--size-outset-box);
  border-image-repeat: repeat repeat;
  border-image-source: url("./box.png");
}

/*
 * dotgrid mixin
 */

.dotgrid {
  /* dotgrid pattern background */
  background-attachment: scroll;
  background-image: url("./dotgrid.png");
  background-repeat: repeat;
}

.dotgrid.dotgrid--frame {
  /* dotgrid frame */
  box-shadow: inset 0 0 0 calc(var(--size-content-padding) * 1)
    var(--color-background-primary);
  /* offset background to align with inner frame */
  background-position: calc(var(--size-content-padding) * 1)
    calc(var(--size-content-padding) * 1);
}

/*
 * fieldset layout component
 */

.frame {
  /* layout */
  margin-top: var(--size-row-margin);
  padding: 0;
  position: relative;
}

.frame > legend {
  /* hack defaults */
  position: absolute;
  top: -1.1em;
  left: var(--size-content-padding);
  /* spacing */
  padding: 0.3em 0.7em 0.1em 0.8em;
  /* font settings */
  color: var(--color-text-fieldset-header);
  font-size: var(--size-font-mid);
  font-weight: bold;
  line-height: 1.1em;
  /* custom border */
  border-image-slice: 27 27 27 27 fill;
  border-image-width: 20px 20px 20px 20px;
  border-image-outset: var(--size-outset-button);
  border-image-repeat: repeat repeat;
  border-image-source: url("./button_purple_default.png");
  /* above all elements */
  z-index: 10010;
}

.frame .legend-button {
  /* hack defaults */
  position: absolute;
  top: -1.1em;
  right: var(--size-content-padding);
  /* above all elements, just as the legend */
  z-index: 10010;
}

/*
 * button component
 */

.button {
  /* spacing */
  padding: 0.3em 0.7em 0.1em 0.8em;
  /* font settings */
  color: var(--color-text-button-blue);
  font-size: var(--size-font-small);
  font-weight: bold;
  line-height: 1.1em;
  /* custom border */
  border-image-slice: 27 27 27 27 fill;
  border-image-width: 20px 20px 20px 20px;
  border-image-outset: var(--size-outset-button);
  border-image-repeat: repeat repeat;
  /* button UX */
  cursor: pointer;
  user-select: none;
}

.button:active {
  padding: 0.4em 0.6em 0 0.9em;
}

.button {
  border-image-source: url("./button_blue_default.png");
}

.button.button--blue:hover {
  border-image-source: url("./button_blue_hover.png");
}

.button.button--blue:active {
  border-image-source: url("./button_blue_down.png");
}
