/* Vice Versa: News feed.
   Everything is scoped under .vvn (page block) or .vvn-lb (lightbox),
   so nothing here can touch another page. Fonts are inherited from the
   site (Alumni Sans for text, Cardo for headings). */

.vvn {
	--vvn-ink: #000;
	--vvn-soft: #6b6b6b;
	--vvn-line: #e4e4e4;
	--vvn-tile: #f1f1f1;
	--vvn-ratio: 4 / 5;
	--vvn-max: 1320px;

	box-sizing: border-box;
	width: 94vw;
	max-width: var(--vvn-max);
	margin: 0 auto;
	padding: 0 0 6rem;
	color: var(--vvn-ink);
	text-align: left;
}
.vvn *, .vvn *::before, .vvn *::after { box-sizing: border-box; }

.vvn-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 3.5rem 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
@media (max-width: 900px) { .vvn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem 1.5rem; } }
@media (max-width: 560px) { .vvn-grid { grid-template-columns: minmax(0, 1fr); gap: 2.75rem; } }

.vvn-card { margin: 0; padding: 0; min-width: 0; }

.vvn-open {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
.vvn-open:focus-visible { outline: 2px solid var(--vvn-ink); outline-offset: 4px; }

.vvn-media {
	position: relative;
	display: block;
	aspect-ratio: var(--vvn-ratio);
	overflow: hidden;
	background: var(--vvn-tile);
}
.vvn-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity .5s ease, transform .9s cubic-bezier(.2, .7, .3, 1), filter .5s ease;
}
.vvn-media img.is-in { opacity: 1; }
.vvn-open:hover .vvn-media img,
.vvn-open:focus-visible .vvn-media img { transform: scale(1.03); }

/* Optional monochrome treatment: add data-tone="mono" to the mount. */
.vvn[data-tone="mono"] .vvn-media img { filter: grayscale(1) contrast(1.05); }
.vvn[data-tone="mono"] .vvn-open:hover .vvn-media img,
.vvn[data-tone="mono"] .vvn-open:focus-visible .vvn-media img { filter: none; }

.vvn-badge {
	position: absolute;
	top: .75rem;
	right: .75rem;
	width: 1.5rem;
	height: 1.5rem;
	color: #fff;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55));
	pointer-events: none;
}
.vvn-badge svg { display: block; width: 100%; height: 100%; fill: currentColor; }

.vvn-date {
	display: block;
	margin: 1.1rem 0 .35rem;
	font-size: 1.05rem;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--vvn-soft);
}
.vvn-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	margin: 0;
	font-size: 1.4rem;
	line-height: 1.4;
	letter-spacing: .02em;
}

/* Foot of the feed: loader, more button, end line, error. */
.vvn-foot {
	margin-top: 4rem;
	padding-top: 2.5rem;
	border-top: 1px solid var(--vvn-line);
	text-align: center;
	font-size: 1.2rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--vvn-soft);
	min-height: 5rem;
}
.vvn-foot p a { color: var(--vvn-ink); text-decoration: underline; text-underline-offset: .25em; }
.vvn a.vvn-btn { text-decoration: none; }
/* The site styles every <button> (black fill, red on hover and focus), so
   the buttons below spell out each property and each state. */
.vvn button.vvn-btn, .vvn a.vvn-btn {
	display: inline-block;
	height: auto;
	padding: .8em 2.2em .75em;
	border: 1px solid var(--vvn-ink);
	border-radius: 0;
	background: transparent;
	color: var(--vvn-ink);
	font: inherit;
	line-height: 1.3;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
	transition: background .25s, color .25s;
}
.vvn button.vvn-btn:hover, .vvn button.vvn-btn:focus, .vvn a.vvn-btn:hover, .vvn a.vvn-btn:focus { background: var(--vvn-ink); border-color: var(--vvn-ink); color: #fff; }
.vvn button.vvn-btn:focus-visible { outline: 2px solid var(--vvn-ink); outline-offset: 3px; }
.vvn-foot p { margin: 0 0 1.25rem; }
.vvn-sentinel { height: 1px; }

.vvn-skel .vvn-media { animation: vvn-pulse 1.4s ease-in-out infinite; }
.vvn-skel .vvn-line { height: .9rem; margin-top: 1rem; background: var(--vvn-tile); width: 40%; }
.vvn-skel .vvn-line + .vvn-line { width: 85%; margin-top: .6rem; }
@keyframes vvn-pulse { 50% { opacity: .45; } }

.vvn-sr {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Lightbox ---------- */
.vvn-lb {
	box-sizing: border-box;
	width: min(1180px, 94vw);
	max-width: none;
	height: min(820px, 90vh);
	max-height: none;
	margin: auto;
	padding: 0;
	border: 0;
	background: #fff;
	color: #000;
	overflow: hidden;
}
.vvn-lb *, .vvn-lb *::before, .vvn-lb *::after { box-sizing: border-box; }
.vvn-lb::backdrop { background: rgba(18, 18, 18, .9); }
.vvn-lb[open] { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }

.vvn-lb-stage {
	position: relative;
	min-height: 0;
	background: #111;
	display: flex;
	align-items: center;
	justify-content: center;
}
.vvn-lb-stage img, .vvn-lb-stage video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #111;
}
.vvn-lb button.vvn-lb-nav, .vvn-lb button.vvn-lb-close {
	position: absolute;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: #000;
	font-size: 1rem;
	line-height: 1;
	letter-spacing: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s;
}
.vvn-lb button.vvn-lb-nav:hover, .vvn-lb button.vvn-lb-nav:focus,
.vvn-lb button.vvn-lb-close:hover, .vvn-lb button.vvn-lb-close:focus { background: #fff; border: 0; }
.vvn-lb button.vvn-lb-nav { top: 50%; margin-top: -1.375rem; }
.vvn-lb button.vvn-lb-nav[hidden] { display: none; }
.vvn-lb-nav svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; }
.vvn-lb button.vvn-lb-prev { left: .9rem; }
.vvn-lb button.vvn-lb-next { right: .9rem; }
.vvn-lb-count {
	position: absolute;
	bottom: .9rem;
	left: 50%;
	transform: translateX(-50%);
	padding: .2em .8em;
	background: rgba(0, 0, 0, .6);
	color: #fff;
	font-size: 1rem;
	letter-spacing: .14em;
}
.vvn-lb-count[hidden] { display: none; }

.vvn-lb-text {
	min-height: 0;
	overflow-y: auto;
	padding: 3.5rem 2.5rem 2.5rem;
	text-align: left;
}
.vvn-lb-date {
	display: block;
	margin: 0 0 1.25rem;
	font-size: 1.05rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #6b6b6b;
}
.vvn-lb-caption p {
	margin: 0 0 1em;
	font-size: 1.45rem;
	line-height: 1.5;
	letter-spacing: .02em;
	overflow-wrap: anywhere;
}
.vvn-lb-caption a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.vvn-lb-link {
	display: inline-block;
	margin-top: 1rem;
	font-size: 1.05rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #000;
	text-decoration: underline;
	text-underline-offset: .3em;
}
.vvn-lb button.vvn-lb-close { top: .6rem; right: .6rem; z-index: 2; }
.vvn-lb-close svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; }
.vvn-lb button:focus-visible, .vvn-lb a:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.vvn-lb-text { text-shadow: none; }
.vvn-lb-stage button:focus-visible { outline-color: #fff; }

@media (max-width: 800px) {
	.vvn-lb { width: 100vw; height: 100dvh; }
	.vvn-lb[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 55%) minmax(0, 45%); }
	.vvn-lb-text { padding: 1.75rem 1.5rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
	.vvn-media img { transition: opacity .2s; }
	.vvn-open:hover .vvn-media img, .vvn-open:focus-visible .vvn-media img { transform: none; }
	.vvn-skel .vvn-media { animation: none; }
}

/* The site turns every link red on hover and focus. Not here: text stays as it is. */
.vvn a:hover, .vvn a:focus, .vvn .vvn-open:hover, .vvn .vvn-open:focus { color: inherit; }
.vvn-foot p a:hover, .vvn-foot p a:focus { color: var(--vvn-ink); }
.vvn-lb a:hover, .vvn-lb a:focus { color: #000; }
.vvn-lb-caption a:hover, .vvn-lb-caption a:focus { color: inherit; }
