html {
  line-height: 1.15;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
}

main {
  display: block;
}

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

a {
  background-color: transparent;
  text-decoration: none;
}

img {
  border-style: none;
}

body {
  background-color: #DEE3DD;
  font-family: 'Poppins', sans-serif;
  margin: 0;
}

ul {
  list-style-type: none;
  padding-inline-start: 0;
}

picture img {
  height: auto;
  max-width: 100%;
}

/* Widths =====================================================================*/

.contact-form,
.error-text,
.grid-image,
.price-list {
  width: 40%;
}

.about-me-img,
.error-img,
.footer-icon,
.footer-main,
.hero-div,
.logo {
  width: 100%;
}

/* Margins =====================================================================*/

.copyright,
.footer-text,
h2,
.price-desc,
.price,
ul {
  margin-block: 0;
}

.main-heading,
.nav-item {
  margin-left: 2rem;
}

.error-heading,
.pricing-list-item,
.service-list-item {
  margin-bottom: 3rem;
}

.section-heading {
  margin-bottom: 2rem;
}

/* Padding =====================================================================*/

.footer-link,
.logo-container,
.skip-link {
  padding: 0.75rem;
}

.image-container,
.grid-image,
.price-list {
  padding: 3rem;
}

.about-me-text,
.grid-text {
  padding: 4rem;
}

.error-page-main {
  padding: 4rem 2rem;
}

/* Flexbox ======================================================================*/

.about-me,
.contact,
.contact-main,
.error-page-main,
.footer,
.footer-icon,
.footer-icons,
.footer-link,
.footer-main,
.grid,
.grid-col-one,
.grid-col-two,
.grid-text,
.header,
.hero-div,
.nav-list,
.main,
.main-error-div,
.price-div {
  display: flex;
}

.contact,
.error-page-main,
.footer,
.footer-link,
.grid-col-one,
.grid-col-two,
.grid-text,
.main {
  flex-direction: column;
}

.about-me,
.contact-main,
.footer,
.footer-link,
.footer-main,
.grid,
.header,
.hero-div,
.main-error-div {
  align-items: center;
}

.footer-main,
.header,
.price-div {
  justify-content: space-between;
}

.about-me,
.contact-main,
.footer {
  justify-content: space-around;
}

.error-page-main,
.grid-text {
  justify-content: center;
}

.footer-icon,
.footer-icons {
  justify-content: flex-end;
}

/* Fonts =========================================================================*/

.body-text,
.error-link {
  font-family: 'Merriweather', serif;
}

.body-text,
h1,
h2,
.nav-item,
.subheading,
.section-heading {
  font-weight: 300;
}

.error-heading {
  font-weight: 400;
}

.body-text,
.email-link,
.error-link,
.nav-item {
  font-size: 20px;
  font-size: 1.25rem;
}

.subheading {
  font-size: 24px;
  font-size: 1.5rem;
}

.main-heading-navbar,
.section-heading {
  font-size: 28px;
  font-size: 1.75rem;
}

/* Colors =====================================================================*/

.footer,
.footer-link,
.footer-main,
.hero-div,
.hero-div a,
.top-div .image-attr,
.link-animated-footer,
.main-heading-navbar,
.nav-link {
  color: #fff;
}

.about-me-text,
.contact,
.error-text,
.grid-text,
.price-list {
  background-color: #fff;
}

/* Purple */

.footer,
.header {
  background-color: #50436e;
}

.body-text,
.email-link,
.image-attr,
.image-attr a,
.skip-link:focus-visible,
.voucher-link {
  color: #50436e;
}

/* Dark Purple Text */

.about-me-text,
.error-body,
.error-link {
  color: #3C3A53;
}

/* Reveal */

.reveal {
  position: relative;
  opacity: 0;
  transition: 2s all ease;
}

.reveal.active {
  opacity: 1;
}

/* Image Attribution */

.image-attr {
  bottom: 0;
  margin: 0 3rem 1rem 0;
  padding: 0.15em;
  position: absolute;
  text-decoration: underline;
  text-underline-offset: 0.1em;
  right: 0;
}

.image-attr:focus-visible {
  outline: 1px solid #50436e;
  text-decoration: none;
}

.hero-div .image-attr {
  margin: 0 1rem 1rem 0;
}

.hero-div a:focus-visible {
  outline: 1px solid #EEE8F2;
}

/* Header  */

/* Skip Link */

.skip-link {
  left: 0;
  position: absolute;
  text-align: center;
  top: 0;
  transform: translateX(-100%);
  /* transition: transform 0.1s; */
  z-index: 3;
}

.skip-link:focus-visible {
  background-color: #fff;
  height: 3%;
  left: 40%;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transform: translateX(0);
  width: 20%;
}

.header {
  padding: 1rem;
}

.logo-container {
  width: 8%;
}

.logo-container:focus-visible {
  border-radius: 10px;
  outline: 1px solid #EEE8F2;
}

.logo {
  border-radius: 10px;
  height: auto;
}

.main-heading {
  color: #fff;
  font-size: 48px;
  font-size: 3rem;
  position: absolute;
  top: 35%;
  z-index: 1;
}

.nav-link {
  padding: 0 0.5rem;
}

.nav-link:focus-visible {
  border-radius: 5px;
  outline: 1px solid #EEE8F2;
}

/* Footer */

.footer {
  height: 250px;
  padding: 1rem 2rem 0;
}

.footer-logo {
  border-radius: 10px;
  height: auto;
  width: 10%;
}

.footer-icons {
  width: 25%;
}

.footer-link:focus-visible {
  border-radius: 10px;
  outline: 1px solid #EEE8F2;
}

.footer-img {
  margin-bottom: 1rem;
  width: 30%;
}

.copyright a {
  text-decoration: underline;
  text-decoration-color: #DEE3DD;
  text-underline-offset: 0.2em;
}

.copyright a:focus-visible {
  outline: 1px solid #EEE8F2;
}

.top-div {
  position: relative;
}

.hero-div {
  background-image: url(images/baby-filter.png);
  background-size: cover;
  height: 800px;
  position: relative;
}

/* Grid */

.grid {
  flex-wrap: wrap;
  padding: 6rem 2rem 4rem;
}

.grid-image {
  border: 2px solid #fff;
  margin: 5rem auto;
  position: relative;
}

#baby-feet {
  margin: 0 auto 5rem;
}

.grid-text {
  margin: 0 auto;
  width: 30%;
}

.services-list {
  list-style-type: disc;
}

.service-list-item:last-child {
  margin-bottom: 0;
}

/* About Section */

.about-me {
  border: 2px solid #fff;
  margin: 0 auto 5rem;
  padding: 5rem 2rem;
  width: 90%;
}

.about-img-container,
.about-me-text {
  width: 35%;
}

.about-me-img {
  height: auto;
}

/* Contact */

.contact {
  padding: 5rem;
  width: 30%;
}

.email-link {
  width: fit-content;
}

/* Pricing */

.pricing-list-item .subheading{
  margin-block-start: 0;
}

.voucher-link {
  text-decoration: underline;
  text-decoration-color: #50436e;
}

.email-link:focus-visible,
.voucher-link:focus-visible {
  outline: 1px solid #50436e;
  text-decoration: none;

}

/* 404 page */

.error-page-main {
  height: 600px;
}

.main-heading-navbar {
  margin: 0 auto 0 1rem;
}

.main-error-div {
  justify-content: space-evenly;
}

.image-container {
  border: 2px solid #fff;
  position: relative;
  width: 40%;
}

.error-img {
  border-radius: 5px;
}

#error-img-attr {
  margin: 0 3rem 1rem 0;
}

.error-text {
  padding: 5rem 1rem;
  text-align: center;
}

.error-heading {
  font-size: 36px;
  font-size: 2.25rem;
}

.error-body {
  margin: 0 auto 3rem;
  width: 85%;
}

.error-link {
  display: block;
  margin: auto;
  text-decoration: underline;
  text-underline-offset: 0.1em;
  width: fit-content;
}


.error-link:focus-visible {
  outline: 2px solid #50436e;
}

/* Media Queries ==============================================================*/

/* Tablet */

@media only screen and (max-width:992px) {

  .about-me,
  .grid,
  .main-error-div {
    flex-direction: column;
  }

  .grid-text,
  .main-heading {
    width: 80%;
  }

  .about-me,
  .about-me-text,
  .grid-image {
    width: 85%;
  }

  .image-container,
  .service-list-item {
    margin-bottom: 4rem;
  }

  .grid-image {
    padding: 3rem;
  }

  .footer-text,
  .nav-item {
    font-size: 20px;
    font-size: 1.25rem;
  }

  .body-text,
  .footer-text,
  .main-heading-navbar {
    font-size: 24px;
    font-size: 1.5rem;
  }

  .about-me .section-heading,
  #contact .section-heading {
    font-size: 32px;
    font-size: 2rem;
  }

  .section-heading {
    font-size: 40px;
    font-size: 2.5rem;
    text-align: center;
  }

  .subheading {
    font-size: 28px;
    font-size: 1.75rem;
    margin-block-end: 0;
    text-align: center;
  }

  /* Header */

  .logo-container {
    width: 15%;
  }

  /* Footer */

  .copyright {
    margin-block: 0.25em;
  }

  .footer-logo {
    width: 20%;
  }

  .footer-icons {
    width: 50%;
  }

  .footer-img {
    margin-bottom: 0;
  }

  /* Home Page */

  .main-heading {
    font-size: 52px;
    font-size: 3.25rem;
    left: 10%;
    margin: auto;
    text-align: center;
  }

  .top-div .image-attr {
    right: -2rem;
  }

  .grid {
    padding: 4rem 2rem 0;
  }

  .grid-text {
    line-height: 1.5;
    text-align: center;
  }

  #what-is {
    order: 1;
  }

  #holding-baby {
    order: 2;
  }

  #services {
    margin-bottom: 5rem;
    order: 3;
  }

  #baby-feet {
    order: 4;
  }

  #pricing {
    order: 5;
  }

  #contact {
    order: 6;
  }

  .about-me {
    padding: 4rem 2rem;
    text-align: center;
  }

  .about-me-text {
    line-height: 1.5;
    order: 1;
    width: 80%;
  }

  .about-img-container {
    order: 2;
    width: 55%;
  }

  .about-me-img {
    margin: 5rem auto 0;
    width: 100%;
  }

  .services-list {
    list-style-type: none;
  }

  /* Contact */

  .contact {
    align-items: center;
    margin: 5rem auto;
    padding: 4rem;
    width: 80%;
  }

  /* Error Page */

  .error-page-main {
    height: initial;
  }

  .main-heading-navbar {
    margin: 0 auto;
    text-align: center;
    width: 40%;
  }

  .image-container {
    width: 80%;
  }

  .error-text {
    padding: 4rem 0.5rem;
    width: 90%;
  }

  .error-heading {
    font-size: 28px;
    font-size: 1.75rem;
  }

}

/* Phone /////////////////////////////////////////////////////////////////////*/

@media only screen and (max-width: 688px) {

  .footer-img,
  .footer-logo {
    width: 25%;
  }

  .image-container {
    padding: 1rem;
  }

  .about-me,
  .error-page-main,
  .grid-image,
  .grid-text {
    padding: 2rem 1rem;
  }

  .about-me-text,
  .error-page-main,
  .error-text {
    padding: 2rem;
  }

  .error-heading {
    margin-bottom: 2rem;
  }

  .body-text,
  .email-link,
  .error-link,
  .footer-text,
  .main-heading-navbar,
  .nav-item {
    font-size: 16px;
    font-size: 1rem;
  }

  .about-me .section-heading,
  #contact .section-heading {
    font-size: 28px;
    font-size: 1.75rem;
  }

  .section-heading {
    font-size: 24px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .subheading {
    font-size: 24px;
    font-size: 1.25rem;
    text-align: center;
  }

  /* Header & Hero Section */

  .header {
    padding: 0.5rem;
  }

  .logo-container {
    width: 20%;
  }

  .hero-div {
    background: url(images/baby-filter-mobile.jpg) bottom/cover;
    height: 600px;
  }

  .main-heading {
    font-size: 48px;
    font-size: 3rem;
  }

  /* Footer */

  .footer {
    height: 200px;
    justify-content: space-evenly;
    padding: 0 1rem;
  }

  .footer-icons {
    width: 75%;
  }

  .footer-icon {
    width: 80%;
  }

  .footer-img {
    margin-bottom: 0.25rem;
    width: 20%;
  }

  .copyright {
    font-size: 12px;
    font-size: 0.75rem;
  }

  /* Home Page */

  .top-div .image-attr {
    right: 0;
  }

  .grid {
    padding: 2rem 1rem 0;
  }

  .grid-image {
    margin: 3rem auto;
    width: 90%;
  }

  .grid-text {
    width: 90%;
  }

  .image-attr {
    font-size: 12px;
    font-size: 0.75rem;
    margin: 1rem;
  }

  .about-img-container {
    width: 55%;
  }

  .about-me-img {
    margin: 2rem auto 0;
  }

  .service-list-item {
    margin-bottom: 3rem;
  }

  #pricing-heading {
    margin-bottom: 2rem;
  }

  /* Contact */

  .contact {
    padding: 4rem 2rem;
    width: 80%;
  }

  /* Error Page */

  .error-header {
    flex-wrap: wrap;
  }

  .error-nav {
    border-top: 1px solid #DEE3DD;
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    width: 100%;
  }

  .error-nav .nav-list {
    justify-content: space-evenly;
    width: 100%;
  }

  .error-nav .nav-item {
    margin-left: 0;
  }

  .main-heading-navbar {
    text-align: center;
    width: 50%;
  }

  .image-container {
    width: 95%;
  }

  .error-text {
    width: 85%;
  }

  .error-heading {
    font-size: 20px;
    font-size: 1.25rem;
  }

  .error-body {
    margin: 0 auto 1rem;
    width: 90%;
  }

  #error-img-attr {
    margin: 0 1rem 0.25rem 0;
  }

}

/* Hover Styles =================================================================*/

@media (hover:hover) and (pointer:fine) {

  /* Animated Links */

  .link-animated {
    background: linear-gradient(0deg, #50436e, #50436e) no-repeat right bottom /0 var(--bg-h);
    --bg-h: 100%;
  }

  .link-animated-footer {
    background: linear-gradient(0deg, #DEE3DD, #DEE3DD) no-repeat right bottom /0 var(--bg-h);
    --bg-h: 100%;
  }

  /* If they have not shown a preference for reduced */
  /* motion, then allow the transition to happen.    */
  @media (prefers-reduced-motion: no-preference) {
    .link-animated {
      transition: background-size 350ms;
    }
  }

  .link-animated:where(:hover) {
    background-size: 100% var(--bg-h);
    background-position-x: left;
    outline: none;
  }

  .underline {
    padding-bottom: .05em;
    --bg-h: .2em;
  }

  .logo-container:hover {
    border-radius: 10px;
    outline: 2px solid #DEE3DD;
  }

  .nav-link:hover {
    background-color: #DEE3DD;
    border-radius: 5px;
    color: #50436e;
  }

  .footer-link:hover {
    border-radius: 10px;
    outline: 2px solid #DEE3DD;
  }


}