@charset "utf-8";
.header.UpMove{
  animation: UpAnime 0.5s forwards;
}

@keyframes UpAnime{
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-100px);
  }
}
.header.DownMove{
  animation: DownAnime 0.5s forwards;
}
@keyframes DownAnime{
  from {
    opacity: 0;
    transform: translateY(-100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 表示前。スクロールの表示切替とは別要素で動かす */
.header.is-ready:not(.is-in) {
  pointer-events: none;
}
.header.is-ready:not(.is-in) .header__inner {
  opacity: 0;
}
.header.is-in .header__inner {
  opacity: 1;
  transition: opacity 0.6s ease-out;
}
body:has(.fv) .header.is-ready:not(.is-in) .header__inner {
  transform: translateY(-1.75rem);
}
body:has(.fv) .header.is-in .header__inner {
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .header.is-in .header__inner {
    transition: none;
  }
}

/* header */
#root {
  padding-top: 120px;
}
.header {
  position: fixed;
  top: 24px;
  left: 0;
  z-index: 1000;
  width: 100%;
  padding-inline: clamp(0.5rem, -0.5rem + 2.08vw, 2rem);
}
.header .header__inner {
  max-width: none !important;
  height: clamp(3.625rem, 2.042rem + 3.3vw, 6rem);
  background-color: #fff;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}
.header__container {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding-left: clamp(1rem, -0.5rem + 3.125vw, 3.25rem);
}
.header__container > a:first-child {
  flex-shrink: 0;
}
.header__logo {
  width: clamp(5rem, -0.833rem + 12.15vw, 13.75rem);
  height: auto;
}
.header__items {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  margin-left: auto;
  column-gap: clamp(1.25rem, -0.417rem + 3.47vw, 3.75rem);
}
.header__item {
  font-size: clamp(0.75rem, 0.5rem + 0.521vw, 1.125rem);
  font-weight: 500;
  line-height: 1.56;
  color: #1d1d1d;
  white-space: nowrap;
}
.header__item br {
  display: none;
}
.header__container > a:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: clamp(6.875rem, 3.458rem + 7.118vw, 12rem);
  height: 100%;
  margin-left: clamp(0.75rem, -1.25rem + 4.167vw, 3.75rem);
  background-color: #002c6a;
}
.header__container > a:last-child:hover {
  background-color: #FAF7A5;
}
.header__contact {
  font-size: clamp(0.75rem, 0.417rem + 0.694vw, 1.25rem);
  font-weight: 500;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  transition: color 0.5s;
}
.header__container > a:last-child:hover .header__contact {
  color: #002c6a;
}

/* hamBtn */
.hamBtn {
  display: none;
}
.sp__menu {
  display: none;
}

@media (max-width: 767px) {
  #root {
    padding-top: 58px;
  }
  .header {
    top: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .header .header__inner {
    height: 58px;
    box-shadow: none;
  }
  .header__container {
    padding-left: 10px;
    padding-right: 62px;
  }
  .header__logo {
    width: 132px;
  }
  .header__items,
  .header__container > a:last-child {
    display: none;
  }
  .hamBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1200;
    width: 42px;
    height: 42px;
    background-color: #003f98;
    cursor: pointer;
  }
  .hamBar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 15px;
  }
  .hamBar div {
    width: 100%;
    height: 1px;
    background-color: #fff;
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .hamBtn.active .hamBar div:nth-child(1) {
    transform: translateY(7px) rotate(29deg);
  }
  .hamBtn.active .hamBar div:nth-child(2) {
    opacity: 0;
  }
  .hamBtn.active .hamBar div:nth-child(3) {
    transform: translateY(-7px) rotate(-29deg);
  }

  /* sp-menu */
  .sp__menu {
    display: block;
    position: fixed;
    top: 66px;
    left: 0;
    z-index: 110;
    width: 100%;
    height: calc(100% - 66px);
    overflow-y: auto;
    background-color: #003f98;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .sp__menu.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .sp__menu::before {
    content: "名古屋・三河を中心に、\A電気工事・太陽光発電システム工事に対応";
    display: flex;
    align-items: center;
    width: 100%;
    height: 38px;
    padding: 0 20px;
    background-color: #002c6a;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    color: #fff;
    white-space: pre-line;
  }
  .sp-menu__inner {
    width: 100%;
  }
  .sp-menu__container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 51px 30px 80px;
  }
  .sp-menu__container > a {
    color: #fff;
  }
  .sp-menu__item {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.45;
    color: #fff;
  }
  .sp-menu__center {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  .sp-menu__center > a {
    display: block;
    width: 100%;
  }
  .sp-menu__btn {
    display: flex;
    width: 100%;
    height: 98px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
    max-width: 400px;
  }
  .sp-menu-btn__left {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    background-color: #fff;
  }
  .sp-menu-btn__sub {
    display: flex;
    align-items: center;
    height: 22px;
    background-color: #002c6a;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.5;
    color: #fff;
    white-space: nowrap;
    justify-content: center;
  }
  .sp-menu-btn__bottom {
    display: flex;
    align-items: center;
    column-gap: 20px;
    flex: 1;
    min-height: 0;
    padding-left: 19px;
  }
  .sp-menu-bnt__icon {
    width: 61px;
    height: 58px;
    object-fit: contain;
  }
  .sp-menu-btn__main {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    color: #000;
  }
  .sp-menu-btn__right {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    width: 73px;
    background-color: #faf7a5;
  }
  .sp-menu-btn__arrow {
    width: 19px;
    height: auto;
  }
  .sp-menu__center > a:hover .sp-menu-btn__arrow,
  .sp-menu__btn:hover .sp-menu-btn__arrow {
    animation: arrow-flow 0.6s ease;
  }
}

@keyframes arrow-flow {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  35% {
    opacity: 1;
  }
  50% {
    transform: translateX(140px);
    opacity: 0;
  }
  51% {
    transform: translateX(-140px);
    opacity: 0;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 389px) {
  .sp-menu__container {
    padding-inline: 20px;
  }
  .sp-menu-bnt__icon {
        width: 50px;
    height: auto;
    aspect-ratio: 61/58;
  }
  .sp-menu-btn__main {
    font-size: 18px;
  }
}