/* =========================================================
   v14: フォトギャラリー（マーキー + ライトボックス）
   ========================================================= */

.hp-photo-strip { display: none !important; }

.hp-gallery {
	position: relative;
	padding: clamp(90px, 9vw, 130px) 0 clamp(80px, 8vw, 110px);
	background: #100c0a;
	color: #fff;
	overflow: hidden;
	border-top: 1px solid rgba(122, 90, 55, .22);
	border-bottom: 1px solid rgba(122, 90, 55, .22);
}

.hp-gallery::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 20% 15%, rgba(180, 0, 0, .14), transparent 38%),
		radial-gradient(circle at 80% 85%, rgba(180, 0, 0, .1), transparent 42%);
	pointer-events: none;
}

.hp-gallery__head {
	position: relative;
	z-index: 2;
	width: min(1180px, calc(100% - 88px));
	margin: 0 auto 56px;
	text-align: center;
}

.hp-gallery__head .hp-story-kicker {
	display: inline-block;
	margin: 0 0 22px;
	padding-left: 0;
	color: var(--hp-red-line);
}

.hp-gallery__head .hp-story-kicker::before {
	display: none;
}

.hp-gallery__head h2 {
	margin: 0 0 18px;
	font-family: var(--hp-serif);
	font-size: clamp(28px, 3.2vw, 42px);
	font-weight: 500;
	line-height: 1.55;
	letter-spacing: .06em;
	color: #fff;
}

.hp-gallery__lead {
	margin: 0 auto;
	max-width: 560px;
	color: rgba(255, 255, 255, .68);
	font-size: 13.5px;
	line-height: 2;
	letter-spacing: .04em;
}

.hp-gallery__marquee {
	position: relative;
	z-index: 1;
	padding: 14px 0;
	overflow: hidden;
	perspective: 1200px;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.hp-gallery__marquee + .hp-gallery__marquee {
	margin-top: 22px;
}

.hp-gallery__track {
	display: flex;
	gap: 22px;
	width: max-content;
	will-change: transform;
	animation: hp-marquee-right 60s linear infinite;
}

.hp-gallery__marquee--left .hp-gallery__track {
	animation: hp-marquee-left 60s linear infinite;
}

@keyframes hp-marquee-right {
	0%   { transform: translate3d(0, 0, 0); }
	100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes hp-marquee-left {
	0%   { transform: translate3d(-50%, 0, 0); }
	100% { transform: translate3d(0, 0, 0); }
}

.hp-gallery__marquee:hover .hp-gallery__track {
	animation-play-state: paused;
}

.hp-gallery__item {
	position: relative;
	flex: 0 0 auto;
	width: 260px;
	height: 200px;
	margin: 0;
	padding: 0;
	border: 0;
	background: #1a1310;
	cursor: pointer;
	overflow: hidden;
	transform-style: preserve-3d;
	transition: transform .55s cubic-bezier(.22, 1, .25, 1);
}

.hp-gallery__item--wide   { width: 360px; height: 220px; }
.hp-gallery__item--tall   { width: 200px; height: 260px; }
.hp-gallery__item--square { width: 240px; height: 240px; }

.hp-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1.02);
	transition: transform .55s cubic-bezier(.22, 1, .25, 1), filter .35s ease;
	filter: saturate(.92) brightness(.85);
}

.hp-gallery__item:hover {
	transform: translateY(-6px) rotateX(2deg);
	z-index: 5;
}

.hp-gallery__item:hover img {
	transform: scale(1.08);
	filter: saturate(1.08) brightness(1);
}

.hp-gallery__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 22px 18px 18px;
	background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .88));
	color: #fff;
	transform: translateY(34px);
	opacity: 0;
	transition: transform .42s cubic-bezier(.22, 1, .25, 1), opacity .42s ease;
	pointer-events: none;
}

.hp-gallery__item:hover .hp-gallery__caption {
	transform: translateY(0);
	opacity: 1;
}

.hp-gallery__num {
	display: block;
	margin-bottom: 4px;
	color: var(--hp-red-line);
	font-family: var(--hp-roman);
	font-size: 10px;
	font-style: normal;
	letter-spacing: .22em;
}

.hp-gallery__title {
	display: block;
	margin-bottom: 4px;
	font-family: var(--hp-serif);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: .06em;
	line-height: 1.4;
}

.hp-gallery__desc {
	display: block;
	color: rgba(255, 255, 255, .76);
	font-size: 11px;
	font-weight: 400;
	letter-spacing: .04em;
	line-height: 1.7;
}

.hp-gallery__corners {
	position: absolute;
	inset: 6px;
	z-index: 3;
	pointer-events: none;
}

.hp-gallery__corners span {
	position: absolute;
	width: 14px;
	height: 14px;
	opacity: 0;
	transition: opacity .3s ease;
}

.hp-gallery__corners span:nth-child(1) { top: 0; left: 0; }
.hp-gallery__corners span:nth-child(2) { top: 0; right: 0; }
.hp-gallery__corners span:nth-child(3) { bottom: 0; left: 0; }
.hp-gallery__corners span:nth-child(4) { bottom: 0; right: 0; }

.hp-gallery__corners span::before,
.hp-gallery__corners span::after {
	content: "";
	position: absolute;
	background: var(--hp-red-line);
	box-shadow: 0 0 4px var(--hp-red-glow);
}

.hp-gallery__corners span:nth-child(1)::before { top: 0; left: 0; width: 12px; height: 1px; }
.hp-gallery__corners span:nth-child(1)::after  { top: 0; left: 0; width: 1px; height: 12px; }
.hp-gallery__corners span:nth-child(2)::before { top: 0; right: 0; width: 12px; height: 1px; }
.hp-gallery__corners span:nth-child(2)::after  { top: 0; right: 0; width: 1px; height: 12px; }
.hp-gallery__corners span:nth-child(3)::before { bottom: 0; left: 0; width: 12px; height: 1px; }
.hp-gallery__corners span:nth-child(3)::after  { bottom: 0; left: 0; width: 1px; height: 12px; }
.hp-gallery__corners span:nth-child(4)::before { bottom: 0; right: 0; width: 12px; height: 1px; }
.hp-gallery__corners span:nth-child(4)::after  { bottom: 0; right: 0; width: 1px; height: 12px; }

.hp-gallery__item:hover .hp-gallery__corners span {
	opacity: 1;
}

.hp-gallery__item:hover .hp-gallery__corners span:nth-child(1) { animation: hp-gal-corner .45s cubic-bezier(.22, 1, .25, 1) forwards; }
.hp-gallery__item:hover .hp-gallery__corners span:nth-child(2) { animation: hp-gal-corner .45s cubic-bezier(.22, 1, .25, 1) .07s forwards; }
.hp-gallery__item:hover .hp-gallery__corners span:nth-child(3) { animation: hp-gal-corner .45s cubic-bezier(.22, 1, .25, 1) .14s forwards; }
.hp-gallery__item:hover .hp-gallery__corners span:nth-child(4) { animation: hp-gal-corner .45s cubic-bezier(.22, 1, .25, 1) .21s forwards; }

@keyframes hp-gal-corner {
	0%   { opacity: 0; transform: scale(.5); }
	60%  { opacity: 1; transform: scale(1.2); }
	100% { opacity: 1; transform: scale(1); }
}

.hp-gallery__foot {
	position: relative;
	z-index: 2;
	margin-top: 50px;
	text-align: center;
}

.hp-gallery__view-more {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 24px 60px;
	color: #fff;
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, .3);
	background: transparent;
	transition: border-color .3s ease, background .3s ease, transform .3s ease;
	overflow: hidden;
}

.hp-gallery__view-more::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(100deg, transparent, rgba(180, 0, 0, .22), transparent);
	transition: left .6s ease;
}

.hp-gallery__view-more:hover {
	border-color: var(--hp-red-line);
	background: rgba(180, 0, 0, .06);
	transform: translateY(-2px);
}

.hp-gallery__view-more:hover::before {
	left: 100%;
}

.hp-gallery__view-more-text {
	font-family: var(--hp-roman);
	font-size: 13px;
	letter-spacing: .26em;
	color: var(--hp-red-line);
}

.hp-gallery__view-more-jp {
	font-family: var(--hp-serif);
	font-size: 12px;
	letter-spacing: .14em;
	color: rgba(255, 255, 255, .82);
}

.hp-gallery__view-more i {
	display: inline-block;
	margin-top: 4px;
	font-style: normal;
	color: var(--hp-red-line);
	transition: transform .3s ease;
}

.hp-gallery__view-more:hover i {
	transform: translateX(8px);
}

/* ライトボックス */
.hp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	background: rgba(8, 6, 5, .94);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .35s ease, visibility .35s ease;
}

.hp-lightbox.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	/* Make controls focusable immediately; fade only the opacity on entry. */
	transition-property: opacity;
}

.hp-lightbox__close,
.hp-lightbox__nav {
	position: absolute;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	color: #fff;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 50%;
	font-size: 22px;
	font-family: var(--hp-roman);
	cursor: pointer;
	transition: background .25s ease, border-color .25s ease;
}

.hp-lightbox__close:hover,
.hp-lightbox__nav:hover {
	background: rgba(180, 0, 0, .2);
	border-color: var(--hp-red-line);
}

.hp-lightbox__close { top: 32px; right: 32px; }
.hp-lightbox__nav--prev { left: 32px; top: 50%; transform: translateY(-50%); font-size: 32px; }
.hp-lightbox__nav--next { right: 32px; top: 50%; transform: translateY(-50%); font-size: 32px; }

.hp-lightbox__inner {
	width: min(960px, 90vw);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	transform: scale(.92);
	transition: transform .42s cubic-bezier(.22, 1, .25, 1);
}

.hp-lightbox.is-open .hp-lightbox__inner {
	transform: scale(1);
}

.hp-lightbox__figure {
	position: relative;
	margin: 0;
	max-width: 100%;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.hp-lightbox__figure::before,
.hp-lightbox__figure::after {
	content: "";
	position: absolute;
	width: 24px;
	height: 24px;
	border: 1px solid var(--hp-red-line);
	box-shadow: 0 0 6px var(--hp-red-glow);
	pointer-events: none;
}

.hp-lightbox__figure::before {
	top: -6px;
	left: -6px;
	border-right: 0;
	border-bottom: 0;
}

.hp-lightbox__figure::after {
	bottom: -6px;
	right: -6px;
	border-left: 0;
	border-top: 0;
}

.hp-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 72vh;
	object-fit: contain;
	background: #000;
}

.hp-lightbox__caption {
	color: #fff;
	text-align: center;
	font-style: normal;
}

.hp-lightbox__num {
	display: block;
	margin-bottom: 8px;
	color: var(--hp-red-line);
	font-family: var(--hp-roman);
	font-size: 12px;
	font-style: normal;
	letter-spacing: .26em;
}

.hp-lightbox__title {
	display: block;
	margin-bottom: 6px;
	font-family: var(--hp-serif);
	font-size: 20px;
	font-weight: 500;
	letter-spacing: .1em;
}

.hp-lightbox__desc {
	display: block;
	color: rgba(255, 255, 255, .72);
	font-size: 13px;
	letter-spacing: .04em;
}

@media (max-width: 900px) {
	.hp-gallery {
		padding: 64px 0 56px;
	}

	.hp-gallery__head {
		width: calc(100% - 32px);
		margin-bottom: 36px;
	}

	.hp-gallery__item        { width: 200px; height: 160px; }
	.hp-gallery__item--wide  { width: 260px; height: 180px; }
	.hp-gallery__item--tall  { width: 160px; height: 210px; }
	.hp-gallery__item--square{ width: 190px; height: 190px; }

	.hp-gallery__track {
		animation-duration: 36s;
	}

	.hp-gallery__view-more {
		padding: 18px 38px;
	}

	.hp-lightbox__close,
	.hp-lightbox__nav {
		width: 44px;
		height: 44px;
	}

	.hp-lightbox__close { top: 16px; right: 16px; }
	.hp-lightbox__nav--prev { left: 12px; }
	.hp-lightbox__nav--next { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.hp-gallery__track {
		animation: none !important;
	}

	.hp-gallery__item,
	.hp-gallery__item img,
	.hp-gallery__caption,
	.hp-gallery__corners span,
	.hp-lightbox,
	.hp-lightbox__inner {
		transition: none !important;
		animation: none !important;
	}
}

/* =========================================================
   専用フォトギャラリーページ：グリッド表示
   （マーキー用の固定幅アイテムをグリッドに並べ直す）
   ========================================================= */
.hp-gallerypage__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	max-width: 1180px;
	margin: 0 auto;
}
.hp-gallerypage__grid .hp-gallery__item,
.hp-gallerypage__grid .hp-gallery__item--wide,
.hp-gallerypage__grid .hp-gallery__item--tall,
.hp-gallerypage__grid .hp-gallery__item--square {
	flex: none;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
}
@media (max-width: 600px) {
	.hp-gallerypage__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
}

/* =========================================================
   フォトギャラリーページ：イベント／カテゴリ別の見出し
   ========================================================= */
.hp-gallerycat { margin-bottom: 70px; }
.hp-gallerycat:last-of-type { margin-bottom: 0; }
.hp-gallerycat__head {
	max-width: 1180px;
	margin: 0 auto 28px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(122, 90, 55, .22);
}
.hp-gallerycat__en {
	font-family: var(--hp-roman, "Cormorant Garamond", serif);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .22em;
	color: var(--hp-red, #b41516);
	margin: 0 0 6px;
}
.hp-gallerycat__jp {
	font-family: var(--hp-serif, "Shippori Mincho", serif);
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 500;
	color: #2a1f1a;
	margin: 0 0 8px;
}
.hp-gallerycat__lead {
	font-size: 13.5px;
	line-height: 1.9;
	color: rgba(42, 31, 26, .7);
	margin: 0;
	max-width: 760px;
}

/* 固定左レール(96px)回避（age-story.css の同名コメント参照） */
@media (min-width: 901px) {
	.hp-gallery__head {
		width: min(1180px, calc(100% - 240px));
	}
}
