.header { position: absolute; top: 0; left: 0; z-index: 900; display: flex; align-items: center; width: 100%; height: 88px; padding: 0 40px; transition: background-color .4s, box-shadow .4s; }
.header.is-fixed { position: fixed; height: 72px; background: rgb(255 255 255 / .94); box-shadow: 0 2px 20px rgb(47 59 57 / .06); transform: translateY(-100%); }
.header.is-fixed.is-show { transform: none; transition: transform .5s var(--ease); }
.header.is-fixed.is-hide { transform: translateY(-100%); transition: transform .5s var(--ease); }

.header__menubtn { display: none; }
.header__panel { display: flex; align-items: center; margin-left: auto; }
.header__nav ul { display: flex; align-items: center; }
.header__nav li + li { margin-left: 28px; }
.header__nav a { position: relative; display: block; padding: 6px 0; font-size: 15px; letter-spacing: .06em; white-space: nowrap; }
.header__nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--accent-soft); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.header__nav a.is-current::after { transform: scaleX(1); }
@media (hover: hover) { .header__nav a:hover::after { transform: scaleX(1); } }

.header__cta { display: flex; align-items: center; margin-left: 32px; }
.header__tel { display: inline-flex; align-items: center; font-family: var(--en); font-size: 20px; font-weight: 700; letter-spacing: .04em; color: var(--accent); white-space: nowrap; }
.header__tel svg { width: 20px; height: 20px; margin-right: 8px; }
.header__line { display: inline-flex; align-items: center; height: 46px; margin-left: 20px; padding: 0 20px; border-radius: 10px; background: var(--accent); color: var(--on-dark); font-size: 15px; font-weight: 700; white-space: nowrap; transition: opacity .3s; }
.header__line svg { width: 20px; height: 20px; margin-right: 8px; }
@media (hover: hover) { .header__line:hover { opacity: .8; } }

@media (max-width: 1240px) {
  .header { padding: 0 24px; }
  .header__nav li + li { margin-left: 18px; }
  .header__nav a { font-size: 14px; letter-spacing: .02em; }
  .header__cta { margin-left: 20px; }
  .header__tel { font-size: 17px; }
  .header__line { margin-left: 14px; padding: 0 14px; font-size: 14px; }
}

/* 1040px 以下はメニューを畳む */
@media (max-width: 1040px) {
  .header, .header.is-fixed { height: 68px; padding: 0 20px; }
  .is-menuopen .header { position: fixed; transform: none !important; background: var(--surface); box-shadow: none; }
  .header__logo { position: relative; z-index: 2; }
  .header__logo .logo__mark { width: 40px; height: 40px; font-size: 7px; }
  .header__logo .logo__mark b { font-size: 5.5px; }
  .header__logo .logo__name { margin-left: 10px; font-size: 17px; }

  .header__menubtn { display: block; position: relative; z-index: 2; width: 48px; height: 48px; margin-left: auto; border-radius: 50%; background: var(--accent); }
  .header__menubtn span { position: absolute; left: 14px; width: 20px; height: 2px; border-radius: 2px; background: var(--on-dark); transition: transform .35s var(--ease), top .35s var(--ease); }
  .header__menubtn span:nth-child(1) { top: 19px; }
  .header__menubtn span:nth-child(2) { top: 27px; }
  .is-menuopen .header__menubtn span:nth-child(1) { top: 23px; transform: rotate(45deg); }
  .is-menuopen .header__menubtn span:nth-child(2) { top: 23px; transform: rotate(-45deg); }

  .header__panel { position: fixed; inset: 0; z-index: 1; display: block; margin: 0; padding: 100px 28px 40px; background: var(--surface); overflow-y: auto; visibility: hidden; opacity: 0; transition: opacity .35s, visibility .35s; }
  .is-menuopen .header__panel { visibility: visible; opacity: 1; }
  .header__nav ul { display: block; border-top: 1px solid var(--line); }
  .header__nav li + li { margin-left: 0; }
  .header__nav a { padding: 20px 4px; border-bottom: 1px solid var(--line); font-size: 18px; letter-spacing: .08em; }
  .header__nav a::after { content: none; }
  .header__cta { display: block; margin: 32px 0 0; }
  .header__tel { display: flex; justify-content: center; height: 60px; border: 1.5px solid var(--accent); border-radius: 12px; font-size: 22px; }
  .header__line { display: flex; justify-content: center; height: 60px; margin: 14px 0 0; border-radius: 12px; font-size: 17px; }
}
