:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --text: #111111;
  --text-sub: #6e6e6e;
  --line: #e6e8eb;
  --accent: #4f86b3;
  --sky: #e9f2fa;
  --font-en: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-ja: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ja);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ヘッダー */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header { transition: background-color .4s ease; }
.logo { text-decoration: none; display: flex; flex-direction: column; line-height: 1.3; }
.logo-ja { font-size: 17px; font-weight: 500; letter-spacing: 0.08em; }
.logo-en { font-family: var(--font-en); font-weight: 300; font-size: 11px; letter-spacing: 0.18em; color: var(--text-sub); }

.menu-button {
  position: relative; width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.menu-bar {
  position: absolute; left: 10px; right: 10px; height: 1.5px;
  background: var(--text);
  transition: transform .35s ease, top .35s ease;
}
.menu-bar:nth-child(1) { top: 19px; }
.menu-bar:nth-child(2) { top: 25px; }
.menu-button[aria-expanded="true"] .menu-bar:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-bar:nth-child(2) { top: 22px; transform: rotate(-45deg); }

/* メニュー(右側のサイドバー) */
.site-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
  width: min(380px, 86vw);
  background: #fff;
  box-shadow: -12px 0 40px rgba(17, 17, 17, .08);
  display: flex; flex-direction: column; justify-content: center;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), visibility .45s;
}
.site-menu[hidden] { display: flex; }
.site-menu.is-open { transform: none; visibility: visible; }
.menu-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 0; }
.menu-close .menu-bar { top: 22px; }
.menu-close .menu-bar:nth-child(1) { transform: rotate(45deg); }
.menu-close .menu-bar:nth-child(2) { transform: rotate(-45deg); }
.site-menu ul { display: grid; gap: 4px; padding: 0 40px; }
.site-menu a {
  display: flex; flex-direction: column; gap: 2px;
  text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--line);
  transform: translateX(24px); opacity: 0;
  transition: transform .5s ease, opacity .5s ease;
}
.site-menu.is-open a { transform: none; opacity: 1; }
.site-menu.is-open li:nth-child(2) a { transition-delay: .06s; }
.site-menu.is-open li:nth-child(3) a { transition-delay: .12s; }
.site-menu.is-open li:nth-child(4) a { transition-delay: .18s; }
.site-menu.is-open li:nth-child(5) a { transition-delay: .24s; }
.site-menu .en { font-family: var(--font-en); font-weight: 200; font-size: 30px; letter-spacing: 0.06em; line-height: 1.3; }
.site-menu .ja { font-size: 12px; color: var(--text-sub); }
/* カーソルを乗せると、英語も小さい日本語も、いっしょに右へ動く */
.site-menu .en, .site-menu .ja { transition: transform .35s ease; }
.site-menu a:hover .en, .site-menu a:hover .ja { transform: translateX(10px); }

/* ローディング画面:白い面に、黒い文字と、横に伸びる線 */
.loader { display: none; }
.js .loader {
  display: flex; position: fixed; inset: 0; z-index: 100; background: #fff; color: #111;
  align-items: center; justify-content: center;
  transition: opacity .7s ease .1s, visibility .7s ease .1s;
  animation: loader-failsafe .01s linear 6s forwards; /* 万一スクリプトが動かなくても、6秒で消える */
}
.loader-inner { text-align: center; }
.loader-name { font-family: var(--font-en); font-weight: 200; font-size: clamp(22px, 4vw, 34px); letter-spacing: .5em; padding-left: .5em; opacity: 0; animation: show .9s ease .2s forwards; }
.loader-line { display: block; width: min(220px, 50vw); height: 1px; margin: 22px auto 0; background: #111; transform: scaleX(0); transform-origin: left; animation: loader-line 1.3s cubic-bezier(.6, .1, .2, 1) .2s forwards; }
@keyframes loader-line { to { transform: scaleX(1); } }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }
.is-loaded .loader { opacity: 0; visibility: hidden; }
/* ローディング中は、ヒーローの動きを止めておく */
.js:not(.is-loaded) .hero-line, .js:not(.is-loaded) .hero-curve path { animation-play-state: paused; }

/* ヒーロー */
/* 白と黒のヒーロー:白い面に、黒い大きな文字。右側に、白黒に変えた明るい写真が、白からうかぶように現れる */
.hero {
  position: relative; min-height: 100svh; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--header-h) clamp(24px, 7vw, 120px) 96px;
  background: #fff; color: #111; text-align: left;
}
.hero::before {
  content: ""; position: absolute; inset: 0 0 0 44%; z-index: -1;
  background: url("../images/trouble-desk.jpg") 30% center / cover no-repeat;
  filter: grayscale(1) contrast(1.08) brightness(1.04);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26%);
  mask-image: linear-gradient(90deg, transparent 0, #000 26%);
}
.hero-inner { display: flex; flex-direction: column; align-items: flex-start; }
.hero-meta {
  position: absolute; left: clamp(24px, 7vw, 120px); right: clamp(24px, 7vw, 120px); bottom: 28px;
  display: flex; justify-content: space-between; padding-top: 14px;
  border-top: 1px solid #111;
  font-family: var(--font-en); font-weight: 400; font-size: 11px; letter-spacing: .3em; color: #111;
}
.hero-curve { width: min(520px, 78vw); height: 28px; margin-top: 32px; overflow: visible; }
.hero-curve path {
  fill: none; stroke: #111; stroke-width: 1.5; stroke-linecap: round;
  /* 描き始めるまでは、完全に隠しておく(線の端の丸みが点で見えないように、透明にもする) */
  opacity: 0;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: show 0.01s linear 1.1s forwards, draw 2.4s ease 1.1s forwards;
}
@keyframes show { to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* 見出しの下に引かれる線 */
.label { position: relative; padding-bottom: 18px; }
.label::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 1px;
  background: var(--accent);
}
.js .label::after { transform: scaleX(0); transform-origin: left; transition: transform 1.3s ease .4s; }
.js .label.is-visible::after { transform: scaleX(1); }
.contact .label::after { left: 50%; margin-left: -36px; }
.hero-title { font-weight: 300; font-size: clamp(36px, 7.6vw, 108px); line-height: 1.35; letter-spacing: 0.08em; color: #111; }
.hero-line { display: block; opacity: 0; transform: translateY(18px); animation: rise 1.4s ease forwards; }
.hero-line:nth-child(2) { animation-delay: .5s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.scroll-hint {
  position: absolute; bottom: 64px; right: clamp(24px, 7vw, 120px); width: 24px; height: 64px;
}
.scroll-hint span {
  position: absolute; left: 11px; top: 0; width: 1px; height: 64px; background: #111; opacity: .8;
  transform-origin: top; animation: hint 2.2s ease-in-out infinite;
}
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* セクション共通 */
.section { padding: clamp(72px, 9vw, 120px) 24px; }
.section:nth-of-type(even) { background: var(--bg-soft); }
.inner { max-width: 960px; margin: 0 auto; }
.label { display: flex; align-items: baseline; gap: 16px; margin-bottom: clamp(36px, 6vw, 64px); }
.label .en { font-family: var(--font-en); font-weight: 200; font-size: clamp(34px, 6vw, 56px); letter-spacing: 0.06em; line-height: 1.2; }
.label .ja { font-size: 13px; color: var(--text-sub); }

/* Trouble:番号つきの、細い線のリスト */
/* 列の幅は固定(文章の長さで、列の幅や写真の位置が変わらないようにする) */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split-photo { position: relative; isolation: isolate; margin: 0; }
.split-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* 写真の後ろに、ずらした細い枠線を置く */
.split-photo::before { content: ""; position: absolute; inset: 16px -16px -16px 16px; border: 1px solid var(--text); z-index: -1; }
.split-text .label { margin-bottom: clamp(28px, 4vw, 44px); }
/* Service:写真を左に置き、「解決した」という安心感を出す */
.split.photo-first .split-photo { order: -1; }
/* Serviceは、写真を左、カードを縦に3枚(右)。Troubleと同じ大きさの写真にそろえる */
.cards.stack { grid-template-columns: 1fr; gap: 12px; }
.cards.stack .card.service { display: grid; grid-template-columns: 64px 1fr; column-gap: 24px; align-items: center; padding: 20px 24px; }
.cards.stack .svc-icon { grid-row: 1 / span 2; width: 64px; height: 51px; margin: 0; }
.cards.stack .card-title { margin: 0 0 4px; font-size: 19px; }
.cards.stack .card.service p:last-child { font-size: 14px; line-height: 1.7; }
.cards.stack .card.service .card-no { font-size: 44px; top: 8px; right: 16px; }
.plain-list li { padding: 22px 0; border-bottom: 1px solid var(--line); font-size: clamp(16px, 2.2vw, 19px); }
.plain-list li:first-child { border-top: 1px solid var(--line); }
.plain-list li { text-wrap: balance; word-break: auto-phrase; }
.plain-list.numbered li { display: flex; align-items: baseline; gap: 24px; transition: transform .4s ease; }
.plain-list.numbered li:hover { transform: translateX(8px); } /* 余白は変えず、位置だけ動かす(改行が変わらない) */
.plain-list .num { font-family: var(--font-en); font-weight: 200; font-size: 14px; letter-spacing: .2em; color: var(--text-sub); min-width: 28px; }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.card { background: var(--bg); padding: 36px 28px; border: 1px solid var(--line); }
.card-no { font-family: var(--font-en); font-weight: 200; font-size: 14px; color: var(--text-sub); letter-spacing: .2em; }
.card-title { font-size: 22px; font-weight: 500; margin: 14px 0 12px; letter-spacing: .1em; }
.card p:last-child { color: var(--text-sub); font-size: 15px; }

/* Service:白と黒の線画。表示されると線が描かれ、カーソルを乗せると白黒が反転する */
.card.service { position: relative; overflow: hidden; transition: background-color .45s ease, color .45s ease, border-color .45s ease, opacity 1s ease, transform 1s ease; }
.svc-icon { width: 80px; height: 64px; margin-bottom: 26px; overflow: visible; }
.svc-icon path {
  fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .45s ease;
}
.js .svc-icon path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s ease .3s, stroke .45s ease; }
.js .card.service.is-visible .svc-icon path { stroke-dashoffset: 0; }
.js .card.service.is-visible .svc-icon path:nth-child(2) { transition-delay: .5s, 0s; }
.js .card.service.is-visible .svc-icon path:nth-child(3) { transition-delay: .7s, 0s; }
.js .card.service.is-visible .svc-icon path:nth-child(4) { transition-delay: .9s, 0s; }
.js .card.service.is-visible .svc-icon path:nth-child(5) { transition-delay: 1.1s, 0s; }
/* 大きな薄い番号を、背景に置く */
.card.service .card-no { position: absolute; top: 14px; right: 22px; font-size: 64px; font-weight: 100; line-height: 1; color: var(--line); transition: color .45s ease; }
.card.service:hover { background: #111; color: #fff; border-color: #111; }
.card.service:hover .svc-icon path { stroke: #fff; }
.card.service:hover .card-no { color: #3a3a3a; }
.card.service:hover p:last-child { color: #d0d0d0; }

.steps { display: grid; gap: 0; }
.steps li { display: flex; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.steps li:first-child { border-top: 1px solid var(--line); }
.step-no { font-family: var(--font-en); font-weight: 200; font-size: 32px; line-height: 1.2; color: var(--accent); min-width: 56px; }
.steps h2 { font-size: 19px; font-weight: 500; }
.steps p { color: var(--text-sub); font-size: 15px; }

.strengths { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.strengths li { background: var(--bg); border: 1px solid var(--line); padding: 32px 28px; }
.strengths h2 { font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.strengths p { color: var(--text-sub); font-size: 15px; }

/* サンプル */
.lead { margin: -24px 0 36px; color: var(--text-sub); font-size: 15px; }
.card.sample { position: relative; }
.sample-icon { width: 52px; height: 48px; margin-bottom: 18px; }
.sample-icon path {
  fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.sample-tag {
  display: inline-block; margin-bottom: 6px; padding: 1px 10px;
  font-size: 11px; letter-spacing: .14em; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px;
}
/* クリックで、サンプルのページへ飛ぶカード(サムネイル付き) */
.sample-link { display: block; text-decoration: none; color: inherit; padding: 0 0 28px; overflow: hidden; transition: transform .35s ease, box-shadow .35s ease; }
.sample-link .sample-thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 20px; border-bottom: 1px solid var(--line); display: block; }
.sample-link .sample-tag, .sample-link .card-title, .sample-link p { margin-left: 28px; margin-right: 28px; }
.sample-link .sample-go { margin-top: 14px; font-size: 13px; letter-spacing: .08em; color: var(--accent); }
.sample-link:hover, .js .sample-link.is-visible:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(17, 17, 17, .08); }
.js .sample-icon path { opacity: 0; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2s ease .3s, opacity .01s linear .3s; }
.js .card.sample.is-visible .sample-icon path { opacity: 1; stroke-dashoffset: 0; }

/* 運営者 */
.about-body { display: grid; grid-template-columns: 300px 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; max-width: 860px; }
.about-photo { position: relative; isolation: isolate; margin: 0; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 42%; }
/* 自分の写真だけ、後ろに黒いベタの面をずらして置く(フリー画像の細い枠線と区別する) */
.about-photo::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; background: var(--text); z-index: -1; }
.about-title { font-size: 15px; font-weight: 500; letter-spacing: .14em; color: var(--accent); margin-bottom: 14px; }
.about-title.second { margin-top: 44px; }
.about-text p + p { margin-top: 14px; }
.signature { margin-top: 28px !important; font-weight: 500; }
.note { color: var(--text-sub); font-size: 13px; margin-top: 18px; }


/* お問い合わせ */
/* Contact:ノートの写真を、うすく背景に敷く */
.contact { position: relative; isolation: isolate; overflow: hidden; text-align: center; }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../images/band-notebook.jpg") center / cover no-repeat;
  opacity: .13; filter: grayscale(.4);
}
/* 文章の後ろに、やや強めの白い面を敷いて、読みやすくする */
.contact .inner { background: rgba(255, 255, 255, .86); padding: clamp(36px, 6vw, 64px) 24px; max-width: 720px; }
.contact { text-align: center; }
.contact .label { justify-content: center; }
.contact-lead { font-size: clamp(16px, 2.4vw, 20px); }
/* お問い合わせフォーム */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.contact-form { max-width: 560px; margin: 0 auto 8px; text-align: left; display: grid; gap: 22px; }
.kinds { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kinds label { cursor: pointer; }
.kinds input { position: absolute; opacity: 0; pointer-events: none; }
.kinds span { display: inline-block; padding: 8px 18px; border: 1px solid var(--text); font-size: 14px; letter-spacing: .08em; transition: background .25s ease, color .25s ease; }
.kinds input:checked + span { background: var(--text); color: #fff; }
.kinds input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.field { display: grid; gap: 6px; }
.field-name { font-size: 13px; letter-spacing: .12em; color: var(--text-sub); }
.field input, .field textarea {
  width: 100%; font: inherit; letter-spacing: .04em; color: var(--text);
  background: transparent; border: 0; border-bottom: 1px solid var(--text); border-radius: 0; padding: 8px 0; outline: none;
}
.field textarea { border: 1px solid var(--text); padding: 12px; resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.hp { position: absolute; left: -9999px; }
.form-status { min-height: 1.6em; font-size: 14px; color: var(--text); }
.form-status.is-error { color: #b3261e; }
.send-button {
  justify-self: center; padding: 16px 56px; font: inherit; font-size: 16px; letter-spacing: .2em;
  color: var(--bg); background: var(--text); border: 1px solid var(--text); cursor: pointer;
  transition: background .3s ease, color .3s ease;
}
.send-button:hover { background: var(--bg); color: var(--text); }
.send-button:disabled { opacity: .5; cursor: default; }
.mail-link {
  display: inline-block; margin-top: 28px; padding: 16px 40px;
  font-family: var(--font-en); font-weight: 300; font-size: clamp(18px, 3vw, 24px); letter-spacing: .08em;
  text-decoration: none; border: 1px solid var(--text);
  transition: background .3s ease, color .3s ease;
}
.mail-link:hover { background: var(--text); color: var(--bg); }

/* フッター */
.site-footer { padding: 48px 24px 56px; text-align: center; border-top: 1px solid var(--line); }
.privacy { max-width: 640px; margin: 0 auto; font-size: 12px; color: var(--text-sub); text-align: left; line-height: 1.9; }
.copyright { margin-top: 28px; font-size: 12px; color: var(--text-sub); font-family: var(--font-en); letter-spacing: .12em; }

/* スクロール表示(JSが動くときだけ隠しておく) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 800px) {
  .cards, .strengths { grid-template-columns: 1fr; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-photo { margin: 0 16px 16px 0; }
  .split.photo-first .split-photo { order: 0; }
  .about-body { grid-template-columns: 1fr; }
  .about-photo { margin: 0 16px 16px 0; max-width: 320px; }
  .site-header { padding: 0 16px; }
  .section { padding-left: 16px; padding-right: 16px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .hero::before { inset: 0; opacity: .22; -webkit-mask-image: none; mask-image: none; }
  .hero-meta { left: 20px; right: 20px; }
  .scroll-hint { display: none; } /* スマホでは、下の線と交差してしまうので出さない */
  .hero-title { font-size: clamp(24px, 8.6vw, 56px); letter-spacing: .06em; }
  .hero-meta { font-size: 10px; letter-spacing: .2em; gap: 12px; white-space: nowrap; }
  .hero-curve { margin-top: 24px; }
  .label { flex-wrap: wrap; gap: 0 14px; }
  .label .en { font-size: clamp(30px, 9vw, 44px); }
  .label .ja { white-space: nowrap; }
  /* Serviceのカード:アイコンを上に置き、文章の幅を確保する */
  .cards.stack .card.service { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .cards.stack .svc-icon { grid-row: auto; width: 48px; height: 38px; margin-bottom: 12px; }
  .cards.stack .card.service .card-no { font-size: 36px; top: 10px; right: 14px; }
  .plain-list.numbered li { gap: 16px; }
  .sample-link .sample-tag, .sample-link .card-title, .sample-link p { margin-left: 20px; margin-right: 20px; }
  .contact .inner { padding-left: 16px; padding-right: 16px; }
  .kinds span { padding: 8px 14px; }
  .send-button { padding: 14px 40px; }
}

/* 動きを減らす設定の人には、動きを止める */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-line { opacity: 1; transform: none; animation: none; }
  .scroll-hint span { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-curve path { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .js .label::after { transform: none; transition: none; }
  .js .sample-icon path { opacity: 1; stroke-dashoffset: 0; transition: none; }
  .js .svc-icon path { stroke-dashoffset: 0; transition: none; }
  .card.service, .plain-list.numbered li { transition: none; }
  .sample-link, .sample-link:hover, .js .sample-link.is-visible:hover { transition: none; transform: none; }
  .site-menu, .site-menu a, .menu-bar { transition: none; }
  .js .loader { display: none; }
  .loader-name, .loader-line { animation: none; }
}
