@charset "utf-8";

  :root{
    --border: #d0dcea;
  }

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  padding: 0 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}

header.scrolled {
  background: rgba(255,255,255,0.8);
  border-bottom-color: var(--border);
  backdrop-filter: blur(5px) saturate(1.3);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark img { width: 30px; height: auto; }

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-dark);
  letter-spacing: 0.04em;
  transition: color 0.4s ease;
}
header.scrolled .logo-text { color: var(--navy); }

nav { display: flex; align-items: center; gap: 36px; }

nav a {
  text-decoration: none;
  color: var(--navy-dark);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  transition: color 0.4s ease;
}
header.scrolled nav a { color: var(--text-main); }

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.2s;
}
nav a:hover::after { width: 100%; }

/* dropmenu内は汎用のnav a::afterを打ち消す */
.dropmenu a::after { display: none !important; }

/* ===== DROPMENU ===== */
.dropmenu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0; padding: 0;
}

.dropmenu > li {
  position: relative;
}

.dropmenu > li > a {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--navy-dark);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s;
  gap: 4px;
}
.dropmenu > li > a b { font-weight: 600; }

/* scrolled時のテキスト色 */
header.scrolled .dropmenu > li > a { color: var(--text-main); }

/* アンダーライン：左から右へすっと伸びる */
.dropmenu > li > a::before {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
header.scrolled .dropmenu > li > a::before { background: var(--navy); }
.dropmenu > li:hover > a::before { transform: scaleX(1); }

/* サブメニュー */
.dropmenu > li > ul {
  list-style: none;
  position: absolute;
  top: calc(100%);
  left: 0;
  min-width: 190px;
  background: rgba(255,255,255,0.95);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 40px rgba(0,30,80,0.15);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s 0.22s;
  z-index: 200;
}

.dropmenu > li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.dropmenu > li > ul > li > a {
  display: block;
  padding: 9px 20px;
  font-size: 13px;
  color: var(--text-main);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
  white-space: nowrap;
}
.dropmenu > li > ul > li > a::after { display: none; } /* 下線アニメを無効化 */
.dropmenu > li > ul > li > a:hover {
  background: var(--bg-light);
  color: var(--navy);
  padding-left: 26px;
}

.btn-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1.5px solid rgba(0,30,80,0.8);
  border-radius: 6px;
  color: var(--navy-dark);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.4s ease;
}
header.scrolled .btn-contact {
  border-color: var(--navy);
  color: var(--navy);
}
.btn-contact:hover {
  background: var(--navy);
  color: white;
}
header.scrolled .btn-contact:hover {
  background: var(--navy);
  color: white;
}

/* ===== HAMBURGER BUTTON ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 300;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 100%; height: 2px;
  background: var(--navy-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.4s ease;
  transform-origin: center;
}
header.scrolled .hamburger span { background: var(--navy); }

/* ×アニメーション */
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== DRAWER (#d_navi) ===== */
#d_navi {
  position: fixed;
  top: 3.5em;
  right: 0;
  width: min(320px, 85vw);
  height: fit-content;
  background: rgba(29, 52, 97, 0.8);
  z-index: 250;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#d_navi.is-open { transform: translateX(0); }

#d_navi_inner { padding: 0 0 40px; }

/* ドロワー内ロゴ */
#logo_2 {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 8px;
}
#logo_2 a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
#logo_2 span {
  font-size: 15px;
  font-weight: 700;
  color: white;
}

#logo_2 img {
  width: 30px;
  height: auto;
  display: block;
}

/* SP メニューリスト */
.sp-menu {
  list-style: none;
  padding: 0; margin: 0;
}

.sp-menu > li {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

/* 親リンク行 */
.sp-menu > li > a {
  display: block;
  padding: 15px 48px 15px 24px;
  font-size: 14px;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  transition: background 0.15s;
}
.sp-menu > li > a:hover { background: rgba(255,255,255,0.06); }
.sp-menu > li > a b { font-weight: 600; }

/* アコーディオン開閉ボタン */
.sp-toggle {
  position: absolute;
  top: 0; right: 0;
  width: 48px; height: 52px;
  background: none;
  border: none;
  border-left: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-toggle::after {
  content: '';
  display: block;
  width: 8px; height: 8px;
  border-right: 2px solid rgba(255,255,255,0.6);
  border-bottom: 2px solid rgba(255,255,255,0.6);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.25s ease;
}
.sp-has-child.is-open .sp-toggle::after {
  transform: rotate(-135deg) translateY(-3px);
}

/* サブメニュー */
.sp-menu > li > ul {
  list-style: none;
  padding: 0; margin: 0;
  background: rgba(0,0,0,0.2);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.sp-menu > li.is-open > ul { max-height: 400px; }

.sp-menu > li > ul > li > a {
  display: block;
  padding: 11px 20px 11px 36px;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,0.05);
  transition: color 0.15s, padding-left 0.15s;
}
.sp-menu > li > ul > li > a::before {
  content: '–';
  margin-right: 8px;
  opacity: 0.5;
}
.sp-menu > li > ul > li > a:hover {
  color: var(--gold-light);
  padding-left: 42px;
}

/* ドロワー内お問い合わせボタン */
.sp-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 20px 0;
  padding: 14px;
  background: white;
  color: var(--navy);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
  width: 60%;
}
.sp-contact-btn:hover { opacity: 0.88; }

/* オーバーレイ */
#d_navi_overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 240;
  backdrop-filter: blur(2px);
}
#d_navi_overlay.is-open { display: block; }


/* ===== FOOTER ===== */
footer {
  background: var(--navy);
  color: white;
  padding: 36px 24px 12px;
  height: auto !important;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto 40px;
}

.footer-brand .f-logo { font-size: 18px; font-weight: 700; color: white; margin-bottom: 14px; }
.footer-brand .f-info { font-size: 16px; line-height: 2; color: rgba(255,255,255,0.9); }
.footer-brand .f-info a { color: rgba(255,255,255,0.9);}

.footer-col-title { font-size: 16px; font-weight: 700; color: rgba(255,255,255,0.9); letter-spacing: 0.08em; margin-bottom: 14px; }
.footer-links { list-style: none; padding-left: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.9); text-decoration: none; }
.footer-links a:hover { color: white; }

.footer-cta {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}
.footer-cta p { font-size: 13px; color: rgba(255,255,255,0.8); margin-bottom: 16px; line-height: 1.8; }
.btn-cta-footer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--navy);
  padding: 11px 24px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-cta-footer:hover { opacity: 0.9; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 12px;
  text-align: center;
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== PAGE TOP BUTTON ===== */
#page-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: rgba(0,30,80,0.8);
  backdrop-filter: blur(2px) saturate(1.5);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(10,40,85,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0s 0.3s, transform 0.3s ease, background 0.2s;
  z-index: 150;
}
#page-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}
#page-top:hover {
  background: var(--navy-mid);
  transform: translateY(-3px);
}
#page-top svg {
  width: 20px; height: 20px;
  stroke: white;
}

/* ===== RESPONSIVE ===== */
@media (width < 768px) {
  header { padding: 0 16px; }
  nav, .btn-contact { display: none; }
  .hamburger { display: flex; }

  .hero {
    padding: 100px 20px 60px;
    min-height: auto;
  }
  .hero-title { font-size: 36px; }
  .hero-badge { width: 80px; height: 80px; top: 72px; left: 16px; }
  .hero-badge .badge-num { font-size: 22px; }
  
  #page-top {
  bottom: 20px;
  right: 16px;
  width: 42px;
  height: 42px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;}
}

@media (width < 431px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  .footer-grid > *:first-child {
    grid-column: 1 / -1;
  }
}