/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section spacing */
.section { padding: var(--space-xl) 0; }
.section-sm { padding: var(--space-lg) 0; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--trans);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; padding: 0 2rem;
  max-width: 1400px; margin: 0 auto;
}
.logo img { height: 44px; width: auto; }
.global-nav ul { display: flex; align-items: center; gap: 2.5rem; }
.global-nav a {
  font-size: .875rem; font-weight: 500; color: var(--color-text);
  position: relative; padding-bottom: 4px;
  transition: color var(--trans);
  white-space: nowrap;
}
.global-nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--color-accent);
  transition: width var(--trans);
}
.global-nav a:hover, .global-nav a.active { color: var(--color-accent); }
.global-nav a:hover::after, .global-nav a.active::after { width: 100%; }
.nav-cta {
  display: flex; align-items: center; gap: 1rem; margin-left: 2rem;
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column;
  justify-content: center; gap: 5px;
  width: 36px; height: 36px; cursor: pointer;
  background: none; border: none; padding: 2px;
}
.hamburger span {
  display: block; width: 100%; height: 2px;
  background: var(--color-primary);
  transition: transform .3s ease, opacity .3s ease;
  border-radius: 2px;
}
.hamburger.is-active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu — display:block 固定、right で出し入れ */
.mobile-menu {
  position: fixed;
  top: 70px; right: -100%; bottom: 0;
  width: 80%; max-width: 360px;
  background: var(--color-primary);
  z-index: 3000; overflow-y: auto;
  padding: 2rem 1.5rem;
  transition: right .3s ease;
}
.mobile-menu.is-active { right: 0; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 1.5rem; }
.mobile-menu a {
  color: #fff; font-size: 1.05rem; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

/* メニュー開放時のオーバーレイ（JS が div.menu-overlay を生成してクリック閉じを実現） */
.menu-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 2999;
  cursor: pointer;
}
body.menu-open .menu-overlay { display: block; }
body.menu-open { overflow: hidden; }

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.8);
  padding: var(--space-lg) 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 260px 1fr 1fr 1fr;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
}
.footer-brand { }
.footer-brand .logo img { height: 40px; filter: brightness(0) invert(1); margin-bottom: 1rem; }
.footer-brand p { font-size: .85rem; line-height: 1.8; }
.footer-col h4 {
  font-size: .8rem; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: #fff;
  margin-bottom: 1rem; padding-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.2);
}
.footer-col ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { font-size: .85rem; transition: color var(--trans); }
.footer-col a:hover { color: #fff; }
.footer-address {
  font-size: .8rem; opacity: .7; line-height: 1.8;
  margin-top: 1rem; font-style: normal;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  text-align: center; padding: 1.25rem;
  font-size: .8rem; color: rgba(255,255,255,.5);
}

/* main offset for fixed header */
main { padding-top: 70px; }

/* Responsive */
@media (max-width: 1200px) {
  .global-nav ul { gap: 1.5rem; }
  .global-nav a { font-size: .8rem; }
  .nav-cta { margin-left: 1rem; }
  .nav-cta .btn { padding: .65rem 1.2rem; font-size: .8rem; }
}
@media (max-width: 1024px) {
  .global-nav, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 0; padding-bottom: var(--space-md); }
  .footer-brand { padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: .25rem; }
  .footer-col { padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .footer-col:last-child { border-bottom: none; }
  .footer-col h4 { margin-bottom: .6rem; }
  .section { padding: var(--space-lg) 0; }
}
