/* =========================================================
   Case Study（/works/yamashiro/）
   既存トークン・sec-label・reveal・btn-solid をそのまま使い、
   ページ固有のレイアウトだけをここに置く。
   ========================================================= */
.cs-main {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-h) + 48px);
}

.cs-ph { display: inline-block; }

.cs-section {
  position: relative;
  padding: 140px 0;
  border-top: 1px solid var(--line);
}

.cs-num {
  margin-right: 14px;
  font-family: var(--font-en);
  color: var(--gray-light);
}

.cs-title {
  margin-top: 40px;
  font-family: var(--font);
  font-size: clamp(25px, 3.9vw, 48px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--ink-strong);
}

.cs-body {
  margin-top: 36px;
  max-width: 640px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 2.1;
  letter-spacing: .04em;
  color: var(--ink);
}
.cs-body p + p { margin-top: 1.4em; }
.cs-body strong { font-weight: 600; color: var(--ink-strong); }

.cs-quote {
  margin: 64px 0 0;
  padding: 6px 0 6px 28px;
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--g1), var(--g3) 60%, var(--g4)) 1;
  font-family: var(--font);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: .06em;
  color: var(--ink-strong);
}
.cs-quote strong { font-weight: 700; }

.cs-note {
  margin-top: 18px;
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--gray-light);
}

/* ---------- 01 HERO ---------- */
.cs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  grid-template-areas:
    "label photo"
    "title photo"
    "lead  photo"
    "index photo"
    "meta  photo";
  grid-template-rows: auto auto auto auto 1fr;
  column-gap: 72px;
  padding-bottom: 140px;
}
.cs-hero .sec-label { grid-area: label; }
.cs-hero-title {
  grid-area: title;
  margin-top: 52px;
  font-family: var(--font);
  font-size: clamp(25px, 3.7vw, 44px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .03em;
  color: var(--ink-strong);
}
.cs-hero-title > span { display: block; }
.cs-hero-lead {
  grid-area: lead;
  margin-top: 40px;
  max-width: 520px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 2.1;
  letter-spacing: .04em;
}
.cs-hero-lead strong { font-weight: 600; color: var(--ink-strong); }
.cs-hero-meta {
  grid-area: meta;
  align-self: end;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
}
.cs-hero-meta span:last-child {
  font-weight: 500;
  color: var(--gray);
  letter-spacing: .14em;
}
.cs-hero-photo {
  grid-area: photo;
  position: relative;
  align-self: start;
  justify-self: end;
  width: 100%;
  max-width: 400px;
  margin-top: 52px;
}
.cs-hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--cs-hero-ratio, 4 / 5);
  object-fit: cover;
  object-position: var(--cs-hero-pos, center);
  background: #EFEFEF;
}
.cs-hero-photo figcaption {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--gray);
}
.cs-hero-index {
  grid-area: index;
  margin-top: 48px;
  max-width: 560px;
}
.cs-hero-index-label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--gray-light);
}
.cs-hero-index ol {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.cs-hero-index li { border-bottom: 1px solid var(--line); }
.cs-hero-index a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 14px 0;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--gray);
  transition: color .3s var(--ease);
}
.cs-hero-index a:hover { color: var(--ink-strong); }
.cs-hero-index b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-strong);
}
.cs-hero-index-num {
  flex: 0 0 auto;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--gray-light);
}
.cs-hero-photo::before {
  content: "";
  position: absolute;
  top: -14px;
  right: -14px;
  width: 64px;
  height: 64px;
  border-top: 1.25px solid var(--ink);
  border-right: 1.25px solid var(--ink);
  pointer-events: none;
}

/* ---------- 02 BEFORE → AFTER ---------- */
.cs-flow {
  margin-top: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cs-flow-col { padding: 44px 48px 48px 0; }
.cs-flow-col + .cs-flow-col {
  padding: 44px 0 48px 48px;
  border-left: 1px solid var(--line);
}
.cs-flow-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .24em;
}
.cs-flow-head small {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--gray);
}
.cs-steps { margin-top: 30px; }
.cs-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding-left: 30px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .06em;
}
.cs-steps li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--bg);
  border: 1.25px solid currentColor;
}
.cs-steps li + li::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: calc(50% + 6px);
  width: 1.25px;
  height: 40px;
  background: currentColor;
  opacity: .35;
}
.cs-steps small {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--gray);
}
.cs-flow-col--before { color: var(--gray); }
.cs-flow-col--before .cs-flow-head { color: var(--gray); }
.cs-flow-col--before .cs-steps li:nth-child(n+2) { color: var(--gray-light); }
.cs-flow-col--after { color: var(--ink-strong); }
.cs-flow-col--after .cs-steps li::before {
  border-color: transparent;
  background: var(--grad);
}
.cs-flow-col--after .cs-steps li + li::after {
  opacity: 1;
  background: linear-gradient(180deg, var(--g2), var(--g3));
}
.cs-flow-result {
  margin-top: 30px;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: .04em;
  color: var(--gray);
}
.cs-flow-col--after .cs-flow-result { color: var(--ink); }

/* ---------- 03 予約が増える ---------- */
.cs-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}
.cs-compare {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.cs-compare > div { padding: 32px 36px 0 0; }
.cs-compare > div + div {
  padding: 32px 0 0 36px;
  border-left: 1px solid var(--line);
}
.cs-compare h3 {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
}
.cs-compare p {
  margin-top: 14px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 2;
  color: var(--gray);
}
.cs-compare > div:last-child h3 { color: var(--ink-strong); }
.cs-compare > div:last-child h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-top: 12px;
  background: var(--grad);
}
.cs-compare > div:first-child h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  margin-top: 12px;
  background: var(--gray-light);
}

.cs-devices {
  position: relative;
  margin-top: 88px;
  padding-right: 9%;
}
.cs-browser {
  border: 1px solid var(--line);
  background: var(--bg-pure);
}
.cs-browser-bar {
  display: flex;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.cs-browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.cs-browser img { width: 100%; height: auto; }
.cs-phone {
  position: absolute;
  right: 0;
  bottom: -48px;
  width: 23%;
  padding: 7px;
  border-radius: 26px;
  background: var(--ink-strong);
  box-shadow: 0 24px 60px rgba(13, 13, 15, .18);
}
.cs-phone img {
  width: 100%;
  height: auto;
  border-radius: 20px;
}
.cs-figcap {
  margin-top: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--gray);
}
.cs-concept {
  margin-top: 120px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.cs-concept img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.cs-concept p {
  font-family: var(--font);
  font-size: 14px;
  line-height: 2.1;
  letter-spacing: .04em;
  color: var(--gray);
}
.cs-concept strong {
  display: block;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-strong);
}

/* ---------- 04 / 05 実画面（Customer / Store） ---------- */
.cs-side-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 88px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
}
.cs-side-label small {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--gray);
}
.cs-shots {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}
.cs-shots--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
}
.cs-shot { display: flex; flex-direction: column; }
.cs-shot img {
  order: 2;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-pure);
}
.cs-shot figcaption {
  order: 1;
  margin-bottom: 16px;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: .04em;
}
.cs-shot figcaption b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--gray-light);
}

.cs-hearing {
  margin-top: 40px;
  max-width: 640px;
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cs-hearing li {
  padding: 16px 28px 16px 0;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  white-space: nowrap;
}
.cs-hearing li + li {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.cs-handoff {
  margin-top: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: .06em;
  color: var(--gray);
}
.cs-handoff::before {
  content: "";
  flex: 0 0 auto;
  width: 1.25px;
  height: 48px;
  background: linear-gradient(180deg, var(--g2), var(--g4));
}

.cs-chain {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .06em;
}
.cs-chain li {
  display: inline-flex;
  align-items: center;
  color: var(--gray);
  text-decoration: line-through;
  text-decoration-color: rgba(110, 110, 115, .5);
}
.cs-chain li + li::before {
  content: "→";
  margin: 0 14px;
  color: var(--gray-light);
  text-decoration: none;
  display: inline-block;
}

/* 自動化された流れ：取り消し線ではなく、つながりとして見せる */
.cs-chain--auto { margin-bottom: 8px; }
.cs-chain--auto li {
  color: var(--ink-strong);
  text-decoration: none;
}
.cs-chain--auto li + li::before {
  color: var(--g3);
}

/* Core message：ページの根幹なので、ここだけダークの面で受け止める */
.cs-core {
  margin-top: 120px;
  padding: 96px 64px;
  background: var(--dark);
  color: var(--dark-ink);
  text-align: center;
}
.cs-core-label {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .26em;
  color: rgba(245, 245, 245, .6);
}
.cs-core-pre {
  margin-top: 28px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 2;
  letter-spacing: .06em;
  color: rgba(245, 245, 245, .62);
}
.cs-core-lead {
  margin-top: 36px;
  font-family: var(--font);
  font-size: clamp(22px, 3.4vw, 42px);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .06em;
}
.cs-core-sub {
  margin-top: 32px;
  font-family: var(--font);
  font-size: clamp(16px, 1.8vw, 21px);
  font-weight: 500;
  line-height: 2;
  letter-spacing: .06em;
  color: rgba(245, 245, 245, .82);
}
.cs-core .grad-text { font-weight: 700; }
.cs-core-rule {
  width: 120px;
  height: 2px;
  margin: 40px auto 0;
  background: var(--grad);
}

/* ---------- 06 CTA ---------- */
.cs-cta { text-align: center; }
.cs-cta .sec-label { justify-content: center; }
.cs-cta .cs-title { margin-inline: auto; }
.cs-cta .cs-body { margin-inline: auto; }
.cs-cta .btn-solid { margin-top: 56px; }

@media (max-width: 1024px) {
  .cs-hero { column-gap: 44px; }
  .cs-split { grid-template-columns: 1fr; gap: 0; }
  .cs-section { padding: 110px 0; }
  .cs-core { padding: 80px 40px; }
}

@media (max-width: 767px) {
  .cs-main { padding-top: calc(var(--header-h) + 28px); }
  .cs-section { padding: 84px 0; }
  .cs-title { margin-top: 30px; font-size: clamp(21px, 6.4vw, 30px); }
  .cs-main .sec-label { gap: 16px; }
  .cs-main .sec-label-line { width: 32px; }
  .cs-num { margin-right: 10px; }
  .cs-body { margin-top: 28px; font-size: 15px; line-height: 2; }
  .cs-quote { margin-top: 48px; padding-left: 20px; font-size: 17px; }

  .cs-hero {
    grid-template-columns: 1fr;
    grid-template-areas: "label" "title" "photo" "lead" "index" "meta";
    grid-template-rows: none;
    padding-bottom: 84px;
  }
  .cs-hero-title { margin-top: 32px; }
  .cs-hero-photo { justify-self: stretch; width: auto; margin-top: 36px; margin-right: 14px; }
  .cs-hero-index { margin-top: 40px; }
  .cs-hero-photo::before { top: -10px; right: -14px; width: 44px; height: 44px; }
  .cs-hero-lead { margin-top: 32px; font-size: 15px; line-height: 2; }
  .cs-hero-meta { margin-top: 36px; }

  .cs-flow { grid-template-columns: 1fr; margin-top: 48px; }
  .cs-flow-col { padding: 32px 0; }
  .cs-flow-col + .cs-flow-col { padding: 32px 0; border-left: 0; border-top: 1px solid var(--line); }
  .cs-steps li { font-size: 15px; }

  .cs-compare { grid-template-columns: 1fr; margin-top: 48px; }
  .cs-compare > div { padding: 28px 0; }
  .cs-compare > div + div { padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--line); }

  .cs-devices { margin-top: 56px; padding-right: 18%; }
  .cs-phone { width: 34%; bottom: -36px; padding: 5px; border-radius: 18px; }
  .cs-phone img { border-radius: 14px; }
  .cs-devices + .cs-figcap { margin-top: 52px; }
  .cs-concept { margin-top: 72px; grid-template-columns: 1fr; gap: 24px; }

  .cs-side-label { margin-top: 56px; }
  /* 実画面はページ内の横スクロールで1枚ずつ。ページ自体は横に広げない */
  .cs-shots,
  .cs-shots--two {
    display: flex;
    gap: 16px;
    max-width: none;
    margin-right: -24px;
    padding-right: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .cs-shots::-webkit-scrollbar { display: none; }
  .cs-shot { flex: 0 0 78%; scroll-snap-align: start; }
  .cs-hearing { grid-template-columns: 1fr 1fr; }
  .cs-hearing li,
  .cs-hearing li + li { padding: 14px 0; border-left: 0; }
  .cs-hearing li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .cs-hearing li:nth-child(n+3) { border-top: 1px solid var(--line); }

  .cs-handoff { margin-top: 56px; }
  .cs-chain { font-size: 14px; }
  .cs-chain li + li::before { margin: 0 10px; }
  .cs-core { margin-top: 80px; padding: 64px 22px; margin-inline: -24px; }

  .cs-cta .btn-lg { min-width: 0; width: 100%; height: 60px; }
}

@media (max-width: 400px) {
  .cs-main .sec-label-line { display: none; }
}

@media (max-width: 360px) {
  .cs-hearing li { font-size: 14px; }
  .cs-shot { flex-basis: 86%; }
}
