/*
 * Lanzini & Sons — refinement layer (v2)
 * Targets the child theme as it stands: lanzini-atelier v1.2.0 +
 * lanzini-atelier-projects style.css + assets/css/atelier-v2.css.
 *
 * Enqueue after atelier-v2.css. No template edits required.
 * Colours come only from the theme's own custom properties — no new hex.
 *
 *   1. Type system        running copy leaves the display serif
 *   2. Hero               a deliberate measure instead of max-width:none
 *   3. Disciplines grid   nine photographs at one ratio, one crop
 *   4. Stories            the two secondary stories match the lead
 *   5. Reading measure    process, FAQ, captions
 *   6. Comparison         the before/after component (see patterns/)
 */

/* ── 1. type system ──────────────────────────────────────────────────── */

body,
.wp-site-blocks,
.entry-content {
	font-family: var(--lanzini-ui);
	font-size: 1.02rem;
	line-height: 1.68;
}

.wp-site-blocks h1,
.wp-site-blocks h2,
.wp-site-blocks h3,
.wp-site-blocks h4,
.wp-block-post-title,
.wp-block-heading {
	font-family: var(--lanzini-display);
	text-wrap: balance;
}

/* captions keep the literary voice; labels go mono */
.wp-block-image figcaption,
.lanzini-media-figure figcaption,
.lanzini-v2-card figcaption,
.wp-element-caption {
	font-family: var(--lanzini-display);
	font-style: italic;
	font-size: 0.84rem;
	line-height: 1.5;
	color: var(--lanzini-umber);
	letter-spacing: 0;
}

.lanzini-eyebrow,
.lanzini-v2-index,
.wp-block-post-terms,
.lanzini-v2-directory-label {
	font-family: var(--lanzini-mono, ui-monospace, "SF Mono", Menlo, monospace);
	font-weight: 400;
	letter-spacing: 0.16em;
}

.lanzini-eyebrow::after {
	width: 2.25rem;
	opacity: 0.7;
}

/* ── 2. hero ─────────────────────────────────────────────────────────── */

/* atelier-v2 sets max-width:none; at 4.6rem the headline then breaks
   wherever the column ends. A 20ch measure keeps two balanced lines. */
.lanzini-atelier-v2 .lanzini-home-hero__copy h1 {
	max-width: 20ch;
	letter-spacing: -0.03em;
}

.lanzini-atelier-v2 .lanzini-home-hero__intro,
.lanzini-atelier-v2 .lanzini-home-hero__disciplines {
	max-width: 44ch;
}

.lanzini-home-hero__note {
	border-left: 0;
	border-top: 1px solid color-mix(in oklab, var(--lanzini-gold) 60%, transparent);
	padding: 0.85rem 0 0;
	font-size: 0.94rem;
	max-width: 32ch;
}

/* ── 3. disciplines: nine photographs, one ratio ─────────────────────── */

/* The nine source photographs arrive in 3:4, 2:3 and 4:3. Unframed, the
   gallery rows cannot align. One plate ratio, one centre crop. */
.lanzini-v2-service-gallery .lanzini-media-figure {
	aspect-ratio: 3 / 4;
	overflow: hidden;
	margin: 0 0 1.15rem;
	background: var(--lanzini-paper);
	border: 1px solid color-mix(in oklab, var(--lanzini-gold) 28%, transparent);
	padding: 6px;
}

.lanzini-v2-service-gallery .lanzini-media-figure img {
	width: 100%;
	height: 100% !important;
	object-fit: cover !important;
	object-position: 50% 42%;
	transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.lanzini-v2-card:hover .lanzini-media-figure img {
	transform: scale(1.03);
}

/* the caption was given a fixed 2.9em floor to stop the cards going ragged;
   with a uniform plate that padding is no longer needed */
.lanzini-v2-card figcaption {
	min-height: 0;
	font-size: 0.8rem;
}

.lanzini-v2-card > p {
	font-family: var(--lanzini-ui);
	font-size: 0.96rem;
	line-height: 1.62;
	color: var(--lanzini-umber);
}

.lanzini-v2-card__heading {
	align-items: start;
}

/* the ornament is a mark, not a button — align it to the numeral, not the
   optical centre of a 44px target */
.lanzini-v2-card__heading .lanzini-v2-wireframe {
	margin-top: 3px;
}

.lanzini-v2-card h3 a:hover {
	color: var(--lanzini-charcoal);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* ── 4. stories ──────────────────────────────────────────────────────── */

/* the lead story is a full-width charcoal panel; the two that follow should
   share one frame ratio so their captions and links line up */
.lanzini-v2-stories article:not(:first-child) .lanzini-media-figure {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	margin: 0 0 1.2rem;
}

.lanzini-v2-stories article:not(:first-child) .lanzini-media-figure img {
	width: 100%;
	height: 100% !important;
	object-fit: cover !important;
	object-position: 50% 50%;
}

.lanzini-v2-stories article:first-child .lanzini-media-figure {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.lanzini-v2-stories article:first-child .lanzini-media-figure img {
	width: 100%;
	height: 100% !important;
	object-fit: cover !important;
}

.lanzini-v2-stories article:first-child h3 {
	letter-spacing: -0.02em;
}

.lanzini-v2-stories article:first-child a:hover {
	color: var(--lanzini-paper);
}

/* ── 5. reading measure ──────────────────────────────────────────────── */

.lanzini-v2-process li p,
.lanzini-v2-card__links,
.lanzini-v2-stories article p {
	text-wrap: pretty;
}

.lanzini-v2-process li p {
	color: var(--lanzini-umber);
	max-width: 34ch;
}

.lanzini-v2-process li h3 {
	letter-spacing: -0.012em;
}

.lanzini-faq summary {
	font-family: var(--lanzini-display) !important;
	letter-spacing: -0.01em;
}

.lanzini-faq .wp-block-details,
.lanzini-faq p {
	font-family: var(--lanzini-ui);
}

.lanzini-atelier-v2 .lanzini-heritage__layout .wp-block-media-text__media img {
	border: 1px solid color-mix(in oklab, var(--lanzini-gold) 28%, transparent);
}

/* focus states never lose contrast */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--lanzini-charcoal);
	outline-offset: 3px;
	box-shadow: none;
}

/* ── 6. restoration comparison (patterns/restoration-compare.php) ────── */

.lz-compare-figure {
	margin: 0;
	max-width: 430px;
}

.lz-compare {
	--pos: 50%;
	position: relative;
	overflow: hidden;
	aspect-ratio: 1125 / 1360;
	background: var(--lanzini-charcoal);
	border: 1px solid color-mix(in oklab, var(--lanzini-ivory) 22%, transparent);
}

.lz-compare img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
	margin: 0;
}

.lz-compare .lz-compare__after { clip-path: inset(0 0 0 var(--pos)); }

.lz-compare__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--pos);
	width: 2px;
	background: var(--lanzini-ivory);
	transform: translateX(-1px);
	pointer-events: none;
	z-index: 2;
}

.lz-compare__knob {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: var(--lanzini-ivory);
	color: var(--lanzini-charcoal);
	border: 1px solid color-mix(in oklab, var(--lanzini-charcoal) 25%, transparent);
	transition: transform 200ms ease;
}

.lz-compare:hover .lz-compare__knob { transform: translate(-50%, -50%) scale(1.06); }

.lz-compare__range {
	position: absolute;
	inset: 0;
	z-index: 3;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
	-webkit-appearance: none;
	appearance: none;
}

.lz-compare__range:focus-visible ~ .lz-compare__handle .lz-compare__knob {
	outline: 2px solid var(--lanzini-gold-on-dark);
	outline-offset: 3px;
}

.lz-compare__tag {
	position: absolute;
	bottom: 0.7rem;
	z-index: 2;
	font-family: var(--lanzini-mono, ui-monospace, Menlo, monospace);
	font-size: 0.68rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	background: color-mix(in oklab, var(--lanzini-charcoal) 82%, transparent);
	color: var(--lanzini-ivory);
	padding: 0.32rem 0.55rem;
}

.lz-compare__tag--before { left: 0.7rem; }
.lz-compare__tag--after  { right: 0.7rem; }

.lz-compare-figure figcaption {
	margin-top: 0.8rem;
	font-family: var(--lanzini-display);
	font-style: italic;
	font-size: 0.85rem;
	line-height: 1.5;
	color: color-mix(in oklab, var(--lanzini-ivory) 72%, transparent);
}

/* ── 7. the cross divider ────────────────────────────────────────────── */

/* latin-cross-divider, rebuilt as a flex band: the rule stays 1px at any
   width and only the cross scales, so it never thickens on wide screens.
   Markup is in the README. */
.frame-cross {
	display: flex;
	align-items: center;
	gap: 11px;
	margin: 0 0 0.75rem;
	color: var(--lanzini-gold);
}

.frame-cross__rule {
	flex: 1 1 auto;
	height: 1px;
	background: currentColor;
	opacity: 0.8;
}

.frame-cross__mark {
	flex: none;
	width: 17px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: square;
}

/* ── 8. emblems ──────────────────────────────────────────────────────── */

/* The ornament files in assets/ornaments/ have been redrawn onto one stroke
   weight (2.2% of the canvas, was 0.8%) and now carry the antique gold in the
   file itself — as <img> they could never resolve currentColor and were
   rendering black at 48%. Because the drawings are now 2.7× heavier, they are
   set smaller here so they read as engraved marks rather than strokes. */
.lanzini-v2-card__heading .lanzini-v2-wireframe,
.lanzini-v2-card__links .lanzini-v2-wireframe {
	width: 32px;
	height: 42px;
	opacity: 0.9;
}

.lanzini-v2-hero-studies img {
	width: 38px;
	height: 51px;
	opacity: 0.9;
}

.lanzini-v2-section-heading .lanzini-v2-wireframe {
	width: 64px;
	height: auto;
	opacity: 0.9;
}

/* ── responsive ──────────────────────────────────────────────────────── */

@media (max-width: 768px) {
	.lanzini-atelier-v2 .lanzini-home-hero__copy h1 {
		max-width: 17ch;
	}
	.lz-compare-figure {
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lanzini-v2-card:hover .lanzini-media-figure img,
	.lz-compare:hover .lz-compare__knob {
		transform: none;
	}
}

.lanzini-wordmark a{display:inline-flex;flex-direction:column;align-items:stretch;text-decoration:none}
.lanzini-logo-image{width:clamp(8.5rem,12.5vw,11rem);height:auto}
.lanzini-wordmark__est{margin-top:.25rem;padding-top:.3rem;border-top:1px solid var(--lanzini-stone);font-family:var(--lanzini-display);font-size:.64rem;line-height:1.2;letter-spacing:.14em;text-transform:uppercase;color:var(--lanzini-gold-text);text-align:center}
