@charset "UTF-8";

@layer utility {
  /* =====================
    u-inner
  ===================== */
  .u-inner {
    max-inline-size: 1120px;
    margin-inline: auto;

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

  /* =====================
    u-hover
  ===================== */
  .u-hover {
    transition: opacity 0.3s ease-in-out;
    will-change: opacity;

    @media (any-hover: hover) {
      &:hover {
        opacity: 0.7;
      }
    }
  }

  /* =====================
    u-anchor
  ===================== */
  .u-anchor {
    position: relative;
    display: block grid;
    grid-auto-flow: column;
    gap: 25px;
    align-items: center;
    justify-content: flex-start;
    inline-size: fit-content;
    padding-block: 5px;
    font-family: var(--yumin);
    font-weight: 600;
    line-height: 1.8;
    text-decoration: underline;

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

    &::before {
      position: absolute;
      inset-block-start: 50%;
      inset-inline-end: 8px;
      display: block;
      inline-size: 23px;
      aspect-ratio: 23 / 7;
      content: '';
      background-color: white;
      mask-image: var(--icon-arrow);
      mask-repeat: no-repeat;
      mask-position: center;
      mask-size: contain;
      translate: 0 -50%;
      transition: transform 250ms ease 0s;
      will-change: transform;
    }

    @media (width <= 768px) {
      &::before {
        inset-inline-end: calc((100 / 390) * 8 * 1vw);
        inline-size: calc((100 / 390) * 23 * 1vw);
      }
    }

    &::after {
      inline-size: 40px;
      aspect-ratio: 1 / 1;
      pointer-events: none;
      content: '';
      background: var(--primary);
      border-radius: calc(infinity * 1px);
      box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 50%, transparent);
      transition: background 250ms ease 0s, border-color 250ms ease 0s;
    }

    @media (width <= 768px) {
      &::after {
        inline-size: calc((100 / 390) * 40 * 1vw);
        box-shadow: 0 0 0 calc((100 / 390) * 5 * 1vw) color-mix(in srgb, var(--primary) 50%, transparent);
      }
    }

    @media (any-hover: hover) {
      &:hover {
        text-decoration: none;

        &::before {
          background: var(--primary);
          transform: translateX(5%);
        }

        &::after {
          background: white;
          box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 100%, transparent);
        }
      }
    }

    &[data-underline='false'] {
      text-decoration: none;
    }
  }

  /* ==== 白 ==== */
  .u-anchor[data-color='white'] {
    &::before {
      background-color: var(--primary);
    }

    &::after {
      background: white;
      box-shadow: 0 0 0 5px color-mix(in srgb, white 30%, transparent);
    }

    @media (width <= 768px) {
      &::after {
        box-shadow: 0 0 0 calc((100 / 390) * 5 * 1vw) color-mix(in srgb, white 30%, transparent);
      }
    }

    @media (any-hover: hover) {
      &:hover {
        &::before {
          background-color: white;
        }

        &::after {
          background: var(--primary);
          box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 30%, transparent);
        }
      }
    }
  }

  /* ==== blank ==== */
  .u-anchor[target='_blank'] {
    &::before {
      inset-inline-end: 13px;
      inline-size: 13px;
      aspect-ratio: 1 / 1;
      mask-image: var(--icon-blank);
    }
  }

  /* =====================
    u-vertical
  ===================== */
  .u-vertical {
    writing-mode: vertical-lr;
    text-orientation: upright;
  }

  /* =====================
    u-mv
  ===================== */
  .u-mv {
    display: block grid;
    grid-template-columns: 1fr auto;
    gap: 35px 0;
    padding-block: 242px 0;
    padding-inline-start: 80px;

    @media (width <= 768px) {
      display: block flex;
      flex-direction: column;
      gap: 0;
      padding-block-start: 42.4vw;
      padding-inline-start: calc((100 / 390) * 16 * 1vw);
    }

    /* ==== hgroup ==== */
    & hgroup {
      display: block grid;
      grid-area: 1 / 1 / 2 / 2;
      grid-auto-flow: column;
      gap: 25px;
      align-items: flex-end;
      justify-content: flex-start;

      @media (width <= 768px) {
        display: block flex;
        flex-direction: column;
        gap: 4.5vw;
        align-items: flex-start;
        margin-block-end: calc((100 / 390) * 25 * 1vw);
      }

      /* en */
      & [lang='en'] {
        font-family: var(--oswald);
        font-size: 100px;
        font-weight: 700;
        line-height: 1;

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

      /* title */
      .title {
        inline-size: fit-content;
        padding-block: 12px;
        padding-inline: 9.7px;
        margin-block: calc((1em - 1lh) / 2);
        font-family: var(--yumin);
        font-size: 18px;
        font-weight: 600;
        line-height: 1;
        color: white;
        letter-spacing: 1.8px;
        background: var(--primary);

        @media (width > 768px) {
          translate: 0 -5px;
        }

        @media (width <= 768px) {
          padding-block: 2.6vw;
          padding-inline: calc((100 / 390) * 10 * 1vw);
          font-size: calc((100 / 390) * 12 * 1vw);
          letter-spacing: calc((100 / 390) * 1.2 * 1vw);
        }
      }
    }

    /* ==== breadcrumb ==== */
    .breadcrumb {
      display: block flex;
      flex-wrap: wrap;
      grid-area: 1 / 2 / 2 / 3;
      gap: 15px;
      align-items: center;
      align-self: flex-end;
      padding-inline-end: 81px;
      font-size: 12px;
      font-weight: 400;

      @media (width > 768px) {
        translate: 0 -10px;
      }

      @media (width <= 768px) {
        gap: calc((100 / 390) * 15 * 1vw);
        padding-inline-end: calc((100 / 390) * 16 * 1vw);
        margin-block-end: calc((100 / 390) * 19 * 1vw);
        font-size: calc((100 / 390) * 12 * 1vw);
      }

      /* lang */
      [lang='en'] {
        text-transform: uppercase;
      }

      & li {
        display: block flex;
        gap: 15px;
        margin-block: calc((1em - 1lh) / 2);
      }

      & li + li::before {
        flex-shrink: 0;
        inline-size: 5.76px;
        aspect-ratio: 5.76 / 5.4;
        content: '';
        background-color: currentcolor;
        mask-image: var(--icon-breadcrumb);
        mask-repeat: no-repeat;
        mask-position: center;
        mask-size: contain;
      }

      @media (width <= 768px) {
        & li + li::before {
          inline-size: calc((100 / 390) * 5.76 * 1vw);
        }
      }

      .item {
        display: block flex;
        gap: 7px;

        @media (width <= 768px) {
          gap: calc((100 / 390) * 7 * 1vw);
        }

        &[href='/'] {
          transition: all 250ms ease 0s;

          @media (any-hover: hover) {
            &:hover {
              opacity: 0.7;
            }
          }

          &::before {
            inline-size: 13px;
            aspect-ratio: 13 / 12;
            content: '';
            background-color: #9fcbeb;
            mask-image: var(--icon-home);
            mask-repeat: no-repeat;
            mask-position: center;
            mask-size: contain;
          }

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

    /* ==== picture ==== */
    .picture {
      grid-area: 2 / 1 / 3 / 3;

      & img {
        display: block;
        inline-size: 100%;
        block-size: 400px;
        object-fit: cover;
        object-position: left top;

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

  /* =====================
    u-bg
  ===================== */
  .u-bg {
    position: relative;

    &::before {
      position: absolute;
      inset-block-start: 0;
      inset-inline-end: 0;
      z-index: 2;
      display: block flow;
      inline-size: 544px;
      aspect-ratio: 544 / 490;
      pointer-events: none;
      content: '';
      background-image: url('../img/_common/bg.webp');
      background-repeat: no-repeat;
      background-position: center;
      background-size: contain;
    }

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

    .u-inner {
      position: relative;
      z-index: 2;
    }
  }

  /* =====================
    u-head
  ===================== */
  .u-head {
    display: block grid;
    gap: 19px;
    inline-size: fit-content;

    @media (width <= 768px) {
      gap: 2.8vw;
    }

    /* ==== [lang='en'] ==== */
    & [lang='en'] {
      margin-block: calc((1em - 1lh) / 2);
      font-family: var(--oswald);
      font-size: 90px;
      font-weight: 700;
      line-height: 1;

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

    /* ==== title ==== */
    .title {
      margin-block: calc((1em - 1lh) / 2);
      font-family: var(--yumin);
      font-size: 16px;
      font-weight: 600;
      color: var(--primary, #0a5791);
      letter-spacing: 1.6px;

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

  /* ==== center ==== */
  .u-head[data-align='center'] {
    margin-inline: auto;
    text-align: center;
  }

  /* =====================
    u-table
  ===================== */
  .u-table {
    --_border-color: #d2d2d2;

    display: block grid;
    grid-template-columns: 250px 1fr;
    max-inline-size: 1040px;
    margin-inline: auto;

    @media (width <= 768px) {
      grid-template-columns: 23vw 1fr;
    }

    /* ==== tr ==== */
    .tr {
      display: block grid;
      grid-template-columns: subgrid;
      grid-column: 1 / -1;

      & :where(dt, dd) {
        block-size: 100%;
        padding-block: 23px;

        @media (width <= 768px) {
          padding-block: calc((100 / 390) * 13 * 1vw);
          padding-inline: calc((100 / 390) * 8 * 1vw);
          word-break: auto-phrase;
        }

        & a:not([href^='tel:']) {
          color: var(--primary);
          text-decoration: underline;

          @media (any-hover: hover) {
            &:hover {
              text-decoration: none;
            }
          }
        }

        @media (width <= 768px) {
          & a {
            color: var(--primary);
            text-decoration: underline;
          }
        }
      }

      &:last-child {
        & dt {
          border-block-end-color: var(--primary);
        }

        & dd {
          border-block-end-color: var(--_border-color);
        }
      }
    }

    /* ==== dt ==== */
    & dt {
      place-content: center start;
      border-block-start: 1px solid var(--primary);
      border-block-end: 1px solid transparent;
    }

    /* ==== dd ==== */
    & dd {
      padding-inline: 10px;
      border-block-start: 1px solid var(--_border-color);
      border-block-end: 1px solid transparent;
    }
  }
}
