/* Base styles */
* {
  box-sizing: border-box;
  font-family: "Lexend", sans-serif;
  scrollbar-width: none
}

/* Typography */
h2 {
  margin: 0 0 25px 0;
  font-size: 60px;
  line-height: 90%;
  font-weight: 300;
}

h3 {
  margin: 0 0 25px 0;
  font-size: 20px;
  line-height: normal;
  font-weight: bold;
  color: #00A1DE;
}

p {
  margin-top: 0;
  font-size: 16px;
  font-weight: 200;
  line-height: 24px;
}

/* Navigation dots styling */
#fp-nav {
  & ul li {
    width: 4px;
    height: 18px;
    margin: 15px 0;
    
    & a span,
    &:hover a span {
      width: 2px;
      height: 18px;
      margin: 0;
      border-radius: 0;
    }
    
    & a.active span,
    &:hover a.active span {
      width: 2px;
      height: 18px;
      margin: -2px 0 0 -2px;
    }
    
    & .fp-tooltip {
      top: 8px;
      right: 20px;
    }
  }
  
  &.fp-right ul li:last-child {
    display: none;
  }
}

/* Background video */
.background-video {
  position: fixed;
  left: 0;
  bottom: 0;
  min-width: 100%;
  min-height: 100%;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* Menu and header elements */
#menu-container {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 70px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  
  & .menu {
    max-width: 27px;
    margin-left: 40px;
    height: auto;
  }
  
  & .logo {
    margin-right: 40px;
  }
}

#chapter-container {
  position: fixed;
  left: 0;
  top: 70px;
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  z-index: 5;
  
  & .inner {
    position: relative;
    width: 1200px;
    margin: 0 auto;
    padding-left: 82px;
    
    & .title {
      margin: 0 0 3px 0;
      font-size: 20px;
      line-height: normal;
      font-weight: bold;
      color: #00A1DE;
    }
    
    & ul {
      list-style: none;
      margin: 0;
      padding: 0;
      
      & li {
        display: inline-block;
        
        & a {
          margin: 0 20px 0 0;
          font-size: 12px;
          font-weight: 300;
          color: black;
          text-decoration: none;
        }
        
        &.active a {
          font-weight: 700;
        }
      }
    }
  }
}

#mouse-container {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* Main container styles */
.container {
  position: relative;
  width: 1200px;
  height: 800px;
  padding: 80px;
  margin: 0 auto;
  
  & img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
  }
}

/* Layout variations */
.container-layout {

  a, a:hover, a:focus, a:visited {
    color: #00a1de;
  }
  &.layout-1, &.layout-2, &.layout-5, &.layout-6, &.layout-7, &.layout-9, &.layout-10 {
    display: flex;
    gap: 20px;
  }
  
  &.layout-1, &.layout-2 {
    & .left, & .right {
      position: relative;
      width: 50%;
    }
  }
  
  &.layout-2 .content {
    padding-left: 223px;
    
    & p {
      max-width: 587px;
    }
  }
  
  &.layout-3, &.layout-4 {
    display: flex;
    gap: 20px;
    margin-top: -80px;
    
    & .left, & .right {
      position: relative;
      width: 50%;
    }
  }
  
  &.layout-4 img, &.layout-5 img, &.layout-8 img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
  }
  
  &.layout-6 .left, &.layout-7 .left {
    margin-left: 250px;
  }
  
  &.layout-8 {
    display: flex;
  }
  
  &.layout-9 {
    & h2 {
      font-size: 30px;
    }
    
    & .left {
      width: 35%;
    }
    
    & .right {
      width: 65%;
    }
  }
  
  &.layout-10 {
    & h2 {
      font-size: 30px;
    }
    
    & .left {
      width: 65%;
    }
    
    & .right {
      width: 35%;
    }
  }
  
  &.layout-12 .content {
    display: flex;
    gap: 20px;
    
    & .left, & .right {
      width: 50%;
    }
  }
  
  &.layout-13 {
    position: relative;
    display: flex;
    height: 100%;
    gap: 20px;
    
    & .number {
      color: #00A1DE;
      font-size: 100px;
      font-style: normal;
      font-weight: 300;
      line-height: 100%;
    }
    
    & .line {
      position: relative;
      height: 100%;
      width: 4px;
      background: #00A1DE;
    }
    
    & .title h2 {
      font-size: 100px;
      font-style: normal;
      font-weight: 300;
      line-height: 100%;
    }
  }
  
  &.layout-14, &.layout-15, &.layout-16 {
    & .columns {
      display: flex;
      gap: 20px;
      
      & .left, & .right {
        width: 50%;
      }
    }
  }
  
  &.layout-14 .columns .icon-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    
    & .left {
      width: 80px;
      
      & img {
        max-height: 80px;
      }
    }
    
    & .right {
      width: 100%;
      
      .has-image & {
        width: calc(100% - 80px);
      }
      
      & .title {
        font-weight: bold;
      }
    }
  }
}

/* Overflow behavior */
.fp-is-overflow:not(.active) > .fp-overflow {
  overflow-y: hidden !important;
}

/* Welcome screen and menu system */
.video-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.7);
  z-index: 1;
}

.welcome-container {
  position: relative;
  display: flex;
  height: 100vh;
  width: 100%;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 5;
  color: white;
  
  & .text-container {
    max-width: 640px;
    text-align: center;
  }
  
  & .line-1 {
    text-align: center;
    font-size: 34px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    color: #00A1DE;
    opacity: 0;
    transition: opacity 400ms ease 400ms;
    
    &.visible {
      opacity: 1;
    }
  }
  
  & .line-2 {
    color: #FFF;
    font-size: 65px;
    font-style: normal;
    font-weight: 300;
    line-height: 100%;
    opacity: 0;
    transition: opacity 600ms ease 400ms;
    
    &.visible {
      opacity: 1;
    }
  }
}

.menu-system {
  position: relative;
  display: none;
  height: 100vh;
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
  z-index: 5;
  color: white;
  padding: 7%;
  
  &.active {
    opacity: 1;
  }
  
  & .title {
    color: #FFF; 
    font-size: 65px;
    font-style: normal;
    font-weight: 300;
    line-height: 100%;
  }
  
  & .menu-items {
    margin: 40px auto;
    
    & .chapter-title {
      display: inline-block;
      position: relative;
      color: #FFF;
      margin-top: 25px;
      font-size: 14px;
      font-style: normal;
      font-weight: 700;
      line-height: normal;
      text-decoration: none;
      
      &:after {
        content: " ";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 80%;
        height: 1px;
        background: #00A1DE;
        transition: width 300ms;
      }
      
      &:hover:after {
        width: 100%;
      }
    }
  }
}

/* Menu items styling */
.menu-items {
  & > ul {
    list-style: none;
    column-count: 3;
    column-gap: 60px;
    padding-left: 0;
    
    & > li {
      display: block;
    }
    
    &:first-child > li:first-child a {
      margin-top: 0;
    }
  }
  
  & ul li ul {
    display: block;
    list-style: none;
    margin-top: 25px;
    padding-left: 20px;
    
    & li a {
      color: #FFF;
      font-size: 13px;
      font-style: normal;
      font-weight: 300;
      line-height: 24px;
      text-decoration: none;
    }
  }
}

/* Animations for desktop */
@media screen and (min-width: 895px) {
  .container-layout {
    &.animation-1 {
      & .left {
        transform: translateY(-1000px);
        opacity: 0;
        transition: transform 2s cubic-bezier(0.16, 0.68, 0.43, 0.99), opacity 800ms ease-in-out 800ms;
      }
      
      & .right {
        transform: translateY(1000px);
        opacity: 0;
        transition: transform 2s cubic-bezier(0.16, 0.68, 0.43, 0.99), opacity 800ms ease-in-out 800ms;
      }
    }
    
    &.animation-2 {
      & .left, & .right {
        transform: translateY(1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99), opacity 800ms ease-in-out 800ms;
      }
    }
    
    &.animation-3 {
      & .left {
        transform: translateX(-1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
      
      & .right {
        transform: translateY(1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
    }
    
    &.animation-4 {
      & .left {
        transform: translateX(-1000px) translateY(-1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
      
      & .right {
        transform: translateY(1000px) translateX(1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
    }
    
    &.animation-5 {
      & .left {
        transform: translateY(-1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
      
      & .right {
        transform: translateY(1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
    }
    
    &.animation-6 {
      transform: translateX(2000px);
      opacity: 0;
      transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
    }
    
    &.animation-7 .left {
      transform: translateY(1000px);
      opacity: 0;
      transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
    }
    
    &.animation-8 img {
      transform: translateY(1000px);
      opacity: 0;
      transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
    }
    
    &.animation-9 {
      & .left {
        transform: translateY(1000px) translateX(-1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
      
      & .right {
        transform: translateY(-1000px) translateX(1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
    }
    
    &.animation-10 {
      & .left {
        transform: translateY(1000px) translateX(-1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
      
      & .right {
        transform: translateY(-1000px) translateX(1000px);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
    }
    
    &.animation-11 {
      transform: translateX(33vw);
      transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99), opacity 800ms ease-in-out 800ms;
      opacity: 0;
    }
    
    &.animation-12 {
      & .title {
        transform: translateX(100vw);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;
      }
      
      & .content {
        transform: translateY(100vh);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;
      }
    }
    
    &.animation-13 {
      & .title, & .number {
        transform: translateY(100vh);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
      
      & .line {
        opacity: 0;
        transition: opacity 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 1.5s;
      }
    }
    
    &.animation-14 {
      & .columns {
        transform: translateX(100vw);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
      
      & h2 {
        transform: translateX(100vw);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 1s, opacity 800ms ease-in-out 800ms;;
      }
    }
    
    &.animation-15, &.animation-16 {
      & .title {
        transform: translateX(100vw);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 1s, opacity 800ms ease-in-out 800ms;;
      }
      
      & .columns {
        transform: translateY(100vh);
        opacity: 0;
        transition: transform 1.1s cubic-bezier(0.16, 0.68, 0.43, 0.99) 500ms, opacity 800ms ease-in-out 800ms;;
      }
    }
  }
  
  /* Animation active states */
  .section.active .slide.active .container-layout {
    &.animation-1 .left, &.animation-1 .right,
    &.animation-2 .left, &.animation-2 .right {
      opacity: 1;
      transform: translateY(0);
    }
    
    &.animation-3 .left {
      transform: translateX(0);
      opacity: 1;
    }
    
    &.animation-3 .right,
    &.animation-5 .left, &.animation-5 .right,
    &.animation-7 .left,
    &.animation-8 img {
      transform: translateY(0);
      opacity: 1;
    }
    
    &.animation-4 .left, &.animation-4 .right,
    &.animation-9 .left, &.animation-9 .right {
      transform: translateX(0) translateY(0);
      opacity: 1;
    }
    
    &.animation-6, &.animation-11 {
      transform: translateX(0);
      opacity: 1;
    }
    
    &.animation-10 .left, &.animation-10 .right {
      transform: translateX(0);
      opacity: 1;
    }
    
    &.animation-12 .title, &.animation-12 .content,
    &.animation-13 .title, &.animation-13 .number,
    &.animation-14 .columns, &.animation-14 h2,
    &.animation-15 .columns, &.animation-15 .title,
    &.animation-16 .columns, &.animation-16 .title {
      transform: translateX(0) translateY(0);
      opacity: 1;
    }
    
    &.animation-13 .line {
      opacity: 1;
    }
  }
}

/* Responsive styles */
@media screen and (max-width: 1399px) {
  .container {
    width: 1000px;
  }
  
  .container-layout.layout-2 .content {
    padding-left: 0;
  }
  
  .container-layout.layout-3 img,
  .container img {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    max-height: inherit;
  }
  
  h2 {
    line-height: 0.9;
    font-size: 49px;
  }
  
  p {
    font-size: 14px;
  }
}

@media screen and (max-width: 1199px) {
  .container {
    width: 891px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media screen and (max-width: 991px) {
  .container {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .menu-items > ul {
    column-count: 2;
    column-gap: 20px;
  }
}

@media screen and (max-width: 894px) {
  .background-video {
    display: none;
  }
  
  #chapter-container {
    position: absolute;
    background: white;
    
    & .inner {
      width: auto;
      padding-left: 20px;
      padding-right: 20px;
      
      & ul li a {
        margin: 0 10px 0 0;
        font-weight: 200;
      }
      
      & .title {
        margin: 0;
        font-size: 16px;
      }
    }
  }
  
  .container {
    height: auto;
  }
  
  .container-layout {
    flex-direction: column;
    
    &.layout-1, &.layout-2, &.layout-3, &.layout-4, 
    &.layout-5, &.layout-9, &.layout-10 {
      & .left, & .right {
        width: 100%;
      }
    }
    
    &.layout-6 .left, &.layout-7 .left {
      margin-left: 0;
    }
    
    &.layout-12 .content {
      display: block;
      
      & .left, & .right {
        width: 100%;
      }
    }
    
    &.layout-14 .columns,
    &.layout-15 .columns,
    &.layout-16 .columns {
      flex-direction: column;
      
      & .left, & .right {
        width: 100%;
      }
    }
  }
  
  #menu-container {
    position: absolute;
  }
  
  .menu-system {
    height: 100%;
    padding-top: 135px;
    
    & .title {
      font-size: 32px;
      text-align: center;
    }
  }
  
  .menu-items > ul {
    column-count: 1;
    column-gap: 0px;
  }
}

@media screen and (max-width: 620px) {
  .menu-system {
    height: 100%;
    padding-top: 135px;
    
    & .title {
      font-size: 32px;
      text-align: center;
    }
  }
}
