/* ==========================================================================
   下層ページ共通スタイルシート
   Horse Design 二級建築士事務所
   対象: PRICE / FLOW / OFFICE / CONTACT / THANKS
   ========================================================================== */


/* --------------------------------------------------------------------------
   CSS カスタムプロパティ（デザイントークン）
   top.css と共通の値を再定義 — 将来 base.css に統合する際はここを削除
   -------------------------------------------------------------------------- */
:root {
  --hd-main:          #1B435D;
  --hd-main-dark:     #143246;
  --hd-main-light:    #2A5979;
  --hd-accent:        #78BBE6;
  --hd-light:         #D5EEFF;
  --hd-warm:          #F99F48;
  --hd-warm-dark:     #E88B35;
  --hd-bg:            #F8F3EC;
  --hd-text:          #2E3842;
  --hd-white:         #FFFFFF;
  --hd-border:        rgba(90, 114, 136, 0.18);

  --hd-container-max: 1100px;
  --hd-container-px:  clamp(1.25rem, 5vw, 3rem);
  --hd-section-py:    clamp(4rem, 8vw, 6.5rem);

  --hd-ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --hd-transition:    0.4s var(--hd-ease);

  --hd-font-serif:    'Noto Serif JP', '游明朝', 'Yu Mincho', serif;
  --hd-font-sans:     'Noto Sans JP', sans-serif;
  --hd-font-en:       'Montserrat', 'Arial', sans-serif;
}


/* --------------------------------------------------------------------------
   ベース・ユーティリティ（下層ページ共通）
   -------------------------------------------------------------------------- */
.hd-subpage {
  background-color: var(--hd-bg);
  color: var(--hd-text);
  font-family: var(--hd-font-sans);
}

.hd-container {
  max-width: var(--hd-container-max);
  margin-inline: auto;
  padding-inline: var(--hd-container-px);
}

/* セクション共通余白 */
.hd-section {
  padding-block: var(--hd-section-py);
}

.hd-section--bg-white {
  background-color: var(--hd-white);
}

.hd-section--bg-navy {
  background-color: var(--hd-main);
  color: var(--hd-white);
}


/* ---- セクションヘッダー（下層ページ内での使用） ---- */
.hd-section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.hd-section-header__en {
  font-family: var(--hd-font-en);
  font-size: clamp(0.65rem, 1.2vw, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--hd-main);
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

.hd-section-header__line {
  width: 2px;
  height: 2.5rem;
  background: var(--hd-accent);
  margin-inline: auto;
  margin-bottom: 1rem;
}

.hd-section-header__ja {
  font-family: var(--hd-font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--hd-main);
  margin: 0;
  letter-spacing: 0.03em;
}

.hd-section-header--light .hd-section-header__ja {
  color: var(--hd-white);
}


/* ---- ボタン共通（top.css と同定義 — 将来 base.css に統合） ---- */
.hd-btn {
  display: inline-block;
  font-family: var(--hd-font-sans);
  text-decoration: none;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background var(--hd-transition),
              color var(--hd-transition),
              border-color var(--hd-transition),
              transform var(--hd-transition);
}

.hd-btn--primary {
  background: var(--hd-main);
  color: var(--hd-white);
  padding: 0.9em 2.6em;
  border: 2px solid var(--hd-main);
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}
.hd-btn--primary:hover {
  background: var(--hd-main-dark);
  color: var(--hd-white);
  border-color: var(--hd-main-dark);
}

.hd-btn--outline {
  border: 1.5px solid var(--hd-main);
  color: var(--hd-main);
  padding: 0.8em 2.6em;
  font-size: clamp(0.82rem, 1.4vw, 0.9rem);
  background: transparent;
}
.hd-btn--outline:hover {
  background: var(--hd-main);
  color: var(--hd-white);
}

.hd-btn--outline-light {
  border-color: var(--hd-white);
  color: var(--hd-white);
}
.hd-btn--outline-light:hover {
  background: var(--hd-white);
  color: var(--hd-main);
}

.hd-btn--text {
  color: var(--hd-main);
  padding: 0;
  border: none;
  background: transparent;
  font-size: clamp(0.82rem, 1.4vw, 0.9rem);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hd-btn--text:hover {
  color: var(--hd-accent);
}

.hd-section-footer {
  text-align: center;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}


/* ==========================================================================
   ページヒーロー（全下層ページ共通）
   ========================================================================== */
.hd-page-hero {
  position: relative;
  background-color: var(--hd-main);
  color: var(--hd-white);
  padding-block: clamp(4rem, 10vw, 7rem);
  overflow: hidden;

  /* フルワイド: SWELLの親コンテナを突き破る */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* 背景画像あり */
.hd-page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hd-page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 画像の上に暗いオーバーレイ */
.hd-page-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(65, 90, 112, 0.72);
}

/* コンテンツは画像より前面 */
.hd-page-hero .hd-container {
  position: relative;
  z-index: 1;
}

.hd-page-hero__inner {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

/* 縦一本線モチーフ */
.hd-page-hero__line-motif {
  flex-shrink: 0;
  width: 2px;
  height: clamp(5rem, 10vw, 7rem);
  background: var(--hd-warm);
}

.hd-page-hero__text {
  padding-top: 0.25rem;
}

.hd-page-hero__en {
  font-family: var(--hd-font-en);
  font-size: clamp(0.65rem, 1.2vw, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--hd-light);
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

.hd-page-hero__title {
  font-family: var(--hd-font-serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 500;
  color: var(--hd-white);
  letter-spacing: 0.06em;
  margin: 0 0 1rem;
  line-height: 1.4;
}

.hd-page-hero__desc {
  font-size: clamp(0.82rem, 1.5vw, 0.92rem);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.85;
  margin: 0;
}

/* タブレット以上 */
@media (min-width: 768px) {
  .hd-page-hero__line-motif {
    height: clamp(6rem, 12vw, 9rem);
  }
}


/* ==========================================================================
   パンくずリスト（下層ページ共通）
   ========================================================================== */
.hd-breadcrumb {
  background-color: var(--hd-white);
  border-bottom: 1px solid var(--hd-border);
  padding-block: 0.75rem;
}

.hd-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.75rem;
  color: rgba(46, 56, 66, 0.84);
}

.hd-breadcrumb__item {
  display: flex;
  align-items: center;
}

/* セパレーター（/） */
.hd-breadcrumb__item:not(:first-child)::before {
  content: '/';
  margin-right: 0.25rem;
  color: rgba(27, 67, 93, 0.7);
}

.hd-breadcrumb__link {
  color: var(--hd-main);
  text-decoration: none;
  transition: color var(--hd-transition);
}
.hd-breadcrumb__link:hover {
  color: var(--hd-accent);
  text-decoration: underline;
}

.hd-breadcrumb__item--current span {
  color: rgba(46, 56, 66, 0.84);
}


/* CTAバナーのスタイルは site.css に移動済み */


/* ==========================================================================
   OFFICE ページ
   ========================================================================== */

/* ---- 事業内容テーブル ---- */
.hd-office-business__table {
  margin: 0;
  border: 1px solid var(--hd-border);
  background: var(--hd-white);
}

.hd-office-business__row {
  display: grid;
  gap: 0.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--hd-border);
}

.hd-office-business__row:last-child {
  border-bottom: none;
}

.hd-office-business__row dt {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--hd-main-dark);
  letter-spacing: 0.06em;
}

.hd-office-business__row dd {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--hd-text);
}

.hd-office-business__row dd p {
  margin: 0 0 0.5rem;
}

.hd-office-business__row dd ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hd-office-business__row dd ul li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.88rem;
  line-height: 2;
  color: rgba(46, 56, 66, 0.78);
}

.hd-office-business__row dd ul li::before {
  content: "│";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(91, 139, 178, 0.9);
  font-size: 0.75rem;
  line-height: 2;
}

@media (min-width: 768px) {
  .hd-office-business__row {
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
  }
}


/* ---- 実績リスト ---- */
.hd-office-works-list__layout {
  display: grid;
  gap: 2.5rem;
}

.hd-office-works-list__items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hd-office-works-list__items li {
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--hd-border);
  color: var(--hd-text);
  letter-spacing: 0.03em;
}

.hd-office-works-list__items li:first-child {
  border-top: 1px solid var(--hd-border);
}

.hd-office-works-list__photos {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, 1fr);
}

.hd-office-works-list__photo-placeholder {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ebe4d7, #d7e2ea);
  border: 1px solid var(--hd-border);
}

@media (min-width: 768px) {
  .hd-office-works-list__layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: start;
    gap: 3rem;
  }

  .hd-office-works-list__photos {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hd-office-works-list__photo-placeholder {
    aspect-ratio: 4 / 3;
  }
}


/* ---- 料金表 ---- */
.hd-office-fee__table {
  margin: 0 auto;
  border: 1px solid var(--hd-border);
  background: var(--hd-white);
  max-width: 640px;
}

.hd-office-fee__row {
  display: grid;
  gap: 0.5rem;
  padding: 2rem 2.5rem;
}

.hd-office-fee__row dt {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--hd-main-dark);
  letter-spacing: 0.08em;
}

.hd-office-fee__row dd {
  margin: 0;
  font-family: var(--hd-font-sans);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  color: var(--hd-main);
  line-height: 2;
}

.hd-office-fee__note {
  font-family: var(--hd-font-sans);
  font-size: 0.82rem;
  color: rgba(46, 56, 66, 0.68);
  display: block;
  margin-top: 0.4rem;
}

@media (min-width: 768px) {
  .hd-office-fee__row {
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: center;
    gap: 1.5rem;
  }
}


/* ---- 事務所概要 ---- */
.hd-office-overview__layout {
  display: grid;
  gap: 2.5rem;
}

.hd-office-overview__photo {
  max-width: 260px;
}

.hd-office-overview__photo img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--hd-border);
}

.hd-office-overview__table {
  margin: 0;
  background: var(--hd-bg);
  border: 1px solid var(--hd-border);
}

.hd-office-overview__row {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--hd-border);
}

.hd-office-overview__row:last-child {
  border-bottom: none;
}

.hd-office-overview__row dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--hd-main-dark);
  white-space: nowrap;
}

.hd-office-overview__row dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--hd-text);
}

@media (min-width: 768px) {
  .hd-office-overview__layout {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 3rem;
  }

  .hd-office-overview__photo {
    max-width: 220px;
  }

  .hd-office-overview__row {
    grid-template-columns: 8rem minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
  }
}

@media (min-width: 1200px) {
  .hd-office-overview__photo {
    max-width: 260px;
  }
}


/* ==========================================================================
   スクロール追従CTAボタン（サイト全体共通）
   ========================================================================== */
.hd-sticky-cta {
  position: fixed;
  z-index: 900;
  transition: opacity 0.4s var(--hd-ease), transform 0.4s var(--hd-ease);
  pointer-events: none;
}

/* aria-hidden="true" のとき非表示 */
.hd-sticky-cta[aria-hidden="true"] {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.hd-sticky-cta[aria-hidden="false"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* SP: 画面下部フルバー */
.hd-sticky-cta {
  bottom: 0;
  left: 0;
  right: 0;
}

.hd-sticky-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  background: var(--hd-main);
  color: var(--hd-white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: background var(--hd-transition);
}
.hd-sticky-cta__btn:hover {
  background: var(--hd-main-dark);
}

/* PC: 右下丸ボタン */
@media (min-width: 768px) {
  .hd-sticky-cta {
    bottom: 2rem;
    right: 2rem;
    left: auto;
    width: auto;
  }

  .hd-sticky-cta__btn {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0;
    box-shadow: 0 4px 16px rgba(27, 67, 93, 0.22);
    font-size: 0.65rem;
  }
}


/* ==========================================================================
   下層ページヒーロー 入場アニメーション（CSS-only）
   ========================================================================== */

@keyframes hd-sub-enter {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes hd-sub-line-grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

.hd-page-hero__line-motif {
  transform-origin: top;
  transform: scaleY(0);
  animation: hd-sub-line-grow 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hd-page-hero__en,
.hd-page-hero__title,
.hd-page-hero__desc {
  opacity: 0;
  animation: hd-sub-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hd-page-hero__en    { animation-delay: 0.3s; }
.hd-page-hero__title { animation-delay: 0.5s; }
.hd-page-hero__desc  { animation-delay: 0.7s; }


/* ==========================================================================
   サンクスページ 入場アニメーション（CSS-only）
   ========================================================================== */

.hd-thanks__line-motif {
  transform-origin: top;
  transform: scaleY(0);
  animation: hd-sub-line-grow 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hd-thanks__icon,
.hd-thanks__en,
.hd-thanks__title,
.hd-thanks__desc,
.hd-thanks__note,
.hd-thanks__actions,
.hd-thanks__home-btn {
  opacity: 0;
  animation: hd-sub-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hd-thanks__icon     { animation-delay: 0.3s; }
.hd-thanks__en       { animation-delay: 0.5s; }
.hd-thanks__title    { animation-delay: 0.65s; }
.hd-thanks__desc     { animation-delay: 0.8s; }
.hd-thanks__note     { animation-delay: 0.95s; }
.hd-thanks__actions  { animation-delay: 1.1s; }
.hd-thanks__home-btn { animation-delay: 1.3s; }


/* アクセシビリティ: 動き軽減設定 */
@media (prefers-reduced-motion: reduce) {
  .hd-page-hero__line-motif,
  .hd-page-hero__en,
  .hd-page-hero__title,
  .hd-page-hero__desc,
  .hd-thanks__line-motif,
  .hd-thanks__icon,
  .hd-thanks__en,
  .hd-thanks__title,
  .hd-thanks__desc,
  .hd-thanks__note,
  .hd-thanks__actions,
  .hd-thanks__home-btn {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
