/* StuVation 公式サイト
   ------------------------------------------------------------------
   色は :root だけで定義する。ここ以外に hex を書かないこと。

   朱（--red）は「記録された」印にだけ使う。1ページに 2 か所まで。
     1) 受付名簿の、埋まった行に付く点
     2) 名刺の見本の中の「記録」の行
   それ以外に朱を出さないこと。増やすと台帳の点が意味を失う。
   ------------------------------------------------------------------ */

:root {
  /* 地・面・墨 */
  --paper: #FFFFFF;   /* 地 */
  --face:  #F2F1EC;   /* 面（台帳の紙・沈めた節） */
  --ink:   #141A20;   /* 墨（本文・見出し） */
  --sub:   #6E7A85;   /* 補助（小さい見出し・罫の上の記号） */
  --blue:  #12489B;   /* 主色（リンク・主ボタン） */
  --red:   #E0483C;   /* 朱（「記録された」印だけ） */

  /* --sub は白の上で 4.4:1 しか出ない。本文サイズの文章はこちら（6.4:1） */
  --sub-ink: #55606B;
  /* ボタンを押し込んだときの主色 */
  --blue-deep: #0E3A7D;
  /* 罫線（不透明度を使わず実色で持つ） */
  --rule:      #DCD9D1;
  --rule-face: #C9C4B7;

  --serif: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "MS Mincho", serif;
  --sans:  "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --num:   "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;

  --wrap: 72rem;
  --gutter: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.9;
  font-feature-settings: "palt" 1;
}

img, svg { max-width: 100%; height: auto; display: block; }
p { margin: 0; }
/* figure はブラウザ既定が margin: 1em 40px。消さないと width:100% と足されて
   左右 40px ずつはみ出す。名刺の見本が枠から出ていた原因はこれ（2026/9/5 に実測） */
figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: 0.005em;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus {
  position: fixed;
  left: var(--gutter);
  top: 0.5rem;
  z-index: 30;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
}

/* ── ロゴ（明朝の文字組み。差し替えるときはここ 1 か所） ─────── */
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: 0.06em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark--foot { color: var(--paper); font-size: 1.5rem; }

/* ── 小見出し（節の上に置く短いラベル） ─────────────────── */
.eyebrow {
  font-family: var(--num);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--sub-ink);
  margin-bottom: 0.9rem;
}

/* ── ヘッダ ─────────────────────────────────────────────── */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 1rem 0;
}
.nav { display: flex; align-items: center; gap: 0.25rem 1.4rem; flex-wrap: wrap; }
.nav a {
  font-size: 0.92rem;
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.nav a.nav__login { color: var(--blue); font-weight: 700; }
.nav a.nav__login:hover { border-bottom-color: var(--blue); }

/* ── ボタン ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 0;
}
.btn--primary { background: var(--blue); color: var(--paper); border-color: var(--blue); }
.btn--primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.tlink {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.95rem;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.tlink--quiet { color: var(--ink); font-weight: 400; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.5rem;
  margin-top: 1.9rem;
}

/* ── ヒーロー（左に言葉・右に実物。中央寄せにしない） ─────── */
.hero { padding: 3rem 0 3.4rem; border-bottom: 1px solid var(--rule); }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.6rem;
  align-items: start;
}
/* grid の子は min-width: auto が既定。中身が枠を押し広げないようにする */
.hero__grid > * { min-width: 0; }
/* 3.2rem より大きくしないこと。左の段に収まる上限がここ（1280px のとき）。
   上げると読点のあとの 1 文字だけが折れます。
   2026/9/10：企業ページの見出しが「会社の名刺を、会社で持つ。」に変わりました。
   前より短いので 3.2rem のままで折れませんが、上限を上げてよい理由にはなりません
   （学生ページの「あなたの活動を、」が同じ規則を共有しています） */
.hero h1 {
  font-size: clamp(2rem, 6.5vw, 3.2rem);
  line-height: 1.38;
  letter-spacing: 0.01em;
}
.hero__lead {
  margin-top: 1.5rem;
  max-width: 32rem;
  color: var(--sub-ink);
  font-size: 1.02rem;
}
.hero__foot {
  margin-top: 1.6rem;
  font-size: 0.88rem;
  color: var(--sub-ink);
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  max-width: 32rem;
}

/* ── 名刺の見本（写真が無くても成立する「実物」） ───────────── */
/* grid/flex の子は min-width が既定で auto。中身の最小幅が枠を押し広げるので、
   この節では入れ子のどの段にも min-width: 0 を置いて、隠さずに折り返させる */
.showcase { display: grid; gap: 1rem; justify-items: stretch; min-width: 0; }

.sample {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 1.5rem 1.5rem 1.3rem;
  margin: 0;
  max-width: 25rem;
  width: 100%;
  min-width: 0;
  /* 長い URL やローマ字の連なりは、枠を広げずに途中で折る */
  overflow-wrap: anywhere;
}
.sample__url {
  font-family: var(--num);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--sub-ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.7rem;
  margin-bottom: 1.2rem;
}
.sample__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.3;
}
.sample__kana {
  font-size: 0.8rem;
  color: var(--sub-ink);
  line-height: 1.6;
  margin-top: 0.3rem;
}
.sample__facts { margin-top: 1.15rem; display: grid; gap: 0.45rem; }
.sample__facts li {
  display: grid;
  /* 1fr ではなく minmax(0, 1fr)。1fr は最小が auto なので枠を押し広げる */
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0 0.8rem;
  font-size: 0.88rem;
  line-height: 1.7;
}
.sample__facts li > span { min-width: 0; }
.sample__facts b {
  font-family: var(--num);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--sub-ink);
  padding-top: 0.15rem;
}
.sample__qr {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr);
  gap: 0 1.1rem;
  align-items: center;
}
.sample__qr img { width: 6.2rem; height: 6.2rem; border: 1px solid var(--rule); }
.sample__qrnote { font-size: 0.84rem; line-height: 1.75; color: var(--sub-ink); min-width: 0; }
/* 朱の 1 か所め：名刺の中の「記録」 */
.sample__rec {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 0.55rem;
  font-family: var(--num);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.sample__rec::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: var(--red);
  flex: none;
}
.sample__cap {
  font-size: 0.8rem;
  color: var(--sub-ink);
  line-height: 1.7;
  max-width: 25rem;
}

/* ── 節 ─────────────────────────────────────────────────── */
.section { padding: 3.6rem 0; }
.section--face { background: var(--face); }
.section__head { max-width: 47rem; margin-bottom: 2.4rem; }
.section__head h2 { font-size: clamp(1.5rem, 4.6vw, 2.15rem); }
.section__head p { margin-top: 1rem; color: var(--sub-ink); font-size: 0.98rem; max-width: 38rem; }

/* ── 目録（価値 3 点。見出しを本文に食い込ませる） ───────────── */
.entries { border-top: 1px solid var(--rule); }
.section--face .entries { border-top-color: var(--rule-face); }
.entries > li {
  border-bottom: 1px solid var(--rule);
  padding: 1.7rem 0 1.8rem;
}
.section--face .entries > li { border-bottom-color: var(--rule-face); }
.entries__body { max-width: 46rem; font-size: 1rem; line-height: 1.95; }
.entries__body b {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}
/* 見出しと本文のあいだの区切り。読み上げに出さないため文字を使わない */
.entries__body b::after {
  content: "";
  display: inline-block;
  width: 1.7em;
  height: 1px;
  background: var(--sub);
  vertical-align: 0.32em;
  margin: 0 0.6em;
}
.entries__body span { color: var(--sub-ink); }

/* ── 受付名簿（このサイトで唯一の動き） ─────────────────── */
.ledger { background: var(--face); padding: 3.8rem 0 4rem; }
.ledger__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.2rem;
  align-items: start;
}
.ledger__intro h2 { font-size: clamp(1.5rem, 4.6vw, 2.15rem); }
.ledger__intro p { margin-top: 1rem; color: var(--sub-ink); font-size: 0.98rem; max-width: 26rem; }
.ledger__count {
  font-family: var(--num);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-top: 1.6rem;
  border-top: 1px solid var(--rule-face);
  padding-top: 0.9rem;
  max-width: 26rem;
}

.sheet { background: var(--paper); border: 1px solid var(--rule-face); }
.sheet__cap {
  display: grid;
  grid-template-columns: 1.4rem 4.2rem 1fr 8.5rem;
  gap: 0 0.7rem;
  font-family: var(--num);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--sub-ink);
  padding: 0.8rem 1rem;
  border-bottom: 2px solid var(--ink);
}
.sheet__rows > li {
  display: grid;
  grid-template-columns: 1.4rem 4.2rem 1fr 8.5rem;
  gap: 0 0.7rem;
  align-items: baseline;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule);
  min-height: 3.2rem;
}
.sheet__rows > li:last-child { border-bottom: 0; }
/* 朱の 2 か所め：埋まった行に付く点 */
.sheet__dot { width: 0.45rem; height: 0.45rem; align-self: center; }
.sheet__rows > li.is-in .sheet__dot { background: var(--red); }
.sheet__date {
  font-family: var(--num);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  white-space: nowrap;
}
.sheet__what { font-size: 0.95rem; line-height: 1.6; }
.sheet__where { font-size: 0.85rem; color: var(--sub-ink); line-height: 1.7; }

/* JS があるときだけ伏せる。無ければ最初から全部見える */
.js .sheet__date,
.js .sheet__what,
.js .sheet__where {
  opacity: 0;
  transition: opacity 260ms ease;
}
.js .sheet__rows > li.is-in .sheet__date,
.js .sheet__rows > li.is-in .sheet__what,
.js .sheet__rows > li.is-in .sheet__where { opacity: 1; }
.js .sheet__dot { transition: background-color 260ms ease; }

@media (prefers-reduced-motion: reduce) {
  .js .sheet__date,
  .js .sheet__what,
  .js .sheet__where { opacity: 1; transition: none; }
  .js .sheet__dot { transition: none; }
}

.ledger__note {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--sub-ink);
  line-height: 1.8;
}

/* ── 写真（あれば出る。無ければ節ごと出ない） ───────────────── */
.photos { padding: 0; }
.photos__main img { width: 100%; height: auto; border-radius: 0; }
.photos__strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 2px;
  margin-top: 2px;
}
.photos__strip img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* ── 2 つの入口（対等に並べない） ───────────────────────── */
.doors {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4rem;
  align-items: start;
}
.door__kind {
  font-family: var(--num);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--sub-ink);
}
.door h3 { font-size: 1.6rem; margin-top: 0.7rem; }
.door--sub h3 { font-size: 1.3rem; }
.door p { margin-top: 0.9rem; color: var(--sub-ink); font-size: 0.96rem; }
.door--main { border-top: 3px solid var(--ink); padding-top: 1.4rem; }
.door--sub { border-top: 1px solid var(--rule); padding-top: 1.4rem; }
.section--face .door--sub { border-top-color: var(--rule-face); }
.door .actions { margin-top: 1.5rem; }

/* ── 手順 ───────────────────────────────────────────────── */
.steps { border-top: 1px solid var(--rule); }
.section--face .steps { border-top-color: var(--rule-face); }
.steps > li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0 1.2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.section--face .steps > li { border-bottom-color: var(--rule-face); }
.steps__no {
  font-family: var(--num);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--sub);
}
.steps h3 { font-size: 1.15rem; }
.steps p { margin-top: 0.5rem; color: var(--sub-ink); font-size: 0.95rem; }

/* ── 箇条書き ───────────────────────────────────────────── */
.list { border-top: 1px solid var(--rule); max-width: 44rem; }
.section--face .list { border-top-color: var(--rule-face); }
.list > li {
  padding: 0.95rem 0 0.95rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
  font-size: 0.98rem;
  line-height: 1.85;
}
.section--face .list > li { border-bottom-color: var(--rule-face); }
.list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.65rem;
  width: 0.6rem;
  height: 1px;
  background: var(--sub);
}

/* ── 注記 ───────────────────────────────────────────────── */
.note {
  margin-top: 2rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--rule);
  color: var(--sub-ink);
  font-size: 0.92rem;
  max-width: 40rem;
}
.section--face .note { border-left-color: var(--rule-face); }

/* ── 文章ページ ─────────────────────────────────────────── */
.prose { max-width: 42rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-top: 1rem; }
.prose p.dim { color: var(--sub-ink); }
.prose .list { margin-top: 1.2rem; }

/* ── 末尾の CTA ─────────────────────────────────────────── */
.closer { padding: 3.6rem 0 4rem; border-top: 1px solid var(--rule); }
.closer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem 3rem;
  align-items: end;
}
.closer h2 { font-size: clamp(1.5rem, 4.4vw, 2.1rem); }
.closer p { margin-top: 1rem; color: var(--sub-ink); font-size: 0.96rem; max-width: 32rem; }
.closer .actions { margin-top: 0; }

/* ── フッタ ─────────────────────────────────────────────── */
.sitefoot { background: var(--ink); color: var(--paper); padding: 2.8rem 0 3rem; }
.sitefoot__grid { display: grid; grid-template-columns: 1fr; gap: 1.8rem 2rem; }
.sitefoot small {
  display: block;
  margin-top: 1rem;
  color: var(--face);
  font-size: 0.85rem;
  line-height: 1.95;
  max-width: 26rem;
}
.sitefoot a { color: var(--paper); }
.sitefoot nav li { padding: 0.28rem 0; }
.sitefoot nav a { font-size: 0.92rem; text-underline-offset: 4px; }
.sitefoot :focus-visible { outline-color: var(--face); }

/* ── 広い画面 ───────────────────────────────────────────── */
@media (min-width: 48rem) {
  :root { --gutter: 2.25rem; }
  .hero { padding: 4.6rem 0 4.4rem; }
  .hero__grid { grid-template-columns: 1.08fr 0.92fr; gap: 3.5rem; }
  .showcase { justify-items: end; }
  .sample__cap { text-align: right; }
  .section { padding: 5rem 0; }
  .ledger { padding: 5rem 0 5.4rem; }
  .ledger__grid { grid-template-columns: 0.78fr 1.22fr; gap: 3.5rem; }
  .doors { grid-template-columns: 1.35fr 0.9fr; gap: 3.5rem; }
  .closer__grid { grid-template-columns: 1fr auto; }
  .sitefoot__grid { grid-template-columns: 1fr auto; }
  .entries__body { font-size: 1.02rem; }
}

/* ── 中くらいまでの画面 ─────────────────────────────────── */
/* 目録の見出しは行に食い込ませる書き方だが、幅が足りないと区切りの罫だけが
   次の行の頭に落ちて読みにくい。狭いところでは見出しを 1 行に独立させる */
@media (max-width: 36rem) {
  .entries__body b { display: block; margin-bottom: 0.25rem; }
  .entries__body b::after { display: none; }
}

/* ── 狭い画面（375px 前後で台帳の列を畳む） ───────────────── */
@media (max-width: 30rem) {
  .sheet__cap { grid-template-columns: 1rem 3.7rem 1fr; }
  .sheet__cap span:last-child { display: none; }
  .sheet__rows > li { grid-template-columns: 1rem 3.7rem 1fr; }
  .sheet__where { grid-column: 3; font-size: 0.8rem; }
  .sample { padding: 1.2rem; }
  .sample__qr { grid-template-columns: 5.2rem minmax(0, 1fr); }
  .sample__qr img { width: 5.2rem; height: 5.2rem; }
  .btn { width: 100%; justify-content: center; }
  .actions { gap: 0.8rem; }
}

/* 見出しの直後に置く一覧 */
.list--gap { margin-top: 2rem; }

/* ── 企業ページ専用（/companies/ の名刺の見本だけで使う） ─────
   接頭辞 co- は企業ページ専用。他のページからは呼ばないこと。
   「会社の意匠が全社員に載る」ことを見せるための帯。朱は使わない
   （このページの朱は .sample__rec の 1 か所だけ）。 */
.co-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.15rem;
}
.co-brand__mark {
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--paper);
  font-family: var(--num);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  line-height: 1;
}
.co-brand__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  min-width: 0;
}
