/* style.css */
/* このファイルでページ全体の見た目を管理します */
/* 色・書体・余白を変更する場合は、まず先頭の :root の値を編集してください */

/* =====================
   テーマ変数（名刺の色を実測した値）
   ===================== */
:root {
  --color-bg: #ddeef6;          /* 水色の地 */
  --color-surface: rgba(255, 255, 255, 0.6);
  --color-navy: #17456b;        /* 紺：名前・本文・ボタン */
  --color-navy-soft: #476e8f;   /* 青灰：日本語名 */
  --color-ring: #5b84ae;        /* 写真の縁 */
  --color-gold: #8c6a2f;        /* 金：罫・アイコン */
  --color-gold-text: #7d5f26;   /* 金：文字（水色の地で AA を満たす濃さ） */
  --color-line: rgba(23, 69, 107, 0.16);

  --font-serif: "Libre Caslon Text", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Figtree", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-ja: "Noto Serif JP Name", "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", serif;

  --radius: 14px;
}

/* =====================
   書体（自前配信。外部の CDN は使わない）
   ===================== */
@font-face {
  font-family: "Libre Caslon Text";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts-v1/libre-caslon-text-400.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Caslon Text";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts-v1/libre-caslon-text-700.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Caslon Text";
  font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts-v1/libre-caslon-text-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts-v1/figtree-400.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts-v1/figtree-600.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Serif JP Name";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts-v1/noto-serif-jp-500-name.woff2") format("woff2");
}

/* =====================
   共通
   ===================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-navy);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

p, ul, figure, h1 { margin: 0; }
ul { padding: 0; list-style: none; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible {
  outline: 3px solid var(--color-gold-text);
  outline-offset: 3px;
}

/* =====================
   カード（モバイル：1カラム。写真→文字の順）
   ===================== */
.card {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 24px 48px;
  display: grid;
  gap: 28px;
  justify-items: center;
  text-align: center;
}

.portrait {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 5px solid var(--color-ring);   /* 名刺の青い縁。名刺側の枠なので、ここで付ける */
  overflow: hidden;
  background: var(--color-ring);
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 22px;
}

/* =====================
   名前・肩書
   ===================== */
.identity { display: grid; gap: 4px; justify-items: center; }

.name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.35rem, 10.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.name-ja {
  font-family: var(--font-ja);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  color: var(--color-navy-soft);
}

.role {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-text);
}

.org {
  margin-top: 6px;
  font-size: 1.2rem;
  font-weight: 600;
}

.staff-id {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.rule { display: block; max-width: 100%; height: auto; }

/* =====================
   連絡先（行ごとに、押せる面を広く）
   ===================== */
.contact { width: 100%; display: grid; gap: 10px; }

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  color: var(--color-navy);
  text-decoration: none;
}
.contact-link .icon { flex: none; color: var(--color-gold); }
.contact-text { font-size: 1.3rem; letter-spacing: 0.03em; }
.contact-email { font-size: 1.1rem; overflow-wrap: anywhere; letter-spacing: 0.01em; }

@media (hover: hover) {
  .contact-link:hover { border-color: var(--color-gold); background: #fff; }
}

/* =====================
   ボタン（強いのは「連絡先に追加」の1つだけ）
   ===================== */
.actions { width: 100%; display: grid; gap: 14px; justify-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.btn-primary { background: var(--color-navy); color: #fff; }
@media (hover: hover) {
  .btn-primary:hover { background: #0f3556; }
}

.link-voice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 6px;
  color: var(--color-navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  border-radius: 6px;
}
.link-voice .icon { color: var(--color-gold); }

.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
}

/* =====================
   404 ページ用
   ===================== */
.notfound { padding-top: 96px; }
.notfound .name { font-size: 2rem; }

/* =====================
   PC 幅：名刺と同じく、左に文字・右に写真
   ===================== */
@media (min-width: 920px) {
  body { display: grid; min-height: 100vh; place-items: center; }

  .card {
    max-width: 1120px;
    width: 100%;
    padding: 72px 64px;
    grid-template-columns: minmax(0, 1fr) 350px;
    grid-template-areas: "info portrait";
    column-gap: 72px;
    align-items: center;
    justify-items: stretch;
    text-align: left;
  }

  .portrait { grid-area: portrait; width: 350px; height: 350px; border-width: 6px; }
  .info { grid-area: info; justify-items: start; gap: 26px; }
  .identity { justify-items: start; }
  .name { font-size: clamp(2.6rem, 4.2vw, 3.4rem); white-space: nowrap; }
  .name-ja { font-size: 1.35rem; }
  .role { font-size: 1.15rem; }
  .org { font-size: 1.3rem; }
  .contact { max-width: 440px; }
  .contact-link { justify-content: flex-start; }
  .actions { max-width: 440px; justify-items: stretch; }
  .btn { width: auto; justify-self: start; min-width: 240px; }
  .link-voice { justify-self: start; }

  /* 404 ページ：写真の列を持たない */
  .card.notfound { max-width: 560px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "info"; text-align: center; }
  .notfound .info { justify-items: center; }
  .notfound .btn { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
