@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&display=swap');

@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/noto-serif-jp-logo-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../assets/fonts/noto-serif-jp-logo-900.woff2') format('woff2');
}
/* 五月女社会保険労務管理事務所 - 共通スタイルシート */
/* 日本一革新的でおしゃれなデザイン */

:root {
  /* メインカラー - 白とベージュ基調 */
  --primary-color: #C9A97B;
  --primary-light: #E8DDD0;
  --primary-lighter: #F5EFE7;
  --primary-dark: #A0877A;
  --primary-darker: #F5EFE7;

  --secondary-color: #B8936A;
  --secondary-light: #D4C4B0;
  --secondary-lighter: #E8DDD0;
  --secondary-dark: #967856;
  --secondary-darker: #7D6247;

  --accent-color: #D4AF77;
  --accent-light: #E8D4B0;
  --accent-lighter: #F5EAD6;
  --accent-dark: #B8936A;
  --accent-darker: #9A7A56;

  --success-color: #A8C2A0;
  --success-light: #C9D9C3;
  --success-lighter: #E0EBD9;
  --success-dark: #88A880;

  --warning-color: #D4AF77;
  --warning-light: #E8D4B0;
  --warning-dark: #B8936A;

  --danger-color: #C9988A;
  --danger-light: #E0C3B8;
  --danger-dark: #A87D6F;

  --info-color: #A8BFC9;
  --info-light: #C9D9E0;
  --info-dark: #88A0B0;

  /* 追加のアクセントカラー */
  --warm-beige: #E8DDD0;
  --cool-beige: #D9CFC3;
  --soft-brown: #B8A08D;
  --light-gold: #E8D4B0;
  --sage-green: #B8C9A8;
  --dusty-rose: #D9C3C3;

  /* 背景色 - アイボリー基調のグラデーション */
  --bg-gradient-start: #FFF8F0;
  --bg-gradient-mid: #FFF5EB;
  --bg-gradient-end: #FFF0E6;
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-bg-hover: rgba(255, 255, 255, 0.98);
  --overlay-bg: rgba(255, 248, 240, 0.95);
  --glass-bg: rgba(255, 248, 240, 0.9);

  /* テキストカラー - ベージュ系 */
  --text-primary: #8B7355;
  --text-secondary: #A0877A;
  --text-light: #B8A08D;
  --text-lighter: #C9B8A8;
  --text-white: #FFFFFF;

  /* シャドウ - ベージュ系の柔らかい影 */
  --shadow-xs: 0 1px 3px rgba(160, 135, 122, 0.12);
  --shadow-sm: 0 2px 8px rgba(160, 135, 122, 0.15);
  --shadow-md: 0 4px 16px rgba(160, 135, 122, 0.18);
  --shadow-lg: 0 8px 32px rgba(160, 135, 122, 0.22);
  --shadow-xl: 0 12px 48px rgba(160, 135, 122, 0.25);
  --shadow-2xl: 0 24px 64px rgba(160, 135, 122, 0.28);
  --shadow-inner: inset 0 2px 4px rgba(139, 115, 85, 0.06);

  /* ボーダー */
  --border-radius-xs: 8px;
  --border-radius-sm: 12px;
  --border-radius-md: 20px;
  --border-radius-lg: 30px;
  --border-radius-xl: 40px;
  --border-radius-full: 9999px;

  /* トランジション - より滑らかなアニメーション */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* スペーシング */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* リセット＆ベーススタイル */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Hiragino Sans', 'Meiryo', sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  font-size: 16px;
  letter-spacing: 0.03em;
  font-feature-settings: "palt" 1;
  text-rendering: optimizeLegibility;
}

/* セレクション */
::selection {
  background: var(--primary-light);
  color: var(--text-white);
}

::-moz-selection {
  background: var(--primary-light);
  color: var(--text-white);
}

/* フォーカス */
:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

/* アクセシビリティ - スクリーンリーダー専用テキスト */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ヘッダー - より洗練されたデザイン */
.header {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: var(--transition-normal);
  border-bottom: 1px solid rgba(201, 169, 123, 0.08);
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), var(--secondary-color), transparent);
  opacity: 0;
  transition: var(--transition-normal);
}

.header:hover::after {
  opacity: 1;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-decoration: none;
  transition: var(--transition-bounce);
  letter-spacing: -0.02em;
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary-color);
  transition: var(--transition-normal);
  border-radius: var(--border-radius-full);
}

.logo:hover {
  transform: scale(1.05) translateY(-2px);
}

.logo:hover::after {
  width: 100%;
}

.logo {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  line-height: 1.2;
  gap: 0;
  white-space: nowrap;
}
.logo-name {
  font-family: "Cormorant Garamond", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary-dark);
}
/* 左上ヘッダーの事務所名だけ：太め＋明朝寄り */
.header .logo .logo-name {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(0.95rem, 1.35vw, 1.2rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.logo-sub {
  display: none;
}
.footer-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.footer-brand .logo-name {
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  font-weight: 700;
}
.footer-brand .logo-sub {
  display: none;
}
@media (max-width: 768px) {
  .logo { white-space: normal; }
  .logo-name { font-size: clamp(0.82rem, 3.4vw, 1.05rem); }
  .header .logo .logo-name { font-size: clamp(0.9rem, 3.6vw, 1.15rem); }
  .footer-brand { white-space: normal; }
  .footer-brand .logo-name { font-size: clamp(0.85rem, 3.2vw, 1.05rem); font-weight: 700; }
}


.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.2rem;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

.nav-link {
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--border-radius-lg);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 123, 0.15), transparent);
  transition: var(--transition-normal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-fast);
  transform: translateX(-50%);
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link:hover {
  color: var(--primary-color);
  background: rgba(201, 169, 123, 0.08);
  transform: translateY(-2px);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.nav-link.active::after {
  display: none;
}

/* コンテナ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-xl);
}

.page-content {
  min-height: calc(100vh - 200px);
}

/* カード - より魅力的なデザイン */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(201, 169, 123, 0.1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 123, 0.15), transparent);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px) scale(1.02);
  background: var(--card-bg-hover);
  border-color: rgba(201, 169, 123, 0.25);
}

.card:hover::before {
  opacity: 1;
}

.card:hover::after {
  width: 500px;
  height: 500px;
}

/* ボタン - より洗練されたインタラクション */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 1rem 2.5rem;
  border: none;
  border-radius: var(--border-radius-lg);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out;
  z-index: -1;
}

.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%) rotate(45deg);
  transition: transform 0.6s ease;
}

.btn:hover::before {
  width: 400px;
  height: 400px;
}

.btn:hover::after {
  transform: translateX(100%) rotate(45deg);
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: var(--primary-color);
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-2xl);
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary-color);
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-2xl);
  background: var(--secondary-dark);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline::before {
  background: var(--primary-color);
}

.btn-outline:hover {
  color: var(--text-white);
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-dark);
  background: var(--primary-color);
}

/* フォーム - より使いやすいデザイン */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: color 0.3s ease;
}

.form-group:focus-within .form-label {
  color: var(--primary-color);
}

.form-input,
.form-textarea,
select.form-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 2px solid rgba(201, 169, 123, 0.15);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: var(--text-white);
  color: var(--text-primary);
  position: relative;
}

.form-input:hover,
.form-textarea:hover {
  border-color: rgba(201, 169, 123, 0.35);
  box-shadow: 0 2px 8px rgba(201, 169, 123, 0.08);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(201, 169, 123, 0.2), 0 4px 12px rgba(201, 169, 123, 0.15);
  transform: translateY(-2px) scale(1.01);
  background: rgba(255, 255, 255, 1);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.75;
}

/* プレースホルダー */
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.form-input:focus::placeholder,
.form-textarea:focus::placeholder {
  opacity: 0.4;
}

/* セクション */
.section {
  padding: var(--spacing-3xl) 0;
}

.section-title {
  font-size: 2.1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-md);
  color: var(--primary-dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-3xl);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* グリッド */
.grid {
  display: grid;
  gap: var(--spacing-xl);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* フッター - より魅力的なデザイン */
.footer {
  background: var(--primary-darker);
  color: var(--text-primary);
  padding: var(--spacing-3xl) var(--spacing-xl) var(--spacing-lg);
  margin-top: var(--spacing-3xl);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-color);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto var(--spacing-xl);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  /* アクセスのカード間隔と同じ 1.5rem */
  gap: 1.5rem;
}

/* ブランド→サービスはカード1つ分＋gapで、所在地↔営業時間に近い「空き」 */
.footer-content > .footer-section:first-child {
  flex: 0 1 16rem;
  margin-right: clamp(4.5rem, 12vw, 9rem); /* 事務所名とサービスをさらに離す */
  min-width: min(100%, 12rem);
}

/* サービス・お問い合わせ・法的情報：同幅・等間隔、やや左寄り */
.footer-content > .footer-section:not(:first-child) {
  flex: 0 1 10.5rem;
  max-width: 12rem;
  text-align: left;
}

.footer-section h3 {
  margin-bottom: var(--spacing-md);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* 下部3項目はロゴ名(1.55rem) より小さく */
.footer-content > .footer-section:not(:first-child) h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.footer-content > .footer-section:not(:first-child) p,
.footer-content > .footer-section:not(:first-child) a {
  font-size: 0.88rem;
  line-height: 1.9;
}


.footer-tagline {
  white-space: nowrap;
  /* 狭いカラムでも改行せず、必要なら少し小さく */
  font-size: clamp(0.78rem, 0.55rem + 0.55vw, 1rem);
  line-height: 1.7;
  display: inline-block;
  max-width: 100%;
}

.footer-section p,
.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 2;
  transition: var(--transition-fast);
}

.footer-section a {
  position: relative;
  display: inline-block;
}

.footer-section a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition-fast);
}

.footer-section a:hover {
  color: var(--accent-color);
  transform: translateX(4px);
}

.footer-section a:hover::after {
  width: 100%;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(139, 115, 85, 0.2);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ユーティリティ */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

/* アニメーション - 滑らかで魔法的な動き */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* 洗練されたアニメーション */
@keyframes magicPop {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-15deg);
  }
  50% {
    transform: scale(1.05) rotate(5deg);
  }
  70% {
    transform: scale(0.95) rotate(-2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes gentleFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-5px) rotate(1deg);
  }
  50% {
    transform: translateY(-10px) rotate(0deg);
  }
  75% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
}

@keyframes slideInBounce {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  60% {
    opacity: 1;
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(5px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes rainbowShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* アニメーションクラス */
.fade-in {
  animation: fadeIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.slide-in {
  animation: slideIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.slide-in-right {
  animation: slideInRight 1s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.scale-in {
  animation: scaleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.magic-pop {
  animation: magicPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.gentle-float {
  animation: gentleFloat 3s ease-in-out infinite;
}

.slide-in-bounce {
  animation: slideInBounce 1s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* アニメーション遅延 */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* 見出しスタイル - 魅力的なタイポグラフィ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: 3.5rem;
  color: var(--primary-dark);
}

h2 {
  font-size: 2.75rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 0.5rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: var(--border-radius-full);
}

h3 {
  font-size: 2rem;
  color: var(--primary-dark);
}

h4 {
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 700;
}

h5 {
  font-size: 1.25rem;
  color: var(--text-primary);
  font-weight: 700;
}

h6 {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 段落スタイル - 読みやすさの最適化 */
p {
  margin-bottom: var(--spacing-md);
  line-height: 2;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

p:last-child {
  margin-bottom: 0;
}

/* 強調テキスト */
strong, b {
  font-weight: 700;
  color: var(--primary-dark);
}

em, i {
  font-style: italic;
  color: var(--secondary-color);
}

/* リスト */
ul, ol {
  margin-bottom: var(--spacing-md);
  padding-left: 2rem;
  line-height: 2;
}

li {
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

/* 引用 */
blockquote {
  border-left: 4px solid var(--primary-color);
  padding: var(--spacing-md) var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  background: linear-gradient(135deg, rgba(245, 239, 231, 0.5), rgba(232, 221, 208, 0.3));
  border-radius: var(--border-radius-sm);
  font-style: italic;
  color: var(--text-secondary);
}

/* ハンバーガーメニュー（モバイル用） */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  position: relative;
}

.mobile-menu-icon {
  width: 30px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: var(--transition-fast);
}

.mobile-menu-toggle.active .mobile-menu-icon span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.mobile-menu-toggle.active .mobile-menu-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .mobile-menu-icon span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* レスポンシブ */
@media (max-width: 1024px) {
  .section-title {
    font-size: 1.85rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }
}


@media (max-width: 1100px) and (min-width: 769px) {
  .header-content { padding: 0.85rem 0.75rem; gap: 0.5rem; }
  .header .logo .logo-name { font-size: clamp(0.85rem, 1.2vw, 1.05rem); }
  .nav { gap: 0.1rem; }
  .nav-link { padding: 0.45rem 0.35rem; font-size: 0.78rem; }
}

/* HP制作依頼の追加に合わせ、中間幅のナビを1行に収める */
@media (min-width: 1101px) and (max-width: 1279px) {
  .nav { gap: 0.1rem; }
  .nav-link { padding: 0.45rem 0.35rem; font-size: 0.78rem; }
}

/* 既存のモバイルナビをタブレット幅にも適用 */
@media (min-width: 769px) and (max-width: 1023px) {
  .mobile-menu-toggle { display: block; }
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(232, 221, 208, 0.98), rgba(245, 239, 231, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 6rem 0 2rem;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
  }
  .nav.active { right: 0; }
  .nav-link {
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    border-radius: 0;
    border-bottom: 1px solid rgba(139, 115, 85, 0.15);
    text-align: left;
  }
  .nav-link:hover { background: rgba(201, 169, 123, 0.2); transform: translateX(10px); }
  .nav-link.active { background: rgba(201, 169, 123, 0.3); box-shadow: none; }
  .nav-link::before, .nav-link::after { display: none; }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
    letter-spacing: 0.025em;
  }

  .header-content {
    flex-direction: row;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-md);
  }

  .logo {
    font-size: 1.35rem;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(232, 221, 208, 0.98), rgba(245, 239, 231, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 6rem 0 2rem;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
  }

  .nav.active {
    right: 0;
  }

  .nav-link {
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    border-radius: 0;
    border-bottom: 1px solid rgba(139, 115, 85, 0.15);
    text-align: left;
  }

  .nav-link:hover {
    background: rgba(201, 169, 123, 0.2);
    transform: translateX(10px);
  }

  .nav-link.active {
    background: rgba(201, 169, 123, 0.3);
    box-shadow: none;
  }

  .nav-link::before,
  .nav-link::after {
    display: none;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  h4 {
    font-size: 1.25rem;
  }

  h5 {
    font-size: 1.125rem;
  }

  h6 {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.65rem;
    line-height: 1.3;
  }

  .section-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
  }

  p {
    line-height: 2.1;
  }

  .container {
    padding: var(--spacing-md);
  }

  .card {
    padding: var(--spacing-lg);
  }

  .btn {
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
  }

  .footer {
    padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-md);
  }

  .footer-content {
    flex-direction: column;
    gap: 1.75rem;
  }

  .footer-content > .footer-section:first-child {
    margin-right: 0;
    flex: 1 1 auto;
  }

  .footer-content > .footer-section:not(:first-child) {
    flex: 1 1 auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
    letter-spacing: 0.03em;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.35rem;
  }

  h4 {
    font-size: 1.15rem;
  }

  h5 {
    font-size: 1.05rem;
  }

  h6 {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.5rem;
    line-height: 1.35;
  }

  .section-subtitle {
    font-size: 1rem;
    line-height: 1.8;
  }

  p {
    line-height: 2.2;
  }

  .btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
  }

  .nav-link {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

/* スクロールバー - より美しいデザイン */
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: var(--bg-gradient-start);
  border-radius: var(--border-radius-xs);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
  border-radius: var(--border-radius-xs);
  border: 2px solid var(--bg-gradient-start);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-dark), var(--primary-color));
}

/* Firefox用スクロールバー */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--bg-gradient-start);
}

/* リンクスタイル */
a {
  color: var(--primary-color);
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* 画像の最適化 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* テーブル */
table {
  border-collapse: collapse;
  width: 100%;
}

/* アクセシビリティ改善 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* プリント用スタイル */
@media print {
  .header,
  .footer,
  .nav,
  .btn {
    display: none;
  }

  body {
    background: white;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ダークモード対応の準備（将来的な拡張用） */
@media (prefers-color-scheme: dark) {
  /* ダークモード時のスタイルをここに追加可能 */
}

/* 減速モーション設定に対応 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
