/* ==========================================================================
   就労女性を対象とした月経教育プログラム ランディングページ
   ========================================================================== */

:root {
  --color-bg: #FAF6EC;
  --color-rose: #E4759B;
  --color-rose-soft: #F3C6D4;
  --color-terracotta: #B87860;
  --color-yellow: #E8C46A;
  --color-sage: #7C9A72;
  --color-blue: #8FAEC7;
  --color-text: #3D3733;
  --color-text-soft: #6B6259;
  --color-card-bg: #FFFFFF;
  --color-border-soft: #E9DED0;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 6px 20px rgba(180, 130, 110, 0.08);
  --shadow-softer: 0 3px 10px rgba(180, 130, 110, 0.06);
  --max-width: 720px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.9;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-terracotta); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-rose);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}

/* ---------- 共通レイアウト ---------- */
.section {
  padding: 56px 20px;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--color-rose);
  font-weight: 600;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 20px;
  line-height: 1.6;
}
.section-lead {
  font-size: 0.98rem;
  color: var(--color-text-soft);
  margin: 0 0 32px;
}

/* ---------- フェードイン ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ---------- ヘッダー / ナビ ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border-soft);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.header-logo {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-terracotta);
  margin: 0;
  white-space: nowrap;
}
.chapter-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chapter-nav a {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--color-rose);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--color-rose);
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.chapter-nav a:hover,
.chapter-nav a:focus-visible {
  background-color: var(--color-rose);
  color: #fff;
  outline: none;
}

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  padding: 40px 20px 48px;
  background: linear-gradient(180deg, #FDFBF6 0%, var(--color-bg) 100%);
  overflow: hidden;
  text-align: center;
}
.hero-deco--flower {
  position: absolute;
  top: 10px;
  right: -10px;
  opacity: 0.7;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-size: 0.75rem;
  color: var(--color-terracotta);
  font-weight: 500;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
}
.hero-title {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.6;
  margin: 0 0 18px;
  color: var(--color-text);
}
.hero-copy {
  font-size: 1rem;
  color: var(--color-text-soft);
  margin: 0 0 24px;
  line-height: 1.9;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
.hero-meta li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--color-text-soft);
  background: #fff;
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  padding: 6px 14px;
}
.hero-meta-icon {
  font-size: 0.9rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-rose);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 15px 36px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--color-rose);
}
.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(228, 117, 155, 0.28);
  outline: none;
}
.cta-arrow {
  display: inline-block;
  animation: bob 1.8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .cta-arrow { animation: none; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.hero-image-wrap {
  margin: 32px auto 0;
  max-width: 280px;
}

/* ---------- About セクション ---------- */
.about-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-softer);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about-card-image {
  max-width: 160px;
  margin: 0 auto;
}
.about-detail {
  margin: 0;
}
.about-detail-row {
  border-top: 1px dashed var(--color-border-soft);
  padding: 14px 0;
}
.about-detail-row:first-child {
  border-top: none;
  padding-top: 0;
}
.about-detail dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-rose);
  margin-bottom: 6px;
}
.about-detail dd {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-soft);
  line-height: 1.8;
}

/* ---------- 学習目標 ---------- */
.goals-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.goal-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-softer);
}
.goal-check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-sage);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.goal-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.8;
}

/* ---------- チャプターカード ---------- */
.chapters-section {
  background-color: #FFFDF8;
}
.chapter-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-soft);
  padding: 22px 18px 26px;
  margin-bottom: 28px;
}
.chapter-card:last-of-type {
  margin-bottom: 36px;
}
.chapter-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.chapter-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-rose);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}
.chapter-heading-group {
  flex: 1;
  min-width: 180px;
}
.chapter-title {
  font-size: 1.12rem;
  font-weight: 600;
  margin: 4px 0 6px;
  line-height: 1.6;
}
.chapter-subtitle {
  font-size: 0.82rem;
  color: var(--color-text-soft);
  margin: 0;
}
.watched-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--color-text-soft);
  cursor: pointer;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.watched-toggle:has(.watched-checkbox:checked) {
  border-color: var(--color-sage);
  background-color: #F1F6EF;
  color: var(--color-sage);
}
.watched-checkbox {
  accent-color: var(--color-sage);
  width: 16px;
  height: 16px;
  margin: 0;
}

.chapter-video {
  margin-bottom: 18px;
}
.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #EFE7DA;
  border: 1px solid var(--color-border-soft);
}
.video-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.chapter-body-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-terracotta);
  margin: 0 0 10px;
}
.chapter-points {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chapter-points li {
  position: relative;
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.8;
}
.chapter-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-rose-soft);
}

/* 視聴済みチャプターの見た目 */
.chapter-card.is-watched {
  border-color: var(--color-sage);
}
.chapter-card.is-watched .chapter-badge {
  background-color: var(--color-sage);
}

/* 進捗サマリー */
.progress-summary {
  text-align: center;
  margin-top: 8px;
}
#progress-text {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin: 0 0 10px;
}
.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background-color: #EFE4D6;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--color-rose);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ---------- まとめセクション ---------- */
.summary-section {
  background: linear-gradient(180deg, #FFFDF8 0%, var(--color-bg) 100%);
}
.summary-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.summary-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  box-shadow: var(--shadow-softer);
}
.summary-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.summary-item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.8;
}
.summary-image-wrap {
  max-width: 200px;
  margin: 0 auto;
}
.summary-closing {
  text-align: center;
  margin-top: 28px;
  font-size: 0.95rem;
  color: var(--color-text-soft);
  line-height: 1.9;
}

/* ---------- フッター ---------- */
.site-footer {
  background-color: #F3ECDD;
  border-top: 1px solid var(--color-border-soft);
  padding: 40px 20px 32px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-block {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border-soft);
}
.footer-block:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.footer-subheading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-terracotta);
  margin: 0 0 10px;
}
.footer-text {
  font-size: 0.82rem;
  color: var(--color-text-soft);
  line-height: 1.85;
  margin: 0 0 8px;
}
.footer-copyright {
  font-size: 0.75rem;
  color: var(--color-text-soft);
  text-align: center;
  margin: 8px 0 0;
}

/* アコーディオン */
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: inherit;
}
.accordion-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-terracotta);
  margin: 0;
}
.accordion-icon {
  font-size: 1.1rem;
  color: var(--color-rose);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
}
.accordion-panel {
  margin-top: 14px;
}
.reference-list {
  margin: 0 0 10px;
  padding-left: 20px;
  font-size: 0.8rem;
  color: var(--color-text-soft);
  line-height: 1.9;
}
.reference-note {
  font-size: 0.76rem;
  color: var(--color-text-soft);
  margin: 0;
}

/* ---------- 先頭へ戻るボタン ---------- */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-rose);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  z-index: 90;
}
.back-to-top[hidden] { display: none; }

/* ---------- フォーカス可視性（アクセシビリティ） ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 2px;
}

/* ==========================================================================
   タブレット・PC 拡張
   ========================================================================== */
@media (min-width: 600px) {
  .hero-title { font-size: 2.1rem; }
  .hero-copy { font-size: 1.08rem; }
  .section-title { font-size: 1.75rem; }
  .about-card {
    flex-direction: row;
    align-items: flex-start;
  }
  .about-card-image { max-width: 180px; flex-shrink: 0; margin: 0; }
  .summary-layout {
    flex-direction: row-reverse;
    align-items: flex-start;
  }
  .summary-list { flex: 1; }
  .summary-image-wrap { flex-shrink: 0; max-width: 220px; margin: 0; }
}

@media (min-width: 860px) {
  :root { --max-width: 840px; }
  .hero-title { font-size: 2.4rem; }
  .hero-inner { padding: 0 20px; }
  .goals-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .chapter-card { padding: 32px 36px 36px; }
}

.chapters-caption-note {
  max-width: 34em;
  margin: 18px 0 36px;
  padding: 12px 16px;
  border: 1px solid var(--color-border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  line-height: 1.85;
  color: var(--color-text-soft);
  text-align: left;
}

.chapter-duration {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 8px 0 0;
  padding: 3px 12px;
  border: 1px solid var(--color-rose-soft);
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--color-terracotta);
}
.chapter-duration-icon { font-size: 0.8rem; line-height: 1; }
