/* Only use em when coding in media queries  */

/**********************************/
/* BELOW 1334px (smaller desktops) */
/**********************************/

@media (max-width: 84em) {
  .hero-heading.heading {
    font-size: 5.6rem;
  }

  .hero-subheading {
    font-size: 2.4rem;
  }
}

/**********************************/
/* BELOW 1200px (landscape tablets) */
/**********************************/

@media (max-width: 75em) {
  html {
    font-size: 56.25%;
  }

  .hero-container.container {
    max-width: 120rem;
  }
}

/**********************************/
/* BELOW 1056px (tablets portrait) */
/**********************************/

@media (max-width: 66em) {
  html {
    font-size: 50%;
  }

  .hero-heading.heading {
    font-size: 4.8rem;
  }

  .main-nav-list {
    gap: 3.6rem;
  }

  /* Hide default nav and make full-screen mobile menu */
  .header .main-nav-list {
    position: fixed;           /* cover viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;              /* full height */
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;   /* vertically center links */
    align-items: center;       /* horizontally center links */
    transform: translateX(-100%); /* hide off-screen left */
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 999;              /* above other content */
  }
      
  /* Mobile nav open */
  .header.nav-open .main-nav-list {
    transform: translateX(0);  /* slide into view */
    background-color: #f8f4f9; /* full screen background */
  }

  .project-container {
    column-gap: 9.6rem;
  }

  .container {
    margin-bottom: 8rem;
  }

  .project-number {
    font-size: 6.2rem;
  }

  .gap {
    gap: 7.4rem;
  }

  .p-list li p {
    font-size: 1.8rem;
  }

  /* .gap-c {
    column-gap: 2.4rem;
  }
  
  .gap-c-2 {
    column-gap: 9.6rem;
  } */
}

/**********************************/
/* BELOW 960px (tablets portrait) */
/**********************************/

@media (max-width: 60em) {
  .container {
    margin-bottom: 5.6rem;
  }

  .grid--4-cols {
    grid-template-columns: 1fr 1fr;
    row-gap: 3.6rem;
  }

  .heading {
    font-size: 3rem;
    margin-bottom: 3.6rem;
  }

  .reason-box {
    width: 100%;
  }

  .hero-subheading {
    font-size: 2rem;
  }

  .hero-text-container {
    padding-left: 2.4rem;
  }

  .query-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .marg-b {
    margin-bottom: 0;
  }

  /* MOBILE NAV */
  .btn-mobile-nav {
    display: block;
    z-index: 9999;
  }

  .main-nav-list {
    flex-direction: column;
    gap: 4.8rem;
  }

  .main-nav-link:link,
  .main-nav-link:visited {
    font-size: 3rem;
  }

  .main-nav {
    background-color: rgba(255, 255, 255, 0);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transform: translateX(100%);

    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease-in;

    /* #1 hide element visually  */
    opacity: 0;

    /* #2 unaccessible to mouse and keyboard  */
    pointer-events: none;

    /* #3 hide it from screen readers  */
    visibility: hidden;
  }

  .nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
  }

  .nav-open .icon-mobile-nav[name="close-outline"] {
    display: block;
  }

  .nav-open .icon-mobile-nav[name="menu-outline"] {
    display: none;
  }

  .book-quote {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .list {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4rem;
  }

  .cover {
    width: 100%;
  }

  .text-align {
    text-align: center;
  }
}

/**********************************/
/* BELOW 704px (smaller tablets) */
/**********************************/

@media (max-width: 44em) {
  .hero-description {
    font-size: 1.8rem;
  }

  /* .gradient-background {
    padding-top: 3.6rem;
  } */

  .hero-content {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    gap: 2.4rem;
  }

  .hero-text-container {
    border-radius: 9px;
    order: 1;
    padding: 4.8rem;
    width: 80%;
  }

  .hero-img-foreground {
    order: 2;
    border-radius: 9px;
    width: 80%;
  }

  .hero-img-foreground:hover {
    transform: none;
  }

  .btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .reference-box {
    display: flex;
    justify-content: center;
  }

  .grid--2-cols,
  .grid--3-cols,
  .thirds-left,
  .thirds-right {
    grid-template-columns: 1fr;
  }

  .grid--2-cols--book {
    grid-template-columns: 1fr;         /* one column */
    grid-template-rows: repeat(2, auto); /* three rows that fit their content */
  }

  .heading-2 {
    font-size: 3rem;
  }

  .project-container {
    gap: 3.6rem;
  }
  .project-img-box {
    width: 80%;
    grid-row: 2 /3;
    justify-content: center;
    margin: 0 auto;
  }

  .project-container.container {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, auto);
    row-gap: 2rem;
    justify-items: center; /* centers child elements horizontally */
  }

  .img {
    padding: 1.6rem;
  }

  .img:hover {
    padding: 1.2rem;
  }

  .p-img {
    grid-row: 1 / 2;
    width: 75%;
    justify-self: center;
  }

  .spotify-box {
    display: flex;
    width: auto;
    justify-content: center;
    gap: 1.6rem;
  }

  .pod-episode {
    width: 50%;
    margin-bottom: 0;
  }

  .p-list {
    grid-template-columns: 1fr;
    row-gap: 1.6rem;
    width: 100%;
  }

  .inv-btn:link,
  .inv-btn:visited {
    width: 40vw;
  }

  .cover-img {
    padding: 1.2rem;
  }

  .gap {
    column-gap: 2.4rem;
  }

  .icon-large {
    position: relative;
    width: 50%;
    margin: 0 auto;
  }

  .icon-large--smaller {
    width: 30%;
  }

  .icon-box {
    grid-column: 1 / 2;
    display: flex;
    justify-content: center;
  }
  .right-col {
    grid-column: 1 / 2;
    text-align: center;
    width: 100%;
    margin: 0 auto;
  }

  .project-description-box {
    grid-row: 1 /2;
  }

  .grid-padding {
    padding-bottom: 3.6rem;
  }

  .grid--5-cols {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 1.6rem;
  }

  .logo-col {
    grid-column: 1 / -1;

    justify-content: center;
    align-items: center;
  }

  .footer-logo {
    display: flex;
    justify-content: center;
    width: 30%;
  }

  .sig-white {
    display: block;
  }

  .list {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
}

/**********************************/
/* BELOW 544px (smaller tablets) */
/**********************************/

@media (max-width: 34em) {
  .grid--2-cols,
  .grid--3-cols,
  .grid--4-cols {
    grid-template-columns: 1fr;
  }

  .hero-text-container {
    width: 100%;
  }

  .hero-img-foreground {
    width: 100%;
  }

  .explanation p {
    text-align: center;
  }

  .grid--5-cols {
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
    gap: 2.4rem;
  }
}

/* fixing flexbox in safari  */

.no-flexbox-gap .main-nav-list li:not(:last-child) {
  margin-right: 4.8rem;
}

.no-flexbox-gap .list-item:not(:last-child) {
  margin-bottom: 1.6rem;
}

.no-flexbox-gap .list-icon:not(:last-child) {
  margin-right: 1.6rem;
}

.no-flexbox-gap .delivered-faces {
  margin-right: 1.6rem;
}

.no-flexbox-gap .meal-attribute:not(:last-child) {
  margin-bottom: 2rem;
}

.no-flexbox-gap .meal-icon {
  margin-right: 1.6rem;
}

.no-flexbox-gap .footer-row div:not(:last-child) {
  margin-right: 6.4rem;
}

.no-flexbox-gap .social-links li:not(:last-child) {
  margin-right: 2.4rem;
}

.no-flexbox-gap .footer-nav li:not(:last-child) {
  margin-bottom: 2.4rem;
}

@media (max-width: 75em) {
  .no-flexbox-gap .main-nav-list li:not(:last-child) {
    margin-right: 3.2rem;
  }
}

@media (max-width: 59em) {
  .no-flexbox-gap .main-nav-list li:not(:last-child) {
    margin-right: 0;
    margin-bottom: 4.8rem;
  }
}