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

:root {
  --primary: hsla(358, 75%, 58%, 1);
  --primary-2: hsla(358, 85%, 63%, 1);
  --blue: hsla(209, 77%, 23%, 1);
  --blue-2: hsla(209, 100%, 40%, 1);
  --rose-1: hsla(358, 85%, 63%, 0.3);
  --rose-2: hsla(356, 81%, 96%, 1);

  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-30: 1.875rem;
  --fs-40: 2.5rem;
  --fs-44: 2.75rem;
  --fs-48: 3rem;
  --fs-72: 4.5rem;
}

html {
  scroll-behavior: smooth;
}

br {
  display: none;
}

body {
  font-family: 'Nunito', sans-serif;
  /* color: white; */
  padding-bottom: 70px;
}

header {
  background-color: var(--primary);
  height: 80px;
  display: flex;
  align-items: center;
}

.logo {
  margin-left: 20px;
}

.hero {
  position: relative;
  background-color: var(--primary-2);
  overflow: hidden;
  padding-bottom: 46px;
}

.menu__trigger {
  width: 72px;
  height: 72px;
  z-index: 100;
  opacity: 0;
}

.menu {
  display: grid;
  grid-template-areas: "buttons" "items";
  justify-items: end;
  align-items: center;
  height: 80px;
  width: 100%;
  z-index: 1;
}

.menu__lines,
.menu__close,
.menu__trigger {
  grid-area: buttons;
  width: 40px;
  height: 40px;
  margin: 20px;
}

.menu__close {
  display: none;
}

.menu__trigger:checked~.menu__lines {
  display: none;
}

.menu__trigger:checked~.menu__close {
  display: block;
}

.menu__trigger:checked~.menu__items {
  opacity: 1;
  transition: opacity 500ms;
}

.menu__items {
  width: 100%;
  opacity: 0;
  padding: 0 20px 20px 20px;
  background-color: var(--primary);
  border-radius: 0 0 20px 20px;
  font-size: var(--fs-16);
  transition: opacity 500ms;
  position: absolute;
  top: 80px;
}

.menu__items ul {
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  list-style: none;
  padding-top: 24px;
}

.menu__items ul {
  display: grid;
  gap: 12px;
}

.menu__items ul li a {
  color: white;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 500ms, text-shadow 500ms;
}

.menu__items ul li a:focus {
  opacity: 1;
  outline: none;
}

.menu__items ul li a:hover {
  opacity: 1;
}

.menu:has(:checked) .menu-items {
  display: block;
}

.info {
  padding: 50px 20px 35px;
}

.info .pet-images img {
  outline: 3px solid var(--primary-2);
  border-radius: 50%;
  width: 24px;
}

.info .pet-images img+img {
  margin-left: -10px;
}

.info__text {
  font-weight: 400;
  font-size: var(--fs-14);
  color: white;
}

.info__text span {
  font-weight: 700;
}

.hero .text-wrapper {
  padding: 0 20px 30px;
}

.info__title {
  font-size: var(--fs-44);
  font-size: clamp(var(--fs-44), 2.1rem + 2.7vw, var(--fs-72));
  width: 90%;
  line-height: 110%;
  color: white;
}

.info__subtitle {
  display: none;
  color: white;
}

/* ===== */

.mosaic {
  height: 280px;
  position: relative;
  background-image: url("./assets/dog-no-bg.png"), url("./assets/bg-1.svg");
  background-repeat: no-repeat, no-repeat;
  background-position: bottom center, bottom center;
}

.cta {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
}

.cta__button {
  width: 240px;
  height: 55px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-14);
}

/* section */

main {
  color: var(--blue);
  padding-top: 70px;
  padding-bottom: 40px;
}

main h3 {
  font-size: var(--fs-30);
  font-weight: 700;
  width: 320px;
  margin: 0 auto 24px;
}

.container-sections {
  display: grid;
  gap: 10px;
}

section {
  background-color: var(--rose-2);
  border: 1px solid var(--rose-1);
  color: var(--blue);
  min-height: 200px;
  width: max(60%, 320px);
  border-radius: 20px;
  padding: 30px;
  margin: 0 auto;
}

section img {
  width: 30px;
  margin-bottom: 24px;
}

section p {
  font-size: var(--fs-14);
  color: black;
  line-height: 110%;
}

section span {
  font-weight: 700;
}

.app-screen {
  margin-top: 35px;
  position: relative;
  background-image: url("./assets/app-screen-bg.svg");
  background-repeat: no-repeat;
  background-position: center center;
  height: 360px;
  width: 100%;
}

.app-screen::before {
  position: absolute;
  width: 100%;
  height: 280px;
  content: '';
  background-color: hsla(356, 81%, 96%, 0.8);
  border-top: 1px solid var(--rose-1);
  border-bottom: 1px solid var(--rose-1);
  z-index: -1;
  top: 50%;
  transform: translateY(-50%);
}

/*friends section*/
#friends {
  position: relative;
  padding: 60px 0 60px 0;
}

#friends br {
  display: inline;
}

#friends::before {
  content: '';
  background-color: var(--primary-2);
  width: 90%;
  max-width: 1280px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 20px;
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: -1;
}

#friends .cta__button {
  width: 260px;
  margin: 24px auto;
}

.friends__title {
  color: hsla(47, 87%, 66%, 1);
  font-size: var(--fs-30);
  text-align: center;
  line-height: 90%;
  font-weight: 700;
}

.friends__text {
  color: white;
  margin-top: 40px;
  margin-bottom: 20px;
  padding: 0 52px;
}

.carousel span {
  display: none;
  user-select: none;
}

.carousel ol,
.carousel li {
  list-style: none;
}

.carousel figure {
  background-color: white;
  height: 175px;
  border-radius: 20px;
}

.carousel figcaption {
  text-align: center;
  padding: 8px;
  color: var(--blue);
}

.carousel img {
  width: 256px;
  height: 128px;
  object-fit: cover;
  border-radius: 18px;
  border: 2px solid white;
}

.carousel {
  position: relative;
  /* width: 80vw; */
}


.carousel__viewport {
  width: 100%;
  display: flex;
  overflow-x: scroll;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  gap: 10px;
}

.carousel__viewport::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.carousel__viewport {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.carousel__snapper {
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.carousel__slide {
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
  padding: 2px;
}

.carousel__slide:first-child {
  margin-left: 52px;
}

.carousel__slide:last-child {
  margin-right: 52px;
}

.carousel__navigation {
  display: none;
}


/**********************/
/***** media query ****/
/**********************/

@media (min-width: 1100px) {
  br {
    display: initial;
  }

  .hero-wrapper {
    background-color: var(--primary-2);
  }

  .hero {
    display: grid;
    height: 820px;
    grid-template-areas:
      "header header"
      "info mosaic"
      "texts mosaic";
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 156px 150px auto;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-bottom: 0;
  }

  header {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    width: 90%;
    margin: auto;
    background-color: transparent;
  }

  header img {
    width: 180px;
  }

  .menu__items {
    width: 100%;
    /* display: none; */
    opacity: 1;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    font-size: var(--fs-18);
    position: static;
    height: 80px;
    display: flex;
    align-items: center;
  }

  .menu__items ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 4vw;
    padding: 0;
    border: none;
  }

  .menu__items ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.5;
    font-size: var(--fs-18);
    font-weight: 600;
  }

  .menu__items ul li a:focus {
    opacity: 1;
    outline: none;
  }

  .menu__items ul li a:hover {
    opacity: 1;
  }

  .info {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-area: info;
    align-self: center;
    width: 80%;
    margin: auto;
  }

  .info .pet-images img {
    width: 32px;
  }

  .info__text {
    font-size: var(--fs-16);
  }

  .hero .text-wrapper {
    grid-area: texts;
    align-self: start;
    display: grid;
    gap: 80px;
    width: 80%;
    margin: auto;
  }

  .info__title {
    width: auto;
    line-height: 110%;
  }

  .info__subtitle {
    display: block;
    font-size: var(--fs-24);
    font-weight: 400;
    width: 90%;
    line-height: 34px;
  }

  .hero .menu .menu__lines,
  .hero .menu .menu__close,
  .hero .menu .menu__trigger {
    display: none;
  }

  .mosaic {
    grid-area: mosaic;
    height: auto;
    background-image: url("./assets/dog-desk-no-bg.png"), url("./assets/bg-2.svg");
    background-repeat: no-repeat, no-repeat;
    background-position: top left 56px, top 42px left;
    background-size: auto, auto;
  }

  .cta {
    height: 156px;
    left: 295px;
  }

  .cta__button {
    width: clamp(240px, -12rem + 55vw, 500px);
    height: 72px;
    border-radius: 20px;
    font-size: var(--fs-20);
    transition: all 500ms;
  }

  .cta__button:hover {
    outline: 2px solid var(--blue-2);
    color: var(--blue-2);
    opacity: 0.9;
    transition: all 500ms;
  }

  .main-wrapper {
    height: 900px;
  }

  main {
    height: 880px;
    display: grid;
    grid-template-areas:
      "screen title"
      "screen section";
    gap: 32px;
    grid-template-columns: 1fr 1fr;
    max-width: 1440px;
    margin: auto;
    width: 95%;
    /* padding-right: 100px; */
  }


  main h3 {
    grid-area: title;
    font-size: var(--fs-48);
    width: 100%;
    display: flex;
    align-items: flex-end;
    margin: 0;
  }

  .container-sections {
    grid-area: section;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 32px;
    padding-bottom: 50px;
  }

  section {
    color: var(--blue);
    width: calc(50% - 16px);
    border-radius: 20px;
    margin: 0 auto;
    flex-grow: 1;
  }

  .app-screen {
    border: none;
    grid-area: screen;
    background-image: url('./assets/screen-3.png');
    position: relative;
    background-position: bottom center;
    margin: 0;
    height: auto;
    height: 760px;
  }

  .app-screen::before {
    display: none;
  }

  .app-screen::after {
    content: '';
    position: absolute;
    background: linear-gradient(180deg, #FDECED 0%, rgba(253, 236, 237, 0) 100%);
    border-radius: 20px;
    top: 0;
    bottom: 0;
    width: 100%;
    opacity: 0.5;
    z-index: -1;
  }

  #friends {
    height: 628px;
  }

  .friends__content {
    display: grid;
    grid-template-areas: "title text" "button slide";
    grid-template-columns: 1fr 1fr;
    height: 100%;
    max-width: 950px;
    margin: 0 auto;
    align-items: center;
  }

  .friends__title {
    font-size: var(--fs-48);
    text-align: left;
  }

  .friends__text {
    font-size: var(--fs-20);
    text-align: justify;
    line-height: 22px;
    padding: 0;
    margin: 0;
    width: 490px;
  }

  #friends .cta__button {
    margin: 0;
    transform: translateY(-50px);
  }

  .carousel {
    width: 384px;
  }

  .carousel img {
    width: 384px;
    height: 192px;
    object-fit: cover;
    border-radius: 18px;
    border: 2px solid white;
  }

  .carousel figure {
    height: 262px;
  }

  .carousel figcaption {
    font-size: var(--fs-24);
  }


  .carousel span {
    display: inline;
  }

  .carousel__prev {
    position: absolute;
    left: -100px;
  }

  .carousel__next {
    position: absolute;
    right: -100px;
  }

  .carousel__next,
  .carousel__prev {
    position: absolute;
    top: 35%;
    width: 72px;
    height: 72px;
    transform: translateY(-50%);
    /* border-radius: 50%; */
    outline: 0;
    color: #fff;
    font-size: 0;
    cursor: pointer;
  }

  .carousel__next:hover,
  .carousel__prev:hover {
    background-color: #000000;
    border-radius: 15px;
    filter: invert(1);
    background-size: 74px;
    background-position: center;
  }

  .carousel__prev {
    background-image: url('./assets/prev.svg');
    background-size: 100%;
  }

  .carousel__next {
    background-image: url('./assets/next.svg');
    background-size: 100%;
  }

  .carousel__navigation {
    display: inline-block;
    position: absolute;
    right: 0;
    left: 0;
    text-align: center;
  }

  .carousel__navigation-list,
  .carousel__navigation-item {
    display: inline-block;
  }

  .carousel__navigation-button {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-color: rgba(255, 255, 255, 0.5);
    background-clip: content-box;
    border: 0.25rem solid transparent;
    border-radius: 50%;
    font-size: 0;
    transition: transform 0.1s;
  }
}
