/* ============================================
   Misaki Kitano — Bonobo  |  shared stylesheet
   ============================================ */
:root {
  --bg: #f4f4f1;
  --ink: #2b2725;
  --soft: #75716b;
  --navy: #2b3a67;
  --red: #ee3124;
  --blue: #1f66e0;
  --yellow: #f2c118;
  --pink: #f2367b;
  --orange: #ec6119;
  --forest: #2f5d2e;
  --olive: #97992e;
  --salmon: #f79b8e;
  --block-a: #ecefe6;
  --block-b: #f6efec;
  --serif-jp: "Shippori Mincho", serif;
  --sans-latin: "Jost", sans-serif;
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
  --ease-draw: cubic-bezier(.65, 0, .35, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--serif-jp); font-size: 16px; line-height: 1.9; letter-spacing: .02em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  animation: page-in .55s ease both;
}
/* ページ遷移：ふわっと現れて、ふわっと消える */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
body.is-leaving { animation: none; opacity: 0; transition: opacity .27s ease; }
.latin { font-family: var(--sans-latin); }
::selection { background: var(--yellow); color: var(--ink); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 2px;
}

/* ---------- header ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 42px;
  background: linear-gradient(var(--bg) 55%, rgba(244,244,241,0));
}
.logo {
  font-family: var(--sans-latin); font-weight: 500; font-size: 14px;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  transition: letter-spacing .5s var(--ease-soft);
}
.logo:hover { letter-spacing: .38em; }
nav { display: flex; gap: 30px; align-items: center; }
nav a {
  font-family: var(--sans-latin); font-size: 13px; letter-spacing: .22em; text-transform: lowercase;
  color: var(--ink); text-decoration: none; position: relative;
  transition: transform .3s var(--ease-soft);
}
nav a:hover { transform: translateY(-1px); }

/* 手書き風の下線（JSがSVGを差し込む） */
.draw-line {
  position: absolute; left: -3px; right: -3px; bottom: -8px;
  width: calc(100% + 6px); height: 10px; overflow: visible; pointer-events: none;
}
.draw-line path {
  fill: none; stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
  transition: stroke-dashoffset .5s var(--ease-draw), opacity .12s linear;
}
nav a:hover .draw-line path,
nav a.active .draw-line path { stroke-dashoffset: 0; opacity: 1; }
/* JSアニメーション（左から描かれ右へ抜ける）が動くときはCSS側の遷移を止める */
.draw-line.js-drawn path { transition: none; }

.lang { display: flex; gap: 10px; margin-left: 22px; }
.lang button {
  font-family: var(--sans-latin); font-size: 12px; letter-spacing: .12em;
  background: none; border: none; cursor: pointer; color: var(--soft); padding: 3px 7px; border-radius: 50%;
  transition: transform .3s var(--ease-soft), color .3s, background .3s;
}
.lang button:hover { transform: translateY(-2px) scale(1.1); color: var(--ink); }
.lang button.active { color: #fff; background: var(--ink); }

/* ハンバーガー（モバイルのみ表示） */
.menu-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  width: 42px; height: 42px; background: none; border: none; cursor: pointer; z-index: 40;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .4s var(--ease-soft), opacity .3s;
}
body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- layout ---------- */
main { min-height: 70vh; }
section { position: relative; padding: 100px 32px; }
.wrap { max-width: 1020px; margin: 0 auto; }
.wrap-narrow { max-width: 720px; margin: 0 auto; }
.sec-label {
  font-family: var(--sans-latin); font-size: 13px; font-weight: 500;
  letter-spacing: .42em; text-transform: uppercase;
  color: var(--ink); display: inline-block; position: relative; margin-bottom: 48px;
}
.squiggle { position: absolute; left: 0; bottom: -12px; width: 100%; height: 12px; }
.squiggle path { fill: none; stroke-width: 3; stroke-linecap: round; }
.divider { display: block; width: 100%; height: 70px; margin-bottom: -1px; }

/* page hero (subpages) */
.page-hero { padding: 170px 32px 40px; text-align: left; }
.page-hero h1 {
  font-family: var(--sans-latin); font-weight: 400;
  font-size: clamp(34px, 5vw, 56px); letter-spacing: .2em; text-transform: uppercase;
  display: inline-block; position: relative;
}
.page-hero .lead { margin-top: 22px; color: var(--soft); max-width: 36em; }

/* ---------- home hero ---------- */
.hero {
  min-height: 62vh; position: relative;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 24px; overflow: hidden;
}
.blob { position: absolute; }
.hero .name {
  font-family: var(--sans-latin); font-weight: 400;
  font-size: clamp(40px, 7.5vw, 96px); letter-spacing: .22em; text-transform: uppercase;
  position: relative; z-index: 2;
}
.hero .name span { display: inline-block; cursor: default; }
.hero-hint {
  position: absolute; bottom: 7vh; left: 50%; transform: translateX(-50%);
  font-family: var(--sans-latin); font-size: 11px; letter-spacing: .35em; text-transform: uppercase;
  color: var(--soft); opacity: .7;
}

/* intro */
#intro { text-align: center; padding-top: 90px; }
#intro p { max-width: 44em; margin: 0 auto; font-size: 17.5px; line-height: 2.2; }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.project {
  display: flex; flex-direction: column;
  background: #fff; border-radius: 22px 26px 20px 28px;
  padding: 34px 30px 30px;
  text-decoration: none; color: inherit;
  transition: transform .4s var(--ease-soft), box-shadow .4s;
}
.project:hover {
  transform: translateY(-10px) rotate(-.6deg);
  box-shadow: 0 18px 40px rgba(43,58,103,.12);
}
.p-blob {
  width: 54px; height: 44px; margin-bottom: 18px; flex-shrink: 0;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.project:hover .p-blob { transform: rotate(-8deg) scale(1.12); }
.project h3 { font-family: var(--sans-latin); font-weight: 400; font-size: 19px; letter-spacing: .1em; margin-bottom: 10px; }
.project .p-q { font-size: 14px; color: var(--soft); line-height: 1.95; margin-bottom: 22px; }
.p-now {
  display: inline-block; font-size: 12.5px; letter-spacing: .06em;
  padding: 4px 14px; border-radius: 999px; color: #fff;
  transition: transform .35s var(--ease-soft);
}
.project .p-now { margin-top: auto; align-self: flex-start; }
.project:hover .p-now { transform: rotate(-2deg) translateX(3px); }
.project-full {
  background: #fff; border-radius: 26px; padding: 44px 40px; margin-bottom: 40px;
  scroll-margin-top: 110px;
}
.project-full h2 { font-family: var(--sans-latin); font-weight: 400; font-size: 24px; letter-spacing: .12em; margin-bottom: 6px; }
.project-full .q { color: var(--soft); font-size: 15px; margin-bottom: 18px; }
.project-full .body { font-size: 15px; }

/* ---------- column ---------- */
.col-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.col-card { cursor: pointer; text-decoration: none; color: var(--ink); display: block; }
.ph {
  aspect-ratio: 4 / 5; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans-latin); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: rgba(50,45,40,.35);
  transition: transform .4s var(--ease-soft);
  background: linear-gradient(170deg, #eaeae3, #d8d8cd);
  border-radius: 58% 42% 50% 50% / 48% 55% 45% 52%;
}
.ph img { width: 100%; height: 100%; object-fit: cover; }
.col-card:hover .ph { transform: rotate(1.2deg) scale(1.03); }
.col-card figcaption { margin-top: 18px; font-size: 16px; letter-spacing: .06em; text-align: center; transition: color .35s; }
.col-card:hover figcaption { color: var(--pink); }
.col-card time { display: block; font-family: var(--sans-latin); font-size: 12px; letter-spacing: .2em; color: var(--soft); margin-top: 4px; text-align: center; }

/* note-feed articles */
.note-list { max-width: 720px; }
.note-item {
  display: block; text-decoration: none; color: var(--ink); padding: 30px 6px;
  border-bottom: 2px dotted rgba(43,58,103,.25);
  transition: transform .35s var(--ease-soft);
}
.note-item:hover { transform: translateX(6px); }
.note-item h3 { font-size: 18px; font-weight: 500; letter-spacing: .04em; margin-bottom: 6px; transition: color .3s; }
.note-item:hover h3 { color: var(--blue); }
.note-item time { font-family: var(--sans-latin); font-size: 12px; letter-spacing: .2em; color: var(--soft); }
.note-item p { font-size: 14px; color: var(--soft); margin-top: 8px; }
.note-item .readmore { font-family: var(--sans-latin); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--navy); }
.feed-note { font-size: 13px; color: var(--soft); background: #fff; border-radius: 14px; padding: 18px 22px; margin-bottom: 30px; }

/* ---------- podcast ---------- */
.ep {
  display: flex; align-items: baseline; gap: 24px; padding: 24px 6px;
  border-bottom: 2px dotted rgba(43,58,103,.25);
  text-decoration: none; color: var(--ink);
  transition: transform .35s var(--ease-soft);
}
.ep:hover { transform: translateX(8px); }
.dot-ep {
  width: 14px; height: 12px; border-radius: 60% 40% 55% 45%; align-self: center; flex-shrink: 0;
  background: var(--yellow);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.ep:hover .dot-ep { transform: scale(1.4) rotate(15deg); }
.ep:nth-child(2n) .dot-ep { background: var(--pink); }
.ep:nth-child(3n) .dot-ep { background: var(--olive); }
.ep .num { font-family: var(--sans-latin); font-size: 13px; letter-spacing: .2em; color: var(--navy); min-width: 48px; }
.ep .t { font-size: 16px; transition: color .3s; }
.ep:hover .t { color: var(--blue); }
.ep .dur { margin-left: auto; font-family: var(--sans-latin); font-size: 12px; color: var(--soft); letter-spacing: .15em; }
.embed-slot { margin: 30px 0; }
.embed-slot iframe { border-radius: 16px; max-width: 100%; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 60px; align-items: start; }
.profile-photo {
  width: 260px; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 58% 42% 50% 50% / 48% 55% 45% 52%;
  background: linear-gradient(170deg, #eaeae3, #d8d8cd);
  display: flex; align-items: center; justify-content: center;
  position: sticky; top: 120px;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-photo .ph-hint {
  position: absolute; text-align: center; font-family: var(--sans-latin);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(50,45,40,.4);
  padding: 0 30px; line-height: 2;
}
.profile-photo.has-img .ph-hint { display: none; }
.profile-sign {
  display: block; text-align: right; margin: 0 0 44px;
  font-family: var(--serif-jp); font-size: 18px; letter-spacing: .14em; color: var(--ink);
}
.profile-sign::before { content: "— "; color: var(--soft); }
.timeline { max-width: 640px; }
.tl-item { display: flex; gap: 28px; padding: 18px 0; border-bottom: 1px solid #e3e3dd; }
.tl-item .y { font-family: var(--sans-latin); font-size: 13px; letter-spacing: .18em; color: var(--soft); min-width: 88px; padding-top: 4px; }
.tl-item .what { font-size: 15px; }
.tl-item .what small { display: block; font-size: 13px; color: var(--soft); }

/* section "more about …" link（ホバーで文字がやわらかく波打つ） */
.sec-more {
  display: inline-block; margin-top: 44px; position: relative;
  font-family: var(--sans-latin); font-size: 13px; letter-spacing: .3em; text-transform: lowercase;
  color: var(--ink); text-decoration: none;
  transition: color .4s;
}
.sec-more:hover { color: var(--mc, var(--ink)); }
.sec-more .arrow { display: inline-block; transition: transform .35s var(--ease-soft); margin-right: 10px; }
.sec-more:hover .arrow { transform: translateX(8px); }
.sec-more .wch { display: inline-block; }

/* ---------- buttons / misc ---------- */
.more {
  display: inline-block; margin-top: 40px; font-family: var(--sans-latin);
  font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding: 10px 26px;
  border: 2px solid var(--ink); border-radius: 999px; background: none; cursor: pointer;
  transition: background .35s, color .35s, transform .35s var(--ease-soft), box-shadow .35s;
}
.more:hover {
  background: var(--ink); color: var(--bg);
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 12px 26px rgba(43,39,37,.16);
}

/* contact */
.contact-block { text-align: center; }
.contact-block .big-mail {
  font-family: var(--sans-latin); font-size: clamp(18px, 3vw, 28px); letter-spacing: .08em;
  color: var(--ink); text-decoration: none; padding-bottom: 4px;
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-repeat: no-repeat; background-size: 100% 3px; background-position: 0 100%;
  transition: background-size .45s var(--ease-draw);
}
.contact-block .big-mail:hover { background-size: 100% 45%; }
.socials { display: flex; gap: 26px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.socials a {
  font-family: var(--sans-latin); font-size: 13px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  position: relative; transition: color .3s;
}
.socials a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: var(--yellow); border-radius: 2px; transition: width .35s var(--ease-soft);
}
.socials a:hover { color: var(--blue); }
.socials a:hover::after { width: 100%; }

/* footer */
footer { background: var(--navy); color: #f4f4f1; margin-top: 80px; }
.f-inner {
  max-width: 1020px; margin: 0 auto; padding: 70px 32px 56px;
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 30px;
}
.f-name { font-family: var(--sans-latin); font-weight: 400; font-size: 15px; letter-spacing: .28em; text-transform: uppercase; }
.f-links { display: flex; gap: 26px; flex-wrap: wrap; }
.f-links a {
  font-family: var(--sans-latin); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(244,244,241,.75); text-decoration: none; position: relative; transition: color .3s;
}
.f-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--yellow); transition: width .35s var(--ease-soft);
}
.f-links a:hover { color: var(--yellow); }
.f-links a:hover::after { width: 100%; }
.f-copy { width: 100%; font-family: var(--sans-latin); font-size: 11px; letter-spacing: .2em; color: rgba(244,244,241,.45); }

/* block backgrounds */
.bg-a { background: var(--block-a); }
.bg-b { background: var(--block-b); }

/* テスト表示中バナー（管理画面の「ローカルで試す」使用時のみ） */
.draft-banner {
  position: fixed; left: 18px; bottom: 18px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  background: var(--navy); color: #f4f4f1;
  font-family: var(--sans-latin); font-size: 12px; letter-spacing: .1em;
  padding: 9px 16px; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(43,58,103,.28);
}
.draft-banner button {
  font-family: var(--sans-latin); font-size: 11px; letter-spacing: .1em;
  background: rgba(244,244,241,.16); color: #f4f4f1;
  border: none; border-radius: 999px; padding: 3px 12px; cursor: pointer;
  transition: background .3s;
}
.draft-banner button:hover { background: rgba(244,244,241,.32); }

/* ============================================
   responsive
   ============================================ */
@media (max-width: 1080px) {
  .projects, .col-grid { gap: 24px; }
  .about-grid { gap: 40px; }
}

@media (max-width: 900px) {
  section { padding: 84px 26px; }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .projects .project:last-child { grid-column: 1 / -1; }
  .col-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .about-grid { grid-template-columns: 1fr; }
  .profile-photo { position: static; margin: 0 auto 10px; }
}

@media (max-width: 760px) {
  header { padding: 14px 18px; }
  .menu-toggle { display: flex; }
  nav {
    position: fixed; inset: 0; z-index: 30;
    flex-direction: column; justify-content: center; align-items: center; gap: 30px;
    background: rgba(244,244,241,.97);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden;
    transition: opacity .4s ease, visibility .4s;
  }
  body.menu-open nav { opacity: 1; visibility: visible; }
  body.menu-open { overflow: hidden; }
  nav a {
    font-size: 18px; letter-spacing: .3em;
    opacity: 0; transform: translateY(16px);
    transition: opacity .45s ease, transform .5s var(--ease-soft);
  }
  body.menu-open nav a { opacity: 1; transform: none; }
  body.menu-open nav a:nth-child(1) { transition-delay: .06s; }
  body.menu-open nav a:nth-child(2) { transition-delay: .12s; }
  body.menu-open nav a:nth-child(3) { transition-delay: .18s; }
  body.menu-open nav a:nth-child(4) { transition-delay: .24s; }
  .lang {
    margin: 14px 0 0;
    opacity: 0; transition: opacity .45s ease .3s;
  }
  body.menu-open .lang { opacity: 1; }
  .lang button { font-size: 14px; }

  /* セクション上部の余白を詰める（下は最後のセクションだけ別途詰める） */
  section { padding: 44px 22px 58px; }
  /* ヒーローを高く。名前は1行に収めてドット（ブロブ）と重ならないように */
  .hero { min-height: 64vh; }
  .hero .name { font-size: clamp(26px, 8vw, 42px); letter-spacing: .12em; }
  .blob { max-width: 19vw; }
  .hero .blob:nth-of-type(5) { top: 24% !important; left: 6% !important; }
  .hero .blob:nth-of-type(6) { top: auto !important; bottom: 18% !important; right: 6% !important; }
  .hero-hint { display: none; }
  .page-hero { padding: 130px 22px 30px; }
  /* 初回表示でヒーロー＋紹介文が見えるよう上余白を詰める */
  #intro { padding-top: 34px; }
  #intro p { font-size: 16px; line-height: 2.1; }
  .projects { grid-template-columns: 1fr; }
  .projects .project:last-child { grid-column: auto; }
  .col-grid { grid-template-columns: 1fr; gap: 34px; }
  .col-card .ph { max-width: 380px; margin: 0 auto; }
  .project-full { padding: 32px 24px; }
  .ep { gap: 14px; }
  .ep .num { min-width: 42px; }
  /* 最後のセクションとフッターの間を詰める */
  main > section:last-of-type { padding-bottom: 32px; }
  footer { margin-top: 36px; }
  .f-inner { flex-direction: column; align-items: flex-start; padding: 56px 24px 44px; }
  .sec-label { margin-bottom: 36px; }
  .sec-more { margin-top: 30px; }
}

@media (max-width: 420px) {
  .hero .name { letter-spacing: .08em; }
  .tl-item { gap: 16px; }
  .tl-item .y { min-width: 72px; }
}

/* ============================================
   reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal, .card-reveal, .row-reveal, .hero .name span, .blob { opacity: 1 !important; transform: none !important; animation: none !important; }
  .draw-line path { transition: none; }
  body { animation: none; }
  * { scroll-behavior: auto !important; }
}
