@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;

}


/* ========================================
  HTML/BODY Settings
======================================== */
html {
  scroll-behavior: smooth;
  font-size: min(62.5%, calc((10 / 1360) * 100vw));
}
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%;
  background-color: #FFF;
  display: flex;
  align-items: center;
}
.header-logo {
  width: 25rem;
  margin-left: calc((43 / 1920) * 100%);
}
.header-nav {
  margin: 0 calc((60 / 1920) * 100%) 0 auto;
}

/* 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);
      }
    }
  }
}
.mega-menu {
  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;
          }
        }
      }
    }
  }
}
/* 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: 10rem 0 13rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 3rem;

  img {
    &:first-child {
      width: auto;
      max-height: 5.5rem;
    }
    &:last-child {
      width: auto;
      max-height: 2rem;
    }
  }
}
.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; }
}
.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;
}
.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;
          }
        }
      }
    }
  }
}

/* Main
---------------------------------------- */
.main {
  margin: 15rem 0 10rem;
}


/* ========================================
  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%);
}

/* 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;
}

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

  &::before {
    content: "";
    width: 1.8rem;
    height: 10.7rem;
    transform: skewX(-20deg);
    background-color: var(--color-primary);
    margin-right: 3rem;
  }
}

/* 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;
  }
}