/* ===========================================================
   Header
   =========================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow var(--t-base), background var(--t-base);
}

/* hint of shadow when scrolled (added by JS optionally) */
header.is-scrolled {
  box-shadow: var(--sh-2);
}

header .header-container {
  width: 100%;
  max-width: 1400px;
  height: 76px;
  padding-inline: clamp(20px, 4vw, 40px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

header .logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
header .logo img {
  width: auto;
  height: 30px;
  max-width: none;
}

/* ---------- PC nav ---------- */
header .nav-pc {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 28px);
}

header .nav-pc a {
  font-family: var(--ff);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--c-ink);
  position: relative;
  padding: 6px 0;
}

header .nav-pc a:not(.contact-btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--c-brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--t-base);
}
header .nav-pc a:not(.contact-btn):hover { opacity: 1; }
header .nav-pc a:not(.contact-btn):hover::after { transform: scaleX(1); }

/* ---------- Contact button ---------- */
/* 詳細度を nav-pc a より高くするため a.contact-btn で指定 */
header .nav-pc a.contact-btn,
header a.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 30px;
  border-radius: var(--r-pill);
  background: var(--c-brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: var(--sh-brand);
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
header a.contact-btn .contact-btn__label {
  display: inline-block;
  line-height: 1;
  color: #fff;
}
header a.contact-btn::after { display: none !important; }
header a.contact-btn:hover {
  background: var(--c-brand-deep);
  color: #fff;
  transform: translateY(-1px);
  opacity: 1;
}
header a.contact-btn .contact-btn__icon {
  width: 16px;
  height: 16px;
  color: #fff;
  transition: transform var(--t-fast);
}
header a.contact-btn:hover .contact-btn__icon {
  transform: translateX(2px);
}

/* ---------- Hamburger ---------- */
header .hamBtn {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1101;
}
header .hamBtn .ham-line {
  position: absolute;
  left: 8px;
  width: 28px;
  height: 2px;
  background-color: var(--c-ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
header .hamBtn .ham-line:nth-child(1) { top: 14px; }
header .hamBtn .ham-line:nth-child(2) { top: 21px; }
header .hamBtn .ham-line:nth-child(3) { top: 28px; }

header .hamBtn.is-open .ham-line:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}
header .hamBtn.is-open .ham-line:nth-child(2) {
  opacity: 0;
}
header .hamBtn.is-open .ham-line:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ---------- Drawer (off by default) ---------- */
header .ham-list { display: none; }
header .nav-overlay { display: none; }

/* ===========================================================
   Tablet & below
   =========================================================== */
@media (max-width: 1100px) {
  header .header-container {
    height: 68px;
  }
  header .logo img {
    height: 26px;
  }
  header .nav-pc {
    gap: 18px;
  }
  header .nav-pc a {
    font-size: 14px;
  }
}

@media (max-width: 950px) {
  header .nav-pc { display: none; }
  header .hamBtn { display: block; }

  header .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(14, 20, 36, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 1050;
  }
  header .nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  header .ham-list {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 88vw);
    height: 100vh;
    height: 100dvh;
    background: #fff;
    flex-direction: column;
    gap: 4px;
    padding: 90px 26px 32px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    z-index: 1100;
    box-shadow: -20px 0 40px rgba(14, 20, 36, .12);
  }
  header .ham-list.is-open {
    transform: translateX(0);
  }

  header .ham-list > a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 4px;
    font-size: 16px;
    font-weight: 500;
    color: var(--c-ink);
    border-bottom: 1px solid var(--c-line);
    transition: color var(--t-fast), padding-left var(--t-fast);
  }
  header .ham-list > a:hover {
    color: var(--c-brand);
    padding-left: 8px;
    opacity: 1;
  }

  header .ham-list .btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
  }
  header .ham-list .btn-group a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: var(--c-bg-soft);
    border: 1px solid var(--c-line);
    transition: background var(--t-fast), border-color var(--t-fast);
  }
  header .ham-list .btn-group a:hover {
    background: var(--c-brand-soft);
    border-color: var(--c-brand-line);
    opacity: 1;
  }
  header .ham-list .btn-group img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }
  header .ham-list .btn-group p {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--c-ink);
  }
  header .ham-list .btn-group p span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--c-ink-3);
    margin-top: 2px;
  }
  header .ham-list .mail-btn {
    background: var(--c-brand);
    border-color: transparent;
  }
  header .ham-list .mail-btn p,
  header .ham-list .mail-btn p span {
    color: #fff;
  }
  header .ham-list .mail-btn:hover {
    background: var(--c-brand-deep);
    border-color: transparent;
  }
}
