@import './variables.css';
@import './utils.css';

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}

body {
  background: var(--background);
  font-family: var(--font-primary);
  color: var(--plantation-950);
  scroll-margin-top: 5rem;
  scroll-behavior: smooth;
}

.progress {
  appearance: none;
  -webkit-appearance: none;
  height: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  transform-origin: 0 50%;
  animation: scaleProgress auto linear;
  animation-timeline: scroll(root block);
  z-index: 9999;
}

.progress::-webkit-progress-bar {
  background-color: var(--wattle-500);
  border-bottom-right-radius: 8px;
  border-top-right-radius: 8px;
}

.welcome {
  margin-top: 50px;
  display: flex;
  justify-content: space-between;
}

.welcome-text {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  z-index: 1;

  p {
    max-width: 80ch;
  }

  a {
    width: 250px;
  }
}

.welcome-image > img {
  overflow: visible;
  max-width: 100%;
  width: 100%;
  height: 600px;
  object-fit: cover;
  opacity: 0.1;
  cursor: pointer;
}

.video {
  margin-top: 6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4rem;
}

.video-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;

  video {
    border-radius: 16px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
    width: 100%;
    min-width: 380px;
    max-width: 500px;
    height: 100%;
    object-fit: cover;
  }
}

.video-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  p {
    max-width: 80ch;
  }

  a {
    margin-top: 30px;
    width: 250px;
  }
}

.welcome,
.video,
.testimonials {
  margin-inline: 20px;
}

.team {
  margin-top: 8rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  color: var(--killarney-950);

  h2 {
    text-align: center;
    margin-bottom: 2rem;
  }
}

.team-ceo-container {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.team-ceo {
  width: 300px;
  height: 420px;
  object-fit: cover;
  position: absolute;
}

.team-tag {
  background-color: var(--plantation-200);
  width: 250px;
  text-align: center;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
  position: absolute;
  right: -120px;
  bottom: 20px;
}

.team-members {
  margin-top: 20rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  background-color: var(--plantation-200);
  border-radius: 12px;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
  padding: 12px 48px;

  div {
    padding: 1.5rem;
    text-align: center;
    max-width: 445px;

    img {
      border-radius: 50%;
      height: 200px;
      width: 200px;
      max-width: 100%;
      object-fit: cover;
    }

    h3 {
      margin: 1rem 0;
    }
  }
}

.testimonials {
  margin-top: 6rem;

  h2 {
    text-align: center;
  }
}

.testimonials-items {
  margin-top: 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, auto));
  justify-content: center;
  gap: 2rem;
}

.item {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.item-balloon {
  background: var(--wattle-900);
  border-radius: 20px;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2);
  height: 120px;
  max-width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wattle-50);
  padding-left: 1rem;

  &::before {
    border: 6px solid var(--wattle-900);
    bottom: -5px;
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.2);
    content: '';
    left: 10%;
    position: absolute;
    transform: translateX(-50%) rotate(45deg);
  }

  p {
    max-width: 40ch;
  }
}

.item-client {
  display: flex;
  align-items: center;
  gap: 2rem;

  img {
    border-radius: 50%;
    height: 70px;
    width: 70px;
    object-fit: cover;
    max-width: 100%;
  }
}

.plans {
  margin-top: 6rem;

  h2 {
    text-align: center;
    margin-inline: 5px;
  }
}

.plans-items {
  margin-top: 6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  align-items: end;
  gap: 2rem;
  overflow: auto;
}

.plan-item {
  background-color: var(--plantation-400);
  padding: 50px 40px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;

  h3 {
    text-align: center;
  }

  h3,
  li {
    color: var(--plantation-950);
  }

  &:nth-child(odd) {
    height: 630px;
  }

  &:nth-child(even) {
    background-color: var(--plantation-300);
    height: 700px;
  }

  img {
    transition: transform 0.5s;
    cursor: pointer;
  }

  img:hover {
    transform: scale(1.15);
  }
}

.footer {
  margin-top: 6rem;
  background-color: var(--killarney-800);
  color: var(--wattle-50);
  display: flex;
  flex-wrap: wrap-reverse;
  gap: 30px;

  img {
    max-width: 100%;
    object-fit: cover;
  }

  a > img {
    width: 50px;
    height: 50px;
  }
}

.footer-contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: 1rem 0 0 1rem;
}

.footer-social {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}

/* animations */

.slide-in-bl {
  animation: slide-in-bl 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.slide-in-right {
  animation: slide-in-right 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.slide-in-bottom {
  animation: slide-in-bottom 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.slit-in-vertical {
  animation: slit-in-vertical 0.8s ease-out both;
}

.fade-in-left {
  animation: fade-in-left 1s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}

.fade-in-right {
  animation: fade-in-right 1s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}

.pulsate-fwd {
  animation: pulsate-fwd 0.8s ease-in-out both;
}

@keyframes scaleProgress {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes slide-in-bl {
  0% {
    transform: translateY(200px) translateX(-200px);
    opacity: 0;
  }
  100% {
    transform: translateY(0) translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-right {
  0% {
    transform: translateX(200px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-bottom {
  0% {
    transform: translateY(200px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slit-in-vertical {
  0% {
    transform: rotateY(-80deg);
    opacity: 0;
  }
  100% {
    transform: rotateY(0);
    opacity: 1;
  }
}

@keyframes fade-in-left {
  0% {
    transform: translateX(-50px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fade-in-right {
  0% {
    transform: translateX(50px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulsate-fwd {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* mobile */

@media (width >= 48rem) {
  .team-tag {
    left: 120px;
    top: 50px;
    height: max-content;
  }
}

@media (width >= 64rem) {
  .item-balloon {
    width: 500px;
  }

  .footer {
    a > img {
      width: 140px;
      height: 140px;
    }
  }
}

@media (width >= 90rem) {
  main {
    margin-inline: 120px;
  }
  .welcome-text {
    z-index: 0;
  }

  .welcome-image > img {
    opacity: 1;
    transition: transform 0.5s;
  }

  .welcome-image > img:hover {
    transform: scale(1.05);
  }
}

@media (width > 96rem) {
  main {
    max-width: 1536px;
    margin: 0 auto;
  }
}

@media (width >= 96rem) {
  .video {
    flex-wrap: nowrap;
    justify-content: start;
  }

  .team-members {
    flex-wrap: nowrap;
  }

  .testimonials-items {
    grid-template-columns: repeat(auto-fit, minmax(500px, auto));
  }
}
