:root {
  --font-family: 'NeueHaasGroteskDisplay75Bold';
  --bg-color: #ffffff;
  --text-color: #000000;
  --floating-bg: #efefef;
  --transparent-bg: rgba(255, 255, 255, 0.789);
}

/* General Page Styling */
#main-container {
  height: 100vh;
  width: 100vw;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: crosshair;
  overflow: hidden;
}

/* Canvas for Emojis (Ball Game) */
canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw; 
  height: 58vh; 
  z-index: 1;
  backface-visibility: hidden; 
}

/* Floating Text Styling */
.floating-text {
  font-size: 16px;
  letter-spacing: -0.25px;
  font-family: var(--font-family);
  padding: 1px 7px;
  background-color: var(--floating-bg);
  color: var(--text-color);
  border-radius: 20px;
  position: absolute;
  white-space: nowrap;
  mix-blend-mode: exclusion;
  z-index: 2; 
  pointer-events: all;
  left: 0;  
  top: 0;   
  transition: transform 0.3s ease;
}

.floating-text:hover {
  transform: scale(1.1) !important;
}

#closeFloatingText {
  position: fixed; 
  top: 20px;
  right: 20px; 
  z-index: 1000;
  width: 53px; 
  height: 20px; 
  overflow: visible; 
  pointer-events: auto;
}

/* Expanding Boxes */
.index {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  position: absolute;
  bottom: 0;
  justify-content: flex-end;
}

.index div {
  flex: 0.03; 
  min-height: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  transition: flex-grow 0.8s ease, height 1s ease;
  cursor: none;
  position: relative;
  z-index: 3;
  will-change: flex-grow, height;
}

.index div.expanded {
  flex-grow: 5;
  height: 100vh;
}

.index div.shrinked {
  flex-grow: 0.04;
  height: 100vh;
}

.index div.shrinked:hover {
  flex-grow: 0.08 !important; 
}

.index div:not(.expanded):hover {
  flex-grow: 0.05;
}

.embed-wrapper {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.index div.embed-wrapper {
  pointer-events: none;
}

.index div.expanded .embed-wrapper {
  pointer-events: all;
}

.index embed,
.embed-wrapper embed {
  width: 100vw;
  height: 90.6vh;
  border: none;
  transform: translateZ(0);
  will-change: transform, opacity, display;
}

.embed-wrapper embed {
  animation: forceRedraw 0.1s linear;
}

@keyframes forceRedraw {
  0% { opacity: 0.99; }
  100% { opacity: 1; }
}

.index div, 
.embed-wrapper, 
.floating-text,
.custom-cursor {
  user-select: none; 
  -webkit-user-select: none;
  -moz-user-select: none; 
  -ms-user-select: none;
}

/* Title Cursor */
.custom-cursor {
  position: absolute;
  pointer-events: none; 
  font-size: 16px;
  letter-spacing: -0.25px;
  font-family: var(--font-family);
  padding: 1px 7px;
  background-color: var(--bg-color);
  color: var(--text-color);
  border-radius: 20px;
  mix-blend-mode: exclusion;
  z-index: 1000;
  white-space: nowrap; 
  display: none; 
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* Sara Maric Button*/
#toggleText {
  display: none;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1;
  color: var(--text-color);
  opacity: 0; 
  transition: opacity 0.5s ease-in-out;
}

/* EMBEDS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; 
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sticky-container, .section {
  position: sticky; 
  width: 100%;
}

img, [id^="image"] {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

#image4 {
  position: relative; 
  z-index: 10;
}

#image1 {
  margin-top: -15vw;
}

[id^="container-image"] {
  top: 0; 
}

#container-image2-comfort { top: -300px; }
#container-image2-jyce, #container-image2-zsc { top: -100px; }
#container-image2-riso { top: -1000px; }
#container-image2-succulent { top: -1200px; }
#container-image2-tatort { top: -215px; }
#container-image2-infotag { top: -1900px; }

.sticky-text {
  position: relative;
  color: var(--text-color);
  letter-spacing: -0.25px;
  font-family: var(--font-family);
  display: flex;
  flex-direction: column;
  z-index: 4;
}

.sticky-text p, #credits-inhalt {
  font-size: 20px;
  line-height: 1.083;
}

[id^="year"], [id^="photography"], [id^="typeface"], [id^="infografik"],
[id^="model"], [id^="animation"], [id^="editorial"], [id^="piktogramme"],
[id^="plakat"], [id^="logo"], [id^="succulent"], [id^="screwed"],
[id^="tatort"], [id^="run"], [id^="tdk"], [id^="riso"], [id^="turborodeo"],
[id^="zsc"], [id^="kreiszwei"], [id^="jyce"], [id^="ewigfremd"],
[id^="comfort"], [id^="fronteo"], [id^="infotag"], [id^="beton"] {
  background-color: var(--transparent-bg);
}

[id^="year"], [id^="photography"], [id^="typeface"], [id^="infografik"],
[id^="model"], [id^="animation"], [id^="editorial"], [id^="piktogramme"],
[id^="plakat"], [id^="logo"] {
  height: 20px;
  padding: 0 5px 10px;
}

#year { width: 60px; }
#photography { width: 125px; padding-bottom: 23px; }
#typeface, #infografik { width: 95px; padding-bottom: 23px; }
#model, #animation { width: 110px; }
#editorial { width: 85px; }
#piktogramme { width: 130px; padding-bottom: 23px; }
#plakat { width: 70px; }
#logo { width: 55px; padding-bottom: 23px; }

#succulent, #screwed, #tatort, #run, #tdk, #riso, #turborodeo, #zsc, 
#kreiszwei, #jyce, #ewigfremd, #comfort, #fronteo, #infotag, #beton {
  font-size: 40px; 
  height: 42px;
  padding: 0 5px 10px;
  line-height: 1;
}

#succulent { width: 390px; }
#screwed { width: 175px; }
#tatort { width: 160px; }
#run { width: 535px; }
#tdk { width: 95px; }
#riso { width: 410px; }
#zsc { width: 272px; }
#kreiszwei { width: 205px; }
#jyce { width: 100px; }
#ewigfremd { width: 230px; }
#comfort { width: 170px; }
#fronteo { width: 200px; }
#infotag { width: 203px; }
#beton { width: 95px; }

.credits-section {
  display: flex;
  justify-content: flex-start;
  padding: 1px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  z-index: 4;
  position: sticky;
}

#credits {
  margin-right: 250px;
  white-space: nowrap;
}

#credits-inhalt, #credits, #bigtext {
  padding-left: 5px;
  font-size: 15px;
}

#bigtext {
  font-size: 40px;
  background-color: var(--bg-color);
}

.video-container, .video-container2 {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-container2 {
  z-index: 0;
  margin-bottom: -5.5em;
}

.video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: black;
}

.custom-link {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s ease, text-decoration-color 0.3s ease; 
}

.custom-link:hover {
  color: rgba(0, 0, 0, 0.187); 
}

@media (max-width: 768px) {
  canvas {
    height: 44vh; 
  }

  .index div {
    flex: 0.04; 
  }

  #credits {
    margin-right: 170px;
  }

  #image1 {
    margin-top: -25vw;
  }
}

