/* =========================================================
   La forme de Da Vinci — EXHIBITIONS list
   Snow Monkey child theme / lfdv-exhibitions
   Ported from the approved design canvas (ExhibitionList / -SP).
   Tokens and the hover-underline mechanic match lfdv-news.css.
   ========================================================= */

.lfdv-exh {
	--ink: #1b1b1b;
	--sub: #666462;
	--accent: #91732d;
	--rule: rgba(145, 115, 45, .22);
	--ph-a: #ece8e1;
	--ph-b: #dcd5ca;
	--display: "Cormorant Garamond", "Times New Roman", serif;
	--jp: "Shippori Mincho", serif;
	--ease: cubic-bezier(.4, .4, 0, 1);

	box-sizing: border-box;
	/* top padding comes from the shared main.lfdv-page rule (lfdv-common.css) */
	padding: 0 clamp(32px, 6vw, 96px) 160px;
	min-width: 0;
	color: var(--ink);
	font-family: var(--jp);
	overflow-x: clip;
}
.lfdv-exh * { box-sizing: border-box; }
.lfdv-exh a { color: inherit; text-decoration: none; }
.lfdv-exh ul { list-style: none; margin: 0; padding: 0; }
.lfdv-exh .xcol { max-width: 1040px; margin-inline: auto; padding-top: 0; }

@media (prefers-reduced-motion: reduce) {
	.lfdv-exh *, .lfdv-exh *::after { transition: none !important; animation: none !important; }
}

/* ---- page heading: shared .lfdv-pagehead (lfdv-common.css); only the spacing below differs ---- */
.lfdv-exh .lfdv-pagehead { margin-bottom: clamp(32px, 3.2vw, 46px); }

/* ---- sections ---- */
.lfdv-exh .sec + .sec { margin-top: clamp(192px, 16vw, 224px); }
.lfdv-exh .sh {
	display: flex;
	align-items: baseline;
	gap: 26px;
	margin-bottom: 0;
	padding: 0 10px 25px;
	border-bottom: 1px solid var(--rule);
}
.lfdv-exh .sh h2 {
	margin: 0;
	font-family: var(--display);
	font-weight: 500;
	font-size: 30px;
	letter-spacing: .11em;
	line-height: 1;
}
.lfdv-exh .sh p { margin: 0; font-size: 16px; letter-spacing: .15em; color: var(--sub); }
/* COMING SOON: no rule under the heading */
.lfdv-exh .sec[aria-labelledby="sec-upcoming"] .sh { border-bottom: 0; padding-bottom: 0; } /* heading -> pictures = the .cs margin-top below (40px) */
/* NOW SHOWING / NEXT SHOW: no rule, bronze heading */
.lfdv-exh .sh--nl { border-bottom: 0; padding-bottom: 0; }
.lfdv-exh .sh--nl p { font-size: 16px; }
.lfdv-exh .sh--ft { margin-bottom: 37px; }
.lfdv-exh .sh--ft h2 { color: var(--accent); }

/* NOW SHOWING: gold band (70%) sweeps left -> right over the title, like the hover underline.
   The band layer carries its own white copy of the text, clipped with the band, so the
   letters turn white only while the band is over them and go back to gold after it leaves.
   Cycle 4.5s: ~2.5s moving, ~2s resting. */
.lfdv-exh .sh h2.is-now { position: relative; display: inline-block; padding: 5px calc(14px - .11em) 5px 14px; margin-left: -14px; }
/* the right padding is reduced by the letter-spacing, which trails after the last letter, so left and right look equal */
.lfdv-exh .sh h2.is-now .fx {
	position: absolute;
	inset: 0;
	padding: 5px calc(14px - .11em) 5px 14px;
	background: rgba(145, 115, 45, .7);
	color: #fff;
	clip-path: inset(0 100% 0 0);
	animation: lfdv-exh-sweep 4.5s infinite;
	pointer-events: none;
}
@keyframes lfdv-exh-sweep {
	0%   { clip-path: inset(0 100% 0 0); animation-timing-function: cubic-bezier(.4, .4, 0, 1); }
	28%  { clip-path: inset(0 0 0 0);    animation-timing-function: cubic-bezier(.4, .4, 0, 1); }
	56%  { clip-path: inset(0 0 0 100%); }
	100% { clip-path: inset(0 0 0 100%); }
}
@media (prefers-reduced-motion: reduce) {
	.lfdv-exh .sh h2.is-now .fx { display: none; }
}

/* ---- image (flyer shown whole, never cropped) ---- */
.lfdv-exh .img {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 210 / 297;
	background: linear-gradient(135deg, var(--ph-a), var(--ph-b));
}
.lfdv-exh .img .kvimg {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 1s var(--ease);
}
.lfdv-exh a:hover .img .kvimg,
.lfdv-exh a:focus-visible .img .kvimg { transform: scale(1.03); }
/* main visual (NOW SHOWING / NEXT SHOW): fitted to the height of the frame, the sides may be cut */
.lfdv-exh .feat .img .kvimg { object-fit: cover; object-position: center; }

/* ---- hover underline on text ---- */
.lfdv-exh .ul {
	padding-bottom: 6.5px;
	background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	transition: background-size .4s var(--ease);
}
/* hover only on devices that really hover (on a phone, :hover would stay on after a tap); a phone shows it only while pressed */
@media (hover: hover) {
	.lfdv-exh a:hover .ul { background-position: 0 100%; background-size: 100% 1px; }
}
.lfdv-exh a:focus-visible .ul { background-position: 0 100%; background-size: 100% 1px; }
@media (hover: none) {
	.lfdv-exh a:active .ul { background-position: 0 100%; background-size: 100% 1px; }
}

.lfdv-exh .per {
	font-family: var(--display);
	font-size: 20px;
	font-weight: 500;
	letter-spacing: .06em;
	font-variant-numeric: lining-nums tabular-nums;
}
.lfdv-exh .tj {
	display: block;
	font-weight: 500;
	letter-spacing: .06em;
	line-height: 1.7;
	text-wrap: balance;
}
.lfdv-exh .aj { letter-spacing: .06em; line-height: 1.8; }
.lfdv-exh .arr--pg { width: 34px; height: 7px; flex: 0 0 auto; }

/* ---- NOW SHOWING / NEXT SHOW ---- */
.lfdv-exh .feat {
	display: grid;
	grid-template-columns: minmax(0, 450px) minmax(0, 1fr);
	column-gap: 64px;
	align-items: center;
}
.lfdv-exh .feat .tx { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
/* NOW SHOWING / NEXT SHOW title sits at the top of the text column, above the date */
.lfdv-exh .feat .sh { padding: 0; margin-bottom: 20px; }
.lfdv-exh .feat .xm { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; }
.lfdv-exh .feat .per { font-size: 23px; }
.lfdv-exh .feat .tj { font-size: 30px; margin-top: -5px; }
.lfdv-exh .feat .by { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.lfdv-exh .feat .by .lb { font-size: 13px; letter-spacing: .1em; color: var(--sub); }
.lfdv-exh .feat .aj { font-size: 15px; margin-top: 5px; }
.lfdv-exh .feat .ex {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	max-width: 34em;
	margin-top: 32px;
	font-size: 15px;
	line-height: 2.05;
	letter-spacing: .05em;
}
.lfdv-exh .feat .go2 {
	align-self: flex-end; /* right-aligned */
	display: inline-flex;
	align-items: center;
	gap: 18px;
	min-height: 44px;
	margin-top: 28px;
	font-size: 14px;
	letter-spacing: .1em;
}
.lfdv-exh .go { display: flex; align-items: center; transition: transform .4s var(--ease); }
/* NOW SHOWING / NEXT SHOW: image, title and "詳細はこちら" are three separate links,
   each reacting on its own; the image has no hover effect. */
.lfdv-exh .feat .go2:hover .go,
.lfdv-exh .feat .go2:focus-visible .go { transform: translateX(6px); }
.lfdv-exh .feat .tj { display: block; }
.lfdv-exh .feat .tj .ul { display: inline; }
/* PC: hover line closer to the text (feat title + archive rows; the carousel cards set their own 0) */
@media (min-width: 901px) { .lfdv-exh .tj .ul { padding-bottom: 2px; } }

/* ---- rows (COMING SOON / ARCHIVE) ---- */
.lfdv-exh .list { border-top: 0; }
.lfdv-exh .prow {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr) auto;
	column-gap: 40px;
	row-gap: 10px;
	align-items: center;
	padding: 20px 10px 20px 20px;
	border-bottom: 1px solid var(--rule);
}
.lfdv-exh .prow .img { grid-column: 1; grid-row: 1 / span 2; width: 112px; }
.lfdv-exh .prow .per { grid-column: 2; grid-row: 1; align-self: end; }
.lfdv-exh .prow > span:not(.img):not(.go) { grid-column: 2; grid-row: 2; align-self: start; }
.lfdv-exh .prow .go { grid-column: 3; grid-row: 1 / span 2; }
.lfdv-exh .prow .tj { font-size: 16px; font-weight: 400; line-height: 1.75; }
.lfdv-exh .prow:hover .go,
.lfdv-exh .prow:focus-visible .go { transform: translateX(6px); }

/* ARCHIVE: text only — date | title | arrow */
.lfdv-exh .prow--txt {
	grid-template-columns: 220px minmax(0, 1fr) auto;
	column-gap: 32px;
	padding: 28px 30px 28px 20px;
}
.lfdv-exh .prow--txt .per { grid-column: 1; grid-row: 1; align-self: center; }
.lfdv-exh .prow--txt > span:not(.img):not(.go) { grid-column: 2; grid-row: 1; align-self: center; }
.lfdv-exh .prow--txt .go { grid-column: 3; grid-row: 1; }

/* ---- COMING SOON carousel ----
   4 cards visible on PC, moved one card at a time with the < > buttons. On phones the
   buttons are hidden: swipe, with 2 cards + a peek of the third. */
.lfdv-exh .cs { position: relative; margin-top: 30px; padding: 0; --gap: 8px; --n: 4; --rise: 200px; }
.lfdv-exh .cs__view {
	overflow-x: auto;
	overflow-y: hidden;
	/* room below the cards so the rise-in (translateY) never makes the strip scroll vertically */
	padding-bottom: var(--rise);
	margin-bottom: calc(var(--rise) * -1);
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.lfdv-exh .cs__view::-webkit-scrollbar { display: none; }
.lfdv-exh .cs__track { display: flex; gap: var(--gap); }
.lfdv-exh .card { flex: 0 0 calc((100% - (var(--n) - 1) * var(--gap)) / var(--n)); scroll-snap-align: start; min-width: 0; }
.lfdv-exh .card a { display: block; }
.lfdv-exh .card .per { display: block; margin-top: 16px; font-size: 17px; color: var(--accent); }
.lfdv-exh .card .tj {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin-top: -3px;
	font-size: 19px;
	font-weight: 500;
}
/* the clamp box clips anything below the text, so the hover line sits right at the text bottom */
.lfdv-exh .card .tj .ul { padding-bottom: 0; }
.lfdv-exh .cs__btn {
	position: absolute;
	top: 150px; /* set to half the image height by the script */
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 56px;
	margin: -28px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--accent);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: opacity .3s var(--ease);
}
.lfdv-exh .cs__btn--prev { left: -48px; }
.lfdv-exh .cs__btn--next { right: -48px; } /* the < > sit outside the row of cards, in the page margin */
.lfdv-exh .cs__btn:hover { opacity: .65; }
.lfdv-exh .cs__btn:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
.lfdv-exh .cs__btn:disabled { opacity: .3; cursor: default; pointer-events: none; }
/* 4 cards or fewer: nothing to move, no buttons */
.lfdv-exh .cs:not(.has-nav) { padding: 0; }
.lfdv-exh .cs:not(.has-nav) .cs__btn { display: none; }
@media (prefers-reduced-motion: reduce) {
	.lfdv-exh .cs__view { scroll-behavior: auto; }
}
@media (max-width: 900px) {
	.lfdv-exh .cs, .lfdv-exh .cs:not(.has-nav) { padding: 0; margin-top: 20px; --gap: 12px; --n: 3.3; --rise: 120px; }
	.lfdv-exh .cs__btn { display: none !important; }
	.lfdv-exh .card .per { font-size: 15px; margin-top: 12px; }
	.lfdv-exh .card .tj { font-size: 15px; margin-top: 2px; }
	/* the title is clipped to 2 lines (overflow hidden): the underline must stay inside the line box, or the 2nd line's underline is cut off */
	.lfdv-exh .card .tj .ul { padding-bottom: 0; }
}
@media (max-width: 480px) {
	.lfdv-exh .cs, .lfdv-exh .cs:not(.has-nav) { --gap: 8px; --n: 2.3; --rise: 120px; }
}

/* ---- fold for "and more": rows stay in the page, height eases open and shut ---- */
.lfdv-exh .xp {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .9s cubic-bezier(.25, .46, .45, .94);
}
.lfdv-exh .xp.open { grid-template-rows: 1fr; }
.lfdv-exh .xp > .list {
	min-height: 0;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transition: opacity .5s cubic-bezier(.25, .46, .45, .94), visibility 0s linear .9s;
}
.lfdv-exh .xp.open > .list {
	opacity: 1;
	visibility: visible;
	transition: opacity .7s cubic-bezier(.25, .46, .45, .94) .25s, visibility 0s;
}

/* ---- "and more" / "close" button ---- */
.lfdv-exh .more { display: flex; justify-content: center; margin-top: 48px; }
.lfdv-exh .mbtn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 0 4px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font-family: var(--display);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: .12em;
	-webkit-tap-highlight-color: transparent;
}
.lfdv-exh .mbtn:hover .ul,
.lfdv-exh .mbtn:focus-visible .ul { background-position: 0 100%; background-size: 100% 1px; }
.lfdv-exh .mbtn:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
/* "詳細はこちら" / "and more": underline about 2px from the text; the box size is unchanged */
.lfdv-exh .go2 .ul, .lfdv-exh .mbtn .ul { background-position: 100% calc(100% - 4.5px); }
.lfdv-exh .go2:focus-visible .ul, .lfdv-exh .mbtn:hover .ul, .lfdv-exh .mbtn:focus-visible .ul { background-position: 0 calc(100% - 4.5px); }
@media (hover: hover) { .lfdv-exh .go2:hover .ul { background-position: 0 calc(100% - 4.5px); } }
@media (hover: none) { .lfdv-exh .go2:active .ul { background-position: 0 calc(100% - 4.5px); } }
.lfdv-exh .mbtn .go { justify-content: center; width: 12px; height: 24px; }
.lfdv-exh .mbtn .arr--sm { width: 23px; height: 7px; flex: 0 0 auto; transform: rotate(90deg); }
.lfdv-exh .mbtn[aria-expanded="true"] .arr--sm { transform: rotate(-90deg); }
.lfdv-exh .mbtn:hover .go { transform: translateY(3px); }
.lfdv-exh .mbtn[aria-expanded="true"]:hover .go { transform: translateY(-3px); }
.lfdv-exh .mbtn[hidden], .lfdv-exh .more[hidden] { display: none; }
.lfdv-exh .mbtn.is-busy { opacity: .5; pointer-events: none; }

.lfdv-exh .empty { margin: 0; padding: 40px 10px; color: var(--sub); font-size: 15px; letter-spacing: .08em; }


/* ---- scroll reveal (only when JS runs and motion is allowed: html.lfdv-js) ----
   COMING SOON: the visible cards rise from far below, left to right, one after another.
   ARCHIVE: the whole section rises once, as a block. NOW SHOWING has no reveal. */
.lfdv-js .lfdv-exh .rv-card {
	opacity: 0;
	transform: translate3d(0, 200px, 0);
	transition: opacity 1.7s cubic-bezier(.25, .46, .45, .94), transform 1.9s cubic-bezier(.25, .46, .45, .94);
	transition-delay: calc(var(--i, 0) * 300ms);
}
/* the cards stay on their own layer for good (4 cards, cheap), so nothing is re-drawn at the start or the end of the motion */
.lfdv-js .lfdv-exh .rv-card { will-change: transform, opacity; backface-visibility: hidden; }
.lfdv-js .lfdv-exh .rv-card.in { opacity: 1; transform: translate3d(0, 0, 0); }
.lfdv-js .lfdv-exh .rv-whole {
	opacity: 0;
	transform: translateY(64px);
	transition: opacity 1.4s cubic-bezier(.25, .46, .45, .94), transform 1.5s cubic-bezier(.25, .46, .45, .94);
}
.lfdv-js .lfdv-exh .rv-whole.in { opacity: 1; transform: none; }
@media (max-width: 900px) {
	.lfdv-js .lfdv-exh .rv-card { transform: translate3d(0, 120px, 0); }
}
@media (prefers-reduced-motion: reduce) {
	.lfdv-js .lfdv-exh .rv-card, .lfdv-js .lfdv-exh .rv-whole { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Phone / tablet
   ========================================================= */
@media (max-width: 900px) {
	.lfdv-exh { padding: 0 clamp(24px, 2.4vw, 34px) 96px; }
	.lfdv-exh .lfdv-pagehead { margin-bottom: 15px; }
	.lfdv-exh .sec + .sec { margin-top: 128px; }
	.lfdv-exh .sec[aria-labelledby="sec-upcoming"] { margin-top: 88px; }
	.lfdv-exh .sec[aria-labelledby="sec-past"] { margin-top: 96px; }
	.lfdv-exh .sh { gap: 16px; padding-bottom: 20px; }
	.lfdv-exh .sec[aria-labelledby="sec-upcoming"] .sh,
	.lfdv-exh .sec[aria-labelledby="sec-past"] .sh { padding-inline: 0; } /* COMING SOON / ARCHIVE: no 10px side padding */
	.lfdv-exh .sh h2 { font-size: 28px; }
	html:not([lang^="en"]) .lfdv-exh .sh h2 { font-size: 28px; letter-spacing: .11em; }
	.lfdv-exh .sh h2.is-now,
	.lfdv-exh .sh h2.is-now .fx { padding: 4px calc(10px - .11em) 4px 10px; }
	.lfdv-exh .sh h2.is-now { margin-left: -10px; }
	.lfdv-exh .sh p { font-size: 13px; }
	.lfdv-exh .sh--nl { padding-bottom: 0; }
	.lfdv-exh .sh--nl p { font-size: 12px; }
	.lfdv-exh .sh--ft { margin-bottom: 23px; }

	.lfdv-exh .feat { grid-template-columns: minmax(0, 1fr); row-gap: 28px; justify-items: center; }
	.lfdv-exh .feat .img { width: min(80%, 340px); }
	/* phone: the picture stays centred; the title, date, exhibition name and artists under it are left-aligned */
	.lfdv-exh .feat .tx { justify-self: stretch; align-items: flex-start; text-align: left; }
	.lfdv-exh .feat .xm { justify-content: flex-start; }
	.lfdv-exh .feat .sh { justify-content: flex-start; margin-bottom: 12px; }
	html .lfdv-exh .feat .sh h2 { font-size: 20px; }
	.lfdv-exh .per { font-size: 17px; }
	.lfdv-exh .feat .per { font-size: 18px; }
	.lfdv-exh .feat .tj { font-size: 23px; line-height: 1.5; margin-top: 0; }
	.lfdv-exh .feat .by { justify-content: flex-start; }
	.lfdv-exh .feat .aj { font-size: 14px; margin-top: 0; }
	/* phone: hover/press line closer to the text (feat title + archive rows) */
	.lfdv-exh .feat .tj .ul, .lfdv-exh .prow .tj .ul { padding-bottom: 2px; }
	.lfdv-exh .feat .ex { -webkit-line-clamp: 4; margin-top: 20px; font-size: 16px; line-height: 1.95; text-align: left; }
	.lfdv-exh .feat .go2 { margin-top: 16px; font-size: 16px; }

	.lfdv-exh .prow {
		grid-template-columns: 96px minmax(0, 1fr) auto;
		column-gap: 16px;
		row-gap: 6px;
		align-items: start;
		padding: 20px 6px 20px 10px;
	}
	.lfdv-exh .prow .img { width: 96px; }
	.lfdv-exh .prow .per { align-self: start; }
	.lfdv-exh .prow .tj { font-size: 15px; }
	.lfdv-exh .prow .arr--pg { width: 24px; }
	.lfdv-exh .prow .go { align-self: center; }

	.lfdv-exh .prow--txt { grid-template-columns: minmax(0, 1fr) auto; padding: 16px 10px 16px 15px; row-gap: 0; } /* same as the NEWS list rows */
	.lfdv-exh .prow--txt .tj { font-size: 16px; line-height: 1.5; }
	.lfdv-exh .prow--txt .per { font-size: 16px; }
	.lfdv-exh .prow--txt .per { grid-column: 1; grid-row: 1; align-self: start; }
	.lfdv-exh .prow--txt > span:not(.img):not(.go) { grid-column: 1; grid-row: 2; align-self: start; }
	.lfdv-exh .prow--txt .go { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

@media (max-width: 480px) {
	.lfdv-exh .prow .go { display: none; }
	.lfdv-exh .prow { grid-template-columns: 96px minmax(0, 1fr); }
	.lfdv-exh .prow--txt { grid-template-columns: minmax(0, 1fr); }
	.lfdv-exh .prow--txt > span:not(.img):not(.go),
	.lfdv-exh .prow--txt .per { grid-column: 1; }
}
