/* style.css */
/* このファイルでページ全体の見た目を管理します */
/* 色・フォント・角丸・余白を変えるときは、まず下の :root の値を編集してください */
/* 作りは「スマホ（〜767px）→ タブレット（768〜1023px）→ PC（1024px〜）」の順に上書きしています */

/* =====================
   テーマ変数
   ===================== */
:root {
  /* 色（Profile 画像から取った、生成り・墨色・朱・ティール） */
  --color-bg: #f4efe4;
  --color-ink: #24262a;
  --color-muted: #55585b;
  --color-rule: #d8d0bf;
  --color-rule-faint: #e3dccd;
  --color-accent: #d4532b;

  /* ブランドごとの区別は、帯の左の細い線の色だけ */
  --color-brand-totonoe: #2c6274;
  --color-brand-works: #d4532b;
  --color-brand-books: #c8902f;

  /* 書体（Google Fonts は2書体まで） */
  --font-heading: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;

  /* 角丸・余白 */
  --radius-photo: 14px;
  --gutter: 24px;
}

/* =====================
   リセット・基本
   ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

/* 英語は、日本語の下に一段小さく添える */
.en {
  color: var(--color-muted);
}

/* =====================
   ページ全体（スマホ：縦1カラム）
   HTML の順番がそのままスマホの見た目の順。PC だけ grid で左右に置く
   ===================== */
.page {
  display: flex;
  flex-direction: column;
}

/* =====================
   Profile
   ===================== */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px var(--gutter) 32px;
  text-align: center;
}

/* スマホ：画像全体の丸（画像は index.html の picture で切り替え） */
.profile-photo {
  width: 152px;
  height: 152px;
  overflow: hidden;
  border-radius: 50%;
}

.profile-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  margin-top: 20px;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
}

.profile-title {
  margin-top: 12px;
  font-size: 15px;
}

.profile-title .en {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

/* =====================
   小見出し（共通）
   ===================== */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-ink);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.2em;
}

.section-title--ja {
  letter-spacing: 0.1em;
}

.section-label {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--color-muted);
}

/* =====================
   活動と「これまで」の帯（.index-list / .index-item）
   ===================== */
.main {
  padding: 0 var(--gutter);
}

.past {
  margin-top: 44px;
}

.index-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  grid-template-areas:
    "num head arrow"
    "num meta arrow"
    "num desc arrow";
  align-items: center;
  column-gap: 8px;
  min-height: 64px;
  padding: 16px 0 16px 14px;
  border-bottom: 1px solid var(--color-rule);
}

/* 左の細い線（ブランドの色）と、ホバーで伸びる朱の線 */
.index-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: var(--item-color, var(--color-rule));
}

.index-item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.35s ease;
}

.index-item:hover::after,
.index-item:focus-visible::after {
  width: 100%;
}

.index-item--totonoe { --item-color: var(--color-brand-totonoe); }
.index-item--works { --item-color: var(--color-brand-works); }
.index-item--books { --item-color: var(--color-brand-books); }

.index-num {
  grid-area: num;
  align-self: start;
  padding-top: 2px;
  font-family: var(--font-heading);
  font-size: 16px;
}

.index-head {
  grid-area: head;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
}

.index-ja {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 500;
}

.index-en {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--color-muted);
}

.index-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
  margin-top: 6px;
  font-size: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ブランド画像（小さな正方形のアイコン） */
.brand-mark {
  flex: none;
  width: 18px;
  height: 18px;
}

.dest {
  color: var(--color-muted);
  font-size: 11.5px;
}

.dest-en {
  display: none;
}

.index-desc {
  grid-area: desc;
  margin-top: 6px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--color-muted);
}

.desc-ja {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.desc-en {
  display: none;
}

.index-arrow {
  grid-area: arrow;
  text-align: right;
  font-size: 16px;
}

/* 「これまで」の帯（番号なし） */
.index-item--past {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "text dest";
  column-gap: 12px;
  padding: 14px 0;
}

.index-item--past::before,
.index-item--past::after {
  display: none;
}

.index-item--past .index-num {
  display: none;
}

.past-text {
  grid-area: text;
  display: flex;
  flex-direction: column;
}

.past-ja {
  font-size: 14px;
  line-height: 1.6;
}

.past-en {
  font-size: 11.5px;
  color: var(--color-muted);
}

.past-dest {
  grid-area: dest;
  font-size: 13px;
}

.index-item--past:hover .past-dest,
.index-item--past:focus-visible .past-dest {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 4px;
}

/* =====================
   Social
   ===================== */
.social {
  padding: 44px var(--gutter) 0;
}

.social-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-ink);
}

.social-head .section-title {
  font-size: 13px;
}

.social-note {
  font-size: 11.5px;
  color: var(--color-muted);
}

.social-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-bottom: 1px solid var(--color-rule-faint);
  font-size: 13px;
}

.social-icon {
  flex: none;
}

.social-account {
  color: var(--color-muted);
}

.social-account--note {
  font-size: 12px;
}

.social-list a:hover .social-service {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 4px;
}

/* =====================
   フッター
   ===================== */
.site-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 48px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--color-ink);
  font-size: 12.5px;
}

.site-footer-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-footer-link .en {
  font-size: 11.5px;
}

.site-footer-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 4px;
}

.site-footer-copy {
  font-size: 11.5px;
  color: var(--color-muted);
}

/* =====================
   404 ページ
   ===================== */
.notfound {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
  padding: 96px var(--gutter);
}

.notfound .profile-name {
  margin-top: 0;
}

.notfound-text .en {
  display: block;
  font-size: 12px;
}

.notfound-link {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-ink);
}

.notfound-link:hover {
  border-bottom-color: var(--color-accent);
}

/* =====================
   タブレット（768〜1023px）：縦1カラムのまま、幅を絞って中央に置き、説明の英語も出す
   ===================== */
@media (min-width: 768px) and (max-width: 1023px) {
  .page {
    max-width: 720px;
    margin: 0 auto;
  }

  .profile-photo {
    width: 176px;
    height: 176px;
  }

  .desc-ja {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .desc-en {
    display: block;
  }

  .dest-en::before {
    content: "/ ";
  }

  .dest-en {
    display: inline;
    margin-left: 4px;
  }
}

/* =====================
   PC（1024px〜）：左右の非対称2カラム（約40：60）
   ===================== */
@media (min-width: 1024px) {
  .page {
    display: grid;
    grid-template-columns: 2fr 3fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
  }

  /* 左カラム（.profile と .bottom）：スクロールしても固定。右カラム（.main）は縦に長く続く
     .profile は左上に、.bottom は左下に、どちらも同じ左カラムの全高を使って貼り付ける */
  .profile,
  .bottom {
    grid-column: 1;
    grid-row: 1 / -1;
    position: sticky;
  }

  .profile {
    top: 0;
    align-self: start;
    padding: clamp(40px, 6vh, 72px) clamp(32px, 4.5vw, 64px) 0 clamp(40px, 5.5vw, 80px);
  }

  .bottom {
    bottom: 0;
    align-self: end;
    padding: 0 clamp(32px, 4.5vw, 64px) clamp(32px, 4vh, 48px) clamp(40px, 5.5vw, 80px);
  }

  .main {
    grid-column: 2;
    grid-row: 1 / -1;
    padding: clamp(56px, 8vh, 96px) clamp(40px, 7.8vw, 112px) 120px clamp(40px, 5.5vw, 80px);
    border-left: 1px solid var(--color-rule);
  }

  /* Profile：全体が見える角丸の四角 */
  .profile {
    align-items: flex-start;
    text-align: left;
  }

  .profile-photo {
    /* 高さの低い画面では写真を縮め、下の Social・フッターが画面内に収まるようにする */
    width: min(100%, 400px, 40vh);
    height: auto;
    aspect-ratio: 1;
    border-radius: var(--radius-photo);
  }

  .profile-name {
    margin-top: 32px;
    font-size: 44px;
  }

  .profile-title {
    margin-top: 16px;
    font-size: 16px;
  }

  .profile-title .en {
    margin-top: 0;
    font-size: 13px;
  }

  /* 小見出し */
  .section-head {
    padding-bottom: 14px;
  }

  .section-title {
    font-size: 15px;
  }

  .section-label {
    font-size: 13px;
  }

  .past {
    margin-top: 72px;
  }

  /* 帯：番号／見出し・ブランド・説明／行き先 */
  .index-item {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas:
      "num head dest"
      "num brand dest"
      "num desc dest";
    column-gap: 24px;
    align-items: start;
    padding: 36px 0 36px 24px;
  }

  .index-item::before {
    top: 36px;
    bottom: 36px;
  }

  .index-num {
    padding-top: 0;
    font-size: 22px;
    line-height: 1.3;
  }

  .index-head {
    column-gap: 14px;
  }

  .index-ja {
    font-size: 28px;
    line-height: 1.3;
  }

  .index-en {
    font-size: 15px;
  }

  .index-meta {
    display: contents;
  }

  .brand {
    grid-area: brand;
    margin-top: 12px;
    gap: 10px;
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  .brand-mark {
    width: 24px;
    height: 24px;
  }

  .dest {
    grid-area: dest;
    align-self: end;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 2px;
    text-align: right;
    font-size: 12px;
  }

  .dest-ja {
    color: var(--color-ink);
    font-size: 14px;
  }

  .dest-ja::after {
    content: " →";
  }

  .dest-en {
    display: block;
    margin-left: 0;
  }

  .dest-en::before {
    content: none;
  }

  .index-desc {
    margin-top: 14px;
    font-size: 14px;
  }

  .desc-ja {
    color: var(--color-ink);
    line-height: 1.75;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .desc-en {
    display: block;
    font-size: 12.5px;
    line-height: 1.7;
  }

  .index-arrow {
    display: none;
  }

  /* 「これまで」の帯 */
  .index-item--past {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas: "num text dest";
    align-items: center;
    padding: 28px 0 28px 24px;
  }

  .index-item--past .index-num {
    display: block;
    font-size: 18px;
    color: var(--color-muted);
  }

  .past-ja {
    font-size: 15px;
    line-height: 1.7;
  }

  .past-en {
    font-size: 12.5px;
  }

  .past-dest {
    font-size: 14px;
  }

  /* Social・フッターは左カラムの下に寄せる */
  .social {
    padding: 0;
  }

  .social-head {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    padding: 12px 0 0;
    border-top: 1px solid var(--color-ink);
    border-bottom: 0;
  }

  .social-head .section-title {
    flex: none;
    font-size: 15px;
    white-space: nowrap;
  }

  .social-note {
    font-size: 12px;
  }

  .social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
    margin-top: 12px;
  }

  .social-list a {
    min-height: 32px;
    gap: 8px;
    border-bottom: 0;
  }

  .social-service {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .social-account--note {
    font-size: 11px;
  }

  .site-footer {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 16px;
    margin-top: 16px;
    padding: 12px 0 0;
    border-top: 1px solid var(--color-rule);
    font-size: 12px;
    color: var(--color-muted);
  }

  .site-footer-link {
    color: var(--color-ink);
  }
}

/* 画面の高さが低いとき：左カラムの固定をやめる（Profile の下に Social・フッターを続ける） */
@media (min-width: 1024px) and (max-height: 739px) {
  .profile,
  .bottom {
    position: static;
    grid-row: auto;
  }

  .profile {
    grid-row: 1;
  }

  .bottom {
    grid-row: 2;
    align-self: start;
    padding-top: 40px;
  }
}

/* 動きを減らす設定のとき：動きを止める */
@media (prefers-reduced-motion: reduce) {
  .index-item::after {
    transition: none;
  }
}
