/* =========================================================
   La forme de Da Vinci — EXHIBITION detail
   Snow Monkey child theme / lfdv-exhibitions
   Ported from the approved design canvas (ExhibitionDetail / -SP).
   Tokens, hover underline and the SHARE / Prev-Next block match lfdv-news.css.
   ========================================================= */

.lfdv-exhd {
	--ink: #1b1b1b;
	--sub: #666462;
	--accent: #91732d;
	--rule: rgba(145, 115, 45, .22);
	--ph-a: #ece8e1;
	--ph-b: #dcd5ca;
	--hd: 72px; /* fixed header height */
	--gutter: clamp(24px, 2.4vw, 34px);
	--display: "Cormorant Garamond", "Times New Roman", serif;
	--jp: "Shippori Mincho", serif;
	--ease: cubic-bezier(.4, .4, 0, 1);

	box-sizing: border-box;
	min-width: 0;
	color: var(--ink);
	font-family: var(--jp);
	overflow-x: clip; /* the WORKS strip is full-bleed */
}
.lfdv-exhd * { box-sizing: border-box; }
.lfdv-exhd a { color: inherit; text-decoration: none; }
.lfdv-exhd ul { list-style: none; margin: 0; padding: 0; }
.lfdv-exhd p,
.lfdv-exhd h2,
.lfdv-exhd h3,
.lfdv-exhd dl,
.lfdv-exhd dd { margin: 0; padding: 0; }

/* The flyer sits right under the fixed header, so this page does not use the shared
   top spacing of main.lfdv-page. */
main.lfdv-page.lfdv-exhd { padding-top: var(--hd); padding-bottom: 0; }

/* ---- hover underline on text ---- */
.lfdv-exhd .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);
}
.lfdv-exhd a:hover .ul,
.lfdv-exhd a:focus-visible .ul { background-position: 0 100%; background-size: 100% 1px; }
.lfdv-exhd .arr--pg { width: 34px; height: 7px; flex: 0 0 auto; }
.lfdv-exhd .arr--sm { width: 23px; height: 7px; flex: 0 0 auto; }

/* =========================================================
   Two columns: flyer (sticky) | text (scrolls)
   The grid ends after ARTISTS, which is what releases the flyer.
   ========================================================= */
.lfdv-exhd .xd {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: start;
	/* on very wide screens the flyer + text block stays centred instead of stretching */
	max-width: 1440px;
	margin-inline: auto;
}
.lfdv-exhd.no-kv .xd { grid-template-columns: minmax(0, 1fr); }
.lfdv-exhd .kvside {
	position: sticky;
	top: var(--hd);
	height: min(calc(100vh - var(--hd)), 900px);
	display: flex;
	align-items: center;
	justify-content: flex-end; /* flyer sits toward the text column */
	padding: 24px clamp(16px, 2vw, 32px) 24px clamp(24px, 3vw, 48px);
	background: transparent; /* no frame on PC */
}
/* the whole flyer is shown (never cropped) at its own ratio, as large as the pane allows */
.lfdv-exhd .kv {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: var(--r, .7071);
	height: auto;
	width: min(100%, calc((min(100vh - var(--hd), 900px) - 48px) * var(--r, .7071)));
}
.lfdv-exhd .kv .kvimg,
.lfdv-exhd .img .kvimg {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lfdv-exhd .art {
	min-width: 0;
	padding: 55px clamp(48px, 5.5vw, 96px) clamp(40px, 4vw, 64px) clamp(32px, 3vw, 48px);
}
.lfdv-exhd.no-kv .art { max-width: 760px; margin-inline: auto; }

/* page heading: above the flyer and the text, same left gutter as the list page */
.lfdv-exhd .khead {
	display: flex;
	align-items: baseline;
	gap: 22px;
	padding: calc(clamp(90px, 7vw, 115px) - var(--hd)) clamp(32px, 6vw, 96px) 0; /* top = same as the list pages' h1 */
	margin: 0 auto clamp(32px, 3.2vw, 46px);
	max-width: 1440px;
}
.lfdv-exhd.no-kv .khead { max-width: 760px; margin-inline: auto; padding-inline: clamp(48px, 5.5vw, 96px); }
.lfdv-exhd .kicker {
	display: inline-block;
	font-family: var(--display);
	font-weight: 500;
	font-size: clamp(34px, calc(4.6vw - 10px), 56px); /* same as the shared .lfdv-pagehead h1 */
	letter-spacing: .12em;
	line-height: 1;
}
.lfdv-exhd .ksub { font-size: 16px; letter-spacing: .15em; color: var(--sub); }
/* status (+ JP label) on its own line, the dates under it */
.lfdv-exhd .catrow { display: flex; align-items: baseline; gap: 26px; }
.lfdv-exhd .csub { font-size: 16px; letter-spacing: .15em; color: var(--sub); } /* same as the list page's JP sub-title */
.lfdv-exhd .xm { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 0; }
.lfdv-exhd .xm .cat {
	font-family: var(--display);
	font-size: 23px;
	font-weight: 500;
	letter-spacing: .11em;
	line-height: 1;
	color: var(--accent);
}
/* NOW SHOWING: same gold sweeping band as the list page (the band layer carries its own
   white copy of the text, clipped with the band). Cycle 4.5s. */
.lfdv-exhd .cat.is-now { position: relative; display: inline-block; padding: 5px calc(14px - .11em) 5px 14px; margin-left: -14px; }
.lfdv-exhd .cat.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-exhd-sweep 4.5s infinite;
	pointer-events: none;
}
@keyframes lfdv-exhd-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-exhd .cat.is-now .fx { display: none; }
}
.lfdv-exhd .xm .per {
	font-family: var(--display);
	font-size: 26px;
	font-weight: 500;
	letter-spacing: .06em;
	line-height: 1.2;
	font-variant-numeric: lining-nums tabular-nums;
}
.lfdv-exhd .art > h1 { font-weight: 500; } /* the exhibition name is an h1 in the template */
.lfdv-exhd .art > h2 {
	font-family: var(--jp);
	font-weight: 500;
	font-size: 35px;
	line-height: 1.65;
	letter-spacing: .06em;
	text-wrap: balance;
}
.lfdv-exhd .by { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.lfdv-exhd .by .lb { font-size: 13px; letter-spacing: .1em; color: var(--sub); }
.lfdv-exhd .aj { font-size: 15.5px; letter-spacing: .06em; line-height: 1.8; }
.lfdv-exhd .art > .by { margin-bottom: 40px; }

.lfdv-exhd .body {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.85;
	letter-spacing: .05em;
}
.lfdv-exhd .body > * + * { margin-top: 1.2em; }
/* no artist line: the text still needs air under the title */
.lfdv-exhd .art > h2 + .body { margin-top: clamp(36px, 3.4vw, 48px); }
.lfdv-exhd .body h3 { font-weight: 500; font-size: 18px; letter-spacing: .08em; padding-top: 1.2em; }
.lfdv-exhd .body img,
.lfdv-exhd .body figure { max-width: 100%; height: auto; }

/* ---- section headings (same values as the list page) ---- */
.lfdv-exhd .dsec { margin-top: clamp(184px, 15vw, 208px); }
.lfdv-exhd .art > .body + .dsec,
.lfdv-exhd .art > .by + .dsec,
.lfdv-exhd .art > h2 + .dsec { margin-top: clamp(152px, 12.5vw, 184px); }
.lfdv-exhd .sh {
	display: flex;
	align-items: baseline;
	gap: 26px;
	margin-bottom: 40px;
	padding: 0 10px 28px;
	border-bottom: 1px solid var(--rule);
}
.lfdv-exhd .sh h3 {
	font-family: var(--display);
	font-weight: 500;
	font-size: 30px;
	letter-spacing: .1em;
	line-height: 1;
}
.lfdv-exhd .sh p { font-size: 15px; letter-spacing: .15em; color: var(--sub); }
/* the heading's rule doubles as the table's top rule */
.lfdv-exhd .sh--tb { margin-bottom: 0; padding-bottom: 25px; }
.lfdv-exhd .sh--nl { border-bottom: 0; padding-bottom: 0; }

/* ---- INFORMATION ---- */
.lfdv-exhd .idl {
	display: grid;
	grid-template-columns: 7.5em minmax(0, 1fr);
	border-top: 0;
	font-family: var(--jp);
}
.lfdv-exhd .idl dt,
.lfdv-exhd .idl dd { padding: 18px 10px; border-bottom: 1px solid var(--rule); line-height: 1.9; }
.lfdv-exhd .idl dt { font-size: 14px; letter-spacing: .14em; color: var(--sub); }
.lfdv-exhd .idl dd { font-size: 16px; letter-spacing: .05em; }
.lfdv-exhd .idl .lk {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	gap: 6px;
	margin: -12px 0 -12px 14px;
	font-family: var(--display);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .16em;
}
.lfdv-exhd .idl .lk .pin { width: 11px; height: 15px; flex: 0 0 auto; }
/* Map's hover underline sits close to the letters */
.lfdv-exhd .idl .lk .ul { padding-bottom: 1px; }

/* ---- ARTISTS ---- */
.lfdv-exhd .agrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 20px; }
.lfdv-exhd .acard { display: block; }
.lfdv-exhd .acard .img { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; background: linear-gradient(135deg, var(--ph-a), var(--ph-b)); }
.lfdv-exhd .acard .nm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 16px; padding-inline: 4px; }
.lfdv-exhd .acard .aj { font-size: 15px; white-space: nowrap; }
/* artist names: underline about 2px from the text; the box size is unchanged */
.lfdv-exhd .acard .aj .ul { background-position: 100% calc(100% - 4.5px); }
.lfdv-exhd .acard:hover .aj .ul,
.lfdv-exhd .acard:focus-visible .aj .ul { background-position: 0 calc(100% - 4.5px); }
.lfdv-exhd .acard .go { display: flex; align-items: center; margin-left: auto; transition: transform .4s var(--ease); }
.lfdv-exhd .acard:hover .go,
.lfdv-exhd .acard:focus-visible .go { transform: translateX(6px); }

/* =========================================================
   Below the grid: WORKS / SHARE / Prev-Next (full width)
   ========================================================= */
.lfdv-exhd .art2 {
	width: min(760px, calc(100% - 2 * clamp(32px, 6vw, 96px)));
	margin-inline: auto;
	padding-bottom: 160px;
}
.lfdv-exhd .art2 .dsec { margin-top: clamp(184px, 15vw, 208px); }

/* WORKS: images drift slowly to the left, full width; pauses on hover */
.lfdv-exhd .works {
	--wh: 340px;
	--wg: 32px;
	margin-top: 40px;
	overflow: hidden;
}
/* WORKS: the whole section is full width; heading sits at the page's left gutter */
.lfdv-exhd .dsec--works {
	--gx: clamp(32px, 6vw, 96px);
	position: relative;
	left: 50%;
	width: 100vw;
	margin-left: -50vw;
}
.lfdv-exhd .dsec--works .sh { margin-inline: var(--gx); padding: 0; border-bottom: 0; }
/* ARTISTS / WORKS: no rule under the heading; heading -> content = 30px (same as the list page's COMING SOON) */
.lfdv-exhd section[aria-labelledby="d-artists"] .sh { padding: 0; border-bottom: 0; }
.lfdv-exhd section[aria-labelledby="d-artists"] .sh,
.lfdv-exhd .dsec--works .sh { margin-bottom: 30px; }
.lfdv-exhd .wtrack { display: flex; width: max-content; animation: lfdv-exhd-flow 70s linear infinite; }
.lfdv-exhd .wset { display: flex; align-items: flex-start; gap: var(--wg); padding-right: var(--wg); }
.lfdv-exhd .works figure { flex: 0 0 auto; margin: 0; }
.lfdv-exhd .works .img {
	position: relative;
	display: block;
	overflow: hidden;
	height: var(--wh);
	width: calc(var(--wh) * var(--wr, 1));
	background: linear-gradient(135deg, var(--ph-a), var(--ph-b));
}
.lfdv-exhd .works .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.lfdv-exhd .works figcaption { margin-top: 12px; font-size: 12.5px; letter-spacing: .06em; line-height: 1.7; color: var(--sub); }
@keyframes lfdv-exhd-flow { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.lfdv-exhd .wtrack { animation: none; }
	.lfdv-exhd .works { overflow-x: auto; }
	.lfdv-exhd .acard .go { transition: none; }
}

/* =========================================================
   SHARE / Prev-Next (identical to NEWS detail)
   ========================================================= */
.lfdv-exhd .share {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin-top: clamp(144px, calc(6vw + 80px), 168px);
	font-family: var(--display);
	font-weight: 500;
}
.lfdv-exhd .share .label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .2em;
	color: var(--accent);
}
.lfdv-exhd .share .icons {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
}
.lfdv-exhd .share .icons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid #d6d0c6;
	color: var(--sub);
	transition: border-color .4s var(--ease), color .4s var(--ease);
}
.lfdv-exhd .share .icons a:hover,
.lfdv-exhd .share .icons a:focus-visible {
	border-color: var(--ink);
	color: var(--ink);
}
.lfdv-exhd .share .icons svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
	.lfdv-exhd .share { margin-top: 136px; }
}

/* prev / back-to-list / next */
.lfdv-exhd .adjacent {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 24px;
	margin-top: 28px;
	padding: 30px 0;
	border-top: 1px solid var(--rule);
	font-family: var(--display);
}
.lfdv-exhd .adjacent .side {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
}
.lfdv-exhd .adjacent .side.next { align-items: flex-end; text-align: right; }
.lfdv-exhd .adjacent .side .dir {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .1em;
	color: var(--ink); /* arrow + label stay black even on hover */
}
.lfdv-exhd .adjacent .side .ttl {
	position: relative;
	padding-bottom: 2.5px;
	font-family: var(--jp);
	font-size: 13px;
	line-height: 1.7;
	letter-spacing: .04em;
	color: var(--sub);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}
.lfdv-exhd .adjacent .side .ttl::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform .4s var(--ease);
}
.lfdv-exhd .adjacent .side:hover .ttl::after,
.lfdv-exhd .adjacent .side:focus-visible .ttl::after {
	transform: scaleX(1);
	transform-origin: left center;
}
.lfdv-exhd .adjacent .back {
	position: relative;
	flex: 0 0 auto;
	padding: 12px 4px;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .12em;
}
.lfdv-exhd .adjacent .back::after {
	content: "";
	position: absolute;
	left: 4px;
	right: 4px;
	bottom: 6.5px;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform .4s var(--ease);
}
.lfdv-exhd .adjacent .back:hover::after,
.lfdv-exhd .adjacent .back:focus-visible::after {
	transform: scaleX(1);
	transform-origin: left center;
}

@media (max-width: 900px) {
	.lfdv-exhd .adjacent {
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
		gap: 10px;
		margin-top: 20px;
		padding: 24px 0;
	}
	.lfdv-exhd .adjacent .side .ttl { display: none; }
	.lfdv-exhd .adjacent .back { padding-block: 4px; }
}

/* =========================================================
   Frameless flyer (class "is-fill", set by $frameless in the template)
   PC: no frame and no cropping. The left column is exactly as wide as the flyer is at
   full pane height (A4: height x .7071), capped at half the page; the text column takes
   the rest. A landscape image fills the half and sits centred in the pane.
   ========================================================= */
.lfdv-exhd.is-fill .xd {
	grid-template-columns: min(50%, calc(min(100vh - var(--hd), 900px) * var(--r, .7071))) minmax(0, 1fr);
}
.lfdv-exhd.is-fill .kvside { padding: 0; background: transparent; }
.lfdv-exhd.is-fill .kv { width: 100%; height: auto; max-height: 100%; aspect-ratio: var(--r, .7071); }
.lfdv-exhd.is-fill .kv .kvimg { object-fit: contain; }

/* =========================================================
   Phone / tablet: flyer stays under the header; the text panel slides up over it
   ========================================================= */
@media (max-width: 900px) {
	.lfdv-exhd { --hd: 64px; }
	main.lfdv-page.lfdv-exhd { padding-top: var(--hd); }

	.lfdv-exhd .xd { grid-template-columns: minmax(0, 1fr); }
	.lfdv-exhd .kvside {
		top: var(--hd);
		z-index: 0;
		height: auto;
		justify-content: center;
		padding: 32px var(--gutter);
		background: #f5f2ee; /* phones keep the beige pane */
	}
	.lfdv-exhd .kv { width: min(100%, 420px, calc(60vh * var(--r, .7071))); }
	.lfdv-exhd .art {
		position: relative;
		z-index: 1;
		padding: 32px var(--gutter) 0;
		background: #fff;
		box-shadow: 0 -14px 28px rgba(96, 76, 44, .08);
	}
	.lfdv-exhd.no-kv .art { box-shadow: none; }
	.lfdv-exhd.is-fill .xd { grid-template-columns: minmax(0, 1fr); }
	.lfdv-exhd.is-fill .kvside { padding: 0; }
	.lfdv-exhd.is-fill .kv { width: 100%; max-width: none; height: auto; aspect-ratio: var(--r, .7071); }
	.lfdv-exhd .art > .by { margin-bottom: 40px; }

	.lfdv-exhd .kicker { font-size: 20px; }
	.lfdv-exhd .xm { gap: 14px; margin-bottom: -1px; }
	.lfdv-exhd .xm .cat { font-size: 20px; }
	.lfdv-exhd .catrow { gap: 16px; }
	.lfdv-exhd .csub { font-size: 15px; }
	.lfdv-exhd .cat.is-now,
	.lfdv-exhd .cat.is-now .fx { padding: 4px calc(10px - .11em) 4px 10px; }
	.lfdv-exhd .cat.is-now { margin-left: -10px; }
	.lfdv-exhd .xm .per { font-size: 20px; }
	.lfdv-exhd .art > h1 { font-size: 23px; line-height: 1.5; }
	.lfdv-exhd .art > h2 { font-size: 24px; }
	html:not([lang^="en"]) .lfdv-exhd .art > h2 { font-size: 25px; letter-spacing: .11em; }
	.lfdv-exhd .by { margin-top: 16px; }
	.lfdv-exhd .aj { font-size: 14px; }
	.lfdv-exhd .body { font-size: 16px; line-height: 1.8; }
	.lfdv-exhd .art > h2 + .body { margin-top: 28px; }
	.lfdv-exhd .khead { gap: 14px; padding: calc(95px - var(--hd)) var(--gutter) 0; margin-bottom: 15px; }
	.lfdv-exhd.no-kv .khead { padding-inline: var(--gutter); margin-inline: 0; max-width: none; }
	.lfdv-exhd .ksub { font-size: 13px; }
	.lfdv-exhd .by .lb { font-size: 12px; }

	.lfdv-exhd .dsec,
	.lfdv-exhd .art > .body + .dsec,
	.lfdv-exhd .art > .by + .dsec,
	.lfdv-exhd .art > h2 + .dsec,
	.lfdv-exhd .art2 .dsec { margin-top: 128px; }
	/* INFORMATION gets a little more air than the other sections */
	.lfdv-exhd .art > .body + .dsec,
	.lfdv-exhd .art > .by + .dsec,
	.lfdv-exhd .art > h2 + .dsec { margin-top: 108px; }
	.lfdv-exhd .sh { gap: 16px; margin-bottom: 28px; padding-bottom: 20px; padding-inline: 0; } /* headings: no side padding */
	.lfdv-exhd section[aria-labelledby="d-artists"] .sh,
	.lfdv-exhd .dsec--works .sh { margin-bottom: 23px; }
	.lfdv-exhd .sh h3 { font-size: 28px; }
	.lfdv-exhd .sh p { font-size: 13px; }
	.lfdv-exhd .sh--tb { margin-bottom: 0; padding-bottom: 28px; }
	.lfdv-exhd .sh--nl { padding-bottom: 0; }

	.lfdv-exhd .idl { grid-template-columns: 5.5em minmax(0, 1fr); }
	.lfdv-exhd .idl dt,
	.lfdv-exhd .idl dd { padding: 14px 6px; }
	.lfdv-exhd .idl dt { font-size: 13px; letter-spacing: .1em; }
	.lfdv-exhd .idl dd { font-size: 16px; }
	.lfdv-exhd .idl .lk { margin-left: 10px; }

	.lfdv-exhd .agrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
	.lfdv-exhd .acard .nm { margin-top: 10px; padding-inline: 2px; }
	.lfdv-exhd .acard .aj { font-size: 14px; }

	.lfdv-exhd .art2 { width: auto; margin-inline: var(--gutter); padding-bottom: 96px; }
	.lfdv-exhd .dsec--works { --gx: var(--gutter); }
	.lfdv-exhd .dsec--works .sh { padding-bottom: 0; }
	.lfdv-exhd .works { --wh: 220px; --wg: 18px; margin-top: 28px; }
	.lfdv-exhd .works figcaption { margin-top: 8px; font-size: 11.5px; }
}
