/* ========================================
   横山製作所 - ベーススタイル（CSS変数・基本設定）
   ======================================== */

:root {
  /* カラーパレット */
  --emphasis: #000000;
  --accent-color: #FFD700;
  --main-text: #333333;
  --bg-white: #ffffff;
  --bg-gray: #f5f5f5;
  --border-line: #e6e6e6;
  --auxiliary-text: #9ca3af;
  --decoration-border: rgba(0,0,0,0.15);

  /* スペーシング */
  --space-xs: 0.4rem;
  --space-sm: 0.8rem;
  --space-md: 1.6rem;
  --space-lg: 2.4rem;
  --space-xl: 3.2rem;
  --space-2xl: 4.8rem;

  /* タイポグラフィ */
  --font-japanese: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  
  --text-xs: 1.2rem;
  --text-sm: 1.4rem;
  --text-base: 1.6rem;
  --text-lg: 1.8rem;
  --text-xl: 2.0rem;
  --text-2xl: 2.4rem;
  --text-3xl: 3.2rem;
  --text-4xl: 4.0rem;

  /* エフェクト */
  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
}

/* リセット・基本設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-japanese);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: 1.75;
  color: var(--main-text);
  background-color: var(--bg-white);
  letter-spacing: 0.05em;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* タイポグラフィ */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-sm);
  color: var(--main-text);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

a {
  color: var(--main-text);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--emphasis);
}

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

/* テキストオーバーフロー対策 */
* {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* 日本語テキストの改行設定 */
p, h1, h2, h3, h4, h5, h6, div, span {
  word-break: break-all;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

/* ユーティリティクラス */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; align-items: center; }

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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