/* components.css — 共通コンポーネント。値はすべて tokens.css 経由 */

/* ── header ── */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  height: var(--header-h);
  background: var(--color-washi);
  border-bottom: var(--line-gold) solid var(--color-line);
  transition: box-shadow var(--dur-base) var(--ease);
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }
.header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
}
.header__logo { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.header__logo-main {
  font-family: var(--font-serif); font-weight: var(--fw-semibold);
  font-size: var(--fs-xl); letter-spacing: 0.3em; line-height: 1; color: var(--color-ink);
}
.header__logo-sub {
  display: flex; flex-direction: column;
  font-family: var(--font-serif); font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  letter-spacing: 0.35em; line-height: 1.35; color: var(--color-ink);
}
.header__logo-sub span { display: block; }
.header__nav { display: none; }
.header__nav ul { display: flex; align-items: center; gap: var(--space-4); }
.header__nav a {
  font-size: var(--fs-sm); letter-spacing: var(--ls-heading);
  text-decoration: none; padding-block: var(--space-1);
  border-bottom: var(--line-gold) solid transparent;
  transition: border-color var(--dur-fast) var(--ease);
}
.header__nav a:hover,
.header__nav a[aria-current="page"] { border-bottom-color: var(--color-gold); }
.header__tel {
  font-size: var(--fs-sm); color: var(--color-wood); white-space: nowrap;
  padding-left: var(--space-4); border-left: var(--line-gold) solid var(--color-line);
  text-decoration: none;
}
.header__toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 var(--space-2);
  background: none; border: 0; cursor: pointer; color: var(--color-ink);
}
.header__toggle span[aria-hidden] {
  display: block; height: 1.5px; background: currentColor;
}

/* ── drawer ── */
.drawer {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-5);
  background: var(--color-ink); color: var(--color-on-dark);
}
.drawer[hidden] { display: none; }
.drawer ul { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.drawer a {
  font-family: var(--font-serif); font-size: var(--fs-lg);
  letter-spacing: var(--ls-heading-wide); text-decoration: none;
  padding: var(--space-1) var(--space-3);
}
.drawer a:hover, .drawer a[aria-current="page"] { color: var(--color-gold-light); }
.drawer__close {
  position: absolute; top: var(--space-3); right: var(--space-3);
  width: 44px; height: 44px; background: none; border: 0; cursor: pointer;
  color: var(--color-on-dark); font-size: var(--fs-xl); line-height: 1;
}

/* ── hero ── */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(25rem + var(--header-h)); padding-top: var(--header-h);
  display: flex; align-items: flex-end;
  background: var(--color-ink); color: var(--color-on-dark);
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.55;
}
.hero__overlay { position: absolute; inset: 0; background: var(--color-overlay); }
/* シグネチャ: 縦の金線 */
.hero__line {
  position: absolute; top: 18%; bottom: 14%; right: 13%;
  width: var(--line-gold);
  background: linear-gradient(to bottom, transparent, var(--color-gold) 35%, var(--color-gold) 65%, transparent);
}
.hero__inner {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-block: var(--space-5) var(--space-6);
}
.hero__eyebrow {
  display: block; font-size: var(--fs-xs); letter-spacing: var(--ls-heading-wide);
  color: var(--color-gold-light); margin-bottom: var(--space-3);
}
.hero__title {
  font-size: var(--fs-hero); line-height: 1; letter-spacing: var(--ls-heading-narrow);
  color: var(--color-white); margin-bottom: var(--space-4);
}
.hero__desc {
  font-size: var(--fs-base); color: var(--color-on-dark);
  margin-bottom: var(--space-5);
}
.js .hero__copy { animation: rise var(--dur-slow) var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(var(--rise)); } to { opacity: 1; transform: none; } }

/* ── section-title ── */
.section-title {
  font-size: var(--fs-xl); color: var(--color-ink);
}
.section-title::after {
  content: ""; display: block; width: var(--space-5); height: 2px;
  margin-top: var(--space-3); background: var(--color-gold);
}
.section-title__en {
  display: block; margin-bottom: var(--space-2);
  font-family: var(--font-sans); font-weight: var(--fw-medium);
  font-size: var(--fs-xs); letter-spacing: var(--ls-heading-wide);
  color: var(--color-gold);   /* 装飾(大見出しに添える英字ラベル) */
}

/* ── button ── */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: var(--space-2) var(--space-5);
  font-family: var(--font-sans); font-weight: var(--fw-medium);
  font-size: var(--fs-sm); letter-spacing: var(--ls-heading);
  text-decoration: none; cursor: pointer; border: 0; border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease);
}
.button--primary { background: var(--color-white); color: var(--color-ink); }
.button--primary:hover { background: var(--color-gold-light); }
.button--text {
  padding-inline: 0; background: none; color: var(--color-wood);
  text-decoration: underline; text-decoration-color: var(--color-gold);
  text-underline-offset: 0.4em; text-decoration-thickness: 1px;
}
.button--text:hover { text-decoration-thickness: 2px; }

/* ── blog-row ── */
.blog-list { margin-top: var(--space-6); border-top: var(--line-gold) solid var(--color-line); }
.blog-row {
  display: grid; gap: var(--space-1);
  padding-block: var(--space-4);
  border-bottom: var(--line-gold) solid var(--color-line);
  text-decoration: none;
}
.blog-row__meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--color-wood); }
.blog-row__meta time { flex: none; min-width: 8.5em; font-variant-numeric: tabular-nums; }
.blog-row__tag {
  display: inline-block; padding-inline: var(--space-2);
  font-size: var(--fs-xs); background: var(--color-moss); color: var(--color-white);
}
.blog-row__tag--hou { background: var(--color-wood); }
.blog-row[hidden] { display: none; }
.blog-row__title { font-family: var(--font-serif); font-weight: var(--fw-semibold); letter-spacing: var(--ls-heading-narrow); }
.blog-row__excerpt {
  font-size: var(--fs-sm); color: var(--color-wood); line-height: var(--lh-body);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-row:hover .blog-row__title {
  text-decoration: underline; text-decoration-color: var(--color-gold); text-underline-offset: 0.3em;
}

/* ── info-bar ── */
.info-bar {
  background: var(--color-ink); color: var(--color-on-dark);
  padding-block: var(--info-bar-y); text-align: center;
}
.info-bar__label {
  display: block; margin-bottom: var(--space-2);
  font-size: var(--fs-xs); letter-spacing: var(--ls-heading-wide); color: var(--color-gold-light);
}
.info-bar__tel {
  font-family: var(--font-serif); font-weight: var(--fw-bold); font-size: var(--fs-lg);
  color: var(--color-white); text-decoration: none; letter-spacing: var(--ls-heading-narrow);
}
.info-bar__copy { margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--color-on-dark-muted); }
.info-bar__address { font-style: normal; font-size: var(--fs-sm); color: var(--color-on-dark-muted); margin-top: var(--space-2); }

/* ── page-hero ── */
.page-hero {
  position: relative; overflow: hidden;
  padding-top: var(--header-h); min-height: 14rem;
  display: flex; align-items: flex-end;
  background: var(--color-ink); color: var(--color-on-dark);
}
.page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.page-hero__overlay { position: absolute; inset: 0; background: var(--color-overlay); }
.page-hero__body { position: relative; z-index: 1; padding-block: var(--space-6) var(--space-5); }
.page-hero__title { font-size: var(--fs-2xl); color: var(--color-white); letter-spacing: var(--ls-heading-wide); }

/* ── breadcrumb ── */
.breadcrumb { margin-bottom: var(--space-2); font-size: var(--fs-xs); letter-spacing: var(--ls-heading); color: var(--color-on-dark-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); }
.breadcrumb li + li::before { content: "/"; margin-right: var(--space-2); }
.breadcrumb a { text-decoration: underline; text-decoration-color: var(--color-gold-light); text-underline-offset: 0.3em; }

/* ── content(本文) ── */
.content { padding-block: var(--section-y); }
.content::after { content: ""; display: table; clear: both; }
.content h2 {
  font-size: var(--fs-lg); margin: var(--space-6) 0 var(--space-3);
  padding-left: var(--space-3); border-left: 3px solid var(--color-gold);
}
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: var(--fs-base); margin: var(--space-5) 0 var(--space-2); }
.content p { margin-bottom: var(--space-3); }
.content a { color: var(--color-wood); text-decoration: underline; text-decoration-color: var(--color-gold); text-underline-offset: 0.3em; }
.content__img { margin-bottom: var(--space-3); border: var(--line-gold) solid var(--color-line); border-radius: var(--radius-md); }
.content__img--center { margin-inline: auto; }
.content__img--right, .content__img--left { margin-inline: auto; }
.content address { font-style: normal; margin-bottom: var(--space-3); }
.mantra { font-family: var(--font-serif); font-weight: var(--fw-semibold); }

/* ── notice ── */
.notice {
  margin-block: var(--space-4); padding: var(--space-3) var(--space-4);
  background: var(--color-washi); border: var(--line-gold) solid var(--color-gold); border-radius: var(--radius-md);
  color: var(--color-wood); font-size: var(--fs-sm);
}
.content .notice p { margin-bottom: 0; }

/* ── fee-table ── */
.fee-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--radius-md); overflow: hidden; margin: var(--space-3) 0 var(--space-5); font-size: var(--fs-sm); }
.fee-table caption {
  text-align: left; padding: var(--space-2) var(--space-3);
  background: var(--color-ink); color: var(--color-on-dark);
  font-family: var(--font-serif); font-weight: var(--fw-semibold); letter-spacing: var(--ls-heading);
}
.fee-table th, .fee-table td {
  padding: var(--space-2) var(--space-3); text-align: left;
  background: var(--color-white); border-bottom: var(--line-gold) solid var(--color-line);
}
.fee-table thead th { background: var(--color-ink); color: var(--color-white); font-family: var(--font-serif); font-weight: var(--fw-semibold); letter-spacing: var(--ls-heading); }
.fee-table tbody th { font-weight: var(--fw-medium); }
.fee-table tbody tr:last-child > th, .fee-table tbody tr:last-child > td { border-bottom: 0; }
.fee-table .is-none { color: var(--color-wood); }

/* ── pdf-button ── */
.pdf-button {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 44px; padding: var(--space-2) var(--space-4);
  background: var(--color-paper); border: var(--line-gold) solid var(--color-gold);
  color: var(--color-wood); font-size: var(--fs-sm); letter-spacing: var(--ls-heading);
  text-decoration: none; border-radius: var(--radius-md);
}
.content .pdf-button { text-decoration: none; }
.pdf-button:hover { background: var(--color-white); }
.pdf-button svg { width: 1.25em; height: 1.25em; flex: none; }
.pdf-button__size { font-size: var(--fs-xs); }
.pdf-wrap { text-align: right; margin-bottom: var(--space-3); }

/* ── map-frame ── */
.map-frame { margin-block: var(--space-4); border: var(--line-gold) solid var(--color-line); aspect-ratio: 64 / 27; background: var(--color-paper); border-radius: var(--radius-md); overflow: hidden; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ── ritual-box(真言を掲げる枠) ── */
.ritual-box {
  margin-block: var(--space-4); padding: var(--space-4); text-align: center;
  background: var(--color-white); border: var(--line-gold) solid var(--color-gold);
  font-family: var(--font-serif); font-weight: var(--fw-semibold); letter-spacing: var(--ls-heading);
}

@media (min-width: 600px) {
  .blog-row { grid-template-columns: 11rem 1fr; gap: var(--space-4); }
  .page-hero__title { font-size: var(--fs-2xl); }
  .content__img--right { float: right; margin: 0 0 var(--space-3) var(--space-4); }
  .content__img--left { float: left; margin: 0 var(--space-4) var(--space-3) 0; }
}

@media (min-width: 920px) {
  .header__nav { display: block; }
  .header__toggle { display: none; }
}

.fee-table tbody th[scope="row"] { width: 40%; }
@media (max-width: 599px) {
  /* SP: 縦積みにせず通常の表のまま、文字が収まる範囲で列幅を自動調整 */
  .fee-table th, .fee-table td { padding: var(--space-2); }
  .fee-table tr > :first-child { padding-left: var(--space-3); }
  .fee-table td { white-space: nowrap; }
  .fee-table tbody th[scope="row"] { width: auto; }
}

/* ── blog-filter / もっと見る ── */
.blog-filter { display: inline-flex; border: var(--line-gold) solid var(--color-line); border-radius: var(--radius-md); overflow: hidden; margin-bottom: var(--space-5); }
.blog-filter__btn {
  min-height: 44px; padding: var(--space-2) var(--space-5); cursor: pointer;
  background: transparent; border: 0; border-right: var(--line-gold) solid var(--color-line);
  font-family: var(--font-sans); font-weight: var(--fw-medium); font-size: var(--fs-sm); letter-spacing: var(--ls-heading);
  color: var(--color-wood); transition: background var(--dur-fast) var(--ease);
}
.blog-filter__btn:last-child { border-right: 0; }
.blog-filter__btn:hover { background: var(--color-paper); }
.blog-filter__btn.is-active { background: var(--color-ink); color: var(--color-white); }
.blog-more { margin-top: var(--space-5); text-align: center; }
.blog-more[hidden], .blog-more:has(#blog-more[hidden]) { display: none; }
