/* Insights: blog index and archives */

/* ---------- Header ---------- */
/* Title starts 200 / 180 / 160 px from the top of the page (desktop / tablet / mobile) */
.od-insights-head { padding: clamp(160px, 145.1px + 3.81vw, 200px) 0 0; background: var(--od-bg); }
.od-insights-head .od-container { position: relative; }
.od-insights-head__corner { position: absolute; top: 0; right: var(--od-inset); line-height: 1; }
.od-insights-head__title { display: flex; align-items: flex-end; gap: clamp(10px, 1.67vw, 24px); margin: 0; font-weight: 600; }
.od-insights-head__title > span:first-child { flex: none; max-width: 100%; }
.od-insights-head__rule { flex: 0 1 2.4em; min-width: 32px; height: clamp(3px, 0.42vw, 6px); margin-bottom: 0.44em; background: var(--od-brand); transform-origin: 0 50%; }
.od-insights-head__intro {
	display: grid; grid-template-columns: 184px minmax(0, 1fr) 300px; column-gap: 0; align-items: start;
	margin-top: clamp(60px, 45.1px + 3.81vw, 100px);
}
.od-insights-head__intro .od-label { margin-top: 8px; }
.od-insights-head__lead { max-width: 716px; margin: 0; padding-right: clamp(24px, 8.1vw, 116px); font-weight: 500; letter-spacing: var(--od-track); color: var(--od-grey-900); }
.od-insights-head__text { margin: 0; }

/* Archive header: long titles (search terms, author names) may wrap */
.od-insights-head--archive .od-insights-head__title { flex-wrap: wrap; overflow-wrap: anywhere; }
.od-insights-head--archive .od-insights-head__title > span:first-child { flex: 0 1 auto; padding-right: 0.12em; }

/* ---------- Featured article ---------- */
.od-insights-featured { padding-top: clamp(100px, 8.33vw, 120px); background: var(--od-bg); }
.od-insights-featured:not(:has(.od-feature)) { display: none; }
.od-insights-featured .od-label { margin-bottom: 32px; }
.od-feature { display: grid; grid-template-columns: minmax(0, 793fr) minmax(0, 387fr); gap: var(--od-gap); align-items: end; }
.od-feature__media { aspect-ratio: 793 / 446; }
.od-feature__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 32px; }
.od-feature__title { margin: 0; font-size: var(--od-fs-h5); line-height: 1.4; font-weight: 600; letter-spacing: var(--od-track); }
.od-feature__title a { transition: color 0.2s; }
.od-feature__title a:hover { color: var(--od-brand); }
.od-feature__excerpt { margin: 0; }
.od-feature__more { margin-top: 20px; }

/* ---------- Filter + grid ---------- */
.od-insights-list { padding: clamp(100px, 8.33vw, 120px) 0 200px; background: var(--od-bg); }
.od-insights-list__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-bottom: 40px; }
.od-insights-filter ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.od-posts--insights { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 80px; align-items: start; padding: 0; list-style: none; }
/* Image heights follow the rhythm of the design: six formats, repeated */
.od-posts--insights .od-post-card__media { aspect-ratio: 387 / 326; }
.od-posts--insights > :nth-child(6n + 2) .od-post-card__media { aspect-ratio: 387 / 337; }
.od-posts--insights > :nth-child(6n + 3) .od-post-card__media { aspect-ratio: 387 / 237; }
.od-posts--insights > :nth-child(6n + 4) .od-post-card__media { aspect-ratio: 1; }
.od-posts--insights > :nth-child(6n + 5) .od-post-card__media { aspect-ratio: 387 / 306; }
.od-posts--insights > :nth-child(6n + 6) .od-post-card__media { aspect-ratio: 387 / 226; }
.od-posts--insights .od-post-card__body { padding-top: 24px; }
.od-posts--insights .od-post-card__title { letter-spacing: var(--od-track); text-wrap: balance; }
.od-posts--insights .od-post-card__title a { transition: color 0.2s; }

/* Shared card details: cover, ruler strip, category badge, date line */
.od-insights-featured .od-media img,
.od-posts--insights .od-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.od-insights-featured .od-ticks,
.od-posts--insights .od-ticks {
	background:
		linear-gradient(var(--od-grey-200), var(--od-grey-200)) 100% 0 / 1px 100% no-repeat,
		repeating-linear-gradient(90deg, var(--od-grey-200) 0 1px, transparent 1px 7.72px);
}
.od-insights-featured .od-tag,
.od-posts--insights .od-tag { border-width: 1.5px; line-height: 1.6; white-space: nowrap; }
.od-insights-featured .od-post-card__meta,
.od-posts--insights .od-post-card__meta { gap: 12px; margin: 0; }
.od-insights-featured .od-post-card__meta span,
.od-posts--insights .od-post-card__meta span { padding-left: 12px; }
/* Empty paragraphs left behind by automatic paragraph formatting */
.od-feature__body > p:empty,
.od-post-card__body > p:empty { display: none; }

.od-insights-list .od-loadmore { display: flex; width: max-content; margin: 80px auto 0; }
.od-insights-empty { margin: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.od-insights-head__intro { grid-template-columns: auto minmax(0, 300px) minmax(0, 230px); justify-content: space-between; column-gap: 24px; }
	.od-insights-head__lead { padding-right: 0; }
	.od-insights-featured, .od-insights-list { padding-top: 100px; }
	.od-posts--insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.od-posts--insights .od-post-card__media { aspect-ratio: 363 / 252; }
	.od-posts--insights > :nth-child(6n + 2) .od-post-card__media { aspect-ratio: 363 / 272; }
	.od-posts--insights > :nth-child(6n + 3) .od-post-card__media { aspect-ratio: 363 / 212; }
	.od-posts--insights > :nth-child(6n + 4) .od-post-card__media { aspect-ratio: 1; }
	.od-posts--insights > :nth-child(6n + 5) .od-post-card__media { aspect-ratio: 363 / 262; }
	.od-posts--insights > :nth-child(6n + 6) .od-post-card__media { aspect-ratio: 363 / 212; }
	.od-insights-featured .od-ticks,
	.od-posts--insights .od-ticks {
		background:
			linear-gradient(var(--od-grey-200), var(--od-grey-200)) 100% 0 / 1px 100% no-repeat,
			repeating-linear-gradient(90deg, var(--od-grey-200) 0 1px, transparent 1px 12.5px);
	}
	.od-feature { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.od-feature__body { padding: 24px 0 0; }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	.od-insights-head__intro { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
	.od-insights-head__intro .od-label { margin-top: 0; }
	.od-insights-head__intro .od-insights-head__text { margin-top: -8px; }
	.od-insights-head__rule { min-width: 24px; }
	.od-insights-list__bar { flex-direction: column; align-items: flex-start; margin-bottom: 32px; }
	.od-posts--insights { grid-template-columns: minmax(0, 1fr); row-gap: 60px; }
	.od-posts--insights .od-post-card__media { aspect-ratio: 350 / 263; }
	.od-posts--insights > :nth-child(6n + 2) .od-post-card__media { aspect-ratio: 350 / 283; }
	.od-posts--insights > :nth-child(6n + 3) .od-post-card__media { aspect-ratio: 350 / 203; }
	.od-posts--insights > :nth-child(6n + 4) .od-post-card__media { aspect-ratio: 350 / 343; }
	.od-posts--insights > :nth-child(6n + 5) .od-post-card__media { aspect-ratio: 350 / 263; }
	.od-posts--insights > :nth-child(6n + 6) .od-post-card__media { aspect-ratio: 350 / 203; }
	.od-insights-list .od-loadmore { margin-top: 60px; }
}

/* ---------- Motion: the orange rule draws in once the page has loaded ---------- */
@media (prefers-reduced-motion: no-preference) {
	.od-motion .od-insights-head__rule { transform: scaleX(0); transition: transform 0.9s cubic-bezier(.16, 1, .3, 1) 0.35s; }
	.od-motion.od-loaded .od-insights-head__rule { transform: none; }
}

/* Filter: one button that opens the list of categories */
.od-insights-filter { display: flex; justify-content: flex-end; }
.od-filter-menu { position: relative; }
.od-filter-menu__toggle { list-style: none; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border: 1px solid var(--od-grey-200); border-radius: 999px; font-size: var(--od-fs-b4); font-weight: 500; line-height: 1.4; color: var(--od-black); cursor: pointer; transition: border-color .3s, color .3s; }
.od-filter-menu__toggle::-webkit-details-marker { display: none; }
.od-filter-menu__toggle:hover, .od-filter-menu[open] .od-filter-menu__toggle { border-color: var(--od-brand); color: var(--od-brand); }
.od-insights-filter .od-filter-menu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0; min-width: 240px; padding: 8px; background: var(--od-white); border: 1px solid var(--od-grey-200); box-shadow: 0 16px 40px rgba(0, 0, 0, .12); }
.od-filter-menu .od-chip { display: block; padding: 10px 12px; border: 0; border-radius: 0; font-size: var(--od-fs-b4); line-height: 1.4; text-decoration: none; }
.od-filter-menu .od-chip:hover, .od-filter-menu .od-chip.is-active { background: var(--od-grey-40); color: var(--od-brand); }
