:root {
  --doc-height: 100%;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.42857143;
  /* background-color: #1f2123; */
  scroll-snap-type: y mandatory;
  width: 100svw;
  height: 100dvh;
  overflow-y: hidden;
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
  /* background-image: url('../assets/background.png'); */
  background: linear-gradient(135deg, #0b0f16, #101622, #0e1a2b, #0c1f33, #0b0f16);
}
body::-webkit-scrollbar {
  display: none;
}
h1 {
  font-size: 3em;
  line-height: 1.1;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 20px;
  padding: 0;
}
p {
  font-size: 1.25em;
  margin: 0 0 10px;
  padding: 0;
  /* text-align: justify; */
}

#header {
  position: fixed;
  display: flex;
  align-items: center;
  top: 0;
  left: 0;
  height: fit-content;
  width: 100%;
  /* text-align: center; */
  /* background-color: #f1f3f4; */
  color: #f1f3f48b;
  font-size: 10px;
  padding-top: 5px;
  padding-bottom: 5px;
  z-index: 9999;
}

#header-logo {
  width: 100px;
  margin-inline: 20px;
}
.container {
  box-sizing: border-box;
  /* width: 100vw; */
  height: fit-content;
  height: var(--doc-height);
  padding-left: 34px;
  padding-right: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
  margin: 0;
}
.container::-webkit-scrollbar {
  display: none;
}

#sections {
  /* box-sizing: border-box; */
  flex: 1;
  width: 35%;
  max-width: 450px;
  top: 0px;
  color: #f1f3f4;
  height: fit-content;
  align-self: self-start;
  margin-bottom: 0;
  z-index: 1;
  padding: 0;
  padding-right: 3%;
  margin: 0;
}


#sections > section {
  height: 100vh;
  width: 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
}

#sections a {
  color: inherit;
  font-style: italic;
  text-decoration: none;
  /* text-shadow: 0 0 5px #fff, 0 0 10px #fff; */
}

#sections a:hover {
  text-decoration: underline;
}

#extra-space {
  height: 400px;
  background-color: red;
}

#charts {
  /* flex: 3; */
  /* width: clamp(500px, 70%, 100vh); */
  width: 70%;
  max-width: clamp(50vh, 90vh, 1000px);
  position: sticky;
  top: calc(50vh - var(--charts-height) / 2);
  transform: none;
  align-self: center;
  /* max-height: 100vh; */
  z-index: 2;
  /* background-color: #1f2123; */
  /* backdrop-filter: blur(30px); */
  padding-top: 10px;
  padding-bottom: 15px;
}

#charts::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  /* background: red; */
  background: unset;
  mask: unset;
  /* backdrop-filter: blur(20px) brightness(0.2); */
}

#chart-sankey {
  margin: auto;
  font-size: inherit;
  max-height: 0;
  opacity: 0;
  transform: translateX(-5%);
  /* -webkit-clip-path: inset(0 0 0 100%); Safari compatibility */
  /* clip-path: inset(0 0 0 100%); */
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, scale 0.3s ease-in-out, max-height 0.3s ease-in-out;
}

#chart-sankey.fade-in {
  visibility: inherit;
  max-height: 100%;
  opacity: 1;
  transform: translateX(0);
  -webkit-clip-path: inset(0 0 0 0); /* Safari compatibility */
  clip-path: inset(0 0 0 0);
}

#chart-sankey.fade-out {
  opacity: 0;
  max-height: 0;
  transform: translateX(-5%);
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, max-height 0.2s ease-in-out;
}

#stats {
  display: flex;
  flex-direction: column;
  gap: 32px;
  font-size: 1.8rem;
  color: #F1F3F4;
  text-align: left;
  margin-left: 100px;
  padding: 20px;
  max-height: 100%;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#stats.fade-out {
  opacity: 0;
  max-height: 0;
  transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
}

.stat {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 48px;
  font-weight: 500;
}

.stat .label {
  font-size: 20px;
  opacity: 0.8;
}

.stat .icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat .icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#footer {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-end;
  position: fixed;
  padding:  10px;
  bottom: 0;
  right: 0;
  z-index: 99999;
}

#footer > a {
  font-size: 1em;
  color:white;
  text-decoration: none;
  opacity: 0.65;
  transition: 0.2s ease;
}

#footer > a:hover {
  text-decoration: underline;
  opacity: 1;
}

.animate-on-scroll {
  opacity: 0;
  scale: 0.5;
  transition: opacity 0.5s ease-in-out, scale 0.3s ease-in-out;
}

.visible {
  opacity: 1;
  scale: 1;
}

.arrow-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-top: 30px;
}
.arrow {
  cursor: pointer;
  margin: 0 auto;
  margin-top: 5px;
  width: 30px;
  height: 30px;
  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iNTEycHgiIGhlaWdodD0iNTEycHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0yOTMuNzUxLDQ1NS44NjhjLTIwLjE4MSwyMC4xNzktNTMuMTY1LDE5LjkxMy03My42NzMtMC41OTVsMCwwYy0yMC41MDgtMjAuNTA4LTIwLjc3My01My40OTMtMC41OTQtNzMuNjcyICBsMTg5Ljk5OS0xOTBjMjAuMTc4LTIwLjE3OCw1My4xNjQtMTkuOTEzLDczLjY3MiwwLjU5NWwwLDBjMjAuNTA4LDIwLjUwOSwyMC43NzIsNTMuNDkyLDAuNTk1LDczLjY3MUwyOTMuNzUxLDQ1NS44Njh6Ii8+DQo8cGF0aCBmaWxsPSIjRkZGRkZGIiBkPSJNMjIwLjI0OSw0NTUuODY4YzIwLjE4LDIwLjE3OSw1My4xNjQsMTkuOTEzLDczLjY3Mi0wLjU5NWwwLDBjMjAuNTA5LTIwLjUwOCwyMC43NzQtNTMuNDkzLDAuNTk2LTczLjY3MiAgbC0xOTAtMTkwYy0yMC4xNzgtMjAuMTc4LTUzLjE2NC0xOS45MTMtNzMuNjcxLDAuNTk1bDAsMGMtMjAuNTA4LDIwLjUwOS0yMC43NzIsNTMuNDkyLTAuNTk1LDczLjY3MUwyMjAuMjQ5LDQ1NS44Njh6Ii8+DQo8L3N2Zz4=);
  background-size: contain;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
  60% {
    transform: translateY(-3px);
  }
}

#section-indicator {
  position: fixed;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: gray;
  cursor: pointer;
  transition: 0.5s ease-out;
}

.dot.active {
  background: #f1f3f4;
  scale: 1.2;
  transition: 0.2s ease-out;
}

.dot:hover {
  background: #f1f3f4;
  scale: 1.2;
  transition: 0.2s ease-out;
}

.hr-summation {
  width: 100%; border: 2px solid #fff; border-radius: 5px; opacity: 0.8; margin-top: 0px; margin-bottom: 0px;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
  body {
    height: 100lvh;
    width: 100svw;
    overflow-y: auto;
    background: #0b0f16;
    margin-left: 0;
    margin-right: 0;
  }
  .container {
    flex-direction: column-reverse;
    justify-content: start;
    align-items: self-start;
    scroll-snap-type: none;
    overflow-y: unset;
    /* overflow-y: scroll; */
    /* margin-top: 55vh; */
  }

  #section-indicator {
    display: none;
  }
  #sections {
    box-sizing: border-box;
    align-self: center;
    /* align-self: center; */
    /* align-items: flex-end; */
    width: 100%; /* Full width */
    max-width: none;
    /* margin: 50% auto; */
    z-index: 1;
    /* height: 40px; */
    height: calc(100dvh - var(--charts-height));
    /* overflow-y: auto; */
    margin: 0;
    position: absolute;
    top: var(--charts-height);
    padding-left: 7vw;
    padding-right: 7vw;
    padding-bottom: 0;
    /* transition: 0.25s ease-out; */
    transition: none;

    /* overscroll-behavior: contain; */

    /* top: unset; */
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  /* #sections::-webkit-scrollbar {
    display: none;
  } */

  #sections > section {
    /* height: calc(100dvh - var(--charts-height)); */
    height: fit-content;
    scroll-snap-align: unset;
    padding-bottom: 80px;
  }

  #charts {
    /* width: 100%; Full width */
    /* position: fixed; */
    position: fixed;
    align-self: center;
    justify-self: start;
    top: 0px;
    /* height: 50%; */
    width: 90svw;
    /* padding-left: 4vw; */
    /* padding-right: 4vw; */
    padding-bottom: 40px;
    /* max-width: 50vh; */
    /* background-color: #1f2123; */
    /* display: flex; */
    /* height: 100px; */
    /* width: 90%;
    max-width: 60vh; */
    /* height: 50vw; */
    /* height: ; Full height */
    /* top: 0px; Align to the top of the viewport */
    /* z-index: 2; Ensure it's above the text */
    /* transform: translateX(-50%); */
    /* left: 50%; */
  }
  #charts::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
  
    /* background: red; */
    background: #0b0f16;
    mask: linear-gradient(to top, transparent, black 5%);
    /* backdrop-filter: blur(20px) brightness(0.2); */
  }
  #chart-sunburst, #chart-sankey {
    /* margin: auto; */
    display: grid;
    max-width: 60vh;
  }

  #footer {
    position: static;
  }
  .animate-on-scroll {
    opacity: 1;
    scale: 1;
    transition: none;
  }

  #stats {
    margin-left: 0;
  }
  .stat {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 32px;
    font-weight: 500;
    margin-top: -10px;
    margin-bottom: -10px;
  }
  
  .stat .label {
    font-size: 12px;
    opacity: 0.8;
  }

  .stat .icon {
    width: 50px;
    height: 50px;
  }

  .hr-summation {
    width: 100%; border: 1px solid #fff; border-radius: 5px; opacity: 0.8; margin-top: -10px; margin-bottom: -10px;
  }

}
