div#main {
  padding-top: var(--topnav-height);
}

.welcome {
  background: radial-gradient(
      112.33% 108.33% at 98.21% 87.68%,
      rgba(26, 184, 153, 0.2) 0%,
      rgba(26, 184, 153, 0) 100%
    ),
    radial-gradient(
      23.7% 84.53% at 57.08% 8.45%,
      rgba(239, 139, 85, 0.3) 0%,
      rgba(239, 139, 85, 0) 100%
    ),
    radial-gradient(
      70.6% 62.27% at 12.37% 70.98%,
      rgba(235, 76, 76, 0.1) 0%,
      rgba(239, 139, 85, 0) 100%
    ),
    #f6fffc;
  height: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}

.landing {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  height: calc(100vh - var(--topnav-height));
  overflow-y: auto;
  overflow-x: hidden;
  text-align: left;
  padding: 40px;
  min-height: 720px;
  max-height: 1200px;
  background-repeat: no-repeat;
}

.welcome section {
  max-width: 1500px;
}

#hero {
  min-width: 392px;
  max-width: 50%;
}

#hero-title,
#features-title {
  color: #009968;
  margin-top: 0px;
  font-family: 'Muli';
}

#hero-title {
  margin-bottom: 16px;
}

#features-title {
  margin-bottom: 8px;
  font-size: 18px;
}

#header {
  justify-content: space-between;
  flex-direction: row;
  max-width: 100%;
  row-gap: 20px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.welcome section.flex-parent {
  flex-wrap: wrap;
  max-width: 100%;
}

.welcome section.flex-parent h1 {
  width: 100%;
  margin-bottom: 0px;
}

.welcome .tagline {
  font-size: 16px;
  margin-bottom: 16px;
  color: rgb(85 85, 85);

  > span {
    font-weight: 800;
  }

  > a {
    color: rgb(85 85, 85);
    text-decoration: underline;
  }
}

.welcome section {
  display: flex;
  gap: 24px;
  width: 100%;
}

#try-kronograph {
  margin-left: -40px;
  margin-right: -40px;
  min-width: 100vw;
  padding-left: 16px;
}

.welcome #usecases {
  max-width: 1350px;
  overflow-y: hidden;
  > * {
    flex: 1 1 auto;
    > .btn.hollow {
      font-size: 18px;
      font-weight: 700;
    }
  }
}

.welcome #features {
  flex-wrap: wrap;
  align-items: stretch;
}

.welcome #features > * {
  flex: 1 1 200px;
}

.image-container {
  position: relative;
  width: auto;
  height: auto;
  overflow: hidden;
  object-fit: contain;
  max-height: 100%;
  max-width: 100%;
  min-width: 0;
}

.not-safari .image-container {
  aspect-ratio: 1 / 1;
}

.image-container img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.image-container::before,
.feature-card::before,
.image-container::after,
.feature-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.image-container::before,
.feature-card::before {
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.image-container::after,
.feature-card::after {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  transition: background-color 0.4s ease;
}

.feature-card::before {
  width: 100%;
  height: 200%;
  z-index: -1;
}

/* Hover Styles */
.image-container:hover::before {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 60%, rgba(255, 255, 255, 0) 60%);
}

.feature-card:hover::before {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 60%, rgba(255, 255, 255, 0) 60%);
}

.image-container:hover img {
  transform: scale(1.1); /* Zoom in */
}

/* Unhover (Default) Styles */
.feature-card::before {
  transform: translate(-50%, -50%) scale(0.1);
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 60%, rgba(255, 255, 255, 0) 60%);
}

.not-safari .image-container:not(:hover)::before {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
  transition: opacity 0s ease;
}

.btn.hollow {
  font-size: 16px;
  font-weight: bold;
  color: black;
  background-color: transparent;
  border: none;
  padding: 10px 0px;
  font-weight: 800;

  &:hover {
    color: black;
    background-color: transparent;
    border-color: transparent;
  }
}

.welcome a[href^='http']:after,
.welcome a[href^='https']:after {
  content: initial;
}

.clickable-box {
  max-height: 100%;
  object-fit: contain;
  height: 100%;

  > p {
    margin-bottom: 0px;
  }
}

.feature-card {
  position: relative;
  max-width: 340px;
  min-width: 230px;
  color: #222b32;
  padding: 16px;
  overflow: hidden;
  z-index: 1;
  &:hover {
    color: initial;
  }
}

.feature-card.new-feature {
  border: 1px solid #009968;
  > .btn:first-child {
    padding: 4px 8px;
    margin-right: 8px;
  }
  > .btn {
    display: inline-block;
  }
  > .btn.hollow {
    min-width: 0px;
  }
}

.welcome-footer {
  height: 100%;
  padding: 40px;
  gap: 40px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

.welcome-footer .divider {
  border-bottom: solid 2px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.footer-section {
  padding: 0px 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 46px;
  min-width: 100%;
}

#ci-logo-text-image {
  width: 181px;
}

.welcome-footer-item {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;

  > .btn.hollow {
    border: 1px solid #009968;
    padding: 10px 20px;
    &:hover {
      background-color: #009968;
      color: white;
    }
  }

  > span {
    font-weight: 800;
    color: black;
  }

  > p {
    margin: 0px;
    color: black;
  }
}

@media (max-width: 506px) {
  .footer-section {
    justify-content: center;
    width: 100%;
  }

  .welcome-footer-item {
    text-align: center;
  }
}

/* Width when kg banner wraps */
@media (min-width: 960px) {
  /* Styles for when kg banner is positioned to the right */
  #try-kronograph {
    width: 440px;
    height: 122px;
    min-width: 0;
    padding-left: 0px;
    margin-left: 0px;
  }

  .kg-banner-image-container {
    > img {
      clip-path: path('M 20 0 Q 5 61 20 122 L 1000 122 L 1000 0 Z');
    }
  }
}

/* Width when kg banner wraps */
@media (max-width: 960px) {
  #hero {
    max-width: 80%;
  }
}

@media (max-width: 800px) {
  #usecases {
    flex-wrap: wrap;
    > * {
      max-width: calc(50% - 12px); /* Calculate 50% - half the flex gap value */
    }
  }

  #hero {
    max-width: 100%;
  }

  .landing {
    height: auto;
    max-height: none;
  }
}

@media (max-width: 596px) {
  .landing {
    max-height: none;
  }

  #usecases,
  #features {
    > * {
      min-width: 100%;
    }
  }

  #hero {
    min-width: 0;
  }
}

@media ((max-width: 1086px) and (max-height: 1024px)) {
  .landing {
    height: auto;
  }
}

@media (max-width: 767px) {
  .section > * {
    width: 100%;
  }
}

@media (max-height: 920px) {
  .welcome #usecases {
    max-width: 110vh;
  }
  .not-safari .image-container {
    aspect-ratio: 1.1 / 1;
  }
}

@media (min-width: 1280px) {
  #hero {
    max-width: 700px;
  }
  @media (min-height: 1048px) {
    .landing,
    .welcome-footer {
      padding: 60px;
    }
    #try-kronograph {
      margin-right: -60px;
    }
  }
}

@media ((max-height: 920px) and (max-width: 1400px) and (min-height: 780px)) {
  .welcome #usecases {
    max-width: 100vh;
  }
  .not-safari .image-container {
    aspect-ratio: 1.1 / 1;
  }
}

@media (max-height: 560px) {
  .welcome #usecases {
    min-width: 620px;
  }
}
