/**
 * main.css
 * リセット・共通レイアウト・コンポーネント
 * セクション固有のスタイルは assets/css/sections/ に書く
 */

/* ===========================
   リセット
=========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ja);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text-primary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea {
  font-family: inherit;
}


/* ===========================
   共通コンテナ
=========================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}


/* ===========================
   見出し共通
=========================== */
.section-title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-lg);
}

.section-label {
  display: inline-block;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

@media (min-width: 1024px) {
  .section-title {
    font-size: var(--fs-3xl);
  }
}


/* ===========================
   ボタン共通
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.875rem 2rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  border-radius: var(--radius-sm);
  transition: var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-white);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-light);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}


/* ===========================
   ヘッダー
=========================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border-light);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo img {
  height: 36px;
  width: auto;
}

.site-logo {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
}

.header-phone {
  display: none;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}

.header-phone strong {
  color: var(--color-text-primary);
  font-size: var(--fs-md);
  font-weight: 700;
}

/* ハンバーガーメニュー（モバイル） */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  transition: var(--transition-normal);
}


/* ===========================
   フッター
=========================== */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-muted);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.site-footer a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  font-size: var(--fs-xs);
  text-align: center;
  color: var(--color-text-muted);
}

/* ===========================
   ハンバーガーメニュー（開閉）
=========================== */

/* PCナビ（デフォルト非表示） */
.global-nav {
  display: none;
}

/* モバイルメニュー（オーバーレイ） */
@media (max-width: 1023px) {
  .global-nav {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(22, 25, 29, 0.98);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding-top: 72px;
  }

  .global-nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .global-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - 72px);
    gap: 2.5rem;
    padding: 0;
    margin: 0;
  }

  .global-nav a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.08em;
  }
}

/* PC（1024px以上）では通常のナビ表示 */
@media (min-width: 1024px) {
  .global-nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    opacity: 1;
    visibility: visible;
    display: block;
  }

  .global-nav ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .global-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #16191d;
  }

  /* PC幅ではハンバーガーメニュー非表示 */
  .hamburger {
    display: none;
  }
}

/* ハンバーガーボタン z-index（メニューより前面に） */
/* ハンバーガーボタン z-index（メニューより前面に） */
.hamburger {
  position: relative;
  z-index: 201;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}

/* ハンバーガーメニューアイコンのアニメーション */
.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);
}

/* メニュー開中はスクロール禁止 */
body.menu-open {
  overflow: hidden;
}


/* ===========================
   スクロール時ヘッダー
=========================== */
.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

/* ===========================
   スクロールアニメーション
=========================== */
.anim-fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.anim-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}