:root {
  --revision-gold: #c5a45c;
  --revision-gold-dark: #a88743;
  --revision-ink: #101426;
}

.hero .hero-copy {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 1.05s ease,
    transform 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero.hero-revision-ready .hero-copy {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  position: relative;
  min-height: clamp(640px, 79vh, 840px) !important;
  overflow: hidden !important;
}

body:has(.hero) #news.gan-news-section {
  padding-top: clamp(24px, 3vw, 36px) !important;
}

body:has(.hero) #news::after {
  opacity: 0.11 !important;
  background-position: left -10vw bottom -70px !important;
}

.hero-temple-band {
  display: none !important;
}

.hero-temple-band {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 6;
  display: flex;
  width: 20%;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border-right: 1px solid rgba(197, 164, 92, 0.86);
  background:
    linear-gradient(155deg, rgba(23, 28, 52, 0.98), rgba(5, 8, 21, 0.99)),
    #080b18;
  color: #fff;
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.18);
}

.hero-temple-crest {
  position: relative;
  display: grid;
  width: clamp(52px, 6vw, 86px);
  aspect-ratio: 1;
  margin-top: clamp(2rem, 7vh, 5rem);
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid var(--revision-gold);
  border-radius: 50%;
}

.hero-temple-crest::before,
.hero-temple-crest::after,
.hero-temple-crest span::before,
.hero-temple-crest span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28%;
  height: 48%;
  border: 1px solid var(--revision-gold);
  border-radius: 70% 30% 70% 30%;
  transform-origin: 50% 100%;
}

.hero-temple-crest::before {
  transform: translate(-50%, -88%) rotate(-42deg);
}

.hero-temple-crest::after {
  transform: translate(-50%, -88%) rotate(42deg);
}

.hero-temple-crest span::before {
  transform: translate(-50%, -88%) rotate(-15deg);
}

.hero-temple-crest span::after {
  transform: translate(-50%, -88%) rotate(15deg);
}

.hero-temple-vertical {
  display: flex;
  width: min(86%, 245px);
  min-height: 0;
  margin-top: clamp(1.75rem, 5vh, 3.75rem);
  padding-bottom: clamp(2rem, 6vh, 5rem);
  flex: 1 1 auto;
  align-items: flex-start;
  justify-content: center;
  flex-direction: row-reverse;
  gap: clamp(0.5rem, 1.35vw, 1.4rem);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

.hero-temple-vertical > * {
  display: block;
  white-space: nowrap;
  letter-spacing: 0.12em;
  line-height: 1;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.hero-sect {
  order: 1;
  padding-top: clamp(0.15rem, 2vh, 1.25rem);
  font-size: clamp(0.68rem, 1.25vw, 1.18rem);
}

.hero-year {
  order: 2;
  padding-top: clamp(1.1rem, 7vh, 5rem);
  font-size: clamp(0.72rem, 1.35vw, 1.3rem);
  letter-spacing: 0.18em;
}

.hero-mountain {
  order: 3;
  padding-top: clamp(1.4rem, 9vh, 6.5rem);
  font-size: clamp(1rem, 2.65vw, 2.6rem);
  letter-spacing: 0.14em;
}

.hero-name {
  order: 4;
  font-size: clamp(1.65rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: 0.16em;
}

.hero .hero-visual {
  inset: 0 !important;
  margin-left: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
}

.hero .hero-visual img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  z-index: 5;
  width: min(72vw, 880px);
  height: min(48vw, 520px);
  pointer-events: none;
  background:
    radial-gradient(ellipse at 78% 72%, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.3) 45%, transparent 72%),
    linear-gradient(135deg, transparent 18%, rgba(3, 5, 13, 0.54) 100%);
}

.hero-brush-signature {
  position: absolute;
  right: clamp(2rem, 7vw, 7.5rem);
  bottom: clamp(7rem, 15vw, 13.5rem);
  z-index: 7;
  width: min(45vw, 590px);
  min-width: 330px;
  pointer-events: none;
  animation: brushWrite 1.62s cubic-bezier(0.2, 0.85, 0.16, 1) both;
  will-change: opacity, transform, filter, clip-path;
}

.hero-brush-title {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: clamp(0.7rem, 1.5vw, 1.35rem);
}

.hero-brush-prefix {
  flex: 0 0 auto;
  padding-bottom: clamp(0.24rem, 0.7vw, 0.6rem);
  color: #fff !important;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(1.55rem, 3.2vw, 2.7rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.78);
}

.hero-brush-stroke {
  position: absolute;
  left: 22%;
  top: 50%;
  width: 82%;
  opacity: 0.3;
  transform: translateY(-44%) rotate(-3deg);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

.hero-brush-word {
  position: relative;
  display: block;
  width: min(31vw, 410px);
  min-width: 225px;
  filter:
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.82))
    drop-shadow(0 10px 24px rgba(0, 0, 0, 0.52));
}

.hero-temple-meta {
  position: absolute;
  right: clamp(2.4rem, 7.4vw, 8rem);
  bottom: clamp(13.2rem, 23vw, 20.2rem);
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 0.82rem;
  flex-wrap: wrap;
  max-width: min(36vw, 470px);
  color: #fffaf0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(0.7rem, 0.92vw, 0.88rem);
  letter-spacing: 0.16em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: translateX(18px);
  animation: brushMeta 1s ease 0.55s both;
}

.hero-temple-meta span {
  color: #fffaf0 !important;
}

.hero-temple-meta span + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin-right: 0.82rem;
  vertical-align: -0.08em;
  background: rgba(197, 164, 92, 0.72);
}

@keyframes brushWrite {
  0% {
    opacity: 0;
    transform: translateX(42px);
    filter: blur(8px);
    clip-path: inset(0 100% 0 0);
  }
  58% {
    opacity: 1;
    filter: blur(1.5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes brushMeta {
  from {
    opacity: 0;
    transform: translateX(18px);
    filter: blur(3px);
  }
  to {
    opacity: 0.9;
    transform: translateX(0);
    filter: blur(0);
  }
}

.hero .hero-copy {
  left: auto;
  justify-self: end;
  width: min(760px, calc(80% - clamp(2rem, 8vw, 8rem)));
  margin-right: clamp(1rem, 4vw, 4rem);
  margin-left: 20%;
}

.hero > .hero-copy {
  display: none !important;
}

.hero-calligraphy {
  display: none;
  flex-direction: column;
  gap: 0.35em;
  margin-bottom: 0.85em;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.hero-calligraphy .hero-founded {
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.2em;
}

.hero-calligraphy strong {
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

.hero-introduction {
  max-width: 48rem;
  line-height: 2;
}

#keidai-gallery .section-heading {
  margin-bottom: clamp(1.8rem, 4vw, 3.5rem);
}

.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: url("/ganrakuji-real-medaka.jpg") center 45% / cover no-repeat !important;
}

.site-footer::before {
  content: none !important;
  display: none !important;
}

.site-footer,
.site-footer a,
.site-footer p,
.site-footer span,
.site-footer .footer-name {
  color: #fff !important;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.95),
    0 2px 10px rgba(0, 0, 0, 0.82);
}

.site-footer {
  padding: clamp(4rem, 9vw, 7rem) clamp(2rem, 8vw, 7rem) !important;
}

.site-footer > * {
  max-width: 1120px;
  margin-inline: auto;
}

.global-home-return {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 150;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.15rem;
  border: 1px solid rgba(197, 164, 92, 0.72);
  background: rgba(16, 20, 38, 0.92);
  color: #fff;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.global-home-return::before {
  content: "←";
  margin-right: 0.55rem;
}

.global-home-return:hover,
.global-home-return:focus-visible {
  transform: translateY(-2px);
  background: rgba(32, 38, 65, 0.98);
}

.contact-actions .button.primary,
.contact-actions .button.secondary,
.contact-section .button.primary,
.contact-section .button.secondary {
  border-color: var(--revision-gold-dark) !important;
  background: linear-gradient(135deg, #d0b16a, var(--revision-gold)) !important;
  color: #111522 !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.about-history-page .detail-page {
  max-width: 880px;
  margin-inline: auto;
}

.about-history-page .detail-page-hero {
  min-height: auto;
  padding-bottom: 1rem;
}

.about-history-page .detail-page-hero .detail-main-image,
.about-history-page .detail-contact-panel,
.about-history-page .detail-facts {
  display: none !important;
}

.about-history-page .detail-sections {
  display: block;
}

.about-history-page .detail-sections > * {
  margin: 0 0 1.6rem !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.about-history-page .detail-sections p {
  line-height: 2.15;
}

.butsuji-revised .detail-page-hero {
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.butsuji-revised .detail-main-image {
  margin-bottom: 0;
}

.detail-consultation-panel {
  margin-top: clamp(2.5rem, 6vw, 5rem) !important;
  padding: clamp(1.5rem, 4vw, 3rem) !important;
  border: 1px solid rgba(197, 164, 92, 0.55) !important;
  text-align: center;
}

.detail-consultation-panel > p {
  margin: 0 0 1.5rem;
  color: #fff !important;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
}

.detail-consultation-actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-consultation-actions > * {
  min-width: min(100%, 270px);
}

.detail-consultation-phone {
  display: inline-flex;
  min-height: 54px;
  padding: 0.65rem 1.25rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--revision-gold-dark);
  background: linear-gradient(135deg, #d0b16a, var(--revision-gold));
  color: #111522 !important;
  text-decoration: none;
}

.detail-consultation-phone span,
.detail-consultation-phone strong {
  color: #111522 !important;
}

.detail-consultation-phone span {
  font-size: 0.75rem;
}

.detail-consultation-phone strong {
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.detail-sections > section::after,
.detail-sections section::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 700px) {
  .hero {
    min-height: clamp(455px, 66vh, 590px) !important;
  }

  body:has(.hero) #news.gan-news-section {
    padding-top: 12px !important;
  }

  body:has(.hero) #news::after {
    opacity: 0.08 !important;
    background-position: left -320px bottom -120px !important;
  }

  .hero .hero-visual {
    height: 100% !important;
    min-height: 100% !important;
  }

  .hero .hero-visual {
    inset: 0 !important;
    margin-left: 0;
    width: 100% !important;
  }

  .hero::after {
    width: 100%;
    height: 48%;
  }

  .hero-brush-signature {
    right: 1.15rem;
    bottom: clamp(5.6rem, 23vw, 7.7rem);
    width: min(82vw, 370px);
    min-width: 245px;
  }

  .hero-brush-title {
    gap: 0.58rem;
  }

  .hero-brush-prefix {
    padding-bottom: 0.22rem;
    font-size: clamp(1.05rem, 5.2vw, 1.48rem);
    letter-spacing: 0.07em;
  }

  .hero-brush-word {
    width: min(55vw, 245px);
    min-width: 150px;
  }

  .hero-brush-stroke {
    left: 24%;
    width: 79%;
  }

  .hero-temple-meta {
    right: 1.25rem;
    bottom: clamp(10.4rem, 39vw, 12.8rem);
    max-width: min(78vw, 330px);
    justify-content: flex-end;
    gap: 0.42rem 0.62rem;
    font-size: clamp(0.64rem, 2.8vw, 0.78rem);
    letter-spacing: 0.11em;
    text-align: right;
  }

  .hero-temple-meta span {
    flex: 0 0 auto;
  }

  .hero-temple-meta span + span::before {
    height: 0.78em;
    margin-right: 0.62rem;
  }

  .hero .hero-copy {
    left: auto;
    right: auto;
    width: calc(80% - 1.5rem);
    margin-right: 0.75rem;
    margin-left: 20%;
  }

  .hero-calligraphy strong {
    font-size: clamp(2.15rem, 11vw, 3.4rem);
    white-space: nowrap;
    letter-spacing: 0.03em;
  }

  .hero-calligraphy .hero-founded {
    font-size: 0.85rem;
  }

  .hero-introduction {
    line-height: 1.85;
  }

  .global-home-return {
    right: 0.75rem;
    bottom: 0.75rem;
    min-height: 42px;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
  }

  .detail-consultation-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-consultation-actions > * {
    width: 100%;
    min-width: 0;
  }

  .site-footer {
    padding: 3.25rem 1.4rem 4.5rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .hero-copy {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-brush-signature {
    animation: none !important;
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: none;
  }

  .hero-temple-meta {
    animation: none !important;
    opacity: 0.9;
    transform: none;
    filter: none;
  }
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body,
  .site-shell,
  .site-header,
  .hero,
  .hero-temple-band,
  .menu-panel,
  .feature-card,
  .detail-page-hero,
  .detail-sections section,
  .detail-contact-panel,
  .site-footer {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* Hero brush layout takes precedence over the previous vertical band. */
.hero .hero-temple-band,
.hero-temple-band {
  display: none !important;
  width: 0 !important;
}

.hero .hero-visual {
  inset: 0 !important;
  width: 100% !important;
  margin-left: 0 !important;
}
