:root {
  --color-primary: #210b8c;
  --color-accent: #ff0004;
  --background-color: #eff3f4;
  --color-tertiary: #968cff;
}

html,
body {
  padding: 0;

  font-family: 'Manrope', sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-primary);
}

html {
  margin: 0;
  scroll-behavior: smooth;
  scrollbar-gutter: transparent;
}

body {
  margin: 0 auto;
  max-width: 1200px;
  padding: 16px;
  background-color: var(--background-color);

  /* footer overflows */
  overflow-x: hidden;
}

:target::before {
  content: '';
  display: block;
  height: 120px;
  margin-top: -120px;
  visibility: hidden;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #968cffaa transparent;
  box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
small {
  font-weight: 400;
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 54px;
  font-weight: 600;
  line-height: 1.1;
}

a {
  color: inherit;
  text-decoration: none;

  transition: color 120ms ease;

  &:hover {
    color: var(--color-accent);
  }
}

icon {
  width: 24px;
  height: 24px;
  font-size: 24px;
  font-family: Material Symbols Outlined;
  font-weight: 400;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-user-select: none;
  user-select: none;

  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

button {
  position: relative;

  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition:
    color 120ms ease,
    background-color 120ms ease;
  color: var(--color-primary);

  padding: 8px;
  border-radius: 50%;
  background-color: transparent;

  &:hover {
    background-color: #968cffaa;
    color: var(--color-accent);
  }
}

.cta {
  background-color: var(--color-primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
}

.spacer {
  flex: 1 1 auto;
}

section {
  margin-bottom: 120px;

  > h2:first-child {
    text-align: center;
    font-size: 24px;
    margin-bottom: 24px;
  }
}

.bubbles {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  @media screen and (max-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media screen and (max-width: 410px) {
    grid-template-columns: repeat(1, 1fr);
  }

  &:has(.bubble:nth-child(5)) {
    grid-template-columns: repeat(5, 1fr);

    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px;
    padding-bottom: 16px;

    > .bubble {
      min-width: calc((1200px / 5) - (4 * 16px));
    }
  }

  gap: 16px;
  justify-content: space-between;

  .bubble {
    min-height: 120px;
    padding: 24px;

    display: flex;
    flex-direction: column;
    gap: 16px;

    &:has(.indicator) {
      justify-content: space-between;
    }

    border-radius: 36px;
    background-color: #fff;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.04) inset;

    font-size: 18px;
    line-height: 1.5;

    transition: 120ms background-color 120ms ease;

    > h2 {
      font-size: 18px;
      line-height: 1.5;
      font-weight: 600;
      margin-bottom: 8px;
      min-height: 56px;
    }

    > img {
      width: 100%;
      height: auto;
      object-fit: contain;
      object-position: center;
      margin: auto 0;
    }

    .indicator {
      width: 80%;
      margin: 0 auto;
      height: 6px;
      background-color: #d9d9d9;
      border-radius: 6px;
      transition: 120ms background-color 120ms ease;
    }

    &:hover:not(.no-highlight),
    &:first-child:not(.no-highlight):not(:has(~ .bubble:hover)) {
      background-color: var(--color-tertiary);

      .indicator {
        background-color: var(--color-accent);
      }
    }
  }

  .icon-bubble {
    display: flex;
    flex-direction: column;
    gap: 16px;

    font-size: 18px;

    @media screen and (max-width: 1200px) {
      margin-left: 24px;
    }

    &:hover,
    &:first-child:not(:has(~ .icon-bubble:hover)) {
      > icon {
        background-color: var(--color-tertiary);
        color: var(--color-accent);
      }
    }

    > icon {
      font-size: 48px;
      padding: 24px;
      aspect-ratio: 1;
      width: fit-content;
      height: fit-content;
      border-radius: 50%;
      background-color: #fff;
      color: var(--color-primary);
      margin-bottom: -36px;
      margin-left: -28px;

      transition:
        120ms background-color 120ms ease,
        120ms color 120ms ease;
    }

    > p {
      font-size: 16px;
      max-width: 200px;
    }
  }
}

.video-holder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: -1;

  &::after {
    content: '';
    position: absolute;
    z-index: 1;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(
      to bottom,
      transparent,
      var(--background-color)
    );
  }

  > video:first-child {
    position: relative;
    width: 100%;
    object-fit: cover;
  }
}

.quote {
  position: relative;

  text-align: left;
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 40px;

  margin: 0 auto;
  max-width: 600px;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: -24px;
    height: 80%;
    width: 6px;
    border-radius: 6px;

    background-color: var(--color-tertiary);
  }

  @media screen and (max-width: 768px) {
    padding-left: 24px;

    &::before {
      left: 0;
    }
  }
}

nav {
  position: sticky;
  top: 16px;
  left: 0;
  margin: 0 -8px;
  margin-top: 16px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 12;

  border-radius: 50px;

  animation: nav-scroll ease-in-out forwards;
  animation-timeline: scroll();
  animation-range: 0 64px;

  img {
    height: 24px;
  }

  > button {
    display: none;
  }

  @media screen and (max-width: 768px) {
    animation: none;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);

    top: 0;
    border-radius: 0;
    margin: -16px;
    margin-bottom: 0;

    > a:not(:first-child) {
      display: none;
    }

    > button {
      display: block;
    }
  }
}

.sidebar {
  @media screen and (min-width: 768px) {
    display: none;
  }

  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  max-width: 200px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  z-index: 12;

  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 16px;

  transition: transform 120ms ease;

  &:not(.active) {
    transform: translateX(100%);
  }

  .header {
    display: flex;
    justify-content: flex-end;
  }
}

@keyframes nav-scroll {
  from {
    background-color: transparent;
    backdrop-filter: blur(0);
  }
  to {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
  }
}

#hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;

  margin: 120px 0;

  > .text-content {
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0 auto;

    a {
      width: fit-content;

      @media screen and (max-width: 768px) {
        align-self: center;
      }
    }

    p {
      font-size: 18px;
      line-height: 1.5;
    }

    small {
      font-size: 14px;
      line-height: 1.5;

      @media screen and (max-width: 768px) {
        align-self: center;
      }
    }
  }

  img {
    max-width: min(600px, 100%);
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
  }
}

#meet {
  > h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 24px;
  }

  > p {
    margin-bottom: 40px;
    font-size: 16px;

    &:first-of-type {
      text-align: center;
    }
  }

  > .bubbles {
    margin-bottom: 40px;
  }

  > video {
    width: 100%;
    border-radius: 24px;
    margin: 0 auto;
  }
}

#who {
  > h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 24px;
  }

  > p {
    margin-bottom: 24px;
    font-size: 24px;
    text-align: center;
  }

  > .bubbles {
    margin-bottom: 40px;
  }
}

#how {
  > .bubbles {
    p {
      min-height: 80px;
    }
  }
}

#join > .content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;

  background: url('assets/join_bg.jpg') no-repeat center center;
  background-size: cover;

  border-radius: 36px;
  padding: 24px;

  /* remove this when form is ready */
  min-height: 600px;

  > .text-content {
    > h2 {
      font-size: 54px;
      margin-bottom: 24px;
    }

    p {
      font-size: 18px;
    }

    max-width: 400px;
  }
}

footer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  color: #fff;

  padding-top: 120px;
  /* background: linear-gradient(
      to bottom,
      transparent,
      var(--color-tertiary) 120px
    ); */

  &::after {
    content: '';
    position: absolute;
    bottom: -16px;
    width: 100vw;
    height: calc(100% + 16px);
    background: linear-gradient(
      to bottom,
      transparent,
      var(--color-tertiary) 120px
    );
    z-index: -1;
  }

  > h2 {
    font-size: 24px;
    max-width: 600px;
  }

  > p {
    margin-bottom: 40px;
  }

  > .logos,
  > .links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }

  > .logos {
    margin-bottom: 80px;
    justify-content: center;
    gap: 40px;

    img {
      width: 200px;
    }
  }

  > .links {
    gap: 24px;
    text-transform: uppercase;
  }
}
