/* =====================================================================
   辺境大学 実践型インターンシップ  tokens.css  v2（2026-10-23）
   白・黒・ベージュ。見出しは明朝体。詳しいルールは DESIGN.md。
   使い方：色・文字・余白は必ず変数から使う。
   ===================================================================== */

/* 書体は自サイトから配信する（scripts/build-fonts.mjs で /fonts/ に生成） */
@import url("/fonts/fonts.css");

/* ---------- Color（ライト固定。ダークモードは作らない） ---------- */
:root {
  --paper: #ffffff;  /* ページの地色（白）。 */
  --panel: #eae1d6;  /* ベージュのパネル。情報を載せる面（カードの下半分、「主な活動」、募集概要など）。 */
  --panel-soft: #f5efe5;  /* もう少し淡いベージュ。大きな背景の飾りなど。 */
  --paper-raised: #ffffff;  /* 入力欄の中など、パネルの上でさらに明るくする面。 */
  --ink: #000000;  /* 見出し・本文（黒）。 */
  --ink-muted: #3b3b3b;  /* 補足、キャプション、英字ラベル。white・panel の上で使う。 */
  --line: #d9d2c8;  /* 細い区切り線。 */
  --line-strong: #8a847b;  /* 入力欄・チェックボックスの枠。paper・panel 上で3:1以上。 */
  --action: #000000;  /* ボタンの塗り、リンク、フォーカスリング。 */
  --on-action: #ffffff;  /* action の塗りに載せる文字。 */
  --notice: #a33a1e;  /* 「締切間近」の文字と点だけ。 */
  --notice-soft: #f8e0d2;
  color-scheme: light;
}

/* ---------- Type families / spacing / radius ---------- */
:root {
  --font-mincho: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Shippori Mincho", "Yu Mincho", "YuMincho", serif;
  --font-sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  /* v1 の名前（互換）：見出し・ラベルは、すべて明朝 */
  --font-serif: var(--font-mincho);
  --font-heading: var(--font-mincho);
  --font-label: var(--font-mincho);
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;  --space-4: 16px;  --space-6: 24px;  --space-10: 40px;  --space-16: 64px;  --space-32: 128px;
  --radius-xs: 0;  /* 角は立てる。 */
  --radius-round: 50%;  /* 番号の円、点だけ。 */
}

/* ---------- Base ---------- */
body { margin: 0; background-color: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 2; letter-spacing: .06em; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--action); text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }

/* ---------- Type styles ---------- */
.t-hero { font-family: var(--font-mincho); font-size: 56px; line-height: 1.5; font-weight: 700; letter-spacing: .18em; }
.t-display { font-family: var(--font-mincho); font-size: 44px; line-height: 1.6; font-weight: 700; letter-spacing: .14em; }
.t-display-en { font-family: var(--font-mincho); font-size: 40px; line-height: 1.2; font-weight: 700; letter-spacing: .12em; }
.t-number { font-family: var(--font-mincho); font-size: 40px; line-height: 1; font-weight: 500; letter-spacing: .04em; }
.t-h1 { font-family: var(--font-mincho); font-size: 30px; line-height: 1.7; font-weight: 700; letter-spacing: .14em; }
.t-h2 { font-family: var(--font-mincho); font-size: 24px; line-height: 1.8; font-weight: 700; letter-spacing: .12em; }
.t-h3 { font-family: var(--font-mincho); font-size: 18px; line-height: 1.8; font-weight: 700; letter-spacing: .1em; }
.t-lead { font-family: var(--font-mincho); font-size: 17px; line-height: 2.3; font-weight: 500; letter-spacing: .12em; }
.t-body { font-family: var(--font-sans); font-size: 15px; line-height: 2.0; font-weight: 400; letter-spacing: .06em; }
.t-small { font-family: var(--font-sans); font-size: 13px; line-height: 1.9; font-weight: 400; letter-spacing: .06em; }
.t-caption { font-family: var(--font-sans); font-size: 11px; line-height: 1.7; font-weight: 400; letter-spacing: .06em; }
.t-label { font-family: var(--font-mincho); font-size: 12px; line-height: 1.5; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; }
@media (max-width: 640px) {
  .t-hero { font-size: 32px; }
  .t-display { font-size: 26px; }
  .t-h1 { font-size: 22px; }
  .t-h2 { font-size: 20px; }
}

/* =====================================================================
   Components（DESIGN.md の「パーツ」を参照）
   ===================================================================== */
.ri { font-family: var(--font-sans); color: var(--ink); font-size: 15px; line-height: 2; letter-spacing: .06em; }
.ri *, .ri *::before, .ri *::after { box-sizing: border-box; }

/* Paper：白い地（紙の粒は使わない） */
.ri-paper { background-color: var(--paper); }
.ri-panel { background: var(--panel); }

/* Rule：細い黒い線 */
.ri-rule { border: 0; border-top: 1px solid var(--ink); margin: 0; }

/* Button */
.ri-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 12px 32px; border-radius: var(--radius-xs); border: 1px solid transparent; font-family: var(--font-mincho); font-size: 15px; font-weight: 700; letter-spacing: .14em; line-height: 1.4; text-decoration: none; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.ri-btn:focus-visible, .ri-more:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
.ri-btn--primary { background: var(--action); color: var(--on-action); }
.ri-btn--primary:hover { background: var(--ink-muted); }
.ri-btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.ri-btn--secondary:hover { background: var(--ink); color: var(--paper); }
.ri-btn[disabled] { background: transparent; color: var(--ink-muted); border-color: var(--line-strong); cursor: not-allowed; }
.ri-more { display: inline-flex; align-items: center; gap: 16px; font-family: var(--font-mincho); font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.ri-more::after { content: ""; width: 28px; height: 1px; background: currentColor; transition: width .2s ease; }
.ri-more:hover::after { width: 40px; }

/* StatusBadge：状態は、文字でも書く */
.ri-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mincho); font-size: 12px; font-weight: 700; letter-spacing: .14em; line-height: 1.5; color: var(--ink); }
.ri-badge::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-round); background: var(--ink); }
.ri-badge--soon { color: var(--notice); }
.ri-badge--soon::before { background: var(--notice); }
.ri-badge--closed { color: var(--ink-muted); }
.ri-badge--closed::before { background: transparent; box-shadow: inset 0 0 0 1px var(--ink-muted); }

/* Tag */
.ri-tags { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.ri-tag { font-size: 12px; line-height: 1.8; letter-spacing: .08em; color: var(--ink-muted); }
.ri-tag::before { content: "— "; color: var(--line-strong); }

/* SectionHeading：英字の小さなラベル → 大きな日本語の見出し（左寄せ） */
.ri-sh { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: left; }
.ri-sh .ri-rule { width: 100%; margin-bottom: 28px; }
.ri-sh__en { margin: 0; font-family: var(--font-mincho); font-size: 12px; font-weight: 500; line-height: 1.5; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-muted); }
.ri-sh__ja { margin: 0; font-family: var(--font-mincho); font-size: 32px; font-weight: 700; line-height: 1.6; letter-spacing: .14em; color: var(--ink); text-wrap: balance; }
.ri-sh--center { align-items: center; text-align: center; }
@media (max-width: 640px) { .ri-sh__ja { font-size: 22px; } }

/* ProjectCard：上に写真、下はベージュのパネル */
.ri-card { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; background: var(--panel); }
.ri-card:focus-visible { outline: 2px solid var(--action); outline-offset: 6px; }
.ri-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--panel-soft); }
.ri-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.ri-card:hover .ri-card__media img { transform: scale(1.03); }
.ri-card__body { display: flex; flex-direction: column; gap: 14px; padding: 24px 24px 28px; flex: 1; }
.ri-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ri-card__area { margin: 0; font-family: var(--font-mincho); font-size: 18px; font-weight: 700; letter-spacing: .24em; }
.ri-card__title { margin: 0; font-family: var(--font-mincho); font-size: 17px; font-weight: 700; line-height: 1.8; letter-spacing: .08em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ri-card__meta { margin: 0; font-size: 13px; line-height: 1.9; color: var(--ink-muted); }
.ri-card__rows { margin: 0; border-top: 1px solid var(--ink); }
.ri-card__rows > div { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--ink); font-size: 13px; line-height: 1.8; }
.ri-card__rows dt { margin: 0; flex: none; width: 3.5em; font-family: var(--font-mincho); font-weight: 700; letter-spacing: .1em; color: var(--ink-muted); }
.ri-card__rows dd { margin: 0; }
.ri-card--closed .ri-card__media img { opacity: .5; filter: grayscale(.6); }

/* StepFlow：番号の円（ベージュ）→ 細い線 */
.ri-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.ri-flow__step { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 0 0 8px; }
.ri-flow__head { display: flex; align-items: center; gap: 24px; margin-bottom: 8px; }
.ri-flow__head::after { content: ""; flex: 1; height: 1px; background: var(--ink); }
.ri-flow__step:last-child .ri-flow__head::after { display: none; }
.ri-flow__num { display: grid; place-items: center; width: 88px; height: 88px; flex: none; border-radius: var(--radius-round); background: var(--panel); font-family: var(--font-mincho); font-size: 36px; font-weight: 500; line-height: 1; }
.ri-flow__en { font-family: var(--font-mincho); font-size: 12px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-muted); }
.ri-flow__title { margin: 8px 0 0; font-family: var(--font-mincho); font-size: 20px; font-weight: 700; letter-spacing: .1em; line-height: 1.8; }
.ri-flow__text { margin: 0 0 16px; font-size: 13px; line-height: 2; color: var(--ink-muted); }
.ri-flow__box { margin-top: auto; padding: 20px 24px; background: var(--panel); border-top: 1px solid var(--ink); }
.ri-flow__box p { margin: 0 0 6px; font-family: var(--font-mincho); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.ri-flow__box ul { margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.9; }
.ri-flow__box li::before { content: "・"; }
@media (max-width: 760px) {
  .ri-flow { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ri-flow__head::after { display: none; }
  .ri-flow__num { width: 64px; height: 64px; font-size: 26px; }
}

/* FaqItem */
.ri-faq { border-top: 1px solid var(--ink); }
.ri-faq details { border-bottom: 1px solid var(--line-strong); }
.ri-faq summary { display: flex; align-items: baseline; gap: 20px; padding: 22px 4px; cursor: pointer; list-style: none; font-family: var(--font-mincho); font-size: 16px; font-weight: 700; letter-spacing: .08em; line-height: 1.8; }
.ri-faq summary::-webkit-details-marker { display: none; }
.ri-faq summary::before { content: "Q."; flex: none; font-family: var(--font-mincho); font-size: 20px; font-weight: 500; color: var(--action); }
.ri-faq summary span { flex: 1; min-width: 0; }
.ri-faq summary::after { content: "+"; flex: none; font-family: var(--font-mincho); font-size: 20px; font-weight: 500; color: var(--ink-muted); }
.ri-faq details[open] summary::after { content: "−"; }
.ri-faq summary:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.ri-faq__a { margin: 0; padding: 0 4px 26px 44px; font-size: 14px; line-height: 2.1; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .ri-btn, .ri-more::after, .ri-card__media img { transition: none; }
  .ri-card:hover .ri-card__media img { transform: none; }
}
