/* 059 藤白法律事務所 ― 綺麗系・ページ全体が横に動く。色はここだけ触れば差し替わる */
:root {
  --c-bg: #f7f5f9;
  --c-paper: #ece6f3;
  --c-deep: #2b2233;
  --c-lav: #c9b6e4;
  --c-accent: #8a6fae;
  --c-accent-text: #5d3f86;
  --c-main: #2b2233;
  --c-line: #ddd5e6;
  --c-text: #374151;
  --c-sub: #4b5563;
  --font: "Noto Sans JP", sans-serif;
  --font-ja: "Hina Mincho", serif;
  --font-en: "Gilda Display", serif;
  --ease: cubic-bezier(.25, .8, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 2; letter-spacing: .04em; color: var(--c-text); background: var(--c-bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
h1, h2, h3, p, dd, li { word-break: auto-phrase; }

.en { font-family: var(--font-en); font-size: 16px; letter-spacing: .3em; text-transform: uppercase; color: var(--c-accent-text); margin-bottom: 18px; }
.en--light { color: var(--c-lav); }
.pno { font-family: var(--font-en); font-size: 16px; letter-spacing: .3em; color: var(--c-accent-text); display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.pno::after { content: ""; width: 64px; height: 1px; background: currentColor; }
.pno--light { color: var(--c-lav); }
.vttl { font-family: var(--font-ja); font-size: clamp(28px, 3.4vw, 42px); line-height: 1.9; letter-spacing: .16em; color: var(--c-main); margin-bottom: 32px; }
.httl { font-family: var(--font-ja); font-size: clamp(30px, 3.6vw, 44px); letter-spacing: .2em; color: var(--c-main); }
.note { margin-top: 18px; font-size: 15px; color: var(--c-sub); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; font-size: 15px; letter-spacing: .14em; text-decoration: none; white-space: nowrap; flex: none; border: 1px solid transparent; transition: background-color .5s var(--ease), color .5s var(--ease); }
.btn--plum { background: var(--c-accent-text); color: #fff; }
.btn--plum:hover { background: var(--c-deep); }
.btn--light { border-color: var(--c-lav); color: #fff; }
.btn--light:hover { background: var(--c-lav); color: var(--c-deep); }
.btn--lg { min-height: 60px; padding: 0 44px; font-size: 16px; }

/* ===== ヘッダー ===== */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(247, 245, 249, .94); border-bottom: 1px solid var(--c-line); }
.header__inner { display: flex; align-items: center; gap: 12px; height: 68px; padding: 0 12px 0 20px; }
.logo { display: grid; line-height: 1.3; min-height: 48px; align-content: center; text-decoration: none; color: var(--c-main); white-space: nowrap; flex: none; }
.logo__ja { font-family: var(--font-ja); font-size: 19px; letter-spacing: .2em; }
.logo__en { font-family: var(--font-en); font-size: 15px; letter-spacing: .24em; color: var(--c-accent-text); display: none; }
.gnav { display: none; }
.header__btn { margin-left: auto; min-height: 44px; padding: 0 16px; }
@media (max-width: 389px) { .header__btn { display: none; } .spmenu { margin-left: auto; } }
@media (min-width: 1080px) {
  .header__inner { height: 80px; padding: 0 48px; gap: 36px; }
  .logo__en { display: block; }
  .gnav { display: flex; gap: 28px; margin-left: auto; }
  .gnav a { display: flex; align-items: center; min-height: 44px; font-size: 15px; letter-spacing: .14em; text-decoration: none; color: var(--c-main); }
  .header__btn { margin-left: 0; padding: 0 24px; }
}
.spmenu { flex: none; }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--c-main); }
.spmenu summary::-webkit-details-marker { display: none; }
.spmenu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spmenu__bar, .spmenu__bar::before, .spmenu__bar::after { display: block; width: 22px; height: 1px; background: currentColor; position: relative; }
.spmenu__bar::before, .spmenu__bar::after { content: ""; position: absolute; left: 0; }
.spmenu__bar::before { top: -7px; } .spmenu__bar::after { top: 7px; }
.spmenu[open] .spmenu__bar { background: transparent; }
.spmenu[open] .spmenu__bar::before { top: 0; transform: rotate(45deg); }
.spmenu[open] .spmenu__bar::after { top: 0; transform: rotate(-45deg); }
.spmenu__nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--c-bg); padding: 8px 20px 24px; display: flex; flex-direction: column; border-bottom: 1px solid var(--c-line); }
.spmenu__nav a { display: flex; align-items: center; min-height: 52px; color: var(--c-main); text-decoration: none; font-family: var(--font-ja); letter-spacing: .14em; border-bottom: 1px solid var(--c-line); }
@media (min-width: 1080px) { .spmenu { display: none; } }

/* 進み具合（横に動くときだけ出す） */
.progress { display: none; }
.is-h .progress { display: flex; align-items: center; gap: 18px; position: absolute; left: 48px; right: 48px; top: 100%; height: 40px; }
.progress__no { font-family: var(--font-en); font-size: 15px; letter-spacing: .2em; color: var(--c-accent-text); white-space: nowrap; }
.progress__bar { flex: 1; height: 1px; background: var(--c-line); position: relative; }
.progress__bar span { position: absolute; left: 0; top: -1px; height: 3px; width: 100%; background: var(--c-accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ===== 面（パネル）：スマホと JSなし は縦に並ぶ ===== */
.panel { position: relative; padding: 96px 20px; }
.panel--top { padding: 68px 0 0; }

/* 01 演出①（A07）：縦3枚の写真 */
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; height: 76svh; min-height: 460px; }
.split__item { overflow: hidden; background: var(--c-paper); }
.split__item img { width: 100%; height: 100%; object-fit: cover; }
.top__copy { position: absolute; z-index: 2; left: 50%; top: calc(68px + 38svh); transform: translate(-50%, -50%); display: flex; flex-direction: row-reverse; align-items: center; gap: 18px; padding: 36px 24px; background: rgba(247, 245, 249, .9); }
.top__title { writing-mode: vertical-rl; font-family: var(--font-ja); font-size: clamp(24px, 6.6vw, 40px); line-height: 1.9; letter-spacing: .24em; color: var(--c-main); }
.top__title span { display: block; }
.top__title span + span { margin-top: 2em; }
.top__sub { writing-mode: vertical-rl; font-size: 15px; letter-spacing: .3em; color: var(--c-accent-text); }
.top__hint { display: none; }
/* ゆっくり拡大（時間差）。JS が .is-motion を付けたときだけ */
@keyframes zoomSlow { from { transform: scale(1); } to { transform: scale(1.12); } }
.is-motion .split__item img { animation: zoomSlow 14s ease-in-out infinite alternate; }
.is-motion .split__item:nth-child(2) img { animation-delay: -4s; }
.is-motion .split__item:nth-child(3) img { animation-delay: -8s; }

/* 02 ごあいさつ */
.panel--about { max-width: 760px; margin: 0 auto; }
.about__body p + p { margin-top: 18px; }
.about__sign { font-family: var(--font-ja); font-size: 18px; letter-spacing: .2em; color: var(--c-main); text-align: right; }

/* 03 取扱分野（Swiper・C02） */
.panel--fields { padding-left: 0; padding-right: 0; background: var(--c-paper); }
.fields__head { padding: 0 20px; margin-bottom: 36px; }
.fields { padding: 10px 0 0; perspective: 1100px; }
.fields .swiper-slide { width: 78%; max-width: 420px; }
.fcard { background: #fff; border: 1px solid var(--c-line); transform-style: preserve-3d; }
.fcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fcard__body { padding: 22px 24px 28px; }
.fcard__no { font-family: var(--font-en); font-size: 18px; color: var(--c-accent-text); }
.fcard h3 { font-family: var(--font-ja); font-size: 22px; letter-spacing: .12em; color: var(--c-main); margin: 4px 0 8px; }
.fcard p:last-child { font-size: 15px; color: var(--c-text); }
/* JSなし（Swiper が動かない）ときは、指で横に送れる並び */
.fields:not(.swiper-initialized) { overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 20px 12px; }
.fields:not(.swiper-initialized) .swiper-slide { margin-right: 16px; scroll-snap-align: center; }
.fields:not(.swiper-initialized) .fields__ctrl, .fields:not(.swiper-initialized) .ruler { display: none; }
.fields__ctrl { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }
.sbtn { min-width: 48px; min-height: 48px; border: 1px solid var(--c-accent); background: transparent; color: var(--c-accent-text); font-size: 18px; cursor: pointer; transition: background-color .4s; }
.sbtn:hover { background: #fff; }
.fields .swiper-pagination { position: static; width: auto; display: flex; }
.fields .swiper-pagination-bullet { position: relative; width: 28px; height: 44px; margin: 0 !important; background: transparent; opacity: 1; border-radius: 0; }
.fields .swiper-pagination-bullet::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 1px; background: var(--c-accent); opacity: .5; }
.fields .swiper-pagination-bullet-active::before { height: 3px; margin-top: -1px; opacity: 1; }
/* 定規の目盛り */
.ruler { height: 18px; margin: 18px 20px 0; background: repeating-linear-gradient(90deg, var(--c-accent) 0 1px, transparent 1px 12px) bottom / 100% 8px no-repeat, repeating-linear-gradient(90deg, var(--c-accent) 0 1px, transparent 1px 60px) bottom / 100% 18px no-repeat; opacity: .6; }

/* 04 お悩み（A10） */
.panel--worry { background: var(--c-deep); color: #ece6f3; }
.worries { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 40px; }
.wcard { font-family: var(--font-ja); font-size: 16px; line-height: 1.7; color: var(--c-deep); background: var(--c-bg); padding: 16px 14px; border-top: 3px solid var(--c-accent); }
.worry__center { text-align: center; }
.worry__title { font-family: var(--font-ja); font-size: clamp(30px, 4vw, 48px); line-height: 1.7; letter-spacing: .16em; color: #fff; margin-bottom: 16px; }
.worry__center p { margin-bottom: 28px; }

/* 05 費用 */
.panel--fee { max-width: 760px; margin: 0 auto; }
.fees { margin: 0; border-top: 1px solid var(--c-line); }
.fees div { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--c-line); }
.fees dt { font-family: var(--font-ja); font-size: 17px; letter-spacing: .1em; color: var(--c-main); }
.fees dd { margin: 0; color: var(--c-accent-text); }
@media (min-width: 768px) { .fees div { grid-template-columns: 1fr auto; } }

/* 06 ご相談 */
.panel--contact { background: var(--c-deep); color: #ece6f3; }
.contact__inner { max-width: 640px; margin: 0 auto; }
.contact__title { font-family: var(--font-ja); font-size: clamp(28px, 3.6vw, 42px); line-height: 1.7; letter-spacing: .14em; color: #fff; margin-bottom: 20px; }
.contact__inner > p { margin-bottom: 28px; }
.contact__tel { font-size: 15px; }
.cinfo { margin: 8px 0 0; border-top: 1px solid rgba(201, 182, 228, .4); }
.cinfo div { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid rgba(201, 182, 228, .4); font-size: 15px; }
.cinfo dt { color: var(--c-lav); }
.cinfo dd { margin: 0; }

/* ===== PC：大きな画面での並び（JSなしでも、縦に並べたまま整える） ===== */
@media (min-width: 1080px) {
  .panel { padding: 140px 8vw; }
  .panel--top { padding: 80px 0 0; }
  .split { height: calc(100vh - 80px); }
  .top__copy { top: calc(80px + (100vh - 80px) / 2); padding: 48px 36px; }
  .panel--about { display: flex; gap: 72px; align-items: flex-start; max-width: none; }
  .panel--about .vttl, .panel--fee .vttl { writing-mode: vertical-rl; margin: 0; }
  .about__body { max-width: 520px; padding-top: 60px; }
  .panel--fee { display: flex; gap: 80px; max-width: none; align-items: flex-start; }
  .fee__body { width: 520px; padding-top: 60px; }
  .fields__head { padding: 0 8vw; }
  .ruler { margin: 18px 8vw 0; }
  .panel--worry { min-height: 100vh; }
  .worries { display: block; margin: 0; }
  .wcard { position: absolute; width: 230px; font-size: 17px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); }
  .wcard--1 { left: 5%; top: 19%; transform: rotate(-4deg); }
  .wcard--2 { left: 30%; top: 15%; transform: rotate(3deg); }
  .wcard--3 { right: 28%; top: 17%; transform: rotate(-2deg); }
  .wcard--4 { right: 5%; top: 22%; transform: rotate(5deg); }
  .wcard--5 { left: 4%; bottom: 14%; transform: rotate(3deg); }
  .wcard--6 { left: 29%; bottom: 8%; transform: rotate(-4deg); }
  .wcard--7 { right: 27%; bottom: 10%; transform: rotate(2deg); }
  .wcard--8 { right: 4%; bottom: 16%; transform: rotate(-3deg); }
  .worry__center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 520px; }
  .panel--contact { display: grid; place-items: center; min-height: 100vh; }
}

/* ===== 形：ページ全体が横に動く（PC で JS が動くときだけ .is-h） ===== */
.is-h .hpage { height: 100vh; overflow: hidden; }
.is-h .hpage__track { display: flex; height: 100vh; width: max-content; }
.is-h .panel { flex: none; height: 100vh; margin: 0; overflow: hidden; }
.is-h .panel--top { width: 100vw; }
.is-h .split { height: calc(100vh - 80px); }
.is-h .top__hint { display: flex; align-items: center; gap: 12px; position: absolute; z-index: 2; right: 48px; bottom: 32px; font-family: var(--font-en); font-size: 15px; letter-spacing: .3em; color: #fff; }
.is-h .top__hint::after { content: ""; width: 80px; height: 1px; background: #fff; }
.is-h .panel--about { width: 72vw; padding-top: 180px; border-right: 1px solid var(--c-line); }
.is-h .panel--fields { width: 100vw; padding: 120px 0 40px; display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: center; }
.is-h .fields__head { padding: 0 0 0 8vw; margin: 0; }
.is-h .fields__head .httl { writing-mode: vertical-rl; margin-top: 8px; }
.is-h .ruler { margin: 14px 4vw 0 0; }
.is-h .fields .swiper-slide { max-width: 380px; }
.is-h .fcard img { aspect-ratio: 16 / 10; }
.is-h .panel--worry { width: 100vw; }
.is-h .panel--fee { width: 76vw; padding-top: 180px; }
.is-h .panel--contact { width: 90vw; padding-top: 120px; padding-bottom: 40px; }
.is-h .contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 0 72px; max-width: 1100px; align-items: start; }
.is-h .contact__inner > * { grid-column: 1; }
.is-h .contact__inner > .cinfo { grid-column: 2; grid-row: 1 / span 6; align-self: center; margin: 0; }

/* ===== フッター ===== */
.footer { background: var(--c-bg); border-top: 1px solid var(--c-line); padding: 56px 20px 40px; text-align: center; font-size: 15px; color: var(--c-sub); }
.footer__logo { font-family: var(--font-ja); font-size: 22px; letter-spacing: .24em; color: var(--c-main); }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; margin: 18px 0; }
.footer__nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--c-main); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
