/* 見出しを主役に、登場と開閉に小さな動きを添える。 */
[data-ethos-motion] .reason__card { cursor:default; }
[data-ethos-motion] .sec-reason { scroll-margin-top:76px; }
[data-ethos-motion="junior"] #numbers { scroll-margin-top:76px; }
[data-ethos-motion="junior"] #numbers .stats-table strong {
  position:relative; display:inline-block; white-space:nowrap; transform-origin:right center;
}
.ethos-stat-accent {
  position:absolute; left:0; right:0; bottom:0; height:2px;
  background:currentColor; transform-origin:left center; pointer-events:none;
}
.ethos-flourish-host { position:relative; }
.ethos-flourish {
  position:absolute; top:-24px; right:8px; width:58px; height:34px;
  color:var(--ethos-pink,#e85b81); pointer-events:none;
}
.ethos-flourish i { position:absolute; display:block; }
.ethos-flourish i:nth-child(1) {
  width:20px; height:20px; left:5px; top:10px; background:currentColor;
  clip-path:polygon(50% 0,61% 35%,100% 50%,61% 62%,50% 100%,38% 62%,0 50%,38% 35%);
}
.ethos-flourish i:nth-child(2) {
  width:12px; height:12px; left:33px; top:0;
  border:2px solid currentColor; border-radius:50%; opacity:.65;
}
.ethos-flourish i:nth-child(3) {
  width:5px; height:5px; left:46px; top:24px;
  border-radius:50%; background:currentColor; opacity:.8;
}
.sec-reason__head .ethos-flourish { color:#fff; }
/* 以前の見出しアニメーションも、JS無効時から読める状態を基本にする。 */
[data-ethos-motion="home"] .anim-up,
[data-ethos-motion="home"] .anim-char span { opacity:1; transform:none; }
[data-ethos-motion="home"] .anim-line { transform:scaleX(1); }

@media (max-width:768px) {
  [data-ethos-motion] .reason__grid { grid-template-columns:minmax(0,1fr); gap:14px; }
  [data-ethos-motion] .reason__grid .reason__card {
    grid-column:1; min-height:0; padding:24px 22px;
    align-items:flex-start; text-align:left; border-radius:16px;
  }
  [data-ethos-motion] .reason__grid .reason__num {
    font-size:2rem; line-height:1.3; margin-bottom:10px; white-space:normal;
  }
  [data-ethos-motion] .reason__grid .reason__num span { font-size:1rem; }
  [data-ethos-motion] .reason__grid .reason__num--data { font-size:1.8rem; }
  [data-ethos-motion] .reason__grid .reason__title { font-size:1.05rem; margin-bottom:10px; }
  [data-ethos-motion] .reason__grid .reason__text {
    display:block; margin:0; font-size:14px; line-height:1.9; text-align:left;
  }
  [data-ethos-motion] .reason__grid .reason__em { font-size:1.7rem; }
  [data-ethos-motion] .reason__card:hover { transform:none; }
  .ethos-flourish { right:4px; top:-20px; transform:scale(.8); transform-origin:right bottom; }
  /* トップの5つの理由も、横へ送らず自然な縦スクロールで読める。 */
  [data-ethos-motion="home"] .sec-reason__row {
    display:grid; grid-template-columns:minmax(0,1fr); gap:24px;
    padding:0 24px; overflow:visible; text-align:left;
  }
  [data-ethos-motion="home"] .sec-reason__item {
    display:grid; grid-template-columns:94px minmax(0,1fr); column-gap:20px;
    max-width:100%; text-align:left; align-content:center;
  }
  [data-ethos-motion="home"] .sec-reason__img {
    grid-row:1 / 4; width:94px; height:94px; margin:4px 0 0;
  }
  [data-ethos-motion="home"] .sec-reason__num { margin-bottom:4px; }
  [data-ethos-motion="home"] .sec-reason__name { font-size:15px; }
  [data-ethos-motion="home"] .sec-reason__desc { font-size:13px; line-height:1.8; }
}
@media (prefers-reduced-motion:reduce) {
  [data-ethos-motion] .hero-banner__text,
  [data-ethos-motion] .hero-banner__title,
  [data-ethos-motion] .hero-banner__scroll-line,
  [data-ethos-motion] .hero-banner__scroll::after { animation:none; opacity:1; transform:none; }
  [data-ethos-motion] .reason__card { transition:none; }
}

/* 理由カード：数字とタイトルを先に、説明はネイティブの開閉に。 */
[data-ethos-motion] #reason .reason__grid {
  grid-template-columns:repeat(6,minmax(0,1fr)); align-items:start; gap:16px;
}
[data-ethos-motion] #reason details.reason__card {
  display:block; grid-column:span 3; min-height:0; padding:0;
  border-radius:20px; text-align:left; overflow:hidden;
  transition:box-shadow .5s ease; cursor:default;
}
[data-ethos-motion="elementary"] #reason .reason__card:nth-child(n+3) { grid-column:span 2; }
[data-ethos-motion] #reason .reason__summary {
  position:relative; display:grid; grid-template-columns:minmax(0,1fr) 44px;
  align-items:center; gap:18px; min-height:136px;
  padding:18px 22px; box-sizing:border-box; list-style:none;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
[data-ethos-motion] #reason .reason__summary::-webkit-details-marker { display:none; }
[data-ethos-motion] #reason .reason__summary::marker { content:""; }
[data-ethos-motion] #reason .reason__summary:focus-visible {
  outline:3px solid currentColor; outline-offset:-6px; border-radius:16px;
}
[data-ethos-motion] #reason .reason__headline {
  display:flex; flex-direction:column; align-items:flex-start;
  justify-content:center; min-width:0; transform-origin:left center;
}
[data-ethos-motion] #reason .reason__core-kicker {
  display:inline-flex; font-size:.6rem; margin-bottom:8px; white-space:normal;
}
[data-ethos-motion] #reason .reason__core-title {
  display:block; font-size:1.25rem; line-height:1.35; margin:0;
}
[data-ethos-motion] #reason .reason__core-title > span { font-size:1.8rem; }
[data-ethos-motion="elementary"] #reason .reason__core-title,
[data-ethos-motion="elementary"] #reason .reason__core-title > span { font-size:2.6rem; }
[data-ethos-motion] #reason .reason__num {
  display:block; font-size:3rem; line-height:1.1; letter-spacing:-.04em;
  margin:0 0 4px; white-space:nowrap;
}
[data-ethos-motion] #reason .reason__num > span { font-size:1rem; margin:0 2px; }
[data-ethos-motion] #reason .reason__num--data { font-size:2rem; }
[data-ethos-motion="elementary"] #reason .reason__card:nth-child(3) .reason__num { font-size:2.15rem; }
[data-ethos-motion] #reason .reason__title {
  display:block; font-size:1.05rem; line-height:1.5; margin:0;
}
[data-ethos-motion] #reason .reason__title--lg { font-size:1.4rem; line-height:1.45; }
[data-ethos-motion] #reason .reason__em { font-size:1.8rem; margin:0 2px; }
[data-ethos-motion] #reason .reason__action {
  display:flex; align-items:center; justify-content:center;
  margin:0; color:#fff;
}
[data-ethos-motion] #reason .reason__card--core .reason__action { color:#7f1f2d; }
[data-ethos-motion="elementary"] #reason .reason__card--core .reason__action { color:#7b3d12; }
[data-ethos-motion] #reason .reason__plus {
  position:relative; display:block; width:44px; height:44px; flex:0 0 44px;
  border:1px solid currentColor; border-radius:50%; background:rgba(255,255,255,.1);
  transition:transform .35s cubic-bezier(.25,.1,.25,1), background .35s ease;
}
[data-ethos-motion] #reason .reason__plus::before,
[data-ethos-motion] #reason .reason__plus::after {
  content:""; position:absolute; width:16px; height:2px;
  left:50%; top:50%; border-radius:2px; background:currentColor;
  transform:translate(-50%,-50%);
}
[data-ethos-motion] #reason .reason__plus::after { transform:translate(-50%,-50%) rotate(90deg); }
[data-ethos-motion] #reason .reason__summary:hover .reason__plus { background:rgba(255,255,255,.22); }
[data-ethos-motion] #reason .reason__action-open,
[data-ethos-motion] #reason .reason__action-close { display:none; }
[data-ethos-motion] #reason .reason__card:is([data-expanded="true"],[open]:not([data-expanded])) .reason__plus { transform:rotate(225deg); }
[data-ethos-motion] #reason .reason__detail { overflow:hidden; }
[data-ethos-motion] #reason .reason__detail .reason__text {
  display:block; margin:0 22px; padding:16px 0 20px;
  border-top:1px solid rgba(255,255,255,.3); font-size:14px; line-height:1.9; text-align:left;
}
[data-ethos-motion] #reason .reason__card--core .reason__detail .reason__text { border-top-color:rgba(100,50,30,.15); }
@media (max-width:768px) {
  [data-ethos-motion] #reason .reason__grid { grid-template-columns:minmax(0,1fr); gap:16px; }
  [data-ethos-motion] #reason details.reason__card,
  [data-ethos-motion="elementary"] #reason .reason__card:nth-child(n+3) { grid-column:1; }
  [data-ethos-motion] #reason .reason__summary { min-height:0; padding:18px; gap:14px; }
  [data-ethos-motion] #reason .reason__detail .reason__text { margin:0 18px; }
  [data-ethos-motion] #reason .reason__num { font-size:2.65rem; }
  [data-ethos-motion] #reason .reason__num--data { font-size:1.85rem; }
  [data-ethos-motion] #reason .reason__core-title { font-size:1.15rem; }
  [data-ethos-motion] #reason .reason__core-title > span { font-size:1.55rem; }
  [data-ethos-motion="elementary"] #reason .reason__core-title,
  [data-ethos-motion="elementary"] #reason .reason__core-title > span { font-size:2.25rem; }
}
@media (prefers-reduced-motion:reduce) {
  [data-ethos-motion] #reason .reason__plus,
  [data-ethos-motion] #reason details.reason__card { transition:none; }
}

/* 淡いカードでも見出し・本文・キーボードのフォーカスを明瞭に。 */
[data-ethos-motion] #reason .reason__card--core .reason__summary { color:#7f1f2d; }
[data-ethos-motion="elementary"] #reason .reason__card--core .reason__summary { color:#7b3d12; }
[data-ethos-motion="elementary"] #reason .reason__card:not(.reason__card--core) :is(.reason__summary,.reason__num,.reason__num > span,.reason__title,.reason__em,.reason__action,.reason__text,.reason__text strong) { color:#663410; }
[data-ethos-motion="elementary"] #reason .reason__detail .reason__text { border-top-color:rgba(102,52,16,.2); }

@media (min-width:769px) and (max-width:1099px) {
  [data-ethos-motion="elementary"] #reason .reason__card:nth-child(n+3) { grid-column:span 3; }
}
/* 中学部：承認済みのタイトルを2行でまとめ、PCでも横幅を抑える。 */
[data-ethos-motion="junior"] #reason .reason__grid { max-width:860px; margin-inline:auto; }
[data-ethos-motion="junior"] #reason .reason__eyebrow {
  display:block; margin-bottom:6px; font-size:.75rem; font-weight:700; line-height:1.7;
}
[data-ethos-motion="junior"] #reason .reason__main-title {
  display:block; font-size:1.45rem; font-weight:800; line-height:1.45; letter-spacing:0;
}
[data-ethos-motion="junior"] #reason .reason__main-title > span { display:block; }
@media (max-width:768px) {
  [data-ethos-motion="junior"] #reason .reason__main-title { font-size:1.2rem; }
  [data-ethos-motion="junior"] #reason .reason__eyebrow { font-size:.7rem; }
}
/* 小学部：同じ大きさの5枚を、PCは3枚＋中央2枚に揃える。 */
[data-ethos-motion="elementary"] #reason .reason__grid {
  display:flex; flex-wrap:wrap; justify-content:center; gap:16px;
  max-width:860px; margin-inline:auto;
}
[data-ethos-motion="elementary"] #reason .reason__grid details.reason__card {
  flex:0 0 calc((100% - 16px) / 2); min-width:0; box-sizing:border-box; border-width:2px;
}
[data-ethos-motion="elementary"] #reason .reason__summary {
  min-height:136px; padding:16px; gap:12px;
}
[data-ethos-motion="elementary"] #reason .reason__core-title,
[data-ethos-motion="elementary"] #reason .reason__core-title > span,
[data-ethos-motion="elementary"] #reason .reason__card:nth-child(n) .reason__num {
  font-size:1.65rem; line-height:1.3; letter-spacing:0;
}
[data-ethos-motion="elementary"] #reason .reason__core-kicker { font-size:.55rem; padding:4px 8px; }
[data-ethos-motion="elementary"] #reason .reason__title { font-size:.95rem; line-height:1.5; }
[data-ethos-motion="elementary"] #reason .reason__title--lg,
[data-ethos-motion="elementary"] #reason .reason__em { font-size:1.2rem; line-height:1.5; }
@media (min-width:1100px) {
  [data-ethos-motion="elementary"] #reason .reason__grid details.reason__card { flex-basis:calc((100% - 32px) / 3); }
}
@media (max-width:768px) {
  [data-ethos-motion="elementary"] #reason .reason__grid details.reason__card { flex-basis:100%; }
  [data-ethos-motion="elementary"] #reason .reason__summary { min-height:132px; }
}
/* 写真の上でも読めるコース見出し。学部の色と穏やかな登場を保つ。 */
[data-ethos-motion="junior"] #course > .sec-head,
[data-ethos-motion="elementary"] #course > .sec-head {
  max-width:680px; margin-inline:auto; padding:22px 28px; box-sizing:border-box;
  background:transparent;
  text-shadow:0 2px 8px rgba(0,0,0,.6),0 1px 2px rgba(0,0,0,.55);
}
[data-ethos-motion="junior"] #course .sec-head__en,
[data-ethos-motion="junior"] #course .sec-head__ja { color:#fff; }
[data-ethos-motion="elementary"] #course .sec-head__en,
[data-ethos-motion="elementary"] #course .sec-head__ja { color:#fff; }
[data-ethos-motion]:is([data-ethos-motion="junior"],[data-ethos-motion="elementary"]) #course .sec-head__en {
  font-size:clamp(1.75rem,3vw,2.5rem); font-weight:700; line-height:1.2; letter-spacing:.1em;
}
[data-ethos-motion]:is([data-ethos-motion="junior"],[data-ethos-motion="elementary"]) #course .sec-head__ja {
  font-size:clamp(1.05rem,1.8vw,1.4rem); font-weight:700; line-height:1.65; margin-top:10px; text-wrap:balance;
}
@media (max-width:768px) {
  [data-ethos-motion="junior"] #course > .sec-head,
  [data-ethos-motion="elementary"] #course > .sec-head { padding:18px 16px; }
}
