/* Lancrigg wedding brochure. Desktop: an open A5 book. Phones (860px and below): a scroll of pages. */

@font-face { font-family: "LB Cinzel"; src: url(fonts/cinzel-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "LB Montserrat"; src: url(fonts/montserrat-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "LB Montserrat"; src: url(fonts/montserrat-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

.lb {
	--taupe: #e4e1da;
	--gold: #a8946a;
	--gold-text: #8d7449;
	--ink: #1b1b1b;
	--green: #448444;
	--serif: "LB Cinzel", Cinzel, Georgia, serif;
	--sans: "LB Montserrat", Montserrat, Helvetica, Arial, sans-serif;
	margin: 0 auto 40px;
	container-type: inline-size; /* the book sizes itself to the column it's placed in */
	font-family: var(--sans);
	color: var(--ink);
}
.lb *, .lb *::before, .lb *::after { box-sizing: border-box; }
.lb figure { margin: 0; overflow: hidden; position: relative; z-index: 1; }
.lb .lb-img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; }
.lb p { margin: 0 0 1.1em; padding: 0; font: inherit; color: inherit; letter-spacing: 0; }
.lb a { color: inherit; }

/* ---------- Book (desktop) ---------- */
.lb-stage { --pw: min(440px, calc((100cqw - 200px) / 2), calc((100vh - 250px) * 419 / 595)); display: flex; align-items: center; justify-content: center; gap: 22px; }
.lb-viewport { overflow: hidden; width: calc(var(--pw) * 2 + 40px); flex: none; }
.lb-track { display: flex; transition: transform .7s cubic-bezier(.65, 0, .35, 1); }
.lb-spread { flex: 0 0 100%; display: flex; justify-content: center; padding: 20px 20px 46px; }
.lb-pages { display: flex; box-shadow: 0 34px 60px -24px rgba(0, 0, 0, .4), 0 8px 18px rgba(0, 0, 0, .08); }

.lb-page { position: relative; width: var(--pw); aspect-ratio: 419 / 595; background: #fff; overflow: hidden; container-type: inline-size; }
.lb-in { position: absolute; inset: 0; font-size: calc(var(--k, 2.75) * 1cqw); line-height: 1.5; --pl: 9cqw; --pr: 9cqw; }
.lb-fit { min-height: 0; overflow: hidden; position: relative; z-index: 2; }
.lb-pages > .lb-page + .lb-page::after {
	content: ""; position: absolute; inset: 0 auto 0 0; width: 9%; z-index: 5; pointer-events: none;
	background: linear-gradient(to right, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0));
}
.lb-pages > .lb-page:first-child:not(:last-child)::after {
	content: ""; position: absolute; inset: 0 0 0 auto; width: 5%; z-index: 5; pointer-events: none;
	background: linear-gradient(to left, rgba(0, 0, 0, .08), rgba(0, 0, 0, 0));
}

/* Taupe strip down one edge */
.lb-stripe-left .lb-in::before, .lb-stripe-right .lb-in::before { content: ""; position: absolute; top: 0; bottom: 0; width: 6.5cqw; background: var(--taupe); z-index: 0; }
.lb-stripe-left .lb-in::before { left: 0; }
.lb-stripe-right .lb-in::before { right: 0; }
.lb-stripe-left .lb-in { --pl: 13cqw; }
.lb-stripe-right .lb-in { --pr: 12.5cqw; }

/* Headings: Cinzel, with a thin gold rule running off the last line to the page edge */
.lb .lb-h { font: 400 4em/1.12 var(--serif); color: var(--ink); letter-spacing: .01em; text-transform: none; margin: 0 0 .45em; padding: 0; }
.lb-h span { display: block; }
.lb-h .lb-h-last { display: flex; align-items: center; gap: .3em; margin-right: calc(-1 * var(--pr)); }
.lb-h .lb-h-last::after { content: ""; flex: 1; height: 1px; min-width: .8em; background: var(--gold); transform: translateY(.08em); }
.lb-h--rev .lb-h-last { flex-direction: row-reverse; margin-right: 0; margin-left: calc(-1 * var(--pl)); }

/* Rich text */
.lb .lb-rt ul { margin: 0 0 1em; padding: 0 0 0 1.1em; list-style: disc; }
.lb .lb-rt ol { margin: 0 0 1em; padding: 0 0 0 1.3em; list-style: decimal; }
.lb .lb-rt li { margin: 0 0 .15em; padding: 0; font: inherit; color: inherit; list-style: inherit; }
.lb .lb-rt h3 { font: 400 1.3em/1.25 var(--serif); color: var(--gold-text); letter-spacing: .04em; margin: .3em 0 .2em; padding: 0; text-transform: none; }
.lb .lb-rt h4 { font: 400 1em/1.4 var(--sans); color: inherit; text-decoration: underline; text-underline-offset: .2em; margin: .2em 0 .45em; padding: 0; letter-spacing: 0; text-transform: none; }
.lb .lb-rt strong, .lb .lb-rt b { font-weight: 700; }
.lb .lb-rt > :last-child { margin-bottom: 0; }
.lb .lb-lead { font-weight: 700; }

/* Buttons */
.lb-btns { display: flex; flex-wrap: wrap; gap: .7em; margin-top: 1.4em; }
.lb-align-right .lb-btns { justify-content: flex-end; }
.lb .lb-btn {
	display: inline-block; padding: .95em 1.5em; border-radius: 999px; border: 1px solid var(--ink);
	font: 700 .85em/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); text-decoration: none; transition: background .2s, color .2s;
}
.lb .lb-btn:hover { background: var(--ink); color: #fff; }
.lb .lb-btn--solid { background: var(--green); border-color: var(--green); color: #fff; }
.lb .lb-btn--solid:hover { background: #356a35; border-color: #356a35; }

/* Cover */
.lb-l-cover .lb-in > .lb-img { position: absolute; inset: 0; object-position: 50% 45%; }
.lb-l-cover .lb-in::before { content: ""; position: absolute; inset: 0 0 auto; height: 42%; z-index: 1; background: linear-gradient(#fff 0%, rgba(255, 255, 255, .92) 38%, rgba(255, 255, 255, 0)); }
.lb .lb-logo { position: absolute; left: 50%; top: 4cqw; width: 70cqw; max-width: none; height: auto; transform: translateX(-50%); z-index: 2; }
.lb .lb-tagline {
	position: absolute; left: 0; right: 0; bottom: 9cqw; z-index: 2; margin: 0;
	font: 700 5.4cqw/1.45 var(--sans); letter-spacing: .3em; text-transform: uppercase; text-align: center; color: #fff;
	text-shadow: 0 2px 14px rgba(0, 0, 0, .45);
}

/* Photo with quote */
.lb-l-photo_quote .lb-in { display: grid; grid-template-rows: 69% 31%; }
.lb-l-photo_quote.lb-quote-top .lb-in { grid-template-rows: 21% 79%; }
.lb-l-photo_quote.lb-quote-top .lb-pq-quote { grid-row: 1; }
.lb-l-photo_quote.lb-quote-top .lb-pq-photo { grid-row: 2; }
.lb-pq-quote { display: flex; align-items: center; justify-content: center; padding: 0 8cqw; background: var(--taupe); text-align: center; }
.lb .lb-pq-quote p { margin: 0; font: 400 1.93em/1.42 var(--serif); color: var(--gold-text); }

/* Full-page photo and collage */
.lb-ph-photo { position: absolute !important; inset: 0; }
.lb-l-collage .lb-in { display: grid; grid-template-columns: 52% 48%; grid-template-rows: 1fr 1fr; }
.lb-c1 { grid-column: 1; grid-row: 1; }
.lb-c2 { grid-column: 1; grid-row: 2; }
.lb-c3 { grid-column: 2; grid-row: 1 / 3; }
.lb-collage-2 .lb-c1, .lb-collage-2 .lb-c2 { grid-column: 1 / -1; }

/* Story */
.lb-l-story .lb-in { display: grid; grid-template-columns: 27% 1fr; grid-template-rows: 69% 1fr; }
.lb .lb-vt { margin: 0; padding: 0; writing-mode: vertical-rl; transform: rotate(180deg); display: flex; align-items: center; justify-content: center; font: 400 11.5cqw/1 var(--serif); letter-spacing: .03em; color: var(--ink); text-transform: none; }
.lb-st-body { background: var(--taupe); padding: 6cqw 3.5cqw 3cqw 4.5cqw; display: flex; flex-direction: column; justify-content: center; }
.lb-st-photo { grid-column: 1 / -1; }

/* Text with a photo below */
.lb-l-text_photo .lb-in { display: grid; grid-template-rows: 1fr; }
.lb-l-text_photo.has-photo .lb-in { grid-template-rows: 1fr 40cqw; }
.lb-tp-body { padding: 9cqw var(--pr) 4cqw var(--pl); }
.lb-align-right .lb-tp-body, .lb-align-right .lb-pt-body { text-align: right; }

/* Text beside a column of photos */
.lb-l-photos_text .lb-in { display: grid; grid-template-columns: 44% 1fr; grid-template-rows: 0 1fr 0; }
.lb-l-photos_text.lb-side-right .lb-in { grid-template-columns: 1fr 44%; }
.lb-l-photos_text.has-top .lb-in { grid-template-rows: 32cqw 1fr 0; }
.lb-l-photos_text.has-bottom .lb-in { grid-template-rows: 0 1fr 38cqw; }
.lb-l-photos_text.has-top.has-bottom .lb-in { grid-template-rows: 30cqw 1fr 34cqw; }
.lb-pt-top { grid-column: 1 / -1; grid-row: 1; }
.lb-pt-bottom { grid-column: 1 / -1; grid-row: 3; }
.lb-pt-side { grid-row: 2; grid-column: 1; display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 1; }
.lb-pt-side figure { flex: 1 1 0; min-height: 0; }
.lb-pt-body { grid-row: 2; grid-column: 2; padding: 7cqw var(--pr) 3cqw var(--pl); }
.lb-side-left .lb-in { --pl: 4.5cqw; }
.lb-side-right .lb-pt-side { grid-column: 2; }
.lb-side-right .lb-pt-body { grid-column: 1; }
.lb-side-right .lb-in { --pr: 4.5cqw; }
.lb-side-right.lb-stripe-left .lb-in { --pl: 11cqw; }
.lb-side-left.lb-stripe-right .lb-in { --pr: 10cqw; }
.lb-l-photos_text .lb-h { font-size: 4.2em; }

/* Text page */
.lb-tx-body { position: absolute !important; inset: 0; padding: 9cqw var(--pr) 4cqw var(--pl); }
.lb .lb-tx-photo { height: 26cqw; margin: 1.2em calc(-1 * var(--pr)) 1.2em calc(-1 * var(--pl)); }
.lb-l-text .lb-h { font-size: 4.3em; }

/* Back cover */
.lb-l-contact .lb-in { display: grid; grid-template-rows: 70% 1fr auto; }
.lb-ct-body { padding: 5cqw 7cqw 3cqw; font-size: 1.05em; line-height: 1.45; }
.lb .lb-ct-h { margin: 0 0 .8em; padding: 0 0 .5em; font: 400 2.3em/1.1 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--gold); display: inline-block; }
.lb-ct-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1em 2em; }
.lb-ct-cols > div { display: flex; flex-direction: column; gap: .25em; }
.lb-ct-cols a { text-decoration: none; }
.lb .lb-ct-pdf { text-decoration: underline; text-underline-offset: .2em; }
.lb-ct-cols a:hover { text-decoration: underline; }
.lb .lb-ct-credits { margin: 0; padding: 1.3cqw 3cqw; background: var(--gold); color: #fff; text-align: center; font: 400 1.8cqw/1.3 var(--serif); letter-spacing: .02em; }

/* ---------- Controls ---------- */
.lb-arrow {
	flex: none; width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); cursor: pointer; display: grid; place-items: center; padding: 0;
	background: rgba(16, 18, 17, .62); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .18); transition: background .2s, opacity .2s, transform .2s;
}
.lb-arrow svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-arrow:hover { background: rgba(16, 18, 17, .82); transform: scale(1.05); }
.lb-arrow:disabled { opacity: 0; pointer-events: none; }
.lb-arrow:focus-visible, .lb-dot:focus-visible, .lb-bar-link:focus-visible, .lb .lb-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: -10px; font: 400 14px/1 var(--sans); color: var(--ink); }
.lb-count { min-width: 110px; text-align: right; letter-spacing: .04em; }
.lb-dots { display: flex; gap: 8px; }
.lb-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid #8a8a83; background: transparent; cursor: pointer; transition: background .2s, transform .2s; }
.lb-dot[aria-current="true"] { background: var(--ink); border-color: var(--ink); transform: scale(1.15); }
.lb .lb-bar-link { min-width: 110px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; letter-spacing: .04em; }
.lb-spread.is-active .lb-pages > .lb-page:last-child:not(:first-child) { cursor: e-resize; }
.lb-spread.is-active .lb-pages > .lb-page:first-child:not(:last-child) { cursor: w-resize; }
.lb-spread.is-active:first-child .lb-page { cursor: e-resize; }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 860px) {
	.lb-stage { --pw: 100%; display: block; }
	.lb-arrow, .lb-dots, .lb-count { display: none !important; }
	.lb-viewport { width: auto; overflow: visible; }
	.lb-track { display: block; transform: none !important; }
	.lb-spread { display: block; padding: 0; }
	.lb-pages { display: block; box-shadow: none; }
	.lb-page { width: 100%; aspect-ratio: auto; margin: 0 0 18px; border-radius: 6px; box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .3); cursor: default !important; }
	.lb-page::after { display: none !important; }
	.lb-page.lb-keep { aspect-ratio: 419 / 595; }

	/* Text pages reflow: normal-size text, photos at natural shapes */
	.lb-page:not(.lb-keep) .lb-in { position: relative; inset: auto; display: block; font-size: 16px; line-height: 1.6; --pl: 22px; --pr: 22px; }
	.lb-page:not(.lb-keep) .lb-in::before { display: none; }
	.lb-page:not(.lb-keep) .lb-fit { overflow: visible; }
	.lb .lb-page:not(.lb-keep) .lb-h { font-size: 2.4em; }
	.lb-page:not(.lb-keep) figure { aspect-ratio: 3 / 2; }
	.lb-align-right .lb-tp-body, .lb-align-right .lb-pt-body { text-align: left; }
	.lb-h--rev .lb-h-last { flex-direction: row; margin-left: 0; margin-right: calc(-1 * var(--pr)); }
	.lb-align-right .lb-btns { justify-content: flex-start; }

	.lb .lb-vt { writing-mode: horizontal-tb; transform: none; display: block; font-size: 2.4em; padding: 1.1em 22px .5em; background: var(--taupe); }
	.lb-st-body { padding: 0 22px 1.4em; }

	.lb-tp-body, .lb-pt-body { padding: 1.6em 22px 1.2em; }
	.lb-l-photos_text .lb-in { display: flex !important; flex-direction: column; }
	.lb-pt-top { order: 1; }
	.lb-pt-body { order: 2; }
	.lb-pt-side { order: 3; flex-direction: row; }
	.lb-pt-side figure { aspect-ratio: 1 / 1; flex: 1 1 0; }
	.lb-pt-bottom { order: 4; }

	.lb-tx-body { position: relative !important; inset: auto; padding: 1.6em 22px 1.2em; }
	.lb .lb-tx-photo { height: auto; aspect-ratio: 16 / 9 !important; margin: 1.2em -22px; }

	.lb-l-contact .lb-in { display: block; }
	.lb-l-contact figure { aspect-ratio: 4 / 3; }
	.lb-ct-body { padding: 1.4em 22px; }
	.lb .lb-ct-h { font-size: 1.5em; }
	.lb .lb-ct-credits { font-size: 13px; padding: 12px 18px; }

	.lb-l-photo_quote .lb-pq-quote p { font-size: 1.75em; }
	.lb-bar { margin-top: 4px; }
	.lb .lb-bar-link { min-width: 0; }
}
@media (max-width: 480px) {
	.lb-ct-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .lb-track { transition: none; } }
