@charset "UTF-8";

/* =========================================================
   おとのわピアノ教室 — 共通スタイル
   トーン: 元気系（明るい・気さく・面倒見がいい）
   ========================================================= */

:root {
  --accent: #E5601D;
  --accent-dark: #BF4A11;
  --accent-light: #FDF1E7;
  --accent2: #F2B01F;
  --ink: #3A2E28;
  --ink-mid: #6E5F56;
  --ink-light: #9A8B81;
  --line: #EADFD5;
  --bg: #FFFFFF;
  --bg-soft: #FFF8F0;

  --radius: 16px;
  --radius-lg: 999px;
  --container: 1080px;

  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}

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

a { color: var(--accent-dark); }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .03em;
  margin: 0;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------- レイアウト ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

.section { padding-block: 64px; }

.section--soft { background: var(--bg-soft); }

.section__head { margin-bottom: 32px; }

.section__label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section__title { font-size: 24px; }

.section__lead {
  margin-top: 16px;
  color: var(--ink-mid);
  max-width: 720px;
}

/* ---------- ヘッダー ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.logo__mark { flex: none; color: var(--accent); }

.header__actions { display: flex; align-items: center; gap: 8px; }

/* ハンバーガー */

.nav-toggle {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: .4s ease;
}

.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-toggle span:nth-child(3) { top: 29px; }

.nav-toggle.open span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 23px; transform: rotate(-45deg); }

.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 8px 16px 24px;
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition: .4s ease;
}

.nav.open { opacity: 1; transform: translateY(0); visibility: visible; }

/* メニューを開いたとき、背後のページを暗くして境目を作る */

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(58, 46, 40, .45);
  opacity: 0;
  visibility: hidden;
  transition: .4s ease;
}

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

.nav__list { display: flex; flex-direction: column; }

.nav__list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.nav__list a[aria-current="page"] { color: var(--accent); }

.nav__tel {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-mid);
}

.nav__tel a { font-weight: 700; font-size: 20px; }

/* ---------- ボタン ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: .2s ease;
}

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }

.btn--ghost {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent-dark);
}
.btn--ghost:hover { background: var(--accent-light); }

.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }

.header .btn--sm { display: none; }

/* ---------- ヒーロー ---------- */

.hero { background: var(--bg-soft); }

.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero__body { padding-block: 40px 64px; }

.hero__title { font-size: 28px; }

.hero__title span,
.hero__title em { display: inline-block; }

.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__text {
  margin-top: 16px;
  color: var(--ink-mid);
  max-width: 640px;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 32px;
}

.hero__note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-light);
}

/* ---------- お知らせ ---------- */

.news { border-top: 1px solid var(--line); }

.news__list li + li { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }

.news__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 8px;
}

.news__date { font-size: 13px; color: var(--ink-light); }

.news__tag {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: var(--radius-lg);
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

/* ---------- 特徴（2カラム交互） ---------- */

.feature + .feature { margin-top: 48px; }

.feature__media { border-radius: var(--radius); overflow: hidden; }

.feature__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .3s ease;
}

.feature__media:hover img { transform: scale(1.03); }

.feature__body { margin-top: 24px; }

.feature__num {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .08em;
}

.feature__title { font-size: 22px; margin-top: 8px; }

.feature__text { margin-top: 16px; color: var(--ink-mid); }

/* ---------- カード ---------- */

.cards { display: grid; gap: 24px; }

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg);
}

.card__title { font-size: 18px; }

.card__age {
  display: inline-block;
  /* .card は縦フレックスなので、これがないとタグがカード幅いっぱいに伸びる */
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 2px 12px;
  border-radius: var(--radius-lg);
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

/* 文量をコースごとに変えているので、テキストを伸ばして金額を下端で揃える */
.card__text { flex: 1; margin-top: 16px; color: var(--ink-mid); font-size: 15px; }

.card__price {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.card__price strong { font-size: 22px; color: var(--accent-dark); }

/* ---------- 表 ---------- */

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  padding: 16px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  font-size: 14px;
  color: var(--ink-mid);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

tbody th { font-weight: 700; white-space: nowrap; }

.table-note { margin-top: 16px; font-size: 13px; color: var(--ink-light); }

/* コース説明。数値は表で比べてもらい、内容はここで読ませる */
.course-notes { margin-top: 32px; display: grid; gap: 20px; }
.course-notes p { color: var(--ink-mid); font-size: 15px; }
.course-notes strong { color: var(--ink); }

/* 空き状況 */

.slot { font-weight: 700; }
.slot--open { color: var(--accent-dark); }
.slot--full { color: var(--ink-light); font-weight: 400; }

/* ---------- 流れ ---------- */

.flow { counter-reset: step; }

.flow__item {
  position: relative;
  padding-left: 48px;
  padding-bottom: 32px;
}

.flow__item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.flow__item::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 40px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.flow__item:last-child { padding-bottom: 0; }
.flow__item:last-child::after { display: none; }

.flow__title { font-size: 18px; }

.flow__text { margin-top: 8px; color: var(--ink-mid); font-size: 15px; }

/* ---------- 講師 ---------- */

.teacher__photo { border-radius: var(--radius); overflow: hidden; }

.teacher__photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.teacher__name { font-size: 24px; margin-top: 24px; }

.teacher__role { font-size: 14px; color: var(--accent); font-weight: 700; }

.teacher__text { margin-top: 16px; color: var(--ink-mid); }

.teacher__text + .teacher__text { margin-top: 16px; }

.history li {
  display: flex;
  gap: 16px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.history dt, .history__year {
  flex: none;
  width: 88px;
  color: var(--ink-light);
  font-size: 14px;
}

/* ---------- FAQ ---------- */

.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.faq__item + .faq__item { margin-top: 16px; }

.faq__q {
  display: flex;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
}

.faq__q::before { content: "Q"; color: var(--accent); flex: none; }

.faq__a {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  color: var(--ink-mid);
  font-size: 15px;
}

.faq__a::before { content: "A"; color: var(--ink-light); font-weight: 700; flex: none; }

/* ---------- フォーム ---------- */

.form { display: grid; gap: 24px; max-width: 720px; }

.field { display: grid; gap: 8px; }

.field__label { font-weight: 700; font-size: 15px; }

.field__req {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-lg);
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 12px;
}

.field__any {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-lg);
  background: #F2EEE9;
  color: var(--ink-mid);
  font-size: 12px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
}

.field textarea { min-height: 144px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.field__help { font-size: 13px; color: var(--ink-light); }

.form__note {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 14px;
  color: var(--ink-mid);
}

/* ---------- 情報リスト ---------- */

.info { border-top: 1px solid var(--line); }

.info > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.info dt { font-size: 14px; color: var(--ink-light); }

.info dd { margin: 0; }

/* ---------- CTA帯 ---------- */

.cta { background: var(--accent); color: #fff; text-align: center; }

.cta__title { font-size: 24px; }

.cta__text { margin-top: 16px; opacity: .95; }

.cta .btn {
  margin-top: 32px;
  background: #fff;
  color: var(--accent-dark);
}

.cta .btn:hover { background: var(--accent-light); }

/* ---------- フッター ---------- */

.footer {
  padding-block: 48px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }

.footer__nav a { color: var(--ink); text-decoration: none; }
.footer__nav a:hover { text-decoration: underline; }

.footer__copy { margin-top: 32px; color: var(--ink-light); font-size: 13px; }

.footer__demo {
  margin-top: 24px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-mid);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- ページヘッダー ---------- */

.page-head { background: var(--bg-soft); padding-block: 40px; }

.page-head h1 { font-size: 28px; }

.page-head p { margin-top: 16px; color: var(--ink-mid); }

.breadcrumb { font-size: 13px; color: var(--ink-light); margin-bottom: 16px; }

.breadcrumb a { color: var(--ink-mid); }

/* ---------- フェードイン ---------- */

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

.fade-in.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .feature__media img { transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   640px〜
   ========================================================= */

@media (min-width: 640px) {
  .hero__cta { flex-direction: row; flex-wrap: wrap; }
  .cards--2 { grid-template-columns: repeat(2, 1fr); }
  .info > div { flex-direction: row; gap: 24px; }
  .info dt { flex: none; width: 160px; padding-top: 2px; }
}

/* =========================================================
   768px〜
   ========================================================= */

@media (min-width: 768px) {
  .container { padding-inline: 24px; }
  .section { padding-block: 96px; }
  .section__title { font-size: 32px; }
  .section__head { margin-bottom: 40px; }

  .header__inner { min-height: 80px; }
  .nav-toggle { display: none; }

  /* ハンバーガーを隠す幅では、開いた状態が残っていてもオーバーレイを出さない */
  .nav-overlay { display: none; }

  /* PCではロゴ → ナビ → 申し込みボタンの順に並べる */
  .header__inner .logo { order: 1; font-size: 17px; }
  .header__inner .nav { order: 2; margin-left: auto; }
  .header__inner .header__actions { order: 3; }

  /* 768〜1023pxはヘッダーの横幅が足りないので、申し込みボタンを出さない。
     ヒーローと各ページ下部のCTAで受ける */
  .nav__list { gap: 16px; white-space: nowrap; }

  .nav {
    position: static;
    opacity: 1;
    transform: none;
    visibility: visible;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav__list { flex-direction: row; gap: 24px; }

  .nav__list a {
    min-height: 0;
    border: 0;
    font-size: 15px;
  }

  .nav__tel { display: none; }

  .hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
  }

  .hero__body { padding-block: 80px; }
  .hero__title { font-size: 34px; }
  .hero__media img { aspect-ratio: 3 / 4; border-radius: var(--radius); }

  .feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
  }

  .feature + .feature { margin-top: 64px; }
  .feature:nth-child(even) .feature__media { order: 2; }
  .feature__body { margin-top: 0; }

  .card { padding: 24px; }

  .teacher {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 48px;
    align-items: start;
  }

  .teacher__name { margin-top: 0; }

  .page-head { padding-block: 64px; }
  .page-head h1 { font-size: 44px; }

  .cta__title { font-size: 32px; }
}

/* =========================================================
   1024px〜
   ========================================================= */

@media (min-width: 1024px) {
  .hero__inner { gap: 64px; }
  .hero__title { font-size: 44px; }
  .feature { gap: 64px; }

  .header__inner .logo { font-size: 18px; }
  .header .btn--sm { display: inline-flex; }
  .nav__list { gap: 24px; }

  /* 3カラムは1024pxから。768pxで3列にすると本文が1行11文字まで狭まり、
     文量の少ないカードに空白が溜まる（DESIGN.md 5章「3カラムは安易に使わない」） */
  .cards--3 { grid-template-columns: repeat(3, 1fr); }
}
