/* Gemeinsame Regeln für alle Seiten */

/* Hauptregeln */
* {
  box-sizing: border-box;
}

@font-face {
  font-family: neueHaasGroteskMedium;
  src: url("./fonts/NeueHaasDisplayMediu.ttf");
  font-display: block;
}

@font-face {
  font-family: neueHaasGroteskLight;
  src: url("./fonts/NeueHaasDisplayLight.ttf");
  font-display: block;
}

body {
  overflow-x: clip;
}

ul {
  list-style-type: none;
}

h1,
h2,
h3,
h4 {
  font-family: neueHaasGroteskMedium;
  /* font-family: "Cormorant Garamond" bold;
  font-style: italic; */
  font-size: 2.8125rem;
}

p,
a,
button,
li {
  font-family: neueHaasGroteskLight;
  font-size: 1.375rem;
}

p {
  font-size: 1.625rem;
}

.separation {
  height: 1px;
  background-color: #000;
  width: 97%;
  margin: 0 auto;
}

/* Für Unterstreichungen aller Links ausser Footer Links */

.underlined {
  text-decoration: none;
  color: #000;
  font-size: 1.625rem;
  position: relative;
}

.underlined::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 3px;
  background-color: #000;
  transition: all 0.5s ease;
}

.underlined:hover::before {
  width: 100%;
}

/* Alle Buttons-Animationen */

button {
  position: relative;
  overflow: hidden;
  z-index: 0;
  padding: 0.9em 1.36em;
  border: 1px solid black;
  background: #fff;
  color: #000;
  cursor: pointer;
  transition: color 0.5s ease;
}

button::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: #000;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s ease;
}

button:hover {
  color: #fff;
}

button:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* Elementen-Animationen */

.reveal {
  opacity: 0;
  /* transform: translateY(30px); */
  transition:
    opacity ease 1s var(--delay, 0s),
    transform ease 1s var(--delay, 0s);
}

button.reveal {
  transition:
    opacity ease 1s var(--delay, 0s),
    transform ease 1s var(--delay, 0s),
    color ease 0.5s;
}

.reveal-left {
  transform: translateX(-30px);
}

.reveal-right {
  transform: translateX(30px);
}

.reveal-bottom {
  transform: translateY(30px);
}

.reveal-top {
  transform: translateY(-30px);
}

.reveal-zoom {
  transform: scale(0.95);
}

.reveal-write {
  mask-image: linear-gradient(
    90deg,
    rgba(0, 0, 0, 1) 40%,
    rgba(255, 255, 255, 0) 60%
  );
  mask-size: 300% 100%;
  mask-repeat: no-repeat;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-write.visible {
  animation: write-from-left ease-out 1.5s both;
}

/* Erste Animation beim Öffnen */

.greeting-container {
  position: fixed;
  overflow: hidden;
  z-index: 11;
  inset: 0;
  transition: 1.5s;
}

.fading {
  opacity: 0;
}

.top-container {
  position: relative;
  width: 100%;
  height: 50%;
  background-color: #ffffff;
}

.top-container::after {
  content: "";
  position: absolute;
  left: 100%;
  width: 30vw;
  height: 100%;
  background: #ffffff;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

.top-container-open {
  transform: translateX(calc(-100% - 30vw));
  transition: transform ease-in-out 1.2s;
}

.top-container p {
  position: absolute;
  width: fit-content;
  bottom: 0;
  left: 0;
  right: 0;
  mask-image: linear-gradient(
    90deg,
    rgba(0, 0, 0, 1) 40%,
    rgba(255, 255, 255, 0) 60%
  );
  mask-size: 300% 100%;
  mask-repeat: no-repeat;
  text-align: center;
  margin: 0 auto 1vw;
  animation: write-from-left ease-out 1.5s both;
}

@keyframes write-from-left {
  from {
    mask-position: 100%;
  }
  to {
    mask-position: 0%;
  }
}

.bot-container {
  position: relative;
  width: 100%;
  height: 50%;
  background-color: #fff;
}

.bot-container::after {
  content: "";
  position: absolute;
  right: 100%;
  width: 30vw;
  height: 100%;
  background: #ffffff;
  background: linear-gradient(
    270deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

.bot-container-open {
  transform: translateX(calc(100% + 30vw));
  transition: transform ease-in-out 1.5s;
}

.bot-container p {
  position: absolute;
  width: fit-content;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  margin: 1.5vw auto 0;
  mask-image: linear-gradient(
    270deg,
    rgba(0, 0, 0, 1) 40%,
    rgba(255, 255, 255, 0) 60%
  );
  mask-size: 300% 100%;
  mask-repeat: no-repeat;
  text-align: center;
  margin: 1vw auto 0;
  animation: write-from-right ease-out 1.5s both;
  animation-delay: 0.7s;
}

@keyframes write-from-right {
  from {
    mask-position: 0%;
  }
  to {
    mask-position: 100%;
  }
}

.main-greeting-text {
  display: flex;
  justify-content: center;
  font-size: 6vw;
  font-family: "Pinyon Script";
}

/* Header */

header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  height: 6.8vw;
  z-index: 10;
}

.initials-link {
  text-decoration: none;
}

.initials-link:visited {
  color: black;
}

.header-initials {
  margin-left: 1.8vw;
  font-size: 3.6vw;
  font-family: "Pinyon Script";
  letter-spacing: 0.3vw;
}

.header-list {
  display: flex;
  max-width: 950px;
  justify-content: space-evenly;
  gap: 4.4rem;
  margin-right: 1.4vw;
}

/* Menü für kleine Bildschirme - normalerweise versteckt */

.header-burgermenu-button {
  display: none;
}

.overlay {
  display: none;
}

/* Footer */

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-break {
  display: none;
}

.footer-text {
  margin-left: 4.54vw;
}

.footer-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3vw;
  margin-right: 4.54vw;
}

.footer-github-icon {
  width: 3.125rem;
  height: 3.125rem;
}

.footer-swisscom-icon {
  width: auto;
  height: 5.625rem;
}

.footer-linkedin-icon {
  width: 3.75rem;
  height: 3.75rem;
}

.footer-email-icon {
  width: 3.4375rem;
  height: auto;
}

/* Responsivität für grosse bis mittlere Bildschirme (Monitore, sehr grosse Laptops etc.) */

@media (max-width: 2000px) {
  h1,
  h2,
  h3,
  h4 {
    font-size: 2.1875rem;
  }

  a,
  button,
  li {
    font-size: 1.125rem;
  }

  p {
    font-size: 1.25rem;
  }

  .underlined {
    font-size: 1.125rem;
  }

  button {
    padding: 10px 15px;
  }

  .header-initials {
    font-size: 2.8125rem;
  }

  .header-list {
    gap: 3.2vw;
    margin-right: 20px;
  }
}

/* Responsivität für mittlere Bildschirme (Laptops, grosse Tablets etc.) */

@media (max-width: 1200px) {
  h1,
  h2,
  h3,
  h4 {
    font-size: 1.75rem;
  }

  a,
  button,
  li {
    font-size: 0.875rem;
  }

  p {
    font-size: 1rem;
  }

  .underlined {
    font-size: 0.875rem;
  }

  .header-initials {
    font-size: 2.5rem;
  }

  .header-list {
    gap: 7vw;
  }

  .footer-github-icon {
    width: 30px;
    height: 30px;
  }

  .footer-swisscom-icon {
    height: 55px;
  }

  .footer-linkedin-icon {
    width: 40px;
    height: 40px;
  }

  .footer-email-icon {
    width: 35px;
  }
}

/* Responsivität für kleine Laptops, Tablets etc. */

@media screen and (max-width: 1000px) {
  p {
    font-size: 0.875rem;
  }

  header {
    height: 90px;
  }

  .footer-text {
    font-size: 0.75rem;
    margin-left: 5vw;
  }

  .footer-icons {
    margin-right: 5vw;
  }

  .reveal {
    transition:
      opacity ease 0.6s calc(var(--delay, 0s) * 0.5),
      transform ease 0.6s calc(var(--delay, 0s) * 0.5);
  }

  button.reveal {
    transition:
      opacity ease 0.6s calc(var(--delay, 0s) * 0.5),
      transform ease 0.6s calc(var(--delay, 0s) * 0.5),
      color ease 0.5s;
  }

  .reveal-left {
    transform: translateY(20px);
  }

  .reveal-right {
    transform: translateY(20px);
  }

  .reveal-top {
    transform: translateY(20px);
  }

  .reveal.desktop-delay {
    transition:
      opacity ease 0.6s,
      transform ease 0.6s;
  }

  .top-container p {
    font-size: 20vw;
  }
  .bot-container p {
    font-size: 20vw;
  }
}
/* Für Footer Text und kleine Icons, damit der Text nicht auf nächste Line geht */

@media screen and (max-width: 700px) {
  .footer-text {
    font-size: 11px;
  }

  .footer-icons {
    gap: 2.5vw;
  }

  .footer-github-icon {
    width: 20px;
    height: 20px;
  }

  .footer-swisscom-icon {
    height: 35px;
  }

  .footer-linkedin-icon {
    width: 25px;
    height: 25px;
  }

  .footer-email-icon {
    width: 25px;
  }
}

/* Responsivität für ganz kleine Bildschirme (Handy, kleine Tablets etc.) */

@media screen and (max-width: 560px) {
  p {
    font-size: 3.2vw;
  }

  .underlined {
    font-size: 3.3vw;
  }

  button {
    padding: 2.4vw 3vw;
    font-size: 2.8vw;
  }

  /* Header */

  .header-initials {
    margin-left: 20px;
  }

  .header-list {
    display: none;
  }

  .header-burgermenu-button {
    display: block;
    font-size: 6vw;
    margin-right: 20px;
  }

  /* Curtains Effekt */

  .overlay {
    display: block;
    height: 0%;
    width: 100%;
    position: fixed;
    z-index: 11;
    top: 0;
    left: 0;
    background-color: rgb(255, 255, 255, 0.9);
    overflow-y: hidden;
    transition: 0.5s;
  }

  .overlay-content {
    position: relative;
    top: 25%;
    width: 100%;
    text-align: center;
    margin-top: 30px;
  }

  .overlay a {
    padding: 8px;
    text-decoration: none;
    font-family: neueHaasGroteskLight;
    font-size: 36px;
    color: #6d6d6d;
    display: block;
    transition: 0.3s;
  }

  .overlay a:hover,
  .overlay a:focus {
    color: #323232;
  }

  .overlay .closebtn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 60px;
  }

  @media screen and (max-height: 450px) {
    .overlay {
      overflow-y: auto;
    }
    .overlay a {
      font-size: 1.25rem;
    }
    .overlay .closebtn {
      font-size: 2.5rem;
      top: 15px;
      right: 35px;
    }
  }

  /* Footer */

  .footer-text {
    font-size: 2.8vw;
  }

  .mobile-break {
    display: block;
  }
}
