/* ===== Tea Lovers' Journal (template/at-tea-lovers-journal.php) =====
   All rules are scoped under .tlj so they don't clash with the theme's global styles. */

.tlj {
	--tlj-green: #1f4a34;
	--tlj-green-deep: #133022;
	--tlj-gold: #b8955a;
	--tlj-gold-light: #d9c39a;
	--tlj-sage: #f1f4ec;
	--tlj-paper: #fffdf9;
	--tlj-ink: #2a2a2a;
	--tlj-muted: #6b6b6b;
	/* Fonts come from the site's Typekit kit loaded in header.php */
	--tlj-title: "futura-pt", "Futura", "Century Gothic", sans-serif;
	--tlj-body: "adobe-garamond-pro", Garamond, Georgia, serif;
	--tlj-serif: var(--tlj-body);
	--tlj-sans: var(--tlj-title);
	--tlj-max: 1120px;

	display: block;
	font-family: var(--tlj-body);
	font-size: 18px;
	color: var(--tlj-ink);
	background: var(--tlj-paper);
	line-height: 1.6;
}

.tlj p {
	font-family: var(--tlj-body);
	font-size: inherit;
	line-height: 1.6;
	color: inherit;
}

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

/* Small uppercase labels use Futura with the titles */
.tlj-eyebrow,
.tlj-form label,
.tlj-benefits__photo figcaption { font-family: var(--tlj-title); }

.tlj-wrap { max-width: var(--tlj-max); margin: 0 auto; padding: 0 24px; }

.tlj-eyebrow {
	font-size: .78rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--tlj-gold-light);
	font-weight: 700;
}

.tlj h1,
.tlj h2,
.tlj h3 {
	font-family: var(--tlj-title);
	font-weight: 500;
	color: var(--tlj-green);
	line-height: 1.2;
	margin: 0;
	text-transform: none;
	letter-spacing: normal;
}

/* ===== Hero with signup ===== */
.tlj-hero {
	position: relative;
	background: var(--tlj-green-deep);
	color: #fff;
	overflow: hidden;
}

.tlj-hero__img {
	position: absolute;
	inset: 0;
	/* Green fade on the left keeps text and form readable */
	background: linear-gradient(100deg, rgba(19, 48, 34, .94) 0%, rgba(19, 48, 34, .82) 45%, rgba(19, 48, 34, .2) 78%, rgba(19, 48, 34, 0) 100%),
		var(--tlj-hero-img) 70% center / cover no-repeat;
}

.tlj-hero__inner {
	position: relative;
	max-width: var(--tlj-max);
	margin: 0 auto;
	padding: 88px 24px 96px;
}

.tlj-hero__content { max-width: 540px; }

.tlj .tlj-hero h1 {
	color: #fff;
	font-size: clamp(2rem, 4vw, 3.1rem);
	margin: 14px 0 16px;
}

.tlj-hero__lead {
	font-size: 1.1rem;
	color: #e3eadf;
	margin: 0 0 30px;
}

/* ===== Form ===== */
.tlj-form { margin: 0; }

.tlj-form label {
	display: block;
	font-size: .78rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--tlj-gold-light);
	margin-bottom: 10px;
	font-weight: 700;
}

.tlj-form__row { display: flex; }

.tlj-form input[type="email"] {
	flex: 1;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 16px 18px;
	font: inherit;
	font-size: 1rem;
	border: 1px solid var(--tlj-gold-light);
	border-right: 0;
	border-radius: 0;
	background: #fff;
	color: var(--tlj-ink);
}

.tlj-form input[type="email"]:focus { outline: 2px solid var(--tlj-gold); outline-offset: 2px; }

.tlj-btn {
	display: inline-block;
	font-family: var(--tlj-sans);
	font-weight: 700;
	font-size: .82rem;
	letter-spacing: .14em;
	line-height: 1.6;
	text-transform: uppercase;
	padding: 16px 26px;
	border: 1px solid var(--tlj-green-deep);
	border-radius: 0;
	background: var(--tlj-green-deep);
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s, color .2s;
}

.tlj-btn:hover,
.tlj-btn:focus-visible { background: var(--tlj-green);  text-decoration: none; }

.tlj-form__tag {
	font-family: var(--tlj-serif);
	font-size: 1.15rem;
	color: #fff;
	margin: 18px 0 4px;
}

.tlj-form__legal { font-size: .82rem; color: #b9c2b8; margin: 0; }
.tlj-form__legal a { color: var(--tlj-gold-light); }

/* WYSIWYG fields: paragraphs from the editor */
.tlj-hero__lead p { margin: 0 0 12px; }
.tlj-hero__lead p:last-child { margin-bottom: 0; }

/* "Bottom Content" under the Klaviyo form: first line is the tagline, the rest is small print */
.tlj-form__bottom { margin-top: 18px; color: #b9c2b8; font-size: .82rem; }
.tlj-form__bottom p { margin: 0 0 4px; }
.tlj-form__bottom p:first-child { font-size: 1.15rem; color: #fff; }
.tlj-form__bottom p:last-child { margin-bottom: 0; }
.tlj-form__bottom a { color: var(--tlj-gold-light); text-decoration: underline; }

.tlj-benefits__intro { color: var(--tlj-muted); }
.tlj-benefits__intro p { margin: 0 0 10px; }
.tlj-benefits__intro p:last-child { margin-bottom: 0; }

.tlj-form__msg { display: none; margin: 16px 0 0; color: var(--tlj-gold-light); font-weight: 700; }
.tlj-form.is-done .tlj-form__msg { display: block; }

/* Klaviyo embedded form: let it fill the hero column; Klaviyo controls its own styling */
.tlj-klaviyo { width: 100%; max-width: 540px; min-height: 60px; }
.tlj-klaviyo form { margin: 0 !important; }

/* Make the Klaviyo email field and button exactly the same height.
   !important is needed because Klaviyo writes inline styles and the theme styles inputs globally. */
.tlj-klaviyo {
	--tlj-field-h: 54px;
}

.tlj-klaviyo input[type="email"],
.tlj-klaviyo input[type="text"],
.tlj-klaviyo button {
	box-sizing: border-box !important;
	height: var(--tlj-field-h) !important;
	min-height: var(--tlj-field-h) !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	line-height: 1.2 !important;
}

.tlj-klaviyo input[type="email"],
.tlj-klaviyo input[type="text"] {
	padding: 0 18px !important;
	font-family: var(--tlj-body) !important;
	font-size: 18px !important;
	color: var(--tlj-ink) !important;
	background-color: #fff !important;
	border: 1px solid var(--tlj-gold-light) !important;
}

.tlj-klaviyo button {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-align: center !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* Klaviyo's loading spinner: always dead centre of the button */
.tlj-klaviyo button svg,
.tlj-klaviyo button > div:empty,
.tlj-klaviyo button > span:empty {
	/* inset + margin:auto centres it without using transform, so the spin animation still works */
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	margin: auto !important;
	transform-origin: center center !important;
}

/* Hide the button text while the spinner is showing so they don't overlap */
.tlj-klaviyo button:has(svg),
.tlj-klaviyo button:has(> div:empty),
.tlj-klaviyo button:has(> span:empty) {
	color: transparent !important;
}

/* Field and button on one row: line them up along the same edge */
.tlj-klaviyo form > div,
.tlj-klaviyo form > div > div { align-items: stretch !important; }

@media (max-width: 560px) {
	.tlj-klaviyo { --tlj-field-h: 50px; }
}

/* ===== What you'll get ===== */
.tlj-benefits { padding: 64px 0 56px; }

.tlj-benefits__layout {
	display: grid;
	grid-template-columns: 5fr 6fr;
	gap: 48px;
	align-items: stretch;
}

.tlj-benefits__photo { margin: 0; position: relative; min-height: 360px; }

.tlj-benefits__photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 40% center;
	display: block;
}

.tlj-benefits__photo figcaption {
	position: absolute;
	left: 0;
	bottom: 0;
	background: var(--tlj-green);
	color: var(--tlj-gold-light);
	font-size: .74rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	font-weight: 700;
	padding: 10px 16px;
}

.tlj-benefits__head { margin: 0 0 26px; }
.tlj .tlj-benefits__head h2 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); margin-bottom: 10px; }
.tlj-benefits__head p { color: var(--tlj-muted); margin: 0; }

.tlj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.tlj-card {
	background: var(--tlj-sage);
	padding: 22px 20px;
	border-top: 3px solid var(--tlj-gold);
}

.tlj-card__icon { width: 34px; height: 34px; color: var(--tlj-gold); margin-bottom: 12px; display: block; }

/* Icon Picker variants */
.tlj-card__icon--dash { font-size: 34px; line-height: 34px; }
.tlj-card__icon--img { object-fit: contain; }
.tlj .tlj-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.tlj-card p { margin: 0; color: var(--tlj-muted); font-size: .95rem; }

/* ===== Closing band ===== */
.tlj-closing {
	background: var(--tlj-gold);
	color: #fff;
	text-align: center;
	padding: 44px 0;
}

.tlj-closing p {
	font-family: var(--tlj-serif);
	font-style: italic;
	font-size: clamp(1.25rem, 2.2vw, 1.6rem);
	max-width: 760px;
	margin: 0 auto 22px;
	line-height: 1.4;
	color: #fff;
}

@media (max-width: 960px) {
	.tlj-benefits__layout { grid-template-columns: 1fr; gap: 32px; }
	.tlj-benefits__photo { min-height: 0; aspect-ratio: 16 / 9; }
	.tlj-hero__img {
		background: linear-gradient(rgba(19, 48, 34, .86), rgba(19, 48, 34, .86)),
			var(--tlj-hero-img) 70% center / cover no-repeat;
	}
}

@media (max-width: 560px) {
	.tlj-grid { grid-template-columns: 1fr; }
	.tlj-hero__inner { padding: 60px 20px 64px; }
	.tlj-form__row { flex-direction: column; gap: 12px; }
	.tlj-form input[type="email"] { border-right: 1px solid var(--tlj-gold-light); }
	.tlj-btn { white-space: normal; }
}
