/* =========================================================================
   Tinge Fleur — matched to the approved homepage design
   ========================================================================= */

/* Fonts are bundled with the theme (SIL Open Font License, see assets/fonts). */
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond.woff") format("woff"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-italic.woff") format("woff"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond.woff") format("woff"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-italic.woff") format("woff"); font-weight: 400 800; font-style: italic; font-display: swap; }

:root {
	--tf-navy: #182458;
	--tf-navy-soft: #2e3762;
	--tf-ivory: #f3f3e8;
	--tf-paper: #e0d8d0;
	--tf-paper-deep: #d8cfc6;
	--tf-taupe: #877c72;
	--tf-taupe-deep: #7d736a;
	--tf-line: rgba(24, 36, 88, .55);
	--tf-display: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
	--tf-body: "EB Garamond", Garamond, Georgia, serif;
	--tf-gap: clamp(10px, 1.6vw, 18px);
	--tf-max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	color: var(--tf-navy);
	font-family: var(--tf-body);
	font-size: 1.125rem;
	line-height: 1.7;
	background-color: var(--tf-paper);
	/* Soft paper grain, as in the design. */
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .25 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
		linear-gradient(180deg, #e2dad2 0, var(--tf-paper) 900px);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--tf-navy-soft); }
:focus-visible { outline: 2px solid var(--tf-navy); outline-offset: 3px; }

.screen-reader-text, .tf-form__trap {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.tf-skip { position: absolute; left: -9999px; top: 0; }
.tf-skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--tf-ivory); padding: .5em 1em; }

.tf-main { flex: 1 0 auto; }
.tf-wrap { width: min(100% - 2 * clamp(16px, 4vw, 48px), var(--tf-max)); margin-inline: auto; }
.tf-wrap--narrow { max-width: 820px; }

/* ---------- Header ---------- */
.tf-header {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: clamp(12px, 3vw, 48px);
	width: min(100% - 2 * clamp(16px, 4vw, 48px), var(--tf-max));
	margin: 0 auto;
	padding: clamp(18px, 2.6vw, 34px) 0 clamp(18px, 2.4vw, 30px);
}
.tf-header__brand { display: block; line-height: 0; }
.tf-logo img { width: clamp(230px, 27vw, 300px); height: auto; }

.tf-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(22px, 4vw, 52px); }
.tf-nav--left .tf-nav__list { justify-content: flex-start; padding-left: clamp(0px, 1.5vw, 20px); }
.tf-nav--right .tf-nav__list { justify-content: flex-end; padding-right: clamp(0px, 1.5vw, 20px); }
.tf-nav a {
	position: relative;
	display: inline-block;
	padding: .55em .9em;
	font-family: var(--tf-display);
	font-size: .84rem;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--tf-navy);
}
.tf-nav a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0;
	height: 1px; background: var(--tf-navy);
	transform: scaleX(0); transition: transform .35s ease;
}
.tf-nav a:hover::after,
.tf-nav .current-menu-item > a::after,
.tf-nav .current_page_item > a::after { transform: scaleX(1); }

/* ---------- Homepage mosaic (layout from the approved design) ---------- */
.tf-mosaic {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	grid-template-rows: clamp(220px, 30vw, 345px) clamp(190px, 27vw, 300px) clamp(190px, 27vw, 300px);
	gap: var(--tf-gap);
}
.tf-tile {
	position: relative; overflow: hidden; display: block;
	background: var(--tf-paper-deep);
	box-shadow: 0 1px 2px rgba(60, 45, 35, .08);
}
.tf-tile img {
	width: 100%; height: 100%; object-fit: cover;
	transition: transform 1.2s cubic-bezier(.2, .6, .2, 1);
	animation: tf-fade-in 1.1s ease both;
}
.tf-tile:hover img { transform: scale(1.035); }
.tf-tile--1 { grid-column: 1 / span 8; grid-row: 1; }
.tf-tile--2 { grid-column: 9 / span 4; grid-row: 1; }
.tf-tile--3 { grid-column: 1 / span 4; grid-row: 2; }
.tf-tile--4 { grid-column: 5 / span 4; grid-row: 2; }
.tf-tile--5 { grid-column: 9 / span 4; grid-row: 2; }
.tf-tile--6 { grid-column: 1 / span 6; grid-row: 3; }
.tf-tile--7 { grid-column: 7 / span 3; grid-row: 3; }
.tf-tile--8 { grid-column: 10 / span 3; grid-row: 3; }
.tf-tile:nth-child(2) img { animation-delay: .08s; }
.tf-tile:nth-child(3) img { animation-delay: .16s; }
.tf-tile:nth-child(4) img { animation-delay: .24s; }
.tf-tile:nth-child(5) img { animation-delay: .32s; }
.tf-tile:nth-child(6) img { animation-delay: .4s; }
.tf-tile:nth-child(7) img { animation-delay: .48s; }
.tf-tile:nth-child(8) img { animation-delay: .56s; }

.tf-tile__caption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 2.2em 1em .8em;
	font-family: var(--tf-display); font-style: italic; font-size: 1.05rem;
	color: var(--tf-ivory);
	background: linear-gradient(transparent, rgba(24, 20, 30, .45));
	opacity: 0; transform: translateY(6px);
	transition: opacity .4s ease, transform .4s ease;
}
.tf-tile:hover .tf-tile__caption, .tf-tile:focus-visible .tf-tile__caption { opacity: 1; transform: none; }

.tf-tile--empty { display: grid; place-content: center; justify-items: center; text-align: center; padding: 1em; }
.tf-tile--empty img { width: 52px; height: auto; opacity: .35; animation: none; }
.tf-tile--empty p { max-width: 28ch; margin: .8em 0 0; font-style: italic; font-size: .95rem; }

/* Collage: three equal-width columns, each photo at its own height. Photos in
   a shorter column share a few extra pixels so the bottom edge lines up. */
.tf-mosaic--masonry { display: flex; gap: var(--tf-gap); align-items: stretch; }
.tf-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--tf-gap); }
.tf-mosaic--masonry .tf-tile { flex: 1 0 auto; aspect-ratio: var(--ar); }
.tf-col:nth-child(2) .tf-tile img { animation-delay: .12s; }
.tf-col:nth-child(3) .tf-tile img { animation-delay: .24s; }
.tf-col:nth-child(4) .tf-tile img { animation-delay: .36s; }

/* Fitted rows: each photo keeps its own shape; rows always span the full width. */
.tf-mosaic--fit { display: flex; flex-direction: column; gap: var(--tf-gap); }
.tf-row { display: flex; gap: var(--tf-gap); }
.tf-mosaic--fit .tf-tile { flex: var(--ar) 1 0; aspect-ratio: var(--ar); min-width: 0; }
.tf-row:nth-child(2) .tf-tile img { animation-delay: .15s; }
.tf-row:nth-child(3) .tf-tile img { animation-delay: .3s; }
.tf-row:nth-child(4) .tf-tile img { animation-delay: .45s; }

@keyframes tf-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Quote & divider ---------- */
.tf-quote { margin: clamp(36px, 5vw, 56px) auto 18px; text-align: center; text-wrap: balance; }
.tf-quote p {
	margin: 0; font-family: var(--tf-display); font-style: italic;
	font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.4; color: var(--tf-navy-soft);
}
.tf-home-spacer { height: clamp(26px, 3.5vw, 40px); }
.tf-divider {
	display: flex; align-items: center; justify-content: center; gap: 12px;
	margin: 14px auto clamp(40px, 5vw, 60px);
}
.tf-divider span { width: clamp(60px, 9vw, 88px); height: 1px; background: var(--tf-line); }
.tf-divider img { width: 38px; height: 38px; }
.tf-page-head .tf-divider { margin-bottom: clamp(28px, 4vw, 44px); }

/* ---------- Page headings & text ---------- */
.tf-page-head { text-align: center; padding-top: clamp(8px, 2vw, 20px); }
.tf-title {
	margin: 0 0 .25em; font-family: var(--tf-display); font-weight: 500;
	font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.12; letter-spacing: .02em;
}
.tf-title--small { font-size: 1.8rem; }
.tf-title a { text-decoration: none; }
.tf-eyebrow, .tf-event-card__meta {
	margin: 0 0 .5em; font-family: var(--tf-display); font-size: .82rem;
	letter-spacing: .2em; text-transform: uppercase; color: var(--tf-navy-soft);
}
.tf-lede { max-width: 60ch; margin: .4em auto 0; font-size: 1.15rem; color: var(--tf-navy-soft); }
.tf-lede p { margin: 0 0 .8em; }
.tf-prose { font-size: 1.15rem; }
.tf-prose p { margin: 0 0 1.15em; }
.tf-prose h2, .tf-prose h3 { font-family: var(--tf-display); font-weight: 500; line-height: 1.2; }
.tf-prose blockquote { margin: 1.5em 0; padding-left: 1em; border-left: 1px solid var(--tf-line); font-style: italic; }
.tf-empty { text-align: center; font-style: italic; margin: 3em 0 5em; }
.tf-back { margin: 0 0 .5em; font-family: var(--tf-display); font-size: .95rem; letter-spacing: .06em; }
.tf-back a { text-decoration: none; }
.tf-preview-note { text-align: center; background: var(--tf-ivory); padding: .6em 1em; font-style: italic; }

.tf-button {
	display: inline-block; padding: .85em 2.1em;
	font-family: var(--tf-display); font-size: .9rem; font-weight: 600;
	letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
	color: var(--tf-ivory); background: var(--tf-navy);
	border: 1px solid var(--tf-navy); border-radius: 0; cursor: pointer;
	transition: background .3s ease, color .3s ease;
}
.tf-button:hover, .tf-button:focus-visible { background: transparent; color: var(--tf-navy); }
.tf-cta { text-align: center; margin: clamp(40px, 6vw, 70px) 0 clamp(48px, 6vw, 80px); }

/* ---------- Gallery: event cards ---------- */
.tf-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin: 0 0 clamp(26px, 4vw, 40px); }
.tf-filter {
	padding: .5em 1.15em; background: transparent; border: 1px solid transparent; cursor: pointer;
	font-family: var(--tf-display); font-size: .84rem; font-weight: 500;
	letter-spacing: .16em; text-transform: uppercase; color: var(--tf-navy);
}
.tf-filter:hover { border-color: var(--tf-line); }
.tf-filter.is-active { border-color: var(--tf-navy); background: rgba(243, 243, 232, .5); }

.tf-events {
	display: grid; grid-template-columns: repeat(3, 1fr);
	gap: clamp(28px, 3.5vw, 44px) var(--tf-gap); margin-bottom: clamp(48px, 6vw, 80px);
}
.tf-event-card { display: block; text-decoration: none; color: var(--tf-navy); }
.tf-event-card[hidden] { display: none; }
.tf-event-card__img { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--tf-paper-deep); margin-bottom: 14px; }
.tf-event-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .6, .2, 1); }
.tf-event-card:hover .tf-event-card__img img { transform: scale(1.035); }
.tf-event-card__meta { display: block; font-size: .74rem; }
.tf-event-card__title { display: block; font-family: var(--tf-display); font-size: 1.55rem; font-weight: 500; line-height: 1.2; }
.tf-event-card__count { display: block; font-style: italic; font-size: .98rem; color: var(--tf-navy-soft); }

/* ---------- Single event: photos ---------- */
.tf-photos { columns: 3 300px; column-gap: var(--tf-gap); }
.tf-photo { display: block; margin: 0 0 var(--tf-gap); break-inside: avoid; overflow: hidden; background: var(--tf-paper-deep); cursor: zoom-in; }
.tf-photo img { width: 100%; transition: transform 1.2s cubic-bezier(.2, .6, .2, 1), opacity .3s; }
.tf-photo:hover img { transform: scale(1.025); }
.tf-pager { display: flex; justify-content: space-between; gap: 20px; margin-top: clamp(30px, 4vw, 48px); font-family: var(--tf-display); font-size: 1.1rem; }
.tf-pager a { text-decoration: none; }
.tf-pager a:hover { text-decoration: underline; }

/* ---------- Lightbox ---------- */
.tf-lightbox {
	position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
	background: rgba(30, 27, 32, .94); opacity: 0; transition: opacity .3s ease;
}
.tf-lightbox.is-open { opacity: 1; }
.tf-lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.tf-lightbox button {
	position: absolute; background: none; border: 0; color: var(--tf-ivory); cursor: pointer;
	font-family: var(--tf-display); font-size: 2.4rem; line-height: 1; padding: .4em .5em; opacity: .85;
}
.tf-lightbox button:hover { opacity: 1; }
.tf-lightbox__close { top: 6px; right: 10px; }
.tf-lightbox__prev { left: 6px; top: 50%; transform: translateY(-50%); }
.tf-lightbox__next { right: 6px; top: 50%; transform: translateY(-50%); }
.tf-lightbox__count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: var(--tf-ivory); font-size: .9rem; letter-spacing: .14em; opacity: .75; }

/* ---------- About ---------- */
.tf-bio { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: start; max-width: 1040px; margin: 0 auto; }
.tf-bio--no-photo { grid-template-columns: 1fr; max-width: 760px; }
.tf-bio__photo { margin: 0; position: sticky; top: 24px; }
.tf-bio__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: 0 1px 2px rgba(60, 45, 35, .08); }
.tf-bio__text > p:first-child::first-letter {
	float: left; font-family: var(--tf-display); font-size: 3.6em; line-height: .8;
	padding: .08em .08em 0 0;
}
.tf-bio__text .tf-signature, .tf-bio__text p:last-child em:only-child { display: block; font-family: var(--tf-display); font-size: 1.5rem; }

/* ---------- Contact page photo strip ---------- */
/* Three photos at a shared height, each in its own shape, centred. */
.tf-strip { --strip-h: clamp(150px, 19vw, 230px); margin: 0 auto 10px; }
.tf-strip .tf-row { justify-content: center; gap: var(--tf-gap); }
.tf-strip .tf-tile { flex: 0 1 calc(var(--strip-h) * var(--ar)); aspect-ratio: var(--ar); min-width: 0; }
.tf-strip__more { margin: 0 0 clamp(28px, 4vw, 40px); text-align: center; font-family: var(--tf-display); font-size: .95rem; letter-spacing: .06em; }
.tf-strip__more a { text-decoration: none; }
.tf-strip__more a:hover { text-decoration: underline; }

/* ---------- Contact form ---------- */
.tf-phone { margin: .9em 0 0; font-size: 1.1rem; }
.tf-phone a { font-weight: 500; white-space: nowrap; }
.tf-form {
	display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px;
	margin: 0 auto clamp(56px, 7vw, 90px); padding: clamp(24px, 4vw, 44px);
	background: rgba(243, 243, 232, .55); border: 1px solid rgba(24, 36, 88, .12);
}
.tf-field { display: flex; flex-direction: column; gap: 6px; }
.tf-field--wide { grid-column: 1 / -1; }
.tf-field label {
	font-family: var(--tf-display); font-size: .82rem; font-weight: 600;
	letter-spacing: .16em; text-transform: uppercase;
}
.tf-field input, .tf-field select, .tf-field textarea {
	width: 100%; padding: .7em .8em; font: inherit; font-size: 1.05rem; color: var(--tf-navy);
	background: #fbfbf6; border: 1px solid rgba(24, 36, 88, .28); border-radius: 0;
	-webkit-appearance: none; appearance: none; min-height: 48px;
}
.tf-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23182458' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right .9em center; padding-right: 2.4em;
}
.tf-field input:focus, .tf-field select:focus, .tf-field textarea:focus { outline: none; border-color: var(--tf-navy); box-shadow: 0 0 0 3px rgba(24, 36, 88, .12); }
.tf-field--error input, .tf-field--error select, .tf-field--error textarea { border-color: #9b2c2c; }
.tf-field__error { color: #9b2c2c; font-size: .95rem; font-style: italic; }
.tf-form__alert { grid-column: 1 / -1; padding: .7em 1em; background: #f7e9e6; border-left: 3px solid #9b2c2c; }
.tf-form .tf-button { align-self: center; min-width: 240px; margin-top: 6px; }
.tf-thanks { text-align: center; max-width: 620px; margin: 0 auto clamp(60px, 8vw, 100px); font-size: 1.25rem; }
.tf-thanks p { margin: 0 0 1.2em; }
.tf-thanks__next { font-style: italic; font-size: 1.1rem; }

/* ---------- Footer band ---------- */
.tf-footer {
	flex-shrink: 0; margin-top: auto;
	padding: clamp(40px, 5vw, 58px) 20px clamp(26px, 3vw, 34px);
	text-align: center; color: var(--tf-ivory);
	background: linear-gradient(180deg, var(--tf-taupe) 0%, var(--tf-taupe-deep) 100%);
}
.tf-footer p { margin: 0; }
.tf-footer__services {
	font-family: var(--tf-display); font-size: clamp(.92rem, 1.5vw, 1.08rem); font-weight: 500;
	letter-spacing: .26em; text-transform: uppercase;
}
.tf-footer__item { white-space: nowrap; }
.tf-footer__sep { margin: 0 clamp(.7em, 2.2vw, 1.6em); opacity: .85; }
.tf-footer__tagline { margin-top: .8em !important; font-family: var(--tf-display); font-style: italic; font-size: clamp(1.1rem, 1.8vw, 1.3rem); opacity: .92; }
.tf-footer__social { margin-top: 1.4em !important; display: flex; justify-content: center; gap: 1.6em; font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; }
.tf-footer__social a { color: var(--tf-ivory); text-decoration: none; opacity: .85; }
.tf-footer__social a:hover { opacity: 1; color: var(--tf-ivory); }
.tf-footer__legal { margin-top: 2em !important; font-size: .8rem; letter-spacing: .08em; opacity: .65; }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
	.tf-events { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
	.tf-header { grid-template-columns: 1fr 1fr; gap: 6px 0; padding-bottom: 16px; }
	.tf-header__brand { grid-column: 1 / -1; grid-row: 1; justify-self: center; margin-bottom: 6px; }
	.tf-nav--left { grid-row: 2; }
	.tf-nav--right { grid-row: 2; }
	.tf-nav__list { gap: 4px; }
	.tf-nav--left .tf-nav__list { justify-content: flex-end; padding: 0; }
	.tf-nav--right .tf-nav__list { justify-content: flex-start; padding: 0; }
	.tf-nav a { padding: .55em .7em; font-size: .78rem; letter-spacing: .13em; }

	.tf-mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 44vw; }
	.tf-tile[class*="tf-tile--"] { grid-column: auto; grid-row: auto; }
	.tf-tile--1 { grid-column: 1 / -1 !important; }
	.tf-tile--2 { grid-row: span 2 !important; }
	.tf-tile__caption { display: none; }

	.tf-mosaic--masonry { display: block; columns: 2; column-gap: 10px; }
	.tf-mosaic--masonry .tf-col { display: contents; }
	.tf-mosaic--masonry .tf-tile { display: block; width: 100%; margin: 0 0 10px; break-inside: avoid; }
	.tf-mosaic--fit { display: block; columns: 2; column-gap: 10px; }
	.tf-mosaic--fit .tf-row { display: contents; }
	.tf-mosaic--fit .tf-tile { display: block; width: 100%; margin: 0 0 10px; break-inside: avoid; }
	.tf-events { grid-template-columns: 1fr; }
	.tf-photos { columns: 2 140px; }
	.tf-form { grid-template-columns: 1fr; padding: 22px 18px; }
	.tf-bio { grid-template-columns: 1fr; }
	.tf-bio__photo { position: static; max-width: 420px; margin: 0 auto; }
	.tf-footer__services { font-size: .82rem; letter-spacing: .15em; }
	.tf-footer__sep { margin: 0 .45em; }
}

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