@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Oxygen:wght@300;400;700&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #1d1d30;
  --secondary-color: #d4edfa;
  --middle-blue-color: #262d57;
  --akzent-color: #c5d86d;
}

body {
  font-family: "Oxygen", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body-color);
  text-align: left;
  background-color: var(--body-bg);
  overflow-x: hidden;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 1rem 0;
}

h2 {
  font-family: "Oswald", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 1rem 0;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 1rem 0;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 1rem 0;
}

button {
  outline: none;
  border: none;
  cursor: pointer;
}

p {
  line-height: 1.8;
  font-size: 1.1em;
  max-width: 80ch;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  font-family: "Oxygen", sans-serif;
}

a:hover {
  color: var(--middle-blue-color);
}

a.button,
button {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  border: 3px solid var(--primary-color);
  border-radius: 0.5rem;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease-out;
  user-select: none;
  cursor: pointer;
}

a.button:hover,
button:hover {
  scale: 1.05;
}

a.button.light,
.dark a.button.primary {
  border: 3px solid var(--secondary-color);
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

a.button.secondary {
  border-color: var(--primary-color);
  background-color: transparent;
  color: var(--primary-color);
}

a.button.secondary:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

a.button.secondary.light,
.dark a.button.secondary {
  border-color: var(--secondary-color);
  background-color: transparent;
  color: var(--secondary-color);
}

button.secondary.light:hover,
.dark a.button.secondary:hover {
  border-color: var(--secondary-color);
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.button-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

header,
section,
footer {
  padding-left: 8%;
  padding-right: 8%;
}
.no-padding {
  padding: 0;
}

.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.hero-section#anwendung {
  background-image: url(../img/anwendung-banner.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: white;
  padding: 3rem;
  border-radius: 0.5rem;
}
img,
video {
  width: 100%;
  max-width: 100%;
  height: auto;
}

img.full {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Menu */

header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 1rem;
  padding-bottom: 1rem;
  z-index: 200;
  background-color: white;
}

header.fixed {
  position: fixed;
  top: 0;
  left: 0;
}

header.fixed + main {
  margin-top: 5rem;
}

header .logo {
  z-index: 101;
}

header .logo img {
  width: 8rem;
}

header button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  background-color: transparent;
  color: var(--light);
  padding: 1rem;
  z-index: 101;
  border: none;
}

header button svg {
  width: 1.5rem;
  height: 1.5rem;
}

header .nav-group {
  position: absolute;
  top: 70px;
  left: 50%;
  opacity: 1;
  background-color: white;
  transform: translate(-50%, 0);
  width: 100%;
  z-index: 100;
  padding: 3rem;
  border-radius: 0 0 2rem 2rem;
}

header .nav-group.is-hidden {
  transform: translate(-50%, -100%);
  opacity: 0;
}

header .nav-group.start {
  transform: translate(-50%, -100%);
}

header .nav-group img {
  width: 80%;
  pointer-events: none;
}

header .nav-group nav {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header .nav-group nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
}

.menu-item {
  position: relative;
  list-style: none;
  padding: 1rem;
  margin: 0 0.5rem;
}

.menu-item a:not(.button):hover {
  color: var(--primary);
}

.menu-item.active {
  font-weight: bold;
  pointer-events: none;
}

/* SCREENREADER */

.sr-only,
.visually-hidden {
  /* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility */
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px);
}
.sr-only a:focus,
.sr-only input:focus,
.sr-only button:focus,
.sr-only .focusable:focus,
.sr-only.focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

/* BIG-LINK */

.big-link-parent {
  position: relative;
  transition: var(--transition-duration) all ease-in-out;
}

.big-link:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.big-link-parent:hover {
  -webkit-box-shadow: 9px 8px 0px 2px rgba(41, 59, 93, var(--shadow-opacity));
  box-shadow: 9px 8px 0px 2px rgba(41, 59, 93, var(--shadow-opacity));
}

.plyr {
  border-radius: 0.5rem;
}
/*################################*/
/*####        Section         ####*/
/*################################*/

section {
  padding-top: 6rem;
  padding-bottom: 6rem;
  position: relative;
}

section.dark {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

section.two-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: start;
}

#motivation .info {
  margin: 0 auto;
}

section.two-columns:nth-child(odd) video {
  grid-row: 2; /* NEW */
}

section h2 {
  margin: 0;
}

section#motivation {
  align-items: center;
  gap: 0;
}

section#motivation img {
  margin-bottom: -2rem;
  width: 100%;
}

section#motivation > article {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 4rem;
  border-radius: 1rem;
}

.placeholder {
  background-color: var(--secondary-color);
  min-height: 10rem;
  border-radius: 1rem;
}

article.info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-logos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.project-logos a {
  padding: 1rem;
  background-color: var(--secondary-color);
  border-radius: 0.5rem;
}
/*--- Summary ---*/

.summary {
  padding-left: 1rem;
  border-left: 5px solid var(--akzent-color);
  align-items: center;
  font-weight: bold;
}

.summary.red {
  border-left: 5px solid rgb(226, 7, 7);
}

.summary.blue {
  border-left: 5px solid rgb(30, 111, 233);
}

.summary.orange {
  border-left: 5px solid rgb(253, 153, 23);
}

.legende {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/*--- Threejs ---*/

#threejs-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #1d1d30;
}

.loading-container {
  position: fixed;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.animation-toggle-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.js-hint {
  font-weight: bold;
  color: var(--akzent-color);
  font-size: 1.5rem;
}

/*################################*/
/*####      CSS-LOADER        ####*/
/*################################*/

/* https://cssloaders.github.io/ */

.loader {
  width: 48px;
  height: 48px;
  border: 3px solid #fff;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}
.loader::after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-bottom-color: #ff3d00;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.graph a {
  color: var(--secondary-color);
}

/*---               ---*/
/*--- MEDIA QUERIES ---*/
/*---               ---*/
@media screen and (min-width: 24em) {
  /** CSS for portable */
}
@media screen and (min-width: 35em) {
  header {
    flex-direction: column;
    .nav-group nav ul {
      flex-direction: row;
    }

    .nav-group {
      width: auto;
      position: unset;
      padding: 0;
      background-color: transparent;
      &.start {
        transform: none;
      }
      &.is-hidden {
        transform: none;
        opacity: 1;
      }
    }
  }
  .site-header > button {
    display: none;
  }
  .button-container {
    flex-direction: row;
  }
}
@media screen and (min-width: 46em) {
  /** CSS for laptop */
  header {
    .nav-group {
      nav {
        flex-direction: row;

        .sm-container {
          margin-left: 2rem;

          .sm-icon {
            width: 1.5rem;
          }
        }
      }
    }
  }
}
@media screen and (min-width: 50em) {
  /** CSS for desktop */
}

@media screen and (min-width: 60em) {
  header {
    flex-direction: row;
    justify-content: space-between;

    .nav-group {
      nav {
        margin-top: 0;
      }
    }
  }

  header,
  section,
  footer {
    padding-left: 15%;
    padding-right: 15%;
    width: 100%;
  }

  #motivation .info {
    margin-top: -15rem;
  }

  section.two-columns:not(#motivation) {
    grid-template-columns: 1fr 1fr;
  }

  section > article {
    position: sticky;
    top: 10rem;
    align-self: flex-start;
  }

  section.two-columns:nth-child(odd) video {
    grid-row: 1; /* NEW */
  }

  #motivation img {
    margin-bottom: 0;
  }

  .menu-item::before {
    content: "";
    position: absolute;
    width: 2px;
    height: 0;
    top: -5rem;
    left: 0;
    background-color: var(--akzent-color);
    transition: height 0.3s ease-out;
  }

  .menu-item:hover::before,
  .menu-item.active:before {
    width: 2px;
    height: 7rem;
    background-color: var(--akzent-color);
  }
}

@media screen and (min-width: 70em) {
}

@media screen and (min-width: 85em) {
}
