/* Here, 1rem = 1em = 16px */

/**************************/
/* Below 1345px (Smaller desktops) */
/**************************/
@media (max-width: 84em) {
  .section-hero {
    padding: 3.2rem 0 9.6rem 0;
  }

  .hero {
    max-width: 100%;
  }
  .heading-primary {
    font-size: 3.3rem;
    margin-bottom: 2.4rem;
  }

  .hero-cta-text {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4.8rem;
  }

  .hero-cta-input {
    font-size: 1.4rem;
  }

  .grid-identity {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    column-gap: 8rem;
    row-gap: 8rem;
  }

  .identity-1 {
    justify-self: end;
  }

  .identity-2 {
    justify-self: start;
  }

  .identity-3 {
    justify-self: center;
    grid-column: 1/3;
  }
}

/**************************/
/* Below 1200px (Smaller desktops) */
/**************************/

@media (max-width: 75em) {
  html {
    /* 9px / 16px = 56.25% */
    font-size: 56.25%;
  }

  .grid {
    column-gap: 4.8rem;
    row-gap: 6.4rem;
  }

  .heading-secondary {
    font-size: 3.6rem;
  }

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

  .identity-description h2 {
    font-size: 3.6rem;
  }

  .heading-tertiary {
    font-size: 3.2rem;
  }

  .identity-item-heading {
    font-size: 3rem;
  }

  .identity-item-text {
    font-size: 2.4rem;
  }
}

/**************************/
/* Below 980px (Tablets) */
/**************************/
@media (max-width: 61.25em) {
  html {
    /* 8px/16px = 50% */
    font-size: 50%;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 3.2rem 3.2rem;
    gap: 9.6rem;
  }

  .hero::before {
    top: -2%;
    left: 0%;
    width: 100%;
    height: 50%;
    border-radius: 0 0 15px 15px;
  }

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

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

  .hero-img {
    width: 95%;
  }

  .hero-cta {
    width: 70%;
  }

  .hero-cta-text {
    font-size: 3.6rem;
    width: 100%;
  }

  .hero-cta-input {
    font-size: 2rem;
  }

  .identity-item {
    padding: 2.4rem;
    width: 36rem;
    height: 36rem;
  }

  .cta {
    grid-template-columns: 2fr 1fr;
  }

  .step-number {
    font-size: 7.4rem;
  }

  .section-hero {
    padding: 3.2rem 0 4.8rem 0;
  }

  .section-identity {
    padding-bottom: 8rem;
  }

  .section-how,
  .section-cta,
  .footer {
    padding: 6.4rem 0;
  }

  .cta-text-box {
    padding: 4.8rem 4.8rem 4.8rem;
    color: #541311;
  }
}

/**************************/
/* Below 832px (Mobile) */
/**************************/
@media (max-width: 52em) {
  .hero::before {
    top: -2%;
    height: 46%;
  }

  .btn-mobile-nav {
    display: block;
    z-index: 9999;
  }

  .main-nav {
    background-color: rgba(255, 228, 196, 0.9);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    transform: translateX(100%);

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

    /* Hide navigation */
    /* 1). Hide nav visually */
    opacity: 0;

    /* 2). Make it 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;
  }

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

  .main-nav-link:link,
  .main-nav-link:visited {
    font-size: 2.8rem;
    font-weight: 500;
    color: #333;
  }

  .identity-item-heading {
    font-size: 3.6rem;
    line-height: 1.1;
  }
}

/**************************/
/* Below 704px (Mobile Middle) */
/**************************/
@media (max-width: 44em) {
  html {
    /* 7px/16px = 43.75 */
    font-size: 43.75%;
  }

  .hero::before {
    top: -1.8%;
    height: 45%;
  }

  .hero-img {
    width: 100%;
  }

  .grid {
    row-gap: 6.4rem;
  }

  .heading-secondary {
    margin-bottom: 3.6rem;
  }

  .grid-identity {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
  }

  .identity-item {
    grid-template-rows: 1fr 1fr;
    row-gap: 0;
  }

  .identity-1 {
    justify-self: center;
  }

  .identity-2 {
    justify-self: center;
  }

  .identity-3 {
    justify-self: center;
    grid-column: 1 / -1;
  }

  .step-icon-box::before {
    width: 50%;
    padding-bottom: 50%;
  }

  .step-icon-box::after {
    width: 40%;
    padding-bottom: 40%;
  }

  .step-icon {
    height: 18rem;
  }

  .cta {
    grid-template-columns: 3fr 2fr;
  }

  .cta-form .btn--form {
    margin-top: 2.4rem;
  }

  .section-hero {
    padding: 2.4rem 0 3.2rem 0;
  }

  .section-identity {
    padding-bottom: 6.4rem;
  }

  .identity-description {
    margin: 4.8rem auto;
  }

  .grid-identity {
    row-gap: 6.4rem;
  }

  .section-how,
  .section-cta,
  .footer {
    padding: 4.8rem 0;
  }

  .cta {
    grid-template-columns: 1fr;
  }

  .cta-form {
    grid-template-columns: 1fr;
    width: 100%;
    margin: 0 auto;
  }

  .cta-text {
    line-height: 1.6;
  }

  .cta-text-box {
    padding: 6.4rem 6.4rem 6.4rem;
  }

  .cta-input {
    padding: 1.6rem;
  }

  .btn--form {
    padding: 1.2rem;
    font-size: 2.4rem;
  }

  .cta-img-box {
    height: 32rem;
    grid-row: 1;
    background-position-y: 70%;
  }
}

/**************************/
/* Below 544px (Phone) */
/**************************/
@media (max-width: 34em) {
  .logo {
    height: 3rem;
  }

  .icon-mobile-nav {
    height: 3rem;
  }

  .sticky .header {
    height: 4rem;
  }

  .sticky .logo {
    height: 3rem;
  }

  .identity-item {
    padding: 1.6rem;
    width: 32rem;
    height: 32rem;
  }

  .identity-item-heading {
    font-size: 3.6rem;
  }

  .identity-item-text {
    font-size: 2.4rem;
  }

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

  .section-hero {
    padding: 1.6rem 0 2.4rem 0;
  }

  .hero {
    padding: 1.2rem;
    gap: 4.8rem;
  }

  .hero::before {
    top: -1.3%;
    height: 40%;
  }

  .hero-description {
    padding: 0 2.4rem;
  }

  .hero-cta {
    width: 100%;
    padding: 0 3.2rem;
  }

  .hero-cta-form section {
    width: 90%;
    margin: 0 auto;
  }

  .hero-cta-text,
  .identity-description {
    line-height: 1.2;
    margin-bottom: 3.2rem;
  }

  .grid--2-cols {
    grid-template-columns: 1fr;
    row-gap: 3.2rem;
  }

  .section-how,
  .section-cta,
  .footer {
    padding: 3.2rem 0;
  }

  .subheading {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
  }

  .step-icon-1 {
    grid-row: 1/2;
  }
  .step-text-1 {
    grid-row: 2/3;
  }

  .step-icon-3 {
    grid-row: 5/6;
  }
  .step-text-3 {
    grid-row: 6/7;
  }

  .margin-bottom-md {
    margin-bottom: 3rem;
  }

  .step-icon-box {
    transform: translateY(5rem);
  }

  .step-icon-box::before {
    width: 30%;
    padding-bottom: 30%;
  }

  .step-icon-box::after {
    width: 24%;
    padding-bottom: 24%;
  }

  .step-icon {
    height: 12rem;
  }

  .cta-text-box {
    padding: 3.2rem 2.4rem 2.4rem;
  }

  .cta-text {
    margin-bottom: 2.4rem;
  }

  .cta-img-box {
    height: 24rem;
    grid-row: 1;
    background-position-y: 70%;
  }
}

/**************************/
/* Below 384px (Phone small) */
/**************************/

@media (max-width: 24em) {
  .heading-secondary {
    margin-bottom: 2.4rem;
  }

  .hero-description {
    padding: 1.6rem;
  }

  .hero-cta {
    width: 100%;
  }

  .step-icon-box::before {
    width: 35%;
    padding-bottom: 35%;
  }

  .step-icon-box::after {
    width: 28%;
    padding-bottom: 28%;
  }

  .step-icon {
    width: 10rem;
  }

  .grid--footer {
    column-gap: 2rem;
  }
}

/* Fixing Safari gap */

/*
- Font Size(px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98

- Spacing System (px)
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
*/
