/* =========================================================
   S-Core — サイト共通（塾LP・探究クエスト）
   B案のスイスグリッドを土台に、余白と行の高さを 8px の倍数でそろえる
   ========================================================= */

:root {
  /* color */
  --bg: #ffffff;
  --soft: #f6f6f5;
  --fg: #0b0b0c;
  --fg-2: #3d3d40;
  --mute: #6f6f74;
  --line: #e3e3e1;
  /* ロゴの2色。明るい色は面・線に、暗くした色は文字に使う */
  --blue-bright: #3aadfe;  /* ロゴの青 */
  --blue: #0a6fbd;         /* 青の文字用（白地でコントラスト5.2） */
  --blue-soft: #e8f4fe;
  --blue-win: #3aadfe;     /* 黒いウィンドウ上の青 */
  --mint: #08ecc0;         /* ロゴのミント */
  --mint-ink: #007f66;     /* ミントの文字用（白地でコントラスト5.0） */
  --gold: var(--mint);     /* 旧：金。強調の下線・探究のスキルに使う色 */         /* 探究の特技 */
  --gold-soft: #e2fbf5;
  --gold-ink: var(--mint-ink);
  --win: #0b0b0c;
  --danger: #d92d20;

  /* type */
  --sans: "IBM Plex Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --num: "Inter Tight", var(--sans);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --dot: "DotGothic16", var(--sans);

  /* spacing (8px grid) */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px;
  --s6: 48px; --s7: 56px; --s8: 64px; --s10: 80px; --s12: 96px; --s14: 112px;

  --frame: 1240px;
  --pad: 40px;
  --header-h: 64px;
  --subnav-h: 0px;
  --tab-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--subnav-h) + var(--s2)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16px; line-height: 32px; letter-spacing: .02em;
  font-feature-settings: "palt"; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, table, fieldset, legend { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s2); top: var(--s2); z-index: 100; background: var(--fg); color: #fff; padding: var(--s1) var(--s2); }
main { overflow-x: clip; }

/* 日本語の改行：文節で折り返し、見出しは行の長さをそろえる */
h1, h2, h3, h4 { word-break: auto-phrase; text-wrap: balance; }
p, li, dd, td, th, summary { word-break: auto-phrase; text-wrap: pretty; }
.nw { white-space: nowrap; }

.mono { font-family: var(--mono); font-size: 12px; line-height: 24px; letter-spacing: .04em; color: var(--mute); font-weight: 400; }
.dot { font-family: var(--dot); letter-spacing: .06em; }

/* ---------- Frame & grid lines ---------- */
.frame { position: relative; max-width: var(--frame); margin-inline: auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.band { border-top: 1px solid var(--line); }
.band > .frame::before, .band > .frame::after {
  content: ""; position: absolute; top: -6px; width: 11px; height: 11px; z-index: 2;
  background: linear-gradient(var(--fg), var(--fg)) center / 11px 1px no-repeat,
              linear-gradient(var(--fg), var(--fg)) center / 1px 11px no-repeat;
}
.band > .frame::before { left: -6px; }
.band > .frame::after { right: -6px; }

.cell { padding: var(--pad); background: var(--bg); }
.grid { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.paper {
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--soft);
}

/* ---------- Type scale（line-height も 8 の倍数） ---------- */
.t-display { font-size: 56px; line-height: 72px; font-weight: 700; }
.t-h2 { font-size: 32px; line-height: 48px; font-weight: 700; }
.t-h3 { font-size: 20px; line-height: 32px; font-weight: 700; }
.t-lead { font-size: 18px; line-height: 32px; color: var(--fg-2); }
.t-body { color: var(--fg-2); }
.t-small { font-size: 13px; line-height: 24px; color: var(--mute); }

.stack-8 > * + * { margin-top: var(--s1); }
.stack-16 > * + * { margin-top: var(--s2); }
.stack-24 > * + * { margin-top: var(--s3); }
.stack-32 > * + * { margin-top: var(--s4); }

/* セクションの見出しブロック */
.sec-head { padding-block: var(--s10) var(--s5); }
.sec-head .t-lead { max-width: 40em; }
.sec-head__no { color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  height: 48px; padding: 0 var(--s3); border: 1px solid var(--fg); background: transparent;
  font-size: 14px; line-height: 24px; font-weight: 500; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--fg); color: #fff; }
.btn--primary:hover { background: var(--blue); border-color: var(--blue); }
.btn--ghost { border-color: var(--line); }
.btn--ghost:hover { border-color: var(--fg); }
.btn--block { width: 100%; height: 56px; }
.kbd { font-family: var(--mono); transition: transform .2s; }
.btn:hover .kbd { transform: translateX(3px); }

/* ---------- Header（サイト共通） ---------- */
.header { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-inline: var(--pad); }
.logo { display: inline-flex; align-items: center; gap: var(--s1); }
.logo__box { display: grid; place-items: center; width: 24px; height: 24px; background: var(--fg); color: #fff; font-family: var(--num); font-weight: 700; font-size: 14px; line-height: 24px; }
.logo__word { font-family: var(--num); font-weight: 700; font-size: 18px; line-height: 24px; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: var(--s3); }
.nav ul { display: flex; align-items: center; gap: 0; }
.nav ul a { display: block; padding: var(--s1) 12px; font-size: 13px; line-height: 24px; color: var(--fg-2); border-bottom: 2px solid transparent; transition: background .2s, color .2s; }
.nav ul a:hover { background: var(--soft); color: var(--fg); }
.nav ul a[aria-current] { color: var(--fg); font-weight: 700; border-bottom-color: var(--blue); }
.nav__quest { margin-left: var(--s1); padding-left: var(--s2); border-left: 1px solid var(--line); }
.nav ul .nav__quest a { font-family: var(--dot); font-size: 14px; letter-spacing: .04em; }
.nav__cta { height: 40px; padding: 0 var(--s2); font-size: 13px; }
.menu { display: none; }

/* ---------- 探究クエストのサブナビ ---------- */
.subnav { position: sticky; top: var(--header-h); z-index: 55; background: var(--win); color: #fff; }
.subnav__inner { display: flex; align-items: center; gap: var(--s3); height: 48px; padding-inline: var(--pad); border-color: transparent; }
.subnav__title { font-family: var(--dot); font-size: 16px; line-height: 24px; letter-spacing: .06em; }
.subnav__tabs { display: flex; height: 100%; margin-left: var(--s2); }
.subnav__tabs a { display: flex; align-items: center; padding: 0 var(--s2); font-size: 14px; line-height: 24px; color: rgba(255,255,255,.7); border-bottom: 3px solid transparent; }
.subnav__tabs a:hover { color: #fff; background: rgba(255,255,255,.08); }
.subnav__tabs a[aria-current="page"] { color: #fff; font-weight: 700; border-bottom-color: var(--gold); }
.subnav__tabs a:focus-visible { outline-color: var(--blue-win); outline-offset: -2px; }
.subnav__meta { margin-left: auto; font-size: 12px; line-height: 24px; color: rgba(255,255,255,.6); }

/* ---------- Game window（探究クエストのウィンドウ） ---------- */
.win { position: relative; background: var(--win); color: #fff; padding: 4px; }
.win__in { border: 2px solid #fff; padding: var(--s4) var(--s3) var(--s3); height: 100%; }
.win__title { position: absolute; top: -12px; left: var(--s3); padding: 0 var(--s1); background: var(--win); font-family: var(--dot); font-size: 16px; line-height: 24px; color: #fff; }

/* ---------- Footer（サイト共通） ---------- */
.footer { border-top: 1px solid var(--line); }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 1px; background: var(--line); }
.footer__tag { margin-top: var(--s1); font-size: 12px; line-height: 24px; color: var(--mute); }
.footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s3); font-size: 12px; line-height: 24px; color: var(--fg-2); }
.footer__links a:hover { color: var(--fg); text-decoration: underline; }
.footer__copy { color: var(--mute); }

/* モバイルの下部固定（LP：申込ボタン／探究：タブ） */
.dock, .tabbar { display: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  :root { --pad: 24px; }
  .grid--4 { grid-template-columns: 1fr 1fr; }
  .t-display { font-size: 40px; line-height: 56px; }

  /* ナビはハンバーガーへ */
  .menu { display: grid; place-content: center; gap: 6px; width: 48px; height: 48px; margin-right: calc(-1 * var(--s1)); background: none; border: 0; cursor: pointer; }
  .menu span { display: block; width: 20px; height: 2px; background: var(--fg); transition: transform .25s; }
  .menu[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav { position: fixed; inset: var(--header-h) 0 0; z-index: 70; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; background: #fff; padding-bottom: var(--s3); overflow-y: auto; visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s; }
  .nav.is-open { visibility: visible; opacity: 1; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav ul a { padding: var(--s2) var(--pad); border-bottom: 1px solid var(--line); font-size: 16px; line-height: 24px; color: var(--fg); }
  .nav ul a[aria-current] { border-bottom-color: var(--line); box-shadow: inset 4px 0 0 var(--blue); }
  .nav__quest { margin: 0; padding: 0; border-left: 0; }
  .nav ul .nav__quest a { background: var(--win); color: #fff; font-size: 16px; }
  .nav__cta { margin: var(--s3) var(--pad) 0; height: 56px; }
}
@media (max-width: 960px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  :root { --pad: 16px; --header-h: 56px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .t-display { font-size: 32px; line-height: 48px; }
  .t-h2 { font-size: 24px; line-height: 40px; }
  .t-lead { font-size: 16px; line-height: 32px; }
  .sec-head { padding-block: var(--s6) var(--s4); }
  .footer__inner { grid-template-columns: 1fr; }

  .subnav__inner { height: 40px; }
  .subnav__tabs { display: none; }

  body.has-tabbar { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; inset: auto 0 0; z-index: 50; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--fg);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; line-height: 16px; color: var(--mute); }
  .tabbar a + a { border-left: 1px solid var(--line); }
  .tabbar svg { width: 24px; height: 24px; margin-bottom: 4px; }
  .tabbar a[aria-current="page"] { color: var(--fg); font-weight: 700; box-shadow: inset 0 3px 0 var(--gold); }

  body.has-dock { padding-bottom: 80px; }
  .dock { display: block; position: fixed; inset: auto 0 0; z-index: 50; padding: var(--s1) var(--s2) calc(var(--s1) + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); transform: translateY(100%); transition: transform .3s; }
  .dock.is-shown { transform: none; }
}

/* 大事な言葉は、色で強調する（ラベルや飾りは足さない） */
em.key { font-style: normal; color: var(--blue); }

/* ロゴ画像（ヘッダー・フッター） */
.logo__img { display: block; width: auto; height: 40px; }
.footer .logo__img { height: 48px; }
@media (max-width: 720px) {
  .logo__img { height: 32px; }
  .footer .logo__img { height: 40px; }
}

/* 話が切り替わる見出し：大きく、要の言葉を青＋金の下線で */
.turn { font-size: 32px; line-height: 56px; font-weight: 700; }
.u-line { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 6px; text-underline-offset: 10px; text-decoration-skip-ink: none; }
@media (max-width: 720px) {
  .turn { font-size: 24px; line-height: 48px; }
  .u-line { text-decoration-thickness: 4px; text-underline-offset: 8px; }
}

/* 試し：大きな見出しの強調語だけ、ロゴと同じ青にする（本文・小さい文字は文字用の青のまま） */
.policy__a em.key, .policy__stance-line em.key, .hero__title em.key, .mission__title em.key, .turn em.key, .promise__no { color: var(--blue-bright); }

/* プレミアムの色（ゴールデンイエロー）。面は明るい金、文字は暗くした金 */
:root { --premium: #d4a72c; --premium-soft: #fbf3dc; --premium-ink: #7a5a00; }

/* 公式LINEのボタン（全ページ共通） */
.btn--line { background: #06c755; border-color: #06c755; color: #fff; font-weight: 700; }
.btn--line:hover { background: #05a647; border-color: #05a647; }
