:root {
  --primary-color: #5151f4;
  --secondary-color: #00002f;
  --text-color: #333;
  --bg-color: #ffffff;
  --border-gray: #2d3748;
}

* {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding: 5rem;
}

body {
  min-height: 100dvh;
  font-family: system-ui;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  font-size: 16px;
}

input,
textarea,
button,
select {
  font-family: inherit;
}

img,
video,
svg {
  height: auto;
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

#logo-scrolled {
  display: none;
}

header {
  background-color: var(--secondary-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  min-height: 100px;
  display: flex;
  flex-flow: column wrap;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background-color 0.3s ease;

  &.scrolled {
    background-color: var(--secondary-color);

    .logo svg {
      height: auto;
      width: 72px;
      display: none;
    }
  }

  .logo {
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;

    svg {
      height: auto;
      width: 175px;
    }
  }
}

.hero {
  height: 100vh;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  .hero-content {
    max-width: 600px;
    padding: 0.2rem 1rem;
    z-index: 3;
  }

  h1 {
    font-size: 48px;
    margin-bottom: 20px;
  }

  p {
    font-size: 18px;
    margin-bottom: 30px;
  }

  @media (max-width: 768px) {
    h1 {
      font-size: 36px;
    }

    p {
      font-size: 16px;
    }
  }
}

.btn {
  display: inline-block;
  background-color: #fff;
  color: var(--primary-color);
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  margin-block: 2rem;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;

  &:hover {
    background-color: var(--secondary-color);
    color: #fff;
  }
}

main {
  overflow: hidden;
}

.showcase-content {
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-flow: column wrap;
}

#showcase-1 {
  .client-logo {
    filter: invert(1);
  }
}

#showcase-1,
#showcase-2,
#showcase-3,
#showcase-4,
#showcase-5,
#showcase-6 {
  .client-logo {
    width: 150px;
    height: auto;
  }
}

#showcase-7 {
  background-color: #44ab39;

  .client-logo {
    filter: invert(0);
    width: 150px;
    height: auto;
  }
}

#showcase-8 {
  background-color: #253280;

  .client-logo {
    filter: invert(0);
    max-width: 220px;
    height: auto;
  }
}

#showcase-9 {
  background-color: #fe2827;

  .client-logo {
    filter: invert(0);
    max-width: 300px;
    height: auto;
  }
}

#showcase-10 {
  background-color: #0081b9;

  .client-logo {
    filter: invert(0);
    max-width: 300px;
    height: auto;
  }
}

#showcase-11 {
  background-color: #4d00cf;

  .client-logo {
    filter: invert(0);
    max-width: 300px;
    height: auto;
  }
}

#showcase-12 {
  background-color: #b01923;

  .client-logo {
    filter: invert(0);
    max-width: 400px;
    height: auto;
  }
}

#showcase-13 {
  background-color: #f80571;

  .client-logo {
    filter: invert(0);
    max-width: 300px;
    height: auto;
  }
}

#showcase-14 {
  background-color: #f1f1f1;

  .client-logo {
    filter: invert(1);
    max-width: 200px;
    height: auto;
  }
}

#showcase-15 {
  overflow: hidden;
  padding-block: 5rem;
  background-color: #d12e40;
  flex-flow: column wrap;

  .showcase-content {
    z-index: 2;
    display: flex;
    justify-content: center;
    flex-flow: column wrap;
    flex: 1;

    .phone-mockup {
      margin: 1rem auto;
    }
  }

  .client-logo {
    filter: invert(0);
    max-width: 200px;
    height: auto;
    z-index: 2;
    position: absolute;
    top: 3rem;

    @media (min-width: 768px) {
      position: relative;
      top: 0;
    }
  }
}

.showcase {
  min-height: 100dvh;
  padding: 5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-color: #232323;

  &::before {
    content: "";
    width: 100dvw;
    height: 100%;
    background-color: rgb(0 0 0 / 50%);
    position: absolute;
    z-index: 2;
    top: 0;
  }

  &-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.client-logo {
  max-width: 200px;
  max-height: 100px;
  margin-bottom: 0.5rem;
  margin-inline: auto;

  @media (max-width: 768px) {
    max-width: 150px;
    max-height: 75px;
  }
}

.phone-mockup {
  position: relative;
  margin: 0 auto;
  border: 14px solid var(--primary-color);
  background-color: var(--primary-color);
  border-radius: 2.5rem;
  height: 830px;
  width: 430px;

  .side-piece {
    position: absolute;
    width: 3px;
    background-color: var(--primary-color);

    &.top-first {
      height: 32px;
      left: -17px;
      top: 72px;
      border-radius: 0.75rem 0 0 0.75rem;
    }

    &.top-second {
      height: 46px;
      left: -17px;
      top: 124px;
      border-radius: 0.75rem 0 0 0.75rem;
    }

    &.top-third {
      height: 46px;
      left: -17px;
      top: 178px;
      border-radius: 0.75rem 0 0 0.75rem;
    }

    &.right-side {
      height: 64px;
      right: -17px;
      top: 142px;
      border-radius: 0 0.75rem 0.75rem 0;
    }
  }

  .inner-container {
    border-radius: 2rem;
    overflow: hidden;
    height: 800px;
    width: 400px;
    background-color: #f0f0f0;
    position: relative;

    iframe {
      width: 100%;
      height: 100%;
      border: none;
    }

    embed {
      width: 100%;
      height: 100%;
      border: none;
    }

    img {
      width: 100%;
      height: auto;
      object-fit: cover;
      position: sticky;
      top: 0;
    }
  }

  @media (max-width: 768px) {
    transform: scale(0.8);
  }
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-bottom-color: var(--primary-color);
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes rotation {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.lazy-iframe {
  opacity: 0;
  transition: opacity 0.3s ease-in;

  &.loaded {
    opacity: 1;
  }
}

.animate-in {
  animation: fadeIn 0.5s ease-in-out forwards;
}

.animate-out {
  animation: fadeOut 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.btn-visit {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 220px;
  margin: 0.5rem auto;
  justify-content: center;
}

.btn-visit:hover {
  background-color: var(--secondary-color);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-visit:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-text {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 24px;
  opacity: 0;
  overflow: hidden;
  margin-left: 0;
  transition: all 0.3s ease;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

.btn-visit:hover .btn-text {
  transform: translateX(-10px);
}

.btn-visit:hover .btn-icon {
  width: 24px;
  opacity: 1;
  margin-left: 8px;
}

@media (max-width: 768px) {
  .btn-visit {
    padding: 10px 20px;
    font-size: 14px;
  }

  .btn-icon svg {
    width: 16px;
    height: 16px;
  }
}

.scroller {
  max-width: 1440px;
}

.scroller__inner {
  padding-block: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.scroller[data-animated="true"] {
  overflow: hidden;
  -webkit-mask: linear-gradient(
    90deg,
    transparent,
    white 5%,
    white 95%,
    transparent
  );
  mask: linear-gradient(90deg, transparent, white 5%, white 95%, transparent);
}

.scroller[data-animated="true"] .scroller__inner {
  width: max-content;
  flex-wrap: nowrap;
  animation: scroll var(--_animation-duration, 40s)
    var(--_animation-direction, forwards) linear infinite;
}

.scroller[data-direction="right"] {
  --_animation-direction: reverse;
}

.scroller[data-direction="left"] {
  --_animation-direction: forwards;
}

.scroller[data-speed="fast"] {
  --_animation-duration: 20s;
}

.scroller[data-speed="slow"] {
  --_animation-duration: 60s;
}

@keyframes scroll {
  to {
    transform: translate(calc(-50% - 0.5rem));
  }
}

.waves {
  position: fixed;
  width: 100%;
  height: 42dvh;
  margin-bottom: -7px;
  bottom: 0;
  /*Fix for safari gap*/
}

/* Animation */
.parallax > use {
  animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}
.parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}
.parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}
.parallax > use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 20s;
}
@keyframes move-forever {
  0% {
    transform: translate3d(-90px, 0, 0);
  }
  100% {
    transform: translate3d(85px, 0, 0);
  }
}
