/* ------------------------------------------------------------------
 * Story module — all selectors prefixed .lto-story-view-* so the module
 * can be removed wholesale without touching main theme styles.
 * Loaded only on singular `lto_story` views via module.php.
 * ------------------------------------------------------------------ */

/* Hero ------------------------------------------------------------ */
.lto-story-view-hero.wp-block-cover,
.lto-story-view-hero {
	min-height: 100vh;
	align-items: flex-end !important;
}
.lto-story-view-hero .wp-block-cover__inner-container {
	width: 100%;
	margin-top: auto;
}
.lto-story-view-hero__inner {
	max-width: 860px;
	margin: 0 auto;
	opacity: 0;
	transform: translateY(30px);
	animation: lto-story-fade-up 0.9s ease-out 0.15s forwards;
}
.lto-story-view-hero__eyebrow {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.8);
	margin: 0 0 20px;
}
.lto-story-view-hero__title {
	font-family: var(--wp--preset--font-family--alice);
	font-size: clamp(40px, 5.5vw, 64px);
	line-height: 1.1;
	letter-spacing: 0.02em;
	color: #fff;
	margin: 0 0 24px;
}
.lto-story-view-hero__excerpt {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 300;
	font-size: clamp(16px, 1.6vw, 20px);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
	max-width: 680px;
	margin: 0 auto;
}

@keyframes lto-story-fade-up {
	from { opacity: 0; transform: translateY(30px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Prose column ---------------------------------------------------- */
.lto-story-view-prose {
	color: var(--wp--preset--color--navy-800);
}
.lto-story-view-prose p,
.lto-story-view-prose ul,
.lto-story-view-prose ol {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 18px;
	line-height: 1.8;
	letter-spacing: 0.02em;
	max-width: 920px;
	margin-left: auto;
	margin-right: auto;
}
.lto-story-view-prose h2,
.lto-story-view-prose h3 {
	font-family: var(--wp--preset--font-family--alice);
	color: var(--wp--preset--color--navy-800);
	max-width: 920px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.2;
}
.lto-story-view-prose h2 {
	font-size: clamp(28px, 3vw, 42px);
	margin-top: 2em;
	margin-bottom: 0.6em;
}
.lto-story-view-prose h3 {
	font-size: clamp(22px, 2.4vw, 28px);
	margin-top: 1.8em;
	margin-bottom: 0.6em;
}
.lto-story-view-prose > :first-child { margin-top: 0; }
.lto-story-view-prose > :last-child  { margin-bottom: 0; }

.lto-story-view-prose figure,
.lto-story-view-prose .wp-block-image {
	margin-top: 48px;
	margin-bottom: 48px;
}
.lto-story-view-prose figure.alignwide,
.lto-story-view-prose .wp-block-image.alignwide {
	max-width: 1200px;
}
.lto-story-view-prose figure img,
.lto-story-view-prose .wp-block-image img {
	border-radius: 10px;
	width: 100%;
	height: auto;
}

/* Parallax-ish image break (image blocks marked .is-style-lto-story-bleed) */
.lto-story-view-prose .is-style-lto-story-bleed,
.lto-story-view-prose .alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
}
.lto-story-view-prose .is-style-lto-story-bleed img,
.lto-story-view-prose .alignfull img {
	border-radius: 0;
	max-height: 70vh;
	object-fit: cover;
}

/* Dark pull-quote band ------------------------------------------- */
.lto-story-view-pullquote__quote {
	font-family: var(--wp--preset--font-family--alice);
	font-style: italic;
	font-size: clamp(24px, 3.2vw, 36px);
	line-height: 1.45;
	letter-spacing: 0.02em;
	color: #fff;
	margin: 0;
}
.lto-story-view-pullquote__attribution {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	margin-top: 28px;
}

/* Key facts band -------------------------------------------------- */
.lto-story-view-facts__num {
	font-family: var(--wp--preset--font-family--alice);
	font-size: clamp(40px, 5vw, 72px);
	line-height: 1;
	color: #fff;
	margin: 0;
	font-variant-numeric: tabular-nums;
}
.lto-story-view-facts__label {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
	margin-top: 12px;
}

/* Support CTA (water-image cover) --------------------------------- */
.lto-story-view-cta.wp-block-cover { min-height: 0; }
.lto-story-view-cta .wp-block-cover__inner-container {
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
}
.lto-story-view-cta__title {
	font-family: var(--wp--preset--font-family--alice);
	font-size: clamp(28px, 3vw, 42px);
	line-height: 1.2;
	color: #fff;
	margin: 16px 0 24px;
}
.lto-story-view-cta__body {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 18px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
	max-width: 560px;
	margin: 0 auto 32px;
}

/* Related stories ------------------------------------------------- */
.lto-story-view-related__title {
	font-family: var(--wp--preset--font-family--alice);
	font-size: clamp(32px, 4vw, 48px);
	line-height: 1.15;
	color: var(--wp--preset--color--navy-800);
	margin: 16px 0 0;
}

/* ==================================================================
 * TRUST SIGNALS  — meta-driven: a count-up "numbers" strip, one big
 * headline number, and a COMPACT sources list (small links, not
 * cards). All scoped .lto-story-view-* and only output when the
 * relevant story meta is filled in.
 * ================================================================== */

/* Numbers strip — soft cards under the hero ----------------------- */
.lto-story-view-trust {
	background: #fff;
	padding: var(--wp--preset--spacing--64) var(--wp--preset--spacing--48) var(--wp--preset--spacing--32);
}
.lto-story-view-trust__row {
	max-width: 1160px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
	gap: 16px;
}
.lto-story-view-trust__stat {
	background: var(--wp--preset--color--cream);
	border-radius: 16px;
	padding: 28px 22px;
	text-align: center;
}
.lto-story-view-trust__num {
	font-family: var(--wp--preset--font-family--alice);
	font-size: clamp(32px, 3.4vw, 42px);
	line-height: 1;
	color: var(--wp--preset--color--navy-800);
	font-variant-numeric: tabular-nums;
}
.lto-story-view-trust__num .lto-accent { color: var(--wp--preset--color--coral); }
.lto-story-view-trust__label {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 500;
	font-size: 13.5px;
	letter-spacing: 0.01em;
	text-transform: none;
	color: var(--wp--preset--color--blue-700);
	margin-top: 12px;
	line-height: 1.45;
}

/* One big headline number (drops in after the prose) -------------- */
.lto-story-view-impact {
	padding: var(--wp--preset--spacing--96) var(--wp--preset--spacing--48);
	text-align: center;
}
.lto-story-view-impact__num {
	font-family: var(--wp--preset--font-family--alice);
	font-size: clamp(72px, 12vw, 132px);
	line-height: 0.92;
	color: var(--wp--preset--color--navy-800);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}
.lto-story-view-impact__num .lto-accent { color: var(--wp--preset--color--coral); }
.lto-story-view-impact__label {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 500;
	font-size: 15px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--blue-700);
	margin-top: 14px;
}
.lto-story-view-impact__note {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 14px;
	line-height: 1.5;
	color: #6a7484;
	max-width: 520px;
	margin: 12px auto 0;
}
.lto-story-view-impact__note a { color: #6a7484; text-decoration: underline; text-underline-offset: 2px; }
.lto-story-view-impact__note a:hover { color: var(--wp--preset--color--coral); }

/* Compact sources list ------------------------------------------- */
.lto-story-view-sources {
	padding: var(--wp--preset--spacing--96) var(--wp--preset--spacing--48) var(--wp--preset--spacing--128);
}
.lto-story-view-sources__inner { max-width: 900px; margin: 0 auto; }
.lto-story-view-sources__head { text-align: center; margin-bottom: 44px; }
.lto-story-view-sources__title {
	font-family: var(--wp--preset--font-family--alice);
	font-size: clamp(28px, 3vw, 38px);
	line-height: 1.15;
	color: var(--wp--preset--color--navy-800);
	margin: 10px 0 0;
}
.lto-story-view-sources__sub {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 15px;
	color: #6a7484;
	margin-top: 12px;
}
.lto-story-view-sources__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px 40px;
}
.lto-source-item {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 15px 0;
	border-bottom: 1px solid var(--wp--preset--color--border-pale);
	text-decoration: none;
}
.lto-source-item:hover .lto-source-item__title { color: var(--wp--preset--color--coral); }
.lto-source-item:hover .lto-source-item__arrow { transform: translateX(3px); color: var(--wp--preset--color--coral); }
.lto-source-item__tag {
	flex-shrink: 0;
	width: 92px;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 600;
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--blue-700);
	padding-top: 3px;
}
.lto-source-item__body { flex: 1; min-width: 0; }
.lto-source-item__title {
	display: block;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 15px;
	font-weight: 500;
	color: var(--wp--preset--color--navy-800);
	line-height: 1.4;
	transition: color 0.15s ease;
}
.lto-source-item__meta {
	display: block;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 12.5px;
	color: #8a94a4;
	margin-top: 3px;
}
.lto-source-item__arrow {
	flex-shrink: 0;
	color: #b7c1cf;
	font-size: 15px;
	align-self: center;
	transition: transform 0.15s ease, color 0.15s ease;
}
.lto-story-view-partners { margin-top: 52px; text-align: center; }
.lto-story-view-partners__label {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #9aa4b2;
	margin-bottom: 20px;
}
.lto-story-view-partners__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 12px;
}
.lto-partner-pill {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--navy-800);
	border: 1px solid var(--wp--preset--color--border-pale);
	border-radius: 100px;
	padding: 8px 16px;
	background: #fff;
}
@media (max-width: 620px) {
	.lto-story-view-sources__list { grid-template-columns: 1fr; }
	.lto-source-item__tag { width: 76px; }
}

/* Count-up: keep numbers visible without JS; JS just animates them. */

/* Pull-quote card styling now lives site-wide in style.css
 * (.wp-block-pullquote) so stories and the rest of the site match. */

/* ==================================================================
 * STORY GALLERY — drop a core Gallery block into any story and it
 * flexes into a tidy, rounded, responsive grid. Set the block to
 * "Wide" or "Full width" in the editor for a bigger, more visual
 * layout; captions are styled to match the prose.
 * ================================================================== */
.lto-story-view-prose .wp-block-gallery {
	margin-top: 56px;
	margin-bottom: 56px;
	gap: 14px;
}
.lto-story-view-prose .wp-block-gallery .wp-block-image,
.lto-story-view-prose .wp-block-gallery figure.wp-block-image {
	border-radius: 12px;
	overflow: hidden;
}
.lto-story-view-prose .wp-block-gallery img {
	border-radius: 12px;
	transition: transform 0.5s ease;
}
.lto-story-view-prose .wp-block-gallery .wp-block-image:hover img {
	transform: scale(1.045);
}
/* Wide / full galleries breathe a little more and lose the inner radius clip */
.lto-story-view-prose .wp-block-gallery.alignwide { max-width: 1200px; }
.lto-story-view-prose .wp-block-gallery > figcaption,
.lto-story-view-prose .wp-block-gallery .blocks-gallery-caption {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 13px;
	color: #6a7484;
	letter-spacing: 0.02em;
	margin-top: 14px;
	text-align: center;
	width: 100%;
}
/* Optional eyebrow you can place above a gallery with a Heading/para
 * given the class .lto-gallery-eyebrow */
.lto-story-view-prose .lto-gallery-eyebrow {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 500;
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--blue-700);
	text-align: center;
	margin-bottom: -32px;
	margin-top: 56px;
}
