* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
}
body.nav-open {
  overflow: hidden;
}
.head {
  position: relative;
  height: 100vh; /* whole hero section */
  overflow: hidden; /* crop image if it overflows */
}

.head img.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* keeps aspect ratio, fills area */
  object-position: center 90%;
  z-index: -1; /* push image behind content */
}
.nav-bar {
  margin: 20px auto;
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
  align-items: center;
}
.nav-bar a {
  text-decoration: none;
  color: hsl(0, 100%, 100%);
  font-family: "Barlow", sans-serif;
}
.nav-menu {
  display: flex;
  gap: 50px;
  list-style: none;
  align-items: center;
}
.nav-item a {
  font-weight: 500;
  font-size: 1.15rem;
  transition: all 0.3s ease-in;
}
.nav-item a:hover,
.nav-item a:focus {
  border-bottom: 2px solid hsl(0, 100%, 100%);
}
.brandName {
  font-size: 2rem;
  font-weight: 700;
}
.nav-menu button {
  padding: 15px 30px;
  border-radius: 30px;
  border: none;
  background-color: hsl(0, 100%, 100%);
  font-family: "Fraunces", serif;
  color: hsl(212, 27%, 19%);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease-in;
}
.nav-menu button:hover,
.nav-menu button:focus {
  background-color: rgba(255, 255, 255, 0.3);
  color: hsl(0, 100%, 100%);
}
.hamburger {
  width: 30px;
  height: 30px;
  display: none;
  cursor: pointer;
}
.hamburger .dot {
  display: block;
  background-color: hsl(0, 100%, 100%);
  margin-top: 5px;
  height: 3px;
  width: 30px;
  transition: all 0.3s ease-in;
}
.head h1 {
  text-align: center;
  font-family: "Fraunces", serif;
  color: hsl(0, 100%, 100%);
  font-size: 3rem;
  letter-spacing: 7px;
  word-spacing: 5px;
  padding: 60px 0 0 0;
}
.head a img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.features-content {
  display: flex;
}
.text-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: hsl(30, 33%, 98%);
  flex: 1;
}
.features-text h2 {
  font-size: 2.75rem;
  font-family: "Fraunces", serif;
  max-width: 400px;
  margin-bottom: 20px;
}
.features-text p {
  max-width: 400px;
  padding: 5px 0 25px 0;
  color: hsl(232, 10%, 55%);
  font-size: 1.1rem;
  font-weight: 600;
  font-family: "Barlow", sans-serif;
}
.features-text a {
  text-decoration: none;
  color: hsl(212, 27%, 19%);
  font-family: "Fraunces", serif;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.3s ease-in;
}
.Transform-brand {
  border-bottom: 4px solid hsl(51, 71%, 73%);
}
.features-text .Transform-brand:hover,
.features-text .Transform-brand:focus {
  border-bottom: 4px solid hsl(51, 100%, 49%);
}
.features-img {
  flex: 1;
}
.features-img picture,
.features-img img.side-img {
  width: 100%;
  object-fit: cover; /* ensures image fills without squishing */
}

.stand-out {
  border-bottom: 4px solid hsl(6, 51%, 75%);
}
.features-text .stand-out:hover,
.features-text .stand-out:focus {
  border-bottom: 4px solid hsl(7, 99%, 70%);
}

/* last part */
.last {
  height: 50vh;
  overflow: hidden;
}
.features-imgtext {
  flex: 1;
  position: relative;
}
.features-imgtext picture,
.features-imgtext .side-img {
  width: 100%;
  /* height: auto; */
  object-fit: cover; /* keeps aspect ratio, fills area */
}
.text {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
}

.text h2 {
  font-size: 2rem;
  font-family: "Fraunces", serif;
  margin-bottom: 25px;
  text-align: center;
}
.text p {
  font-weight: 500;
  font-size: 1.15rem;
  font-family: "Barlow", sans-serif;
  max-width: 367px;
  text-align: center;
}
.cherry {
  color: hsl(167, 40%, 24%);
}
.orange {
  color: hsl(198, 62%, 26%);
}
.testimonial-container {
  padding: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: hsl(30, 33%, 98%);
}
.testimonial-container h2 {
  color: hsl(232, 10%, 55%);
  letter-spacing: 4px;
  font-family: "Fraunces", serif;
}
.testimonia-wrapper {
  display: flex;
  gap: 30px;
  padding: 30px 30px 0 30px;
}
.testimonial {
  margin: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
}
.testimonial-img {
  height: 65px;
  width: 65px;
  border-radius: 50%;
}
.testimonial-img img {
  height: 100%;
  width: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.testimonial p {
  max-width: 300px;
  text-align: center;
  color: hsl(213, 9%, 39%);
  font-family: "Barlow", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
}
.testimonial .authorinfo {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.testimonial .authorinfo h3 {
  color: hsl(212, 27%, 19%);
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  font-weight: 700;
}
.authorinfo .status {
  color: hsl(210, 4%, 67%);
  font-weight: 600;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
}
.gallery > div {
  flex: 1 1 calc(25%);
  overflow: hidden;
}
.milk-bottle img,
.orange img,
.cone img,
.sugar-cubes img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease-out;
  cursor: pointer;
}
.milk-bottle img:hover,
.orange img:hover,
.cone img:hover,
.sugar-cubes img:hover {
  transform: scale(1.3);
}
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px;
  background-color: hsl(168, 45%, 70%);
  color: hsl(168, 34%, 26%);
}
.footer > div {
  flex: 1 1 calc(100%);
}
.websiteName h1 {
  font-family: "Barlow", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 10px 0 20px 0;
}
.links ul {
  display: flex;
  gap: 40px;
  list-style: none;
  padding: 20px 0 40px 0;
}
.links ul a {
  text-decoration: none;
  font-size: 1.15rem;
  font-family: "Barlow", sans-serif;
  color: hsl(168, 34%, 26%);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease-in;
}
.links ul a:hover,
.links ul a:focus {
  color: hsl(0, 100%, 100%);
}
.social {
  padding-top: 50px;
  display: flex;
  gap: 20px;
}
.social a {
  text-decoration: none;
  font-size: 1.5rem;
  color: hsl(168, 34%, 26%);
  transition: all 0.3s ease-in;
}
.social a:hover,
.social a:focus {
  color: hsl(0, 100%, 100%);
  transform: translateY(-2px);
}
.scrollUp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 10px;
  background-color: hsl(167, 40%, 24%);
  border-radius: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  display: none;
  cursor: pointer;

  /* button resets */
  border: none;
  color: hsl(0, 100%, 100%);
  font-size: 1.6rem;
}

.scrollUp:focus {
  outline: 2px solid yellow;
  outline-offset: 4px;
}

/* last part */
@media (max-width: 1050px) {
  .features-text h2 {
    font-size: 2rem;
  }
  .features-text p {
    font-size: 1rem;
  }
  .text h2 {
    font-size: 1.6rem;
  }
  .text p {
    font-size: 1rem;
  }
  .testimonia-wrapper {
    flex-direction: column;
    gap: 20px;
    padding: 30px 0 0 0;
  }
  .testimonial-container {
    padding: 70px 20px 70px 20px;
  }
  .gallery > div {
    flex: 1 1 calc(50%);
  }
  .milk-bottle img,
  .orange img,
  .cone img,
  .sugar-cubes img {
    max-height: 434px;
    display: block;
  }
}

@media (max-width: 900px) {
  .features-content {
    flex-direction: column-reverse;
    display: flex;
  }

  .reverse {
    flex-direction: column;
  }

  .features-img img {
    width: 100%;
    max-height: 400px;
    object-fit: cover; /* keeps proportions but fills height */
  }

  .text-wrapper {
    padding: 6rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .features-imgtext picture,
  .features-imgtext .side-img {
    width: 100%;
    max-height: 800px;
    object-fit: cover;
    object-position: center 20%;
    display: block;
  }
}

/* media queries */
@media (min-width: 901px) {
  .features-img img.side-img {
    height: 100%; /* only force full height on desktop */
  }

  .features-imgtext .side-img {
    height: 100%;
  }
}
@media (max-width: 750px) {
  .hamburger {
    display: block;
  }
  .hamburger.active .dot:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .dot:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .dot:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: absolute;
    top: 80px; /* a bit below navbar */
    left: 50%;
    transform: translateX(-50%);
    background-color: hsl(0, 100%, 100%);
    padding: 30px 20px;
    width: 85%;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    list-style: none;
    border-radius: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
  }
  .nav-menu a {
    color: hsl(213, 9%, 39%);
    transition: all 0.3s ease-in;
  }
  .nav-menu a:hover,
  .nav-menu a:focus {
    border-bottom: 2px solid hsl(213, 9%, 39%);
  }

  .nav-menu button {
    background-color: hsl(51, 100%, 49%);
  }
  .nav-menu button:hover {
    background-color: hsl(51, 78%, 56%);
  }
}

@media (max-width: 430px) {
  .head h1 {
    font-size: 2rem;
    letter-spacing: 5px;
    word-spacing: 3px;
    text-align: center;
  }
  .testimonial {
    margin: 40px 0 0 0;
  }
  .testimonial-container h2 {
    text-align: center;
    line-height: 1.5;
  }
}

@media (max-width: 406px) {
  .text h2 {
    font-size: 1.2rem;
  }
}
