/* Media queries ignore html font-size, instead 1rem = 1em = 16px */

/**************************/
/* BELOW 1200px (Landscape Tablets) */
/**************************/

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

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

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

  .header {
    padding: 0 3.2rem;
  }

  .psychedelic-type-text {
    font-size: 2.6rem;
  }
}

/**************************/
/* BELOW 944px (Tablets) */
/**************************/

@media (max-width: 59em) {
  html {
    /* 8px / 16px = 0.5 = 50% */
    font-size: 50%;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 0 8rem;
    gap: 6.4rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-text-box,
  .hero-img-box {
    text-align: center;
  }

  .hero-img {
    width: 50%;
  }

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

  .grid-explore {
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    column-gap: 1.2rem;
    row-gap: 3.2rem;
  }

  .psychedelic-type {
    width: 80%;
  }

  .psychedelic-type-text {
    font-size: 2.8rem;
  }

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

  .main-nav {
    /* Position to the right and move out of the screen */
    background-color: rgba(255, 255, 255, 0.97);
    position: fixed;
    top: 0;
    right: 0;
    width: 30vw;
    height: 100vh;
    transform: translateX(100%);

    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    transition: all 0.3s ease-in;

    /* Hide visually */
    opacity: 0;
    /* Unaccessible to mouse and keyboard */
    pointer-events: none;
    /* Hide from screen readers */
    visibility: hidden;

    z-index: 999;
  }

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

  .nav-open .icon-mobile-nav[name="close-outline"] {
    display: flex;
    position: fixed;
    right: 3.2rem;
    top: 1.2rem;
  }

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

  .main-nav-list {
    flex-direction: column;
    align-items: flex-end;
    padding: 12.8rem 3.2rem;
  }

  .main-nav-link:link,
  .main-nav-link:visited {
    font-size: 2.4rem;
    text-align: right;
  }

  .main-nav-link.nav-cta:link,
  .main-nav-link.nav-cta:visited {
    padding: 0;
    border-radius: 0;
    color: #000;
    background-color: transparent;
  }

  @media (hover: hover) and (pointer: fine) {
    .main-nav-link.nav-cta:hover {
      color: #ff6f61;
      background-color: transparent;
    }
  }

  .main-nav-link.nav-cta:active {
    color: #ff6f61;
    background-color: transparent;
  }

  .logged-user:link,
  .logged-user:visited {
    font-size: 2rem;
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); /* Dark transparent background */
    opacity: 0;
    pointer-events: none; /* Prevent interaction when hidden */
    transition: opacity 0.3s ease;
    z-index: 900;
  }

  .nav-open + .overlay {
    opacity: 1;
    pointer-events: auto; /* Allows clicking to close */
  }
}

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

@media (max-width: 44em) {
  .hero-img {
    width: 60%;
  }

  .grid-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 6.4rem;
  }

  .grid-explore {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 1.2rem;
    row-gap: 3.2rem;
  }

  .psychedelic-type-text {
    font-size: 2.8rem;
  }
}

/**************************/
/* BELOW 576px (Phones) */
/**************************/

@media (max-width: 36em) {
  .heading-primary {
    font-size: 4.4rem;
  }

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

  .hero {
    padding: 0 3.2rem;
  }

  .hero-text-box {
    margin-bottom: 1.2rem;
  }

  .hero-cta,
  .hero-more {
    padding: 1.6rem 2.4rem;
  }

  .hero-img {
    width: 70%;
  }

  .grid-steps {
    grid-template-columns: repeat(1, 1fr);
    gap: 6.4rem;
  }

  .grid-explore {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 3.2rem;
    column-gap: 1.2rem;
  }

  .psychedelic-type-text {
    font-size: 2.2rem;
  }

  .main-nav {
    width: 40vw;
  }

  .grid-footer {
    grid-template-columns: repeat(2, 1fr);
  }

  .logo-col {
    grid-row: 1;
    grid-column: 1 / -1;
    gap: 3.2rem;
  }
}

/**************************/
/* BELOW 320px (Small phones) */
/**************************/

@media (max-width: 20em) {
  .heading-primary {
    font-size: 3.6rem;
  }

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

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
  }

  .hero-img {
    width: 80%;
  }

  .grid-explore {
    row-gap: 2.4rem;
  }

  .psychedelic-type-text {
    font-size: 2.2rem;
  }

  .footer-heading {
    margin-bottom: 3.2rem;
  }

  .contacts-col {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .resources-col {
    grid-row: 3;
    grid-column: 1 / -1;
  }
}
