@charset "UTF-8";

/* =====================
  menu
===================== */
@layer style {
  /* =====================
    sp-menu
  ===================== */
  .sp-menu {
    position: fixed;
    inset-block-start: 32px;
    inset-inline-end: 40px;
    z-index: 25;
    display: block grid;
    gap: 6px;
    place-content: center;
    align-self: flex-start;
    inline-size: 46px;
    aspect-ratio: 1 / 1;
    background: white;
    border: 1px solid currentcolor;
    border-radius: calc(infinity * 1px);
    transition: all 250ms ease 0s;

    @media (any-hover: hover) {
      &:hover {
        color: white;
        background: var(--color-text-primary);
        border: 1px solid var(--color-text-primary);
      }
    }

    @media (width <= 768px) {
      inset-block-start: 6.1vw;
      inset-inline-end: calc((100 / 390) * 16 * 1vw);
      inline-size: calc((100 / 390) * 48 * 1vw);
    }

    &::before,
    &::after {
      inset-inline: auto;
      display: block flow;
      inline-size: 16px;
      block-size: 1px;
      margin-inline: auto;
      content: '';
      background: currentcolor;
      transition: all 350ms var(--easeOutQuart) 0s;

      @media (width <= 768px) {
        inline-size: calc((100 / 390) * 18 * 1vw);
      }
    }
  }

  /* =====================
    nav
  ===================== */
  .sp-nav {
    position: fixed;
    inset: 0;
    z-index: 22;
    display: block grid;
    margin-inline: auto;
    pointer-events: none;
    background: var(--bg);
    opacity: 0;
    filter: blur(0.5rem);
    will-change: opacity;

    @media ((768px < width) and (width <= 1200px)) {
      inline-size: 100%;
    }

    /* ==== wrapper ==== */
    .wrapper {
      position: relative;
      display: block grid;
      grid-template-columns: 57% 1fr;
      grid-auto-flow: column;
      align-items: flex-start;
      justify-content: flex-start;

      @media ((768px < width) and (width <= 1200px)) {
        grid-template-columns: 30% 1fr;
      }

      @media (width <= 768px) {
        display: block flex;
        flex-direction: column;
      }

      &::before {
        display: block flow;
        inline-size: 100%;
        max-inline-size: 827px;
        block-size: 100%;
        content: '';
        background-image: url('../../img/recruit/_common/menu/bg.webp');
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;

        @media (width <= 768px) {
          display: none;
        }
      }
    }

    /* ==== content ==== */
    .content {
      padding-block: 68px;
      padding-inline: 0;

      @media (width <= 768px) {
        inline-size: 100%;
        padding-block: 20vw;
      }
    }

    /* ==== inner ==== */
    .inner {
      display: grid;
      gap: 45px;
      max-block-size: 80vh;
      padding-block-end: 32px;
      padding-inline: 103px;
      overflow-y: auto;

      @media (width <= 768px) {
        gap: 45px;
        padding-block-end: 32px;
        padding-inline: calc((100 / 390) * 32 * 1vw);
      }
    }

    /* ==== nav ==== */
    .nav {
      font-weight: 700;

      ul {
        display: block grid;
        gap: 26.9px;

        @media (width <= 768px) {
          gap: 6.9vw;
          font-size: calc((100 / 390) * 16 * 1vw);
        }

        li {
          font-weight: 700;

          a {
            display: block flow;
          }
        }
      }
    }

    /* ==== entry ==== */
    .entry {
      display: block grid;
      place-content: center;
      align-self: flex-start;
      inline-size: fit-content;
      padding-block: 7.4px;
      padding-inline: 33.4px;
      font-size: 16px;
      font-weight: 700;
      background: white;
      border: 1px solid currentcolor;
      border-radius: calc(infinity * 1px);
      transition: all 250ms ease 0s;

      @media (any-hover: hover) {
        &:hover {
          color: white;
          background: var(--color-text-primary);
        }
      }

      @media (width <= 768px) {
        padding-block: 2vw;
        padding-inline: 8.5vw;
        font-size: calc((100 / 390) * 16 * 1vw);
      }
    }

    /* ==== logo ==== */
    .logo {
      display: block flex;
      gap: 16px;
      align-items: center;
      inline-size: fit-content;
      margin-block-start: 43px;
      font-size: 20px;

      @media (width <= 768px) {
        gap: calc((100 / 390) * 14 * 1vw);
        margin-block-start: calc((100 / 390) * 51 * 1vw);
        font-size: calc((100 / 390) * 20 * 1vw);
      }

      & img {
        filter: brightness(0) saturate(100%) invert(21%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);

        @media (width <= 768px) {
          inline-size: calc((100 / 390) * 93 * 1vw);
          block-size: calc((100 / 390) * 50 * 1vw);
        }
      }
    }

    /* ==== .sub-nav ==== */
    .sub-nav {
      display: block flex;
      gap: 26px;
      align-items: center;
      align-self: flex-start;
      inline-size: fit-content;
      margin-block-start: -12px;
      font-weight: 700;

      @media (width <= 768px) {
        gap: 4.3vw;
        margin-block-start: -4.9vw;
      }

      a {
        display: block flex;
        gap: 7px;
        align-items: center;
        font-size: 13px;

        @media (width <= 768px) {
          gap: 1.5vw;
          font-size: calc((100 / 390) * 12 * 1vw);
        }

        &::after {
          inline-size: 10px;
          aspect-ratio: 1 / 1;
          content: '';
          background-color: currentcolor;
          mask-image: var(--icon-blank);
          mask-repeat: no-repeat;
          mask-position: center;
          mask-size: contain;
          translate: 0 -1px;

          @media (width <= 768px) {
            inline-size: calc((100 / 390) * 10 * 1vw);
            translate: 0 -0.4vw;
          }
        }
      }
    }
  }

  /* =====================
    menu active
  ===================== */
  .menu-on .sp-nav {
    pointer-events: auto;
    opacity: 1;
    filter: blur(0);
    transition: all 250ms ease 0s;
  }

  .menu-on .sp-menu::before {
    transform-origin: 20%;
    rotate: 0 0 1 45deg;
    translate: 1.5px 0;
  }

  .menu-on .sp-menu::after {
    transform-origin: 20%;
    rotate: 0 0 1 -45deg;
    translate: 1.5px 0;
  }
}
