/* ===================================================
   history.css - ココカラヒストリー ページ専用スタイル
   CENTURY21ココカラ
   =================================================== */

/* ===== Page Header (taller to match directory top) ===== */
.page-header {
  padding: 180px 0 120px;
}

/* ===== History Section Common ===== */
.history-section {
  padding: 140px 0;
  position: relative;
}
.history-section .container {
  position: relative;
  z-index: 1;
}
.history-section .reveal {
  transition: all 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Decorative Large Text ===== */
.history-header-group {
  position: relative;
}
.history-header-group::before {
  content: attr(data-number);
  position: absolute;
  top: -0.3em;
  left: -0.08em;
  font-size: 180px;
  font-weight: 900;
  line-height: 1;
  color: rgba(199, 186, 140, 0.12);
  font-family: var(--font-serif);
  letter-spacing: 0.04em;
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
}
.history-lead .history-header-group {
  display: inline-block;
}
.history-lead .history-header-group::before {
  left: 50%;
  transform: translateX(-50%);
  top: -0.25em;
}
.history-section-dark .history-header-group::before {
  color: rgba(255, 255, 255, 0.15);
}

/* ===== Chapter Label ===== */
.history-chapter-label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.history-section-dark .history-chapter-label {
  color: var(--accent);
}

/* ===== History Heading ===== */
.history-heading {
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

/* ===== Era Subtitle ===== */
.history-era {
  display: block;
  font-size: 14px;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-top: -36px;
  margin-bottom: 48px;
  opacity: 0.6;
}
.history-section-dark .history-era {
  opacity: 0.7;
}

/* ===== History Body Text ===== */
.history-body {
  font-size: 16px;
  line-height: 2.4;
  font-weight: 400;
  max-width: 720px;
}
.history-body + .history-body {
  margin-top: 32px;
}

/* ===== Light Section (white bg) ===== */
.history-section-light {
  background: #fff;
}
.history-section-light .history-heading {
  color: var(--text-main);
}
.history-section-light .history-body {
  color: var(--text-main);
}

/* ===== Dark Section (parallax bg) ===== */
.history-section-dark {
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #333;
  color: #fff;
}
.history-section-dark::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
}
.history-section-dark .history-heading {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.history-section-dark .history-body {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

/* ===== Lead Section ===== */
.history-lead {
  padding: 160px 0;
  text-align: center;
}
.history-lead .history-heading {
  font-size: 38px;
  margin-bottom: 56px;
}
.history-lead .history-body {
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

/* ===== Left-Aligned Section (Chapter 01, 03) ===== */
.history-align-left .reveal {
  transform: translateX(-40px);
}
.history-align-left .reveal.active {
  transform: translateX(0);
}

/* ===== Right-Aligned Section (Chapter 02) ===== */
.history-align-right .history-header-group {
  max-width: 720px;
  margin-left: auto;
}
.history-align-right .history-era {
  max-width: 720px;
  margin-left: auto;
}
.history-align-right .history-body {
  margin-left: auto;
}
.history-align-right .history-header-group::before {
  left: auto;
  right: -0.08em;
}
.history-align-right .reveal {
  transform: translateX(40px);
}
.history-align-right .reveal.active {
  transform: translateX(0);
}

/* ===== Center-Aligned Section (Chapter 04) ===== */
.history-align-center {
  text-align: center;
}
.history-align-center .history-header-group {
  display: inline-block;
}
.history-align-center .history-header-group::before {
  left: 50%;
  transform: translateX(-50%);
}
.history-align-center .history-body {
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  max-width: 680px;
}

/* ===== CTA Link ===== */
.history-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.8);
  padding-bottom: 4px;
  transition: opacity 0.3s, gap 0.3s;
  margin-top: 40px;
  text-decoration: none;
}
.history-cta-link:hover {
  opacity: 0.8;
  gap: 20px;
  border-bottom-color: #fff;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1024px) {
  .history-section {
    padding: 100px 0;
  }
  .history-lead {
    padding: 100px 0;
  }
  .history-heading {
    font-size: 28px;
  }
  .history-lead .history-heading {
    font-size: 30px;
  }
  .history-header-group::before {
    font-size: 140px;
  }
  .history-section-dark {
    background-attachment: scroll;
  }
  /* All sections left-aligned on TB/SP */
  .history-lead {
    text-align: left;
  }
  .history-lead .history-body {
    margin-left: 0;
    margin-right: 0;
  }
  .history-lead .history-header-group {
    display: block;
  }
  .history-lead .history-header-group::before {
    left: -0.08em;
    transform: none;
  }
  .history-align-right .history-header-group {
    max-width: none;
    margin-left: 0;
  }
  .history-align-right .history-body {
    margin-left: 0;
  }
  .history-align-right .history-header-group::before {
    left: -0.08em;
    right: auto;
  }
  .history-align-center {
    text-align: left;
  }
  .history-align-center .history-body {
    margin-left: 0;
    margin-right: 0;
  }
  .history-align-center .history-header-group {
    display: block;
  }
  .history-align-center .history-header-group::before {
    left: -0.08em;
    transform: none;
  }
}

/* ===== Responsive: SP ===== */
@media (max-width: 768px) {
  .history-section {
    padding: 72px 0;
  }
  .history-lead {
    padding: 72px 0;
  }
  .history-heading {
    font-size: 24px;
    margin-bottom: 36px;
  }
  .history-lead .history-heading {
    font-size: 26px;
    margin-bottom: 40px;
  }
  .history-header-group::before {
    font-size: 90px;
  }
  .history-body {
    font-size: 15px;
    line-height: 2.2;
  }
  .history-era {
    margin-top: -24px;
    margin-bottom: 36px;
  }
}
