/*
================================
Markus Heinlein
01-2024
================================
*/

/*
------------------------------
ROOT
------------------------------
*/

:root {
  --login-page-noise: url("../assets/noise.webp");
  --login-font-color: rgb(231, 231, 231);
}

/*
------------------------------
SCROLLBARS
------------------------------
*/

::-webkit-resizer {
  display: none;
}

::-webkit-scrollbar {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 1em;
}

::-webkit-scrollbar-thumb {
  background: rgb(94, 94, 94);
  border-radius: 8px;
  box-shadow:
    inset 2px 2px 2px rgba(255, 255, 255, 0.25),
    inset -2px -2px 2px rgba(0, 0, 0, 0.25);
}

::-webkit-scrollbar-track {
  background: rgb(32, 32, 32);
  border-radius: 8px;
}

/*
------------------------------
PAGE
------------------------------
*/

body {
  min-height: 100vh;

  background-color: black;

  font-family: var(--theme-primary-font), sans-serif;
  color: var(--login-font-color);
  text-wrap: pretty;

  overflow: hidden;
}

@supports (min-height: 100svh) {
  #hero {
    min-height: 100svh;
  }
}

span {
  padding: 0;
  font-size: 1.125rem;
}

a {
  color: unset;
  font-size: 1.125rem;
}

.u-button {
  background-color: var(--theme-lightgray-color);
  color: var(--theme-darkgray-color);
}

.u-button:hover {
  background: hsl(212, 63%, 39%);
  color: var(--theme-lightgray-color);
}

/*
------------------------------
LOGIN
------------------------------
*/

#login {
  position: absolute;
  z-index: 2;

  top: 8vh;
  left: 4vw;

  padding: 0;
  margin: 0;

  width: 360px;
  height: auto;
}

#login.shake {
  animation: shake 0.5s;
}

.login__wrapper,
#sound {
  padding: 30px;
  height: auto;

  backdrop-filter: blur(40px) saturate(180%);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.04) 70%,
    rgba(255, 255, 255, 0.06) 100%
  );
  box-shadow:
    0 16px 64px rgba(0, 0, 0, 0.4),
    0 8px 32px rgba(0, 0, 0, 0.2);

  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
}

/* Info */

.login__info {
  padding: 0 0 25px;
}

/* Wrapper */

.login__password-wrapper {
  display: flex;
  gap: 5px;

  height: 44px;
  margin: 10px 0;

  /* background-color: transparent; */
  background-color: rgba(0, 0, 0, 0.1);
  border: 2px solid var(--theme-lightgray-color);
}

/* Form */

.login__form {
  display: flex;
  flex-direction: column;
}

/* Label */

.login__password-label {
  cursor: var(--theme-pointer-cursor), auto;
}

/* Input */

.login__password {
  flex-grow: 1;

  height: 100%;
  width: 100%;

  margin: 0 10px;

  font-size: 1.5rem;

  background-color: transparent;
  color: var(--login-font-color);

  border: none;
  outline: none;

  cursor: var(--theme-text-cursor), auto;
}

.login__password-caps,
.login__password-mask {
  --button-size: 40px;

  width: var(--button-size);
  height: var(--button-size);

  display: flex;
  align-items: center;
  justify-content: center;

  outline: none;
  box-shadow: none;

  cursor: var(--theme-link-cursor), auto;
}

.login__password-mask {
  margin-right: 5px;
}

.login__password-mask.show::before,
.login__password-mask.hide::before {
  --image-size: 35px;

  content: "";

  display: inline-block;

  width: var(--image-size);
  height: var(--image-size);

  mask-size: contain;
  -webkit-mask-size: contain;

  background-color: var(--theme-lightgray-color);
}

.login__password-mask.show::before {
  mask-image: var(--theme-show-icon);
  -webkit-mask-image: var(--theme-show-icon);
}

.login__password-mask.hide::before {
  mask-image: var(--theme-hide-icon);
  -webkit-mask-image: var(--theme-hide-icon);
}

.login__password-caps.on::before {
  --image-size: 32px;

  content: "";

  display: inline-block;

  width: var(--image-size);
  height: var(--image-size);

  mask-image: var(--theme-caps-icon);
  mask-size: contain;
  -webkit-mask-image: var(--theme-caps-icon);
  -webkit-mask-size: contain;

  /* background-color: var(--theme-orange-accent-color); */
  background-color: var(--theme-lightgray-color);
}

.login__password-caps.off {
  display: none;
}

/* Button */

.login__button {
  width: fit-content;
  margin-left: auto;
  margin-top: 5px;
}

/* Error */

.login__error {
  position: absolute;
  display: none;
  margin: 15px 0;

  width: fit-content;
  height: 40px;
  line-height: 40px;

  color: var(--theme-red-accent-color);
}

.login__contact:hover {
  color: var(--theme-orange-accent-color);
}

@media (max-width: 768px) {
  #login {
    top: 50%;
    left: 50%;
    bottom: unset;
    transform: translate(-50%, -50%);
    margin: 0;
    width: 75vw;
  }
}

/*
------------------------------
LEGAL
------------------------------
*/

#legal {
  position: absolute;

  width: 100%;
  padding: 15px 0;

  text-align: center;
}

#legal a {
  position: relative;
  cursor: var(--theme-link-cursor), auto;
}

#legal a::before {
  position: absolute;
  display: block;

  content: "";

  width: 100%;
  height: 2px;
  bottom: -5px;
  left: 0;

  background-color: var(--theme-orange-accent-color);

  transform: scaleX(0);
  transition: all 200ms ease-in-out;
}

#legal a:hover::before {
  transform: scaleX(1);
}

#legal a:hover {
  color: var(--theme-orange-accent-color);
}

/*
------------------------------
OVERLAY
------------------------------
*/

#overlay {
  position: fixed;
  z-index: 4;

  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-color: black;

  opacity: 0;
  transition: opacity 0.3s ease;

  pointer-events: none;
}

#overlay.show {
  opacity: 0.5;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

/*
------------------------------
POPUPS
------------------------------
*/

#popup {
  --init-height: 70vh;
  --init-width: 60vw;

  display: none;
  position: fixed;
  overflow: auto;
  z-index: 5;

  min-height: 300px;
  min-width: 500px;

  height: var(--init-height);
  width: var(--init-width);

  top: calc((100vh - var(--init-height)) / 2);
  left: calc((100vw - var(--init-width)) / 2);

  border: 2px solid rgb(210, 210, 210);
  background-color: rgb(79, 78, 76);

  resize: both;
}

.popup__header {
  position: absolute;

  left: 30px;
  top: 40px;

  padding: 5px 0;
  line-height: 0.7;
}

.popup__content {
  position: absolute;

  overflow-y: scroll;
  overflow-x: hidden;

  left: 0;
  right: 0;
  /* top: 70px; */
  top: 85px;
  bottom: 0;

  padding-right: 20px;
  margin: 30px;

  line-height: 1.5;
}

.popup__drag {
  position: absolute;

  left: 0;
  right: 0;
  top: 0;

  height: 16px;
  margin: 5px;

  background-image: repeating-linear-gradient(0deg, #444444, #444444 2px, #707070 2px, #707070 4px);

  cursor: move;

  z-index: 1;
}

.popup__drag::before {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  top: 0;

  height: 16px;

  background-image: repeating-linear-gradient(0deg, #444444, #444444 2px, #ffa500 2px, #ffa500 4px);

  z-index: -1;
  opacity: 0;

  transition: opacity 100ms linear;
}

.popup__drag:hover::before {
  opacity: 1;
}

.popup__close {
  position: absolute;

  right: 25px;
  top: 45px;

  display: flex;
  align-items: center;

  outline: none;
  box-shadow: none;
}

.popup__close::before {
  --image-size: 25px;

  content: "";

  display: inline-block;

  width: var(--image-size);
  height: var(--image-size);

  mask-image: var(--theme-close-icon);
  mask-size: contain;
  -webkit-mask-image: var(--theme-close-icon);
  -webkit-mask-size: contain;

  background-color: var(--theme-lightgray-color);

  cursor: var(--theme-link-cursor), auto;

  transition: background-color 150ms ease-in-out;
}

.popup__close:hover::before {
  background-color: var(--theme-orange-accent-color);
}

.popup__size {
  position: absolute;

  height: 15px;
  width: 15px;

  right: 0;
  bottom: 0;

  margin: 10px;

  border-right: 2px solid rgb(112, 112, 112);
  border-bottom: 2px solid rgb(112, 112, 112);
}

@media (max-width: 768px) {
  #popup {
    min-height: unset;
    min-width: unset;

    height: 90vh;
    height: 90svh;

    width: 90vw;
    min-width: unset;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  /* @supports (height: 90svh) {
    #hero {
      height: 90svh;
    }
  } */
}

/*
------------------------------
SOUND
------------------------------
*/

#sound {
  position: fixed;
  z-index: 5;

  top: 50%;
  left: 50%;

  width: min(330px, 90vw);

  text-align: center;

  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.95);

  transition:
    opacity 400ms ease-out,
    transform 400ms ease-out,
    visibility 400ms;
}

#sound.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);

  transition:
    opacity 400ms ease-out,
    transform 400ms ease-out,
    visibility 0s;
}

.sound__icon {
  --image-size: 70px;

  width: var(--image-size);
  height: var(--image-size);

  margin: 0 auto 20px;

  mask-image: var(--theme-listen-icon);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: var(--theme-listen-icon);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;

  background-color: var(--theme-lightgray-color);
}

.sound__text,
.sound__hint {
  text-wrap: balance;
}

.sound__hint {
  display: none;
  margin-top: 15px;

  font-size: 0.9rem;
  opacity: 0.7;
}

.sound__buttons {
  display: flex;
  justify-content: center;
  gap: 15px;

  margin-top: 30px;
}

.sound__buttons .u-button {
  min-width: 100px;
}

.sound__decline.u-button {
  background-color: transparent;
  color: var(--theme-lightgray-color);
  box-shadow: inset 0 0 0 2px var(--theme-lightgray-color);
}

.sound__decline.u-button:hover {
  background: hsl(212, 63%, 39%);
  box-shadow: inset 0 0 0 2px hsl(212, 63%, 39%);
}

/*
------------------------------
BANNER
------------------------------
*/

#banner {
  position: fixed;
  /* display: flex; */
  display: none;
  z-index: 3;

  justify-content: center;
  align-items: center;

  flex-wrap: wrap;

  /* top: 0; */
  /* right: 0; */
  top: 8vh;
  right: 4vw;

  width: 470px;

  /* margin: 30px; */
  padding: 30px;

  background: rgb(51, 43, 0);
  color: var(--theme-orange-accent-color);
  border: 2px solid rgb(102, 85, 0);

  /* color: dodgerblue;
  background: color-mix(in lab, currentColor 25%, black);

  border: 2px solid color-mix(in lab, currentColor 85%, white);
  border-radius: 10px; */
}

.banner__text {
  flex-grow: 1;
}

.banner__text a {
  text-decoration-line: underline;
  text-underline-offset: 6px;
  text-decoration-style: dotted;
  color: var(--theme-orange-accent-color);
}

.banner__accept {
  display: flex;

  justify-content: center;
  align-items: center;

  margin-top: 30px;

  background: hsl(50, 100%, 20%);
  color: hsl(39, 100%, 50%);
}

.banner__accept:hover {
  background: hsl(50, 100%, 25%);
  color: hsl(20, 6%, 90%);
}

@media (max-width: 768px) {
  #banner {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: unset;
    width: 90vw;
  }
}

/*
------------------------------
FADE
------------------------------
*/

#fade {
  position: absolute;
  overflow: hidden;
  inset: 0;
  background: black;
}

#fade img {
  position: absolute;
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
  background: black;
  backface-visibility: hidden;
}

/*
------------------------------
POEM
------------------------------
*/

#poem {
  position: absolute;
  display: flex;

  align-items: center;

  flex-wrap: wrap;

  bottom: 13vh;
  left: calc(100vw - 4vw - 640px);

  width: 640px;
}

#poem span {
  position: absolute;
  opacity: 0;

  font-family: var(--theme-capital-font);
  font-weight: var(--theme-font-weight-light);
  font-size: 1.75rem;

  border-left: 6px solid rgba(255, 255, 255, 0.5);
  padding-left: 0.75em;
  padding-bottom: 0.15em;
}

@media (max-width: 768px) {
  #poem {
    display: none;
  }
}

/*
------------------------------
CONTROLS
------------------------------
*/

#controls {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;

  margin: 30px;

  top: 0;
  right: 0;

  /* border: 2px solid red; */
}

.controls__state {
  --button-size: 50px;

  display: flex;
  align-items: center;
  justify-content: center;

  width: var(--button-size);
  height: var(--button-size);

  font-family: var(--theme-capital-font);
  font-weight: var(--theme-font-weight-light);
  font-size: 2rem;

  color: var(--theme-orange-accent-color);

  padding-bottom: 4px;

  /* border: 2px solid yellow; */
}

.controls__sound {
  --button-size: 50px;

  display: flex;
  align-items: center;
  justify-content: center;

  width: var(--button-size);
  height: var(--button-size);

  cursor: var(--theme-link-cursor), auto;

  /* border: 2px solid blue; */
}

.controls__sound.play::before {
  --image-size: 45px;

  content: "";

  display: inline-block;

  width: var(--image-size);
  height: var(--image-size);

  mask-size: contain;
  mask-image: var(--theme-listen-icon);
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-image: var(--theme-listen-icon);
  -webkit-mask-repeat: no-repeat;

  background-color: var(--theme-lightgray-color);
}

.controls__sound.pause::before {
  --image-size: 45px;

  content: "";

  display: inline-block;

  width: var(--image-size);
  height: var(--image-size);

  mask-size: contain;
  mask-image: var(--theme-mute-icon);
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-image: var(--theme-mute-icon);
  -webkit-mask-repeat: no-repeat;

  background-color: var(--theme-lightgray-color);
}

/*
------------------------------
ANNIVERSARY
------------------------------
*/

#anniversary {
  --image-size: 260px;

  position: absolute;
  z-index: 1;
  visibility: hidden;

  left: calc(4vw + ((360px - var(--image-size)) / 2));
  bottom: 8vh;

  width: min(80vw, var(--image-size));

  font-family: var(--theme-capital-font);
  font-weight: var(--theme-font-weight-light);

  backdrop-filter: blur(40px) saturate(180%);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.04) 70%,
    rgba(255, 255, 255, 0.06) 100%
  );
  box-shadow:
    0 16px 64px rgba(0, 0, 0, 0.4),
    0 8px 32px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);

  border-radius: 100%;
}

#anniversary svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

#anniversary text {
  fill: currentColor;
}

#anniversary circle {
  display: none;
  fill: rgba(255, 255, 255, 0.2);
  /* stroke: rgba(255, 255, 255, 0.2); */
  /* stroke: currentColor; */
  stroke-width: 1px;
  /* stroke-dasharray: 1 4; */
}

.anniversary__ring {
  transform-box: view-box;
  transform-origin: 200px 200px;
  animation: spin 60s linear infinite;
}

.anniversary__ring-text {
  font-family: var(--theme-primary-font);
  font-size: 1.5rem;
  white-space: pre;
}

.anniversary__number {
  font-size: 5.5rem;
  letter-spacing: -2px;
  text-anchor: middle;
}

.anniversary__label {
  font-size: 2.75rem;
  text-anchor: middle;
}

@keyframes spin {
  to {
    transform: rotate(-360deg);
  }
}

@media (max-width: 768px) {
  #anniversary {
    display: none;
  }
}
