/* ========================================
page.css（案件固有）
======================================== */

/* =========================
hero copy（他セクションでも再利用可）
========================= */

.hero-copy {
  margin: 0;
}

.hero-copy__main,
.hero-copy__sub {
  display: block;
}

.hero-copy__main {
  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 37px;
  font-weight: 900;
  font-synthesis: none;
  line-height: 1.55;
}

.hero-copy__sub {
  margin-top: 20px;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 24px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.5;
}

/* 行マスク＋軽いブラー（ヒーロー専用） */
.hero-copy__line {
  display: block;
  overflow: hidden;
}

.hero-copy__line[data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}

.hero-copy__line-inner {
  display: block;
  opacity: 0;
  transform: translateY(110%);
  filter: blur(8px);
  transition:
    opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.1s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-copy__line.is-visible .hero-copy__line-inner {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.hero-copy__main .hero-copy__line:nth-child(1) .hero-copy__line-inner {
  transition-delay: 0.9s;
}

.hero-copy__main .hero-copy__line:nth-child(2) .hero-copy__line-inner {
  transition-delay: 1.4s;
}

.hero-copy__sub .hero-copy__line:nth-child(1) .hero-copy__line-inner {
  transition-delay: 1.9s;
}

.hero-copy__sub .hero-copy__line:nth-child(2) .hero-copy__line-inner {
  transition-delay: 2.4s;
}

.hero-copy__sub .hero-copy__line:nth-child(3) .hero-copy__line-inner {
  transition-delay: 2.9s;
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy__line-inner {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

@media (max-width: 767px) {
  .hero-copy__main {
    font-size: 20px;
    line-height: 1.6;
  }

  .hero-copy__sub {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.75;
  }
}

/* =========================
p-hero
========================= */

.p-hero {
  position: relative;
  width: 100%;
}

.p-hero__visual {
  position: relative;
  width: 100%;
}

.p-hero__img {
  display: block;
  width: 100%;
  height: auto;
}

.p-hero__copy {
  position: absolute;
  top: calc(var(--header-height) + 90px);
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);

  width: 100%;
  max-width: var(--layout-width);
  padding-inline: 0;
}

@media (max-width: 767px) {
  .p-hero {
    margin-top: 80px;
  }

  .p-hero__copy {
    top: calc(var(--header-height) + 20px - 50px);
    padding-inline: 15px;
  }
}

/* =========================
p-slide（施工風景マーキー）
========================= */

.p-slide {
  width: 100%;
  padding-block: 15px;
  overflow: hidden;
}

.p-slide__wrap {
  overflow: hidden;
}

.p-slide__wrap {
  cursor: grab;
  touch-action: pan-y;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
}

.p-slide__wrap.is-dragging {
  cursor: grabbing;
  touch-action: none;
}

.p-slide__track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.p-slide__list {
  display: flex;
  flex-shrink: 0;

  margin: 0;
  padding: 0;

  list-style: none;
}

/* JSで複製セット分の幅を --marquee-distance に設定 */

.p-slide__item {
  flex-shrink: 0;
  width: 180px;
  margin-right: 10px;
}

.p-slide__item img {
  display: block;
  width: 180px;
  height: auto;
}

/* =========================
placeholder（次フェーズまで）
========================= */

.p-placeholder {
  min-height: 50vh;
}

/* =========================
p-service（事業内容）
========================= */

.p-service {
  background: var(--color-bg);
}

.p-service__list {
  display: flex;
  justify-content: center;
  gap: 30px;

  margin: 100px 0;
  padding: 0;

  list-style: none;
}

.p-service__item {
  flex: 1;
  min-width: 0;

  display: flex;
  justify-content: center;
}

.p-service__item img {
  height: auto;
  max-width: 100%;
}

/* 01は従来どおり親の50%、02・03は実寸比率で拡大 */
.p-service__item--01 img {
  width: 50%;
}

.p-service__item--02 img {
  width: calc(50% * 201 / 181);
}

.p-service__item--03 img {
  width: calc(50% * 251 / 181);
}

/* スクロール演出：見出し→画像の順でディレイ */
.p-service .title__main[data-reveal] {
  transition-delay: 0s;
}

.p-service .title__sub[data-reveal] {
  transition-delay: 0.15s;
}

/* 3つ並び：小→大→元に戻るポップ */
@keyframes p-service-item-pop {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }

  50% {
    opacity: 1;
    transform: scale(1.18);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.p-service__item[data-reveal] {
  opacity: 0;
  transform: scale(0.72);
  transition: none;
}

.p-service__item[data-reveal].is-visible {
  animation: p-service-item-pop 0.85s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.p-service__item:nth-child(1)[data-reveal] {
  animation-delay: 0.3s;
}

.p-service__item:nth-child(2)[data-reveal] {
  animation-delay: 0.8s;
}

.p-service__item:nth-child(3)[data-reveal] {
  animation-delay: 1.3s;
}

@media (prefers-reduced-motion: reduce) {
  .p-service__item[data-reveal] {
    opacity: 1;
    transform: none;
  }

  .p-service__item[data-reveal].is-visible {
    animation: none;
  }
}

@media (max-width: 767px) {
  .p-service__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 15px;
    justify-items: center;
  }

  .p-service__item {
    flex: none;
    width: 100%;
  }

  /* 1段目：01のみ中央 */
  .p-service__item--01 {
    grid-column: 1 / -1;
  }

  /* 2段目：02・03を左右 */
  .p-service__item--02 {
    justify-content: flex-start;
  }

  .p-service__item--03 {
    justify-content: flex-end;
  }

  .p-service__item--01 img {
    width: 34vw;
  }

  .p-service__item--02 img {
    width: calc(34vw * 201 / 181);
  }

  .p-service__item--03 img {
    width: calc(34vw * 251 / 181);
  }
}

/* =========================
p-service-row（事業カテゴリ1段）
========================= */

.p-service-row {
  margin-top: 80px;
}

/* サブタイトルなし（解体工事など） */
.p-service-row--no-sub .p-service-row__head {
  justify-content: flex-start;
}

.p-service-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.p-service-row__title {
  flex-shrink: 0;
  margin: 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 38px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.2;
}

.p-service-row__sub {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;

  width: 760px;
  max-width: 100%;
  height: 50px;
  margin: 0;
  padding-inline: 24px;

  color: var(--color-primary);
  background: #f2f5f9;
  border-radius: 999px;

  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.4;
  text-align: left;
  line-break: strict;
  word-break: keep-all;
  text-wrap: pretty;
}

.p-service-row__gallery {
  display: flex;
  gap: 10px;

  margin: 0;
  padding: 0;

  list-style: none;
}

.p-service-row__photo {
  flex: 0 0 165px;
  width: 165px;
}

.p-service-row__photo img {
  width: 100%;
  height: auto;
}

/* スクロール演出 */
.p-service-row__title[data-reveal] {
  transition-delay: 0s;
}

.p-service-row__sub[data-reveal] {
  transition-delay: 0.12s;
}

.p-service-row__photo:nth-child(1)[data-reveal] {
  transition-delay: 0.2s;
}

.p-service-row__photo:nth-child(2)[data-reveal] {
  transition-delay: 0.28s;
}

.p-service-row__photo:nth-child(3)[data-reveal] {
  transition-delay: 0.36s;
}

.p-service-row__photo:nth-child(4)[data-reveal] {
  transition-delay: 0.44s;
}

.p-service-row__photo:nth-child(5)[data-reveal] {
  transition-delay: 0.52s;
}

.p-service-row__photo:nth-child(6)[data-reveal] {
  transition-delay: 0.6s;
}

/* タブレット（iPad 768px など）：サブタイトル・横並び画像をコンテナ内に収める */
@media (max-width: 1024px) {
  .p-service-row__head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .p-service-row__sub {
    flex-shrink: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 50px;
    padding: 12px 20px;
    line-height: 1.6;
  }

  .p-service-row__gallery {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .p-service-row__photo {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .p-service-row {
    margin-top: 40px;
  }

  .p-service-row__head {
    margin-bottom: 16px;
  }

  .p-service-row__title {
	font-size: 22px;
  }

  .p-service-row__sub {
	padding: 12px 15px;
	justify-content: flex-start;
	text-align: left;
	border-radius: 999px;
	font-size: 12px;
  }

  .p-service-row__gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
  }

  .p-service-row__photo--05,
  .p-service-row__photo--06 {
    display: none;
  }
}

/* =========================
p-service-line（企業様向け）
========================= */

.p-service-line {
  margin-top: 80px;
  text-align: center;
}

@media (min-width: 768px) {
  .p-service-line {
    max-width: 660px;
    margin-inline: auto;
  }
}

.p-service-line__title {
  margin: 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 32px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.5;
}

.p-service-line__sub {
  margin: 10px 0 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.6;
  line-break: strict;
  word-break: keep-all;
  text-wrap: pretty;
}

.p-service-line__gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;

  margin: 30px 0 0;
  padding: 0;

  list-style: none;
}

.p-service-line__photo img {
  width: 100%;
  height: auto;
}

.p-service-line__cta {
  margin-top: 30px;
}

.p-service-line__btn {
  display: block;
  width: 100%;
  margin: 0 auto;

  transition:
    opacity var(--transition),
    transform var(--transition);
}

.p-service-line__btn img {
  width: 100%;
  height: auto;
}

.p-service-line__btn:hover {
  opacity: 0.85;
  transform: translateY(-3px);
}

/* スクロール演出 */
.p-service-line__title[data-reveal] {
  transition-delay: 0s;
}

.p-service-line__sub[data-reveal] {
  transition-delay: 0.12s;
}

.p-service-line__photo:nth-child(1)[data-reveal] {
  transition-delay: 0.2s;
}

.p-service-line__photo:nth-child(2)[data-reveal] {
  transition-delay: 0.26s;
}

.p-service-line__photo:nth-child(3)[data-reveal] {
  transition-delay: 0.32s;
}

.p-service-line__photo:nth-child(4)[data-reveal] {
  transition-delay: 0.38s;
}

.p-service-line__photo:nth-child(5)[data-reveal] {
  transition-delay: 0.44s;
}

.p-service-line__photo:nth-child(6)[data-reveal] {
  transition-delay: 0.5s;
}

.p-service-line__photo:nth-child(7)[data-reveal] {
  transition-delay: 0.56s;
}

.p-service-line__photo:nth-child(8)[data-reveal] {
  transition-delay: 0.62s;
}

.p-service-line__cta[data-reveal] {
  transition-delay: 0.7s;
}

@media (max-width: 767px) {
  .p-service-line {
    margin-top: 60px;
  }

  .p-service-line__title {
	font-size: 22px;
  }

  .p-service-line__sub {
	font-size: 12px;
  }

  .p-service-line__gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 24px;
  }

  .p-service-line__photo--04,
  .p-service-line__photo--08 {
    display: none;
  }

  .p-service-line__cta {
    margin-top: 24px;
  }
}

/* =========================
p-service-insta（Instagram）
========================= */

.p-service-insta {
  margin-top: 80px;
  text-align: center;
}

@media (min-width: 768px) {
  .p-service-insta {
    max-width: 1000px;
    margin-inline: auto;
  }
}

.p-service-insta__title {
  margin: 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 32px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.2;
}

.p-service-insta__sub {
  margin: 10px 0 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.6;
  line-break: strict;
  word-break: keep-all;
  text-wrap: pretty;
}

/* グリッドは instagram-feed.css（.c-insta-feed）を使用 */

.p-service-insta .c-insta-feed__list {
  margin-top: 30px;
}

/* スクロール演出 */
.p-service-insta__title[data-reveal] {
  transition-delay: 0s;
}

.p-service-insta__sub[data-reveal] {
  transition-delay: 0.12s;
}

.p-service-insta .c-insta-feed__item:nth-child(1)[data-reveal] {
  transition-delay: 0.2s;
}

.p-service-insta .c-insta-feed__item:nth-child(2)[data-reveal] {
  transition-delay: 0.26s;
}

.p-service-insta .c-insta-feed__item:nth-child(3)[data-reveal] {
  transition-delay: 0.32s;
}

.p-service-insta .c-insta-feed__item:nth-child(4)[data-reveal] {
  transition-delay: 0.38s;
}

.p-service-insta .c-insta-feed__item:nth-child(5)[data-reveal] {
  transition-delay: 0.44s;
}

.p-service-insta .c-insta-feed__item:nth-child(6)[data-reveal] {
  transition-delay: 0.5s;
}

.p-service-insta .c-insta-feed__item:nth-child(7)[data-reveal] {
  transition-delay: 0.56s;
}

.p-service-insta .c-insta-feed__item:nth-child(8)[data-reveal] {
  transition-delay: 0.62s;
}

@media (max-width: 767px) {
  .p-service-insta {
    margin-top: 60px;
  }

  .p-service-insta__title {
	font-size: 22px;
  }

  .p-service-insta__sub {
	font-size: 12px;
  }

  .p-service-insta .c-insta-feed__list {
    margin-top: 24px;
  }
}

/* =========================
p-service-staff（スタッフ紹介）
========================= */

.p-service-staff {
  --staff-section-bg: #edf2f8;
  --staff-card-width: 350px;
  --staff-card-gap: 80px;
  --staff-photo-width: 330px;
  --staff-photo-height: 322px;
  --staff-bg-size: 200px;
  --staff-bg-top: 32px;
  --staff-bg-offset-right: calc((var(--staff-photo-width) - var(--staff-bg-size)) / 2);

  margin-top: 80px;
  padding-top: 60px;
  margin-inline: calc(50% - 50vw);
  padding-bottom: 60px;
  background: var(--staff-section-bg);
}

.p-service-staff > .title {
  width: 100%;
  max-width: var(--layout-width);
  margin-inline: auto;
  padding-inline: 0;
}

@media (max-width: 767px) {
  .p-service-staff > .title {
    padding-inline: 15px;
  }
}

.p-service-staff .title {
  margin-bottom: 30px;
  padding-top: 10px;
}

.p-service-staff .title__main[data-reveal] {
  transition-delay: 0s;
}

.p-service-staff .title__sub[data-reveal] {
  transition-delay: 0.15s;
}

/* 横スクロール（右→左） */
.p-service-staff__marquee {
  overflow: hidden;
  width: 100%;
  cursor: grab;
  touch-action: pan-y;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
}

.p-service-staff__marquee.is-dragging {
  cursor: grabbing;
  touch-action: none;
}

.p-service-staff__track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.p-service-staff__list {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;

  margin: 0;
  padding: 0;

  list-style: none;
}

.p-service-staff__item {
  flex-shrink: 0;
  margin-right: var(--staff-card-gap);
}

/* =========================
staff-card（1名分）
========================= */

.staff-card {
  display: flex;
  flex-direction: column;
  width: var(--staff-card-width);
  height: 100%;
  background: var(--staff-section-bg);
}

.staff-card__visual {
  position: relative;
  padding: 20px 0 16px 16px;
  min-height: calc(20px + var(--staff-photo-height) + 16px);
}

/* 青い四角（画像内の青は削除しCSSで統一） */
.staff-card__bg {
  position: absolute;
  top: var(--staff-bg-top);
  right: var(--staff-bg-offset-right);
  z-index: 0;

  width: var(--staff-bg-size);
  height: var(--staff-bg-size);
  background: var(--color-primary);
}

/* 写真エリア：全員同じ枠・上揃え・頭が切れないよう contain */
.staff-card__photo {
  position: absolute;
  top: 20px;
  right: 0;
  z-index: 1;

  width: var(--staff-photo-width);
  height: var(--staff-photo-height);
  overflow: hidden;
  line-height: 0;
}

.staff-card__photo::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 45%;

  background: linear-gradient(to bottom, transparent 0%, var(--staff-section-bg) 100%);
  content: "";
  pointer-events: none;
}

.staff-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}

.staff-card__identity {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 3;
  max-width: 140px;
}

.staff-card__name {
  margin: 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 16px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.15;
}

.staff-card__name + .staff-card__name {
  margin-top: 2px;
}

.staff-card__name-en {
  margin: 2px 0 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 10px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.15;
  letter-spacing: 0.04em;
}

/* 名前2行（フリガナなし） */
.staff-card--name-2line .staff-card__name + .staff-card__name {
  margin-top: 2px;
}

.staff-card--name-2line .staff-card__birth {
  margin-top: 2px;
}

.staff-card__birth {
  margin: 2px 0 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.2;
}

.staff-card__body {
  flex: 1;
  padding: 0 20px 24px;
}

.staff-card__profile {
  margin: 0;
}

.staff-card__row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.staff-card__row:last-child {
  margin-bottom: 0;
}

.staff-card__row dt,
.staff-card__row dd,
.staff-card__message-label,
.staff-card__message-text {
  line-break: strict;
  word-break: keep-all;
  text-wrap: pretty;
}

.staff-card__row dt {
  flex: 0 0 80px;
  width: 80px;
  margin: 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.25;
}

.staff-card__row dd {
  flex: 1;
  min-width: 0;
  margin: 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.25;
}

.staff-card__line {
  margin: 12px 0;
  border: 0;
  border-top: 2px solid var(--color-primary);
}

.staff-card__message-label {
  margin: 0 0 4px;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.25;
}

.staff-card__message-text {
  margin: 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.35;
}

@media (max-width: 767px) {
  .p-service-staff {
    margin-top: 60px;
    padding-bottom: 40px;
  }

  .p-service-staff .title {
    margin-bottom: 24px;
  }
}

/* =========================
p-message（ご挨拶）
========================= */

.p-message {
  --message-panel-width: 75%;
  --message-panel-left: 40%;
  --message-person-width: 360px;
  --message-person-height: 470px;
  --message-person-overhang: 250px;
  --message-top-full-text-height: 280px;

  padding-bottom: 80px;
}

.p-message__body {
  position: relative;
  margin-top: 20px;
  overflow: visible;
}

/* 青ボックス本体（PC: 75% / left 40%） */
.p-message__panel {
  position: relative;
  left: var(--message-panel-left);
  width: var(--message-panel-width);
  transform: translateX(-50%);
  z-index: 1;
  overflow: visible;

  padding: 40px 40px 0 40px;
  background: var(--color-primary);
}

.p-message__text {
  position: relative;
  z-index: 1;
  overflow: visible;

  color: var(--color-bg);
  font-size: 15px;
  font-weight: 700;
  line-height: 2;
  text-align: left;
}

.p-message__text::after {
  content: "";
  display: table;
  clear: both;
}

/* 先頭は本文を全幅表示するための透明スペーサー（shape-outside で回り込み領域を制御） */
.p-message__text .person-spacer {
  float: right;
  width: 200px;
  height: 280px;
  margin: 0;
  background: transparent;
  shape-outside: polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%);
}

/* 人物画像は右floatで回り込みを作り、右へ120pxはみ出す */
.p-message__text .person-img {
  float: right;
  clear: right;
  width: var(--message-person-width);
  height: var(--message-person-height);
  margin: 0 calc(var(--message-person-overhang) * -1) 0 16px;
  display: block;
  shape-outside: polygon(100% 0%, 100% 0%, 100% 100%, 35% 100%);
  shape-margin: 16px;
  object-fit: cover;
  object-position: center bottom;
}

.p-message__text .about-text p {
  margin: 0;
  line-break: strict;
  word-break: keep-all;
  text-wrap: pretty;
}

/* スクロール演出 */
.p-message .title__main[data-reveal] {
  transition-delay: 0s;
}

.p-message .title__sub[data-reveal] {
  transition-delay: 0.12s;
}

.p-message__text[data-reveal] {
  transition-delay: 0.36s;
}

/* モバイル〜iPad（768px以下）：flex縦並びレイアウト */
@media (max-width: 768px) {
  .p-message {
    --message-panel-width: 100%;
    --message-panel-left: 0;

    padding-bottom: 100px;
  }

  .p-message__panel {
    left: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
    padding: 32px 24px 0;
  }

  .p-message__body {
    max-width: 100%;
  }

  .p-message__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.9;
  }

  .p-message__text::after {
    display: none;
  }

  .p-message__text .person-spacer {
    display: none;
  }

  .p-message__text .about-text {
    order: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .p-message__text .about-text p {
	overflow-wrap: anywhere;
	word-break: normal;
	line-break: auto;
	text-wrap: wrap;
  }

  /* テキストの下・右下へ配置し、青枠の下方向にはみ出す */
  .p-message__text .person-img {
    order: 2;
    float: none;
    clear: none;
    align-self: flex-end;
    width: 58%;
    max-width: 240px;
    height: auto;
    margin: -60px 0 -72px;
    shape-outside: none;
    shape-margin: 0;
    object-fit: cover;
    object-position: center bottom;
  }
}

/* =========================
p-company（会社案内）
========================= */

.p-company {
  --company-section-bg: #edf2f8;
  --company-dot-size: 3px;
  --company-dot-gap: 3px;

  /* padding-bottom: 60px; */
  background: var(--company-section-bg);
}

.p-company .title {
  margin-bottom: 40px;
}

.p-company__list {
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  column-gap: 39px;
  width: 100%;
  max-width: 704px;
  margin-inline: auto;
}

.p-company__row {
  position: relative;
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: start;
  margin: 0;
  padding: 18px 0;
}

/* 点線（3pxの丸点・行間のみ・横幅いっぱい） */
.p-company__row:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--company-dot-size);
  background-image: radial-gradient(circle, var(--color-primary) calc(var(--company-dot-size) / 2), transparent calc(var(--company-dot-size) / 2));
  background-repeat: repeat-x;
  background-size: calc(var(--company-dot-size) + var(--company-dot-gap)) var(--company-dot-size);
}

.p-company__term,
.p-company__desc {
  margin: 0;

  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 20px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.6;
  text-align: left;
}

.p-company__term {
  grid-column: 2;
}

.p-company__desc {
  grid-column: 3;
  min-width: 0;
}

.p-company__cta {
  max-width: 704px;
  margin: 40px auto 0;
}

.p-company__slide {
  margin-top: 40px;
}

.p-company__line-btn {
  display: block;
  width: 100%;

  transition:
    opacity var(--transition),
    transform var(--transition);
}

.p-company__line-btn img {
  width: 100%;
  height: auto;
}

.p-company__line-btn:hover {
  opacity: 0.85;
  transform: translateY(-3px);
}

/* スクロール演出 */
.p-company .title__main[data-reveal] {
  transition-delay: 0s;
}

.p-company .title__sub[data-reveal] {
  transition-delay: 0.12s;
}

.p-company__row[data-reveal]:nth-of-type(1) {
  transition-delay: 0.24s;
}

.p-company__row[data-reveal]:nth-of-type(2) {
  transition-delay: 0.32s;
}

.p-company__row[data-reveal]:nth-of-type(3) {
  transition-delay: 0.4s;
}

.p-company__row[data-reveal]:nth-of-type(4) {
  transition-delay: 0.48s;
}

.p-company__row[data-reveal]:nth-of-type(5) {
  transition-delay: 0.56s;
}

.p-company__row[data-reveal]:nth-of-type(6) {
  transition-delay: 0.64s;
}

.p-company__cta[data-reveal] {
  transition-delay: 0.72s;
}

@media (max-width: 767px) {
  .p-company {
    padding-bottom: 48px;
  }

  .p-company .title {
    margin-bottom: 28px;
  }

  .p-company__list {
    column-gap: 18px;
  }

  .p-company__row {
    padding: 14px 0;
  }

  .p-company__term,
  .p-company__desc {
    font-size: 16px;
  }

  .p-company__cta {
    margin-top: 28px;
  }

  .p-company__slide {
    margin-top: 28px;
  }
}

/* =========================
p-contact（お問合せ・青背景）
========================= */

.p-contact {
  padding-top: 0;
}

.p-contact__hero {
  --contact-bg: #003089;

  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-top: 60px;
  background-color: var(--contact-bg);
  color: #fff;
  text-align: center;
}

.p-contact .title {
  margin-bottom: 36px;
}

.p-contact .title__main,
.p-contact .title__sub {
  color: #fff;
}

.p-contact__body {
  margin: 0;
}

.p-contact__lead {
  margin: 0;
  font-family: var(--font-base);
  font-size: 20px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.6;
}

.p-contact__lead + .p-contact__lead {
  margin-top: 6px;
}

.p-contact__tel {
  --contact-tel-scale-x: 1.08;

  margin: 28px 0 0;
  font-family: "Oswald", sans-serif;
  font-size: 65px;
  font-weight: 500;
  font-synthesis: none;
  line-height: 1;
  letter-spacing: 2px;
  transform-origin: center;
}

/* data-reveal の translateY と scaleX を併用（片方だけだと上書きされる） */
.p-contact__tel[data-reveal] {
  transform: translateY(30px) scaleX(var(--contact-tel-scale-x));
}

.p-contact__tel[data-reveal].is-visible {
  transform: translateY(0) scaleX(var(--contact-tel-scale-x));
}

.p-contact__tel-link {
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition);
}

.p-contact__tel-link:hover {
  opacity: 0.85;
}

.p-contact__hours {
  margin: 12px 0 0;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.6;
}

.p-contact__visual {
  width: 100%;
  max-width: var(--layout-width);
  margin: 36px auto 0;
  line-height: 0;
}

.p-contact__visual img {
  width: 100%;
  height: auto;
}

/* スクロール演出 */
.p-contact .title__main[data-reveal] {
  transition-delay: 0s;
}

.p-contact .title__sub[data-reveal] {
  transition-delay: 0.12s;
}

.p-contact__lead[data-reveal]:nth-of-type(1) {
  transition-delay: 0.24s;
}

.p-contact__lead[data-reveal]:nth-of-type(2) {
  transition-delay: 0.32s;
}

.p-contact__tel[data-reveal] {
  transition-delay: 0.4s;
}

.p-contact__hours[data-reveal] {
  transition-delay: 0.48s;
}

.p-contact__visual[data-reveal] {
  transition-delay: 0.56s;
}

@media (max-width: 767px) {
  .p-contact__hero {
    padding-top: 48px;
  }

  .p-contact .title {
    margin-bottom: 28px;
  }

  .p-contact__lead {
    font-size: 16px;
    line-height: 1.7;
  }

  .p-contact__tel {
    margin-top: 20px;
    font-size: 42px;
  }

  .p-contact__hours {
    margin-top: 10px;
    font-size: 12px;
  }

  .p-contact__visual {
    max-width: none;
    margin-top: 28px;
    padding-inline: 15px;
  }
}

/* =========================
p-contact-form（お問合せフォーム）
========================= */

.p-contact-form {
  --contact-form-input-width: 430px;
  --contact-form-label-width: 168px;
  --contact-form-required-bg: #f06b6b;
  --contact-form-reset-bg: #c8d6e6;

  padding: 48px 0 72px;
  background: var(--color-bg-light);
}

.p-contact-form__title {
  margin-bottom: 12px;
}

.p-contact-form__title .title__main {
  color: var(--color-primary);
}

.p-contact-form__note {
  margin: 0 0 40px;
  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.6;
  text-align: center;
}

.p-contact-form__form {
  margin: 0;
}

.p-contact-form__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.p-contact-form__row--textarea {
  align-items: flex-start;
}

.p-contact-form__label-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: var(--contact-form-label-width);
  flex-shrink: 0;
}

.p-contact-form__row--textarea .p-contact-form__label-wrap {
  padding-top: 12px;
}

.p-contact-form__required {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 22px;
  padding: 0 8px;
  color: #fff;
  background: var(--contact-form-required-bg);
  border-radius: 3px;
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1;
}

.p-contact-form__required:empty {
  visibility: hidden;
}

.p-contact-form__label {
  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 16px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.4;
  white-space: nowrap;
}

.p-contact-form__field {
  flex-shrink: 0;
}

.p-contact-form__input,
.p-contact-form__textarea {
  display: block;
  width: var(--contact-form-input-width);
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #c5c5c5;
  border-radius: 0;
  background: #fff;
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.p-contact-form__input {
  height: 44px;
}

.p-contact-form__textarea {
  height: 180px;
  resize: vertical;
}

.p-contact-form__input:focus,
.p-contact-form__textarea:focus {
  border-color: var(--color-primary);
  outline: none;
}

.p-contact-form__row--agree {
  align-items: flex-start;
  margin-bottom: 8px;
}

.p-contact-form__row--agree .p-contact-form__label-wrap {
  padding-top: 2px;
}

.p-contact-form__field--agree {
  width: var(--contact-form-input-width);
}

.p-contact-form__agree {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.p-contact-form__agree-check {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}

.p-contact-form__checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.p-contact-form__checkbox-mark {
  display: block;
  width: 35px;
  height: 35px;
  border: 1px solid #c5c5c5;
  background: #fff;
  transition:
    border-color var(--transition),
    background-color var(--transition);
}

.p-contact-form__checkbox-mark::after {
  content: "";
  display: block;
  width: 9px;
  height: 15px;
  margin: 5px auto 0;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  opacity: 0;
  transform: rotate(45deg) scale(0.8);
  transition: opacity var(--transition);
}

.p-contact-form__checkbox:focus-visible + .p-contact-form__checkbox-mark {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.p-contact-form__checkbox:checked + .p-contact-form__checkbox-mark {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.p-contact-form__checkbox:checked + .p-contact-form__checkbox-mark::after {
  opacity: 1;
}

.p-contact-form__agree-text {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 15px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.6;
}

.p-contact-form__privacy-link {
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  transition: opacity var(--transition);
}

.p-contact-form__privacy-link:hover {
  opacity: 0.75;
}

.p-contact-form__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.p-contact-form__field--actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: var(--contact-form-input-width);
}

.p-contact-form__submit,
.p-contact-form__reset {
  margin: 0;
  border: none;
  border-radius: 4px;
  font-family: var(--font-base);
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.4;
  cursor: pointer;
  transition:
    opacity var(--transition),
    transform var(--transition);
}

.p-contact-form__submit {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  color: #fff;
  background: #003089;
  font-size: 18px;
}

.p-contact-form__reset {
  flex-shrink: 0;
  width: 100px;
  height: 44px;
  padding: 0 12px;
  color: var(--color-primary);
  background: var(--contact-form-reset-bg);
  font-size: 16px;
}

.p-contact-form__submit:hover,
.p-contact-form__reset:hover {
  opacity: 0.85;
  transform: translateY(-3px);
}

/* スクロール演出 */
.p-contact-form__title .title__main[data-reveal] {
  transition-delay: 0s;
}

.p-contact-form__note[data-reveal] {
  transition-delay: 0.12s;
}

/* reCAPTCHA v3 バッジ非表示（送信時の検証は維持） */
.grecaptcha-badge {
  visibility: hidden;
}

/* =========================
p-privacy-modal（プライバシーポリシー）
========================= */

.p-privacy-modal {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-header-overlay) + 10);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 15px;
}

.p-privacy-modal[hidden] {
  display: none;
}

.p-privacy-modal.is-open {
  display: flex;
}

.p-privacy-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 34, 100, 0.55);
}

.p-privacy-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  max-height: min(88vh, 760px);
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 55, 156, 0.18);
}

.p-privacy-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: var(--color-bg-light);
  border-bottom: 1px solid #d8e2ef;
}

.p-privacy-modal__title {
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 20px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.4;
}

.p-privacy-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transition);
}

.p-privacy-modal__close:hover {
  background: rgba(0, 55, 156, 0.08);
}

.p-privacy-modal__close-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.p-privacy-modal__close-icon::before,
.p-privacy-modal__close-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--color-primary);
  transform-origin: center;
}

.p-privacy-modal__close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.p-privacy-modal__close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.p-privacy-modal__body {
  overflow-y: auto;
  padding: 24px;
}

.p-privacy-modal__lead {
  margin: 0 0 24px;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.9;
}

.p-privacy-modal__section + .p-privacy-modal__section {
  margin-top: 20px;
}

.p-privacy-modal__heading {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.5;
}

.p-privacy-modal__text {
  margin: 0;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.9;
}

.p-privacy-modal__list {
  margin: 8px 0 0;
  padding-left: 1.4em;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.9;
}

.p-privacy-modal__list li + li {
  margin-top: 4px;
}

.p-privacy-modal__address {
  margin: 12px 0 0;
  color: var(--color-text);
  font-size: 14px;
  font-style: normal;
  line-height: 1.9;
}

.p-privacy-modal__company {
  display: block;
  margin-bottom: 4px;
  color: var(--color-primary);
  font-weight: 700;
}

.p-privacy-modal__address a {
  color: var(--color-primary);
  text-decoration: none;
}

.p-privacy-modal__address a:hover {
  text-decoration: underline;
}

body.is-privacy-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .p-contact-form {
    padding: 36px 0 56px;
  }

  .p-contact-form__note {
    margin-bottom: 28px;
    font-size: 13px;
  }

  .p-contact-form__row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 20px;
  }

  .p-contact-form__row--textarea .p-contact-form__label-wrap {
    padding-top: 0;
  }

  .p-contact-form__label-wrap {
	justify-content: flex-end;
	width: 100%;
	flex-direction: row-reverse;
	gap: 8px;
  }

  .p-contact-form__label {
	text-align: left;
  }

  .p-contact-form__input,
  .p-contact-form__textarea {
    width: 100%;
  }

  .p-contact-form__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 28px;
  }

  .p-contact-form__actions .p-contact-form__label-wrap {
    display: none;
  }

  .p-contact-form__field--actions {
    width: 100%;
    flex-direction: column;
    gap: 12px;
  }

  .p-contact-form__submit,
  .p-contact-form__reset {
    flex: none;
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .p-contact-form__submit {
    font-size: 16px;
  }

  .p-contact-form__field--agree {
    width: 100%;
  }

  .p-contact-form__row--agree .p-contact-form__label-wrap {
	padding-top: 0;
  }

  .p-contact-form__row--agree .p-contact-form__required {
	display: none;
  }

  .p-contact-form__agree-text::after {
	content: "必須";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 22px;
	margin-left: 8px;
	padding: 0 8px;
	color: #fff;
	background: var(--contact-form-required-bg);
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	vertical-align: middle;
  }

  .p-privacy-modal {
    padding: 12px;
  }

  .p-privacy-modal__header {
    padding: 16px;
  }

  .p-privacy-modal__title {
    font-size: 18px;
  }

  .p-privacy-modal__body {
    padding: 16px;
  }

  .p-privacy-modal__dialog {
    max-height: 92vh;
  }
}
