@charset "UTF-8";

/* ========================================
  Design tokens (CSS Custom Properties)
======================================== */
:root {

  /* brand-color */
  --color-primary:#004A95;
  --color-secondary:#1B3043;
  --color-link:#38A1DB;
  --color-hover: #00265B;
  --color-text: #000;
  --color-border: #B5B5B6;

  /* layout */
  --header-height: 9.6rem;
  --contents-width-sm: min(90%, 90rem);
  --contents-width-md: min(90%, 136rem);
  --contents-width-lg: min(94%, 182rem);

  /* font */
  --font-size-xs: 1.3rem;
  --font-size-sm: 1.5rem;
  --font-size-md: 1.6rem;
  --font-size-lg: 1.8rem;
  --font-size-xl: 1.9rem;

  @media screen and (max-width: 1024px) {
    --header-height: 7.4rem;
    --contents-width-sm: 90vw;
    --contents-width-md: 90vw;
    --contents-width-lg: 90vw;
  }
  @media screen and (max-width: 767px) {
    --header-height: 6rem;
  }

}


/* ========================================
  HTML/BODY Settings
======================================== */
html {
  scroll-behavior: smooth;
  font-size: min(62.5%, calc((10 / 1360) * 100vw));

  @media screen and (max-width: 1024px) {
    font-size: 8px;
  }
}
body {
  padding-top: var(--header-height);
  line-height: 2;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.6rem;
  color: var(--color-text);
}


/* ========================================
Elements (global default styles)
======================================== */
ul,
ol {
  list-style-type: none;
}
table {
  border-collapse: collapse;
}
img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}
a {
  text-decoration: none;
  color: inherit;
}
em, i {
  font-style: normal;
}
[id] {
  scroll-margin-top: var(--header-height);
}


/* ========================================
  Layout
======================================== */

/* Header
---------------------------------------- */
.header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  border-bottom: solid 1px #E5EDF4;
  background-color: #FFF;
  display: flex;
  align-items: center;
}
.header-logo {
  width: min(25rem, 40%);
  margin-left: calc((43 / 1920) * 100%);

  img {
    display: block;
  }
}
.header-btn {
  display: none;

  @media screen and (max-width: 1024px) {
    z-index: 1000;
    width: var(--header-height);
    aspect-ratio: 1;
    margin-left: auto;
    display: flex;
    justify-content: center;
    align-items: center;

    span {
      position: relative;
      width: calc(var(--header-height) * .4);
      height: 2px;
      background-color: var(--color-primary);

      &::before, &::after {
        content: "";
        position: absolute;
        left: 0;
        width: calc(var(--header-height) * .4);
        height: 2px;
        background-color: var(--color-primary);
        transition: .3s ease;
      }
      &::before {
        top: -6px;
      }
      &::after {
        bottom: -6px;
      }
    }
    &.is-open {
      span {
        background-color: transparent;

        &::before {
          top: 0;
          transform: rotate(45deg);
        }
        &::after {
          bottom: 0;
          transform: rotate(-45deg);
        }
      }
    }
  }
}
.header-nav {
  margin: 0 calc((60 / 1920) * 100%) 0 auto;

  @media screen and (max-width: 1024px) {
    position: fixed;
    top: var(--header-height);
    right: -30rem;
    width: min(100%, 30rem);
    height: calc(100vh - var(--header-height));
    margin: 0;
    overflow-y: auto;
    background-color: #FFF;
    transition: right .5s ease;

    &.is-open {
      right: 0;
    }
  }
  @media screen and (max-width: 540px) {
    right: -100vw;
    width: 100%;
  }
}

/* Global Nav
---------------------------------------- */
.global-nav {
  display: flex;
  align-items: center;

  > li {
    position: relative;
  }
  > li > a {
    padding: 0 2.4rem;
    display: flex;
    align-items: center;
    height: var(--header-height);
    transition: color .2s ease;

    @media (hover: hover) {
      &:hover {
        color: var(--color-primary);
      }
    }
  }
  @media screen and (max-width: 1024px) {
    display: block;
    border-top: solid 1px #CCC;
    line-height: 1.4;

    > li {
      border-bottom: solid 1px #CCC;
    }
    > li > a,
    > li > span {
      /* display: flex;
      justify-content: space-between;
      align-items: center; */
      height: auto;
      padding: 1rem 5%;

      /* &::after {
        content: "";
        width: 1rem;
        aspect-ratio: 1;
        border: solid currentColor;
        border-width: 1px 1px 0 0;
        transform: rotate(45deg);
      } */
    }
    > li > span {
      &::after {
        margin-bottom: .75rem;
        transform: rotate(135deg);
      }
      &.is-open {
        &::after {
          margin-bottom: 0;
          transform: rotate(-45deg);
        }
      }
    }
  }
}
.mega-menu {
  @media screen and (min-width: 1025px) {
    position: fixed;
    z-index: 20;
    top: var(--header-height);
    left: 0;
    width: 100%;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background-color: #FFF;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility 0s linear .3s;

    li:hover &,
    li:focus-within & {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition: opacity .3s ease, visibility 0s;
    }
    > div:not(:last-child) {
      &::before {
        content: "";
        display: block;
        width: 100%;
        aspect-ratio: 384 / 160;
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
      }
    }
    .lineup01::before { background-image: url(../images/common/megamenu-img01.jpg); }
    .lineup02::before { background-image: url(../images/common/megamenu-img02.jpg); }
    .lineup03::before { background-image: url(../images/common/megamenu-img03.jpg); }
    .lineup04::before { background-image: url(../images/common/megamenu-img04.jpg); }
    > div > * {
      margin: 2rem 5% 3.5rem;
    }
    p {
      font-size: 2.2rem;
      font-weight: 500;

      a {
        @media (hover: hover) {
          transition: color .2s ease;

          &:hover {
            color: var(--color-link);
          }
        }
      }
    }
    ul {
      display: grid;
      grid-template-columns: repeat(2, auto);
      grid-template-rows: repeat(11, auto);
      grid-auto-flow: column;
      font-size: min(1.5rem, .8vw);
      font-weight: 300;

      li {
        position: relative;
        padding-left: 1.2em;

        &::before {
          content: "＞";
          position: absolute;
          left: 0;
          color: var(--color-link);
        }
        a {
          @media (hover: hover) {
            &:hover {
              text-decoration: underline;
            }
          }
        }
      }
    }
  }
  @media screen and (max-width: 1024px) {
    background-color: rgba(255, 255, 255, 0.1);

    > div {
      > p {
        padding: 1rem 5%;
        border-top: solid 1px #CCC;

        &.sp-submenu-toggle {
          position: relative;
          padding: 1rem 5% 1rem 7%;

          &::before {
            content: "";
            position: absolute;
            top: 50%;
            right: 5%;
            width: 1em;
            height: 0;
            border-top: solid 1px currentColor;
          }
          &::after {
            content: "";
            position: absolute;
            top: calc(50% - .5em + .5px);
            right: calc(5% + .5em - .5px);
            width: 0;
            height: 1em;
            border-left: solid 1px currentColor;
          }
          &.is-open {
            &::after {
              content: none;
            }
          }
        }
      }
      > ul {
        display: none;
        background-color: var(--color-primary);
        color: #FFF;

        > li:not(:first-child) {
          border-top: solid 1px #FFF;
        }
        > li > a {
          display: block;
          padding: 1rem 10%;
        }
      }
    }
  }
}
/* hover無効中は、強制的に閉じる（hoverにも勝つように !important） */
.header.is-hover-disabled .mega-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Footer
---------------------------------------- */
.footer {
  background-color: var(--color-primary);
  color: #FFF;
}
.footer-inner {
  padding: min(10rem, 10vw) 0 min(13rem, 10vw);
}
.footer-logo a {
  display: inline-flex;
  align-items: center;
  gap: 2rem 3rem;
  transition: opacity .3s;

  img {
    &:first-child {
      max-height: 5.5rem;
    }
    &:last-child {
      max-height: 2rem;
    }
  }
  @media (hover: hover) {
    &:hover {
      opacity: .7;
    }
  }
  @media screen and (max-width: 767px) {
    flex-direction: column;
    align-items: flex-start;

    img {
      &:first-child {
        width: min(80%, 43.1rem);
        max-height: initial;
      }
      &:last-child {
        width: min(68%, 37.4rem);
        max-height: initial;
      }
    }
  }
}
.footer-block {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0 6.5rem;

  > div:first-child {
    padding-right: 6.5rem;
    border-right: solid 1px #FFF;
  }
  h2 {
    font-size: 2.4rem;
    font-weight: 400;
  }
  dl {
    margin-top: 2.5rem;

    dt {
      font-size: 1.8rem;

      &::before {
        content: "■";
        margin-right: .5rem;
      }
    }
    dd {
      font-weight: 300;
    }
  }
  .inner {
    display: grid;
    justify-content: space-between;
    grid-template-columns: auto auto;
    grid-template-areas: "a d" "b e" "c c";
    gap: 0 2rem;
  }
  [data-label="本社"] { grid-area: a; }
  [data-label="本社東棟"] { grid-area: b; }
  [data-label="津営業所"] { grid-area: c; }
  [data-label="浜松出張所"] { grid-area: d; }
  [data-label="東京オフィス"] { grid-area: e; }

  @media screen and (max-width: 1024px) {
    gap: 0 3rem;

    > div:first-child {
      padding-right: 3rem;
    }
  }
  @media screen and (max-width: 767px) {
    grid-template-columns: 4fr 3fr;

    .inner {
      display: block;
    }
  }
  @media screen and (max-width: 540px) {
    grid-template-columns: 1fr;
    gap: 3rem 0;

    > div:first-child {
      padding-right: 0;
      border-right: none;
    }
  }
}
.footer-bottom {
  padding: 1.8rem 4% 2.2rem;
  border-top: solid 1px #FFF;
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sx);
  font-weight: 300;

  @media screen and (max-width: 767px) {
    display: block;
  }
}
.footer-link {
  display: flex;
  align-items: center;
  gap: 0 2rem;

  a {
    @media (hover: hover) {
      &:hover {
        text-decoration: underline;
      }
    }
  }
}
.pagetop {
  position: fixed;
  bottom: 8rem;
  right: 1rem;
  width: 6rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility 0s linear .3s;

  &.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .3s ease, visibility 0s;
  }
  a {
    transition: opacity .2s ease;

    @media (hover: hover) {
      &:hover {
        opacity: .7;
      }
    }
  }
}

/* Topic Path
---------------------------------------- */
.topic-path {
  width: var(--contents-width-md);
  margin: 3.5rem auto;

  ol {
    display: flex;
    flex-wrap: wrap;

    li {
      margin-right: .5em;
      font-size: var(--font-size-sm);

      &:not(:last-child) {
        &::after {
          content: "＞";
          margin-left: .5em;
        }
      }
      a {
        @media (hover: hover) {
          &:hover {
            text-decoration: underline;
          }
        }
      }
    }
  }
  @media screen and (max-width: 1024px) {
    margin: 1rem auto;
  }
  @media screen and (max-width: 540px) {
    ol {
      li {
        font-size: var(--font-size-xs);
      }
    }
  }
}

/* Main
---------------------------------------- */
.main {
  margin: min(15rem, 10vw) 0 min(10rem, 10vw);
}


/* ========================================
  Components
======================================== */

/* Layout
---------------------------------------- */
.l-container {
  margin-right: auto;
  margin-left: auto;

  &.sz-lg { width: var(--contents-width-lg); }
  &.sz-md { width: var(--contents-width-md); }
  &.sz-sm { width: var(--contents-width-sm); }
}
.l-section {
  padding-bottom: 10rem;
}
.l-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc((80 / 1360) * 100%);

  @media screen and (max-width: 767px) {
    grid-template-columns: auto;
    gap: 0;
  }
}


/* Usability
---------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media screen and (min-width: 768px) {
  .u-only-sp { display: none !important; }
}
@media screen and (max-width: 767px) {
  .u-only-pc { display: none !important; }
}

/* Components
---------------------------------------- */
/* Heading */
.section-heading-lg {
  margin-bottom: 1em;
  margin-left: 2rem;
  display: flex;
  align-items: center;
  line-height: 1.2;
  font-size: 4rem;
  font-weight: 600;

  &::before {
    content: "";
    width: .42em;
    height: 2.4em;
    transform: skewX(-20deg);
    background-color: var(--color-primary);
    margin-right: .7em;
  }
  @media screen and (max-width: 767px) {
    margin-left: 1rem;
    font-size: 2.6rem;

    &::before {
      width: .3em;
      height: 2em;
    }
  }
}

/* Table */
.section-table {
  width: 100%;

  th, td {
    padding: .5em calc((45 / 1360) * 100%);
    border: solid 1px var(--color-border);
    vertical-align: top;
  }
  th {
    width: calc((264 / 1360) * 100%);
    background-color: #F6F6F6;
    font-weight: 400;
  }
}