/* =========================================================
   La forme de Da Vinci — NEWS list + detail
   Snow Monkey child theme / lfdv-news
   Colors, type and spacing match the hand-off memo, sections 5–6–7,
   and reuse the same tokens / hover-underline mechanic as lfdv-common.css.
   ========================================================= */

.lfdv-news {
	--ink: #1b1b1b;
	--sub: #666462;
	--accent: #91732d;   /* category / current page / rule color, at full opacity */
	--rule: rgba(145, 115, 45, .22);
	--display: "Cormorant Garamond", "Times New Roman", serif;
	--jp: "Shippori Mincho", serif;
	--ease: cubic-bezier(.4, .4, 0, 1);

	box-sizing: border-box;
	padding: clamp(150px, 13vw, 190px) clamp(32px, 6vw, 96px) 160px;
	color: var(--ink);
	font-family: var(--jp);
}
.lfdv-news * { box-sizing: border-box; }
.lfdv-news a { color: inherit; text-decoration: none; }
.lfdv-news .col { max-width: 760px; margin-inline: auto; }

@media (max-width: 900px) {
	.lfdv-news { padding: 120px clamp(24px, 2.4vw, 34px) 96px; }
}

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

/* ---------------------------------------------------------
   Shared: the hover underline used on every link in both pages
   (same mechanic as the global nav: grows in from the left, exits
   to the right — hand-off memo, section 1).
   --------------------------------------------------------- */
.lfdv-news .u {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}
.lfdv-news .u::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 5.5px;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform .4s var(--ease);
}
.lfdv-news .u:hover::after,
.lfdv-news .u:focus-visible::after {
	transform: scaleX(1);
	transform-origin: left center;
}

/* ---------------------------------------------------------
   Shared: the one-sided "hooked" Prev / Next arrow (separate path
   data per direction, not a flip), same shape site-wide — list
   pagination and the detail page's prev/next nav.
   --------------------------------------------------------- */
.lfdv-news .arr--pg { width: 34px; height: 7px; flex: 0 0 auto; }

/* =========================================================
   NEWS list
   ========================================================= */
.lfdv-news-list .rows { border-top: 1px solid var(--rule); }
.lfdv-news-list .row {
	display: grid;
	grid-template-columns: 118px 132px minmax(0, 1fr);
	align-items: baseline;
	column-gap: 24px;
	padding: 28px 10px 28px 20px;
	border-bottom: 1px solid var(--rule);
	transition: background-color .4s var(--ease);
}
.lfdv-news-list .row .date {
	grid-column: 1;
	font-family: var(--display);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: .06em;
	font-variant-numeric: lining-nums tabular-nums;
}
.lfdv-news-list .row .cat {
	grid-column: 2;
	font-family: var(--display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .18em;
	color: var(--accent);
}
.lfdv-news-list .row .title {
	grid-column: 3;
	min-width: 0;
	font-size: 16px;
	line-height: 1.75;
	letter-spacing: .05em;
}
.lfdv-news-list .row .title span {
	position: relative;
	display: inline-block;
	padding: 5px;
}
.lfdv-news-list .row .title span::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2.5px; /* underline about 2px from the text */
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform .4s var(--ease);
}
.lfdv-news-list .row:hover .title span::after,
.lfdv-news-list .row:focus-visible .title span::after {
	transform: scaleX(1);
	transform-origin: left center;
}

@media (max-width: 900px) {
	.lfdv-news-list .row {
		grid-template-columns: auto auto minmax(0, 1fr);
		row-gap: 0;
		column-gap: 16px;
		padding: 16px 10px 16px 15px;
	}
	.lfdv-news-list .row .title { grid-column: 1 / -1; font-size: 16px; line-height: 1.5; }
	.lfdv-news-list .row .date { font-size: 16px; }
	.lfdv-news-list .row .cat { font-size: 11px; }
}

/* pagination */
.lfdv-news-list .pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 30px;
	margin-top: 72px;
	font-family: var(--display);
}
.lfdv-news-list .pager ol {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.lfdv-news-list .pager ol a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	font-size: 20px;
	font-variant-numeric: lining-nums tabular-nums;
}
.lfdv-news-list .pager ol a span {
	display: inline-block;
	transform-origin: 50% 100%;
	transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), color .3s var(--ease);
}
.lfdv-news-list .pager ol a:hover span,
.lfdv-news-list .pager ol a:focus-visible span { transform: translateY(-4px) scale(1.15); }
.lfdv-news-list .pager ol a[aria-current="page"] { color: var(--accent); cursor: default; }
.lfdv-news-list .pager ol a[aria-current="page"] span { transform: none; }
.lfdv-news-list .pager .pn {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	min-height: 44px;
	font-size: 17px;
}
.lfdv-news-list .pager .pn.off { color: #b4b0aa; pointer-events: none; }
.lfdv-news-list .arr--pg { width: 34px; height: 7px; flex: 0 0 auto; }

@media (max-width: 900px) {
	.lfdv-news-list .pager { gap: 14px; margin-top: 48px; }
	.lfdv-news-list .pager ol { gap: 0; }
	.lfdv-news-list .pager .pn .lbl { display: none; }
}

/* =========================================================
   NEWS detail
   ========================================================= */
.lfdv-news-detail .eyebrow {
	display: inline-block;
	margin: 0 0 40px;
	font-family: var(--display);
	font-weight: 500;
	font-size: 30px;
	letter-spacing: .2em;
}
.lfdv-news-detail .meta {
	display: flex;
	align-items: baseline;
	gap: 22px;
	font-family: var(--display);
}
.lfdv-news-detail .meta .date { font-size: 20px; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.lfdv-news-detail .meta .cat { font-size: 17px; font-weight: 600; letter-spacing: .14em; color: var(--accent); }

.lfdv-news-detail h2.title {
	margin: 0;
	font-family: var(--jp);
	font-weight: 600;
	font-size: clamp(24px, 2.2vw, 30px);
	line-height: 1.4;
	letter-spacing: .06em;
	text-wrap: balance;
}

.lfdv-news-detail .eyecatch {
	margin: clamp(30px, calc(4vw - 10px), 35px) 0 clamp(34px, calc(4.4vw - 10px), 40px);
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.lfdv-news-detail .eyecatch img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lfdv-news-detail .body {
	margin-top: clamp(30px, calc(4vw - 10px), 35px);
	font-size: 16px;
	font-weight: 500;
	line-height: 2.1;
	letter-spacing: .05em;
}
.lfdv-news-detail .body,
.lfdv-news-detail .body * { font-family: var(--jp); } /* no monospace / theme fonts inside the article text (English posts included) */
.lfdv-news-detail .body > * + * { margin-top: 1.6em; }
.lfdv-news-detail .body h2 { font-weight: 500; }
.lfdv-news-detail .body p,
.lfdv-news-detail .body li { font-size: 16px; } /* article text 16px (English posts included) */
/* keep the gap under an image the same as the Japanese page (no empty paragraph / line break / extra margin) */
.lfdv-news-detail .body p:empty,
.lfdv-news-detail .body img + br,
.lfdv-news-detail .body figure + br { display: none; }
.lfdv-news-detail .body figure + *,
.lfdv-news-detail .body p:has(> img:only-child) + * { margin-top: 0; }
/* text that was entered as a Preformatted / Code / Verse block: show it like a normal paragraph */
.lfdv-news-detail .body pre,
.lfdv-news-detail .body code,
.lfdv-news-detail .body .wp-block-preformatted,
.lfdv-news-detail .body .wp-block-verse,
.lfdv-news-detail .body .wp-block-code {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font-size: 16px;
	line-height: inherit;
	letter-spacing: inherit;
	white-space: pre-wrap;
	word-break: normal;
	overflow: visible;
}
.lfdv-news-detail .body h3 { font-weight: 500; font-size: 18px; letter-spacing: .08em; padding-top: 1.2em; }

/*
 * Images inserted directly into the post body (a Gutenberg "wp-block-image" figure,
 * or a bare <img> pasted into a paragraph) get the same vertical margin as the
 * dedicated eyecatch above, so the rhythm stays consistent whichever way an image
 * gets into the page. More specific than ".body > * + *" above, so it wins on
 * margin-top; margin-bottom on a block-level element collapses against the next
 * sibling's margin-top, so no separate override is needed there.
 *
 * On narrow screens ".body" still carries its own "padding-inline: 10px" (see the
 * mobile block below), so the mobile version of this rule bleeds the image back out
 * past that padding to land flush with the eyecatch/title; on desktop ".body" has no
 * inline padding, so the image lines up with no extra compensation needed.
 */
.lfdv-news-detail .body img,
.lfdv-news-detail .body figure {
	display: block;
	margin-block: clamp(30px, calc(4vw - 10px), 35px) clamp(34px, calc(4.4vw - 10px), 40px);
	width: 100%;
	max-width: 100%;
	height: auto;
}
.lfdv-news-detail .body figure img { margin: 0; width: 100%; max-width: 100%; }
.lfdv-news-detail .body figcaption {
	margin-top: 10px;
	font-size: 13px;
	text-align: center;
	opacity: .7;
}

@media (max-width: 900px) {
	.lfdv-news-detail .eyebrow { font-size: 24px; margin-bottom: 14px; }
	.lfdv-news-detail .meta { gap: 16px; margin-bottom: 0; }
	.lfdv-news-detail h2.title { font-size: 20px; margin-top: -5px; text-wrap: wrap; } /* fill each line before breaking (no balancing) */
	.lfdv-news-detail .eyecatch { margin: 30px 0 29px; }
	.lfdv-news-detail .body { font-size: 15px; line-height: 2; }
	:lang(en) .lfdv-news-detail .body,
	:lang(en) .lfdv-news-detail .body p,
	:lang(en) .lfdv-news-detail .body li { line-height: 1.6; } /* English article text */
	.lfdv-news-detail .body img,
	.lfdv-news-detail .body figure { margin-block: 30px 29px; }
}

.lfdv-news-detail .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-news-detail .share .label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .2em;
	color: var(--accent);
}
.lfdv-news-detail .share .icons {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
}
.lfdv-news-detail .share .icons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	transition: opacity .4s var(--ease);
}
.lfdv-news-detail .share .icons a:hover,
.lfdv-news-detail .share .icons a:focus-visible { opacity: .7; }
.lfdv-news-detail .share .icons img { display: block; width: 100%; height: 100%; }
/* Facebook / X are full circles; LINE's bubble fills only ~88% of its picture, so the circles are scaled to match its visible size */
.lfdv-news-detail .share .icons a:nth-child(-n+2) img { width: 28px; height: 28px; }

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

/* prev / back-to-list / next */
.lfdv-news-detail .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-news-detail .adjacent .side {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
}
.lfdv-news-detail .adjacent .side.next { align-items: flex-end; text-align: right; }
.lfdv-news-detail .adjacent .side .dir {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	font-size: 17px;
	font-weight: 500;
	letter-spacing: .1em;
	color: var(--ink); /* arrow + label stay black even on hover */
}
.lfdv-news-detail .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-news-detail .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-news-detail .adjacent .side:hover .ttl::after,
.lfdv-news-detail .adjacent .side:focus-visible .ttl::after {
	transform: scaleX(1);
	transform-origin: left center;
}
.lfdv-news-detail .adjacent .back {
	position: relative;
	flex: 0 0 auto;
	padding: 12px 4px;
	font-size: 17px;
	font-weight: 500;
	letter-spacing: .12em;
}
.lfdv-news-detail .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-news-detail .adjacent .back:hover::after,
.lfdv-news-detail .adjacent .back:focus-visible::after {
	transform: scaleX(1);
	transform-origin: left center;
}

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