/* 元八塾 公式サイト */
:root {
  --bg: #ffffff;
  --ink: #111111;
  --sub: #8a8a8e;        /* 補足文 */
  --head-sub: #b0b0b4;   /* 見出しのグレー部分 */
  --rule: #e5e5e7;
  --placeholder: #f2f2f4;
  --radius: 8px;
  --gutter: 20px;
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}
@media (min-width: 820px) { :root { --gutter: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  padding-bottom: 84px;            /* スマホの固定LINEボタンの分 */
  overflow-wrap: anywhere;
  line-break: strict;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: var(--bg); padding: 8px 12px; }

/* 大見出し(h1・各セクションの見出し) */
.hero h1, .pagehead h1, .sec h2 {
  font-size: 34px; line-height: 1.15; letter-spacing: -.01em; font-weight: 400;
}
@media (min-width: 820px) {
  .hero h1, .pagehead h1, .sec h2 { font-size: 56px; }
}

/* ---------- header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.logo { display: flex; flex-direction: column; line-height: 1.4; text-decoration: none; }
.logo-name { font-size: 14px; font-weight: 500; letter-spacing: .04em; }
.logo-sub { font-size: 11px; color: var(--sub); }
.site-nav ul { display: flex; gap: 4px; }
.site-nav a {
  display: block; padding: 10px 6px; font-size: 13px; color: var(--sub); text-decoration: none;
  transition: color .2s;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
@media (min-width: 820px) {
  .header-inner { min-height: 68px; }
  .site-nav ul { gap: 20px; }
}

/* ---------- LINE button */
.cta { margin: 32px 0 0; }
.btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 28px;
  background: var(--ink); color: #fff;
  font-size: 16px; font-weight: 500; letter-spacing: .02em;
  text-decoration: none; border-radius: var(--radius);
  transition: opacity .2s;
}
.btn-line:hover { opacity: .8; }
.btn-line .icon { flex: none; }

.line-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--rule);
}
.line-bar .cta { margin: 0; }
.line-bar .btn-line { display: flex; width: 100%; }
@media (min-width: 820px) {
  body { padding-bottom: 0; }
  .line-bar { display: none; }
}

/* ---------- first view */
.hero { padding: 32px 0 40px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero h1 { color: var(--head-sub); }
.hero h1 strong { color: var(--ink); font-weight: 400; }
.lead { margin-top: 24px; color: var(--sub); }
.hero-photo { margin: 0; }
.hero-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius); background: var(--placeholder);
  filter: grayscale(1);
}
@media (min-width: 820px) {
  .hero { padding: 72px 0 72px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  .lead { margin-top: 32px; }
}

.wide-photo img {
  width: 100%; height: 240px; object-fit: cover;
  border-radius: var(--radius); background: var(--placeholder);
}
@media (min-width: 820px) { .wide-photo img { height: 560px; } }

/* ---------- sections(左に短い見出し、右に本文) */
.sec { border-top: 1px solid var(--rule); padding: 64px 0; }
.wide-photo + .sec, .hero + .sec { margin-top: 64px; }
.sec-grid { display: grid; gap: 32px; }
.sec-body { max-width: 44em; }
.intro { margin-bottom: 32px; }
.intro:last-child { margin-bottom: 0; }
.outro { margin-top: 32px; color: var(--sub); }
@media (min-width: 820px) {
  .sec { padding: 96px 0; }
  .wide-photo + .sec, .hero + .sec { margin-top: 96px; }
  .sec-grid { grid-template-columns: 1fr 2fr; column-gap: 48px; row-gap: 56px; }
  .sec-full { grid-column: 1 / -1; }
}

/* 行で区切るリスト(お悩み・経歴・コース・入塾までなど) */
.rows > .row { border-top: 1px solid var(--rule); padding: 24px 0; }
.rows > .row:last-child { border-bottom: 1px solid var(--rule); }
.row h3 { font-size: 20px; line-height: 1.5; margin-bottom: 8px; }
.row p { color: var(--sub); }
.row .more { margin-top: 12px; }
.num { display: block; font-size: 11px; letter-spacing: .08em; color: var(--sub); margin-bottom: 6px; font-variant-numeric: tabular-nums; }

/* 「指導」の4枚カード */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.feature {
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg);
  padding: 16px 14px 20px;
}
.feature .num { margin-bottom: 20px; }
.feature .icon { display: block; margin-bottom: 16px; }
.feature h3 { font-size: 20px; line-height: 1.4; margin-bottom: 12px; }
.feature p { font-size: 14px; line-height: 1.8; color: var(--sub); }
.feature p:first-of-type { font-size: 15px; color: var(--ink); margin-bottom: 8px; }
@media (min-width: 820px) {
  .features { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .feature { padding: 20px 20px 28px; }
  .feature .num { margin-bottom: 32px; }
}

/* 「塾長」原点ストーリー */
.sec-story .sec-body { max-width: 32em; }
.sec-story p { margin-bottom: 24px; }
.fold summary {
  display: inline-block; cursor: pointer; list-style: none;
  text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px;
  padding: 6px 0;
}
.fold summary::-webkit-details-marker { display: none; }
.fold[open] summary { margin-bottom: 24px; }
.fold[open] .label { display: none; }
.fold[open] summary::after { content: "閉じる"; }
.fold p:last-child { margin-bottom: 0; }

/* 保護者の声(準備中の枠) */
.sec-voices .row h3 { color: var(--sub); font-size: 16px; }

.more { margin-top: 24px; }
.more a { text-decoration: underline; }

/* ---------- tables(横罫だけ) */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; font-weight: 400; }
thead th { font-size: 13px; color: var(--sub); padding-top: 0; }
tbody th { padding-right: 16px; }
td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec-place td { text-align: left; white-space: normal; }
.table-wrap + p { margin-top: 24px; }

/* ---------- 下層ページ見出し */
.pagehead { padding: 48px 0 56px; }
@media (min-width: 820px) { .pagehead { padding: 96px 0; } }

/* ---------- footer */
.site-footer { border-top: 1px solid var(--rule); padding: 64px 0 32px; margin-top: 0; }
.footer-cta { display: grid; gap: 24px; padding-bottom: 64px; }
.footer-title { font-size: 28px; line-height: 1.25; letter-spacing: -.01em; font-weight: 400; margin: 0; }
.footer-actions .cta { margin: 0; }
.footer-mail { margin: 16px 0 0; }
.footer-note { margin: 12px 0 0; font-size: 14px; color: var(--sub); }
.footer-bottom { border-top: 1px solid var(--rule); padding-top: 24px; font-size: 14px; color: var(--sub); }
.footer-bottom address { font-style: normal; line-height: 1.9; margin-bottom: 16px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 16px; }
.footer-nav a { display: inline-block; padding: 6px 0; }
.copy { margin: 0; }
@media (min-width: 820px) {
  .site-footer { padding: 96px 0 40px; }
  .footer-cta { grid-template-columns: 1fr 1fr; align-items: center; padding-bottom: 96px; }
  .footer-title { font-size: 40px; }
}

/* ---------- スクロールで出てくる動き(JSが動くときだけ) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease-out, transform .6s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
