/* =========================================================
   BCJ Scholarship — base.css
   変数 / リセット / タイポグラフィ

   デザイン方針（明るい基調）
   - 背景は白・オフホワイト・ごく薄いブルーグレー。黒背景を基調にしない。
   - コーポレートカラー #052365 は、重要な行動・ブランドの認識点に限定する。
     （主要ボタン・リンク・小さなラベル・選択状態）
   - 強さは、余白・タイポグラフィ・レイアウトで出す。
   ========================================================= */

:root {
  /* --- Color tokens --------------------------------------------------- */
  --bcj-navy:         #052365;  /* コーポレートカラー */
  --bcj-navy-hover:   #0b3188;  /* ホバー：少し明るく */
  --bcj-navy-press:   #031a4d;  /* 押下：少し暗く */
  --bcj-navy-tint:    #e8edf8;  /* ごく薄い面（バッジなど） */
  --bcj-navy-line:    rgba(255, 255, 255, 0.22);

  --bcj-bg:           #ffffff;
  --bcj-bg-soft:      #f5f7fa;  /* オフホワイト／ごく薄いブルーグレー */
  --bcj-bg-tint:      #edf1f7;

  --bcj-ink:          #12161e;  /* 見出し・本文（ほぼ黒） */
  --bcj-text:         #1c2330;
  --bcj-text-dim:     #465061;  /* 補足テキスト（白背景で 7:1 以上） */
  --bcj-text-faint:   #667085;  /* キャプション・注記（白背景で 4.6:1） */
  --bcj-line:         #dfe4ec;  /* 境界線 */
  --bcj-line-soft:    #e9edf3;

  --bcj-white:        #ffffff;
  --bcj-shadow:       0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
  --bcj-shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.05), 0 16px 40px rgba(16, 24, 40, 0.09);

  /* --- Typography ----------------------------------------------------- */
  --bcj-font-en: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --bcj-font-ja: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
                 Meiryo, sans-serif;

  /* 流体タイポグラフィ（375px 〜 1440px） */
  --bcj-fs-display: clamp(2.6rem, 1.4rem + 5.4vw, 5.75rem);  /* ヒーロー見出し */
  --bcj-fs-h2:      clamp(1.95rem, 1.2rem + 3vw, 3.4rem);    /* セクション見出し */
  --bcj-fs-h3:      clamp(1.3rem, 1.0rem + 1.3vw, 1.85rem);
  --bcj-fs-lead:    clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  --bcj-fs-body:    clamp(0.975rem, 0.93rem + 0.22vw, 1.0625rem);
  --bcj-fs-small:   0.875rem;
  --bcj-fs-eyebrow: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);

  /* --- Space / shape -------------------------------------------------- */
  --bcj-header-h:    72px;
  --bcj-content:     1120px;  /* 本文カラム幅 */
  --bcj-wide:        1280px;  /* カード列の最大幅 */
  --bcj-gutter:      clamp(1.25rem, 0.6rem + 2.8vw, 3rem);
  --bcj-section-y:   clamp(3.75rem, 2.25rem + 5.5vw, 7rem);   /* 通常のセクション上下 */
  --bcj-section-y-sm: clamp(2.5rem, 1.75rem + 3.5vw, 4.5rem);  /* つながるセクション間（Intro と 3カードなど） */
  --bcj-radius:      20px;
  --bcj-radius-lg:   28px;
  --bcj-radius-pill: 999px;

  --bcj-ease:        cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bcj-header-h) + 16px);
}

body {
  margin: 0;
  background-color: var(--bcj-bg);
  color: var(--bcj-text);
  font-family: var(--bcj-font-ja);
  font-size: var(--bcj-fs-body);
  line-height: 1.85;
  letter-spacing: 0.02em;
  font-feature-settings: "palt" 1; /* 和文の約物詰め */
  line-break: strict;
  word-break: auto-phrase; /* 日本語を文節の単位で折り返す（対応ブラウザ。未対応でも表示は崩れない） */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
svg { display: block; max-width: 100%; height: auto; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

/* --- Headings --------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--bcj-ink);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0 0 1.4em; }
p:last-child { margin-bottom: 0; }

/* 見出しを文節（、。の区切り）の単位で折り返す。単語の途中では折らない */
.bcj-phrase { display: inline-block; }

/* 英語の大見出し（SCHOLARSHIP など） */
.bcj-en {
  font-family: var(--bcj-font-en);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* セクション上部の小さなラベル（コーポレートカラー） */
.bcj-eyebrow {
  display: inline-block;
  margin: 0 0 1.1rem;
  font-family: var(--bcj-font-en);
  font-size: var(--bcj-fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bcj-navy);
}

.bcj-lead {
  font-size: var(--bcj-fs-lead);
  line-height: 1.85;
  color: var(--bcj-text-dim);
}

/* --- Links ------------------------------------------------------------ */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--bcj-ease), background-color 0.2s var(--bcj-ease),
              border-color 0.2s var(--bcj-ease), opacity 0.2s var(--bcj-ease);
}

.bcj-prose a,
.bcj-textlink {
  color: var(--bcj-navy);
  text-decoration: underline;
  text-decoration-color: rgba(5, 35, 101, 0.3);
  text-underline-offset: 0.2em;
}

.bcj-prose a:hover,
.bcj-textlink:hover { color: var(--bcj-navy-hover); text-decoration-color: currentColor; }

/* --- Accessibility ---------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--bcj-navy);
  outline-offset: 3px;
  border-radius: 4px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.bcj-skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 0.75rem 1.5rem;
  background: var(--bcj-navy);
  color: var(--bcj-white);
  border-radius: 0 0 12px 12px;
}
.bcj-skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
