/*
 * Navigation, dropdown, shop button, card grids and mobile off-canvas panel.
 *
 * This file is the visual upgrade that turns the flat link list into a polished
 * publication-level navigation. Every colour comes from the tokens; no value is
 * invented here.
 *
 * Requirements: 2.3, 2.5, 2.6, 5.2, 7.1, 9.1
 */

/* ---------------------------------------------------------------------------
 * Design tokens for this component
 * ------------------------------------------------------------------------ */

:root {
	--itwt-dropdown-surface: var(--itwt-paper-raised);
	--itwt-dropdown-shadow: var(--itwt-shadow-l);
	--itwt-shop-bg: var(--itwt-brand);
	--itwt-shop-fg: var(--itwt-paper-raised);
	--itwt-nav-transition: var(--itwt-motion) var(--itwt-ease);
}

/* ---------------------------------------------------------------------------
 * Screen-reader only utility
 * ------------------------------------------------------------------------ */

.itwt-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------------------
 * Navigation structure (shared)
 * ------------------------------------------------------------------------ */

.itwt-nav {
	position: relative;
}

.itwt-nav__list {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
	gap: var(--itwt-space-2xs) var(--itwt-space-xs);
	flex-wrap: wrap;
	align-items: center;
}

.itwt-nav__item > a,
.itwt-nav__item > button {
	display: inline-flex;
	align-items: center;
	min-height: var(--itwt-tap-min);
	padding-inline: var(--itwt-space-xs);
	font-family: var(--itwt-font-body);
	font-size: var(--itwt-size-small);
	font-weight: var(--itwt-weight-body);
	letter-spacing: 0.01em;
	text-decoration: none;
	color: inherit;
	background: none;
	border: none;
	cursor: pointer;
	transition: color var(--itwt-nav-transition);
}

.itwt-nav__item > a:hover,
.itwt-nav__item > button:hover {
	text-decoration: underline;
	text-decoration-thickness: var(--itwt-rule-width-strong);
	text-underline-offset: 0.25em;
}

.itwt-nav__close {
	display: none;
}

.itwt-nav__item--has-children > button::after {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	margin-inline-start: 0.4em;
	border-inline-start: 0.28em solid transparent;
	border-inline-end: 0.28em solid transparent;
	border-block-start: 0.32em solid currentColor;
	transform: none;
	opacity: 0.75;
	transition: transform var(--itwt-nav-transition);
}

.itwt-nav__item--has-children > button[aria-expanded="true"]::after {
	transform: rotate(180deg);
}

/* ---------------------------------------------------------------------------
 * Dropdown submenu (desktop: CSS-only)
 * ------------------------------------------------------------------------ */

.itwt-nav__submenu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 100;
	min-width: 14rem;
	margin: 0;
	padding: var(--itwt-space-xs) 0;
	list-style: none;
	background-color: var(--itwt-dropdown-surface);
	border: var(--itwt-rule-width) solid var(--itwt-rule);
	border-radius: var(--itwt-radius);
	box-shadow: var(--itwt-dropdown-shadow);
	/* Smooth appear animation */
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity var(--itwt-nav-transition), transform var(--itwt-nav-transition);
}

.itwt-nav__item--has-children {
	position: relative;
}

.itwt-nav__item--has-children.is-open > .itwt-nav__submenu {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

.itwt-nav__submenu a,
.itwt-nav__submenu span {
	display: block;
	padding: var(--itwt-space-xs) var(--itwt-space-l);
	color: var(--itwt-ink);
	font-size: var(--itwt-size-small);
	text-decoration: none;
	transition: background-color var(--itwt-nav-transition);
}

.itwt-nav__submenu a:hover,
.itwt-nav__submenu a:focus {
	background-color: var(--itwt-brand-tint);
}

.itwt-nav__empty {
	color: var(--itwt-ink-soft);
	font-style: italic;
}

/* ---------------------------------------------------------------------------
 * Shop button — the CTA that POPS
 * ------------------------------------------------------------------------ */

.itwt-shop-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--itwt-tap-min);
	padding: var(--itwt-space-xs) var(--itwt-space-l);
	background-color: var(--itwt-shop-bg);
	background-image: var(--itwt-gradient-action);
	color: var(--itwt-shop-fg);
	font-family: var(--itwt-font-body);
	font-size: var(--itwt-size-small);
	font-weight: var(--itwt-weight-strong);
	letter-spacing: 0.02em;
	text-decoration: none;
	border-radius: var(--itwt-radius-pill);
	border: var(--itwt-rule-width-strong) solid transparent;
	box-shadow: var(--itwt-shadow-m);
	transition: background-color var(--itwt-nav-transition),
	            transform var(--itwt-nav-transition),
	            box-shadow var(--itwt-nav-transition);
}

.itwt-shop-btn:hover {
	background-color: var(--itwt-link);
	background-image: var(--itwt-gradient-action-hover);
	transform: translateY(var(--itwt-lift));
	box-shadow: var(--itwt-shadow-l);
}

.itwt-shop-btn:focus {
	outline-color: var(--itwt-paper);
}

/*
 * On the dark band a brand-on-brand button disappears. Paper on the band is an
 * audited pair, and it is the one colour that actually stands off the nameplate.
 */
.itwt-masthead .itwt-shop-btn {
	background-color: var(--itwt-paper-raised);
	background-image: none;
	color: var(--itwt-brand);
	border-color: var(--itwt-paper-raised);
}

.itwt-masthead .itwt-shop-btn:hover,
.itwt-masthead .itwt-shop-btn:focus {
	background-color: var(--itwt-brand-tint);
	background-image: none;
	color: var(--itwt-brand-deep);
	border-color: var(--itwt-brand-tint);
}

/* ---------------------------------------------------------------------------
 * Desktop layout (>= 48em)
 * ------------------------------------------------------------------------ */

@media (min-width: 48em) {
	.itwt-nav__toggle,
	.itwt-nav__close {
		display: none;
	}

	.itwt-nav__panel {
		display: flex;
		align-items: center;
		flex-wrap: nowrap;
		gap: var(--itwt-space-m);
	}

	.itwt-nav__list {
		gap: var(--itwt-space-2xs) var(--itwt-space-xs);
	}

	.itwt-nav__item--has-children:hover > .itwt-nav__submenu,
	.itwt-nav__item--has-children:focus-within > .itwt-nav__submenu {
		display: block;
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------------------------------------------------------------------------
 * Mobile layout (< 48em): off-canvas panel
 *
 * The masthead is sticky. A position:fixed descendant of a sticky ancestor is
 * a containing-block trap on WebKit: the panel then only covers the nameplate
 * and Zoeken sits on top of the page heading underneath. While the menu is
 * open the band is relative, so inset:0 is the viewport again.
 * ------------------------------------------------------------------------ */

body.is-nav-open {
	overflow: hidden;
}

@media (max-width: 47.999em) {
	body.is-nav-open .itwt-masthead {
		position: relative;
	}

	body.is-nav-open .itwt-masthead__title,
	body.is-nav-open .itwt-nav__toggle {
		visibility: hidden;
	}

	.itwt-nav__toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: var(--itwt-tap-min);
		min-width: var(--itwt-tap-min);
		padding: var(--itwt-space-xs);
		background: none;
		border: var(--itwt-rule-width) solid var(--itwt-paper-soft);
		border-radius: var(--itwt-radius);
		color: var(--itwt-paper);
		font-size: 1.5rem;
		cursor: pointer;
		transition: border-color var(--itwt-nav-transition);
	}

	.itwt-nav__toggle:hover {
		border-color: var(--itwt-paper);
	}

	.itwt-nav__panel {
		position: fixed;
		inset: 0;
		z-index: 1000;
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-rows: auto minmax(0, 1fr) auto;
		align-items: center;
		padding: max(var(--itwt-space-m), env(safe-area-inset-top, 0px))
			var(--itwt-space-l)
			max(var(--itwt-space-xl), env(safe-area-inset-bottom, 0px));
		background-color: var(--itwt-brand-deep);
		color: var(--itwt-paper);
		transform: translateX(-100%);
		transition: transform var(--itwt-nav-transition);
		overflow: hidden;
		isolation: isolate;
	}

	.itwt-nav__panel.is-open {
		transform: translateX(0);
	}

	.itwt-nav__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		grid-column: 2;
		grid-row: 1;
		min-height: var(--itwt-tap-min);
		min-width: var(--itwt-tap-min);
		margin: 0;
		padding: 0;
		background: none;
		border: var(--itwt-rule-width) solid var(--itwt-paper-soft);
		border-radius: var(--itwt-radius);
		color: var(--itwt-paper);
		font-size: 1.75rem;
		line-height: 1;
		cursor: pointer;
	}

	.itwt-nav__list {
		grid-column: 1 / -1;
		grid-row: 2;
		align-self: stretch;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 0;
		min-height: 0;
		margin-block-start: var(--itwt-space-m);
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.itwt-nav__item > a,
	.itwt-nav__item > button {
		width: 100%;
		justify-content: space-between;
		padding: var(--itwt-space-s) 0;
		font-size: var(--itwt-size-body);
		border-bottom: var(--itwt-rule-width) solid var(--itwt-rule-on-band);
	}

	/* Accordion: closed until Onderwerpen is tapped. In flow, never over Zoeken. */
	.itwt-nav__submenu {
		display: none;
		position: static;
		z-index: auto;
		opacity: 1;
		transform: none;
		background: none;
		border: none;
		box-shadow: none;
		padding: 0 0 var(--itwt-space-xs) var(--itwt-space-l);
	}

	.itwt-nav__item--has-children.is-open > .itwt-nav__submenu {
		display: block;
	}

	.itwt-nav__submenu a,
	.itwt-nav__submenu span {
		color: var(--itwt-paper-soft);
		padding: var(--itwt-space-s) 0;
		min-height: var(--itwt-tap-min);
	}

	.itwt-nav__submenu a:hover,
	.itwt-nav__submenu a:focus {
		color: var(--itwt-paper);
		background: none;
	}

	.itwt-nav__panel > .itwt-shop-btn {
		grid-column: 1 / -1;
		grid-row: 3;
		margin-top: var(--itwt-space-m);
		align-self: stretch;
		width: 100%;
	}
}

/* ---------------------------------------------------------------------------
 * Hero — compact name + CTAs, then a full-bleed named still.
 * The photograph is an <img> in a figure, never a CSS background
 * (Requirement 22.8).
 * ------------------------------------------------------------------------ */

.itwt-hero {
	overflow-x: clip;
	padding-block: var(--itwt-space-l) 0;
	background-color: var(--itwt-brand-tint);
}

.itwt-hero__bar {
	display: grid;
	gap: var(--itwt-space-l);
	padding-block-end: var(--itwt-space-l);
}

.itwt-hero .itwt-label {
	color: var(--itwt-brand);
}

.itwt-hero__title {
	font-size: clamp(1.85rem, 1.2rem + 2.4vw, 2.75rem);
	margin-block-start: var(--itwt-space-2xs);
	letter-spacing: -0.024em;
	line-height: 1.08;
}

.itwt-hero__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	flex-wrap: wrap;
	gap: var(--itwt-space-s);
	margin: 0;
}

.itwt-hero__cta {
	display: inline-flex;
	align-items: center;
	min-height: var(--itwt-tap-min);
	margin-block-start: 0;
	background-color: var(--itwt-brand);
	background-image: var(--itwt-gradient-action);
	color: var(--itwt-paper-raised);
	border: var(--itwt-rule-width-strong) solid var(--itwt-brand);
	padding: var(--itwt-space-s) var(--itwt-space-xl);
	border-radius: var(--itwt-radius);
	font-weight: var(--itwt-weight-strong);
	font-size: var(--itwt-size-body);
	letter-spacing: 0.01em;
	text-decoration: none;
	justify-content: center;
	width: 100%;
	box-shadow: var(--itwt-shadow-m);
	transition: background-color var(--itwt-nav-transition),
	            transform var(--itwt-nav-transition),
	            box-shadow var(--itwt-nav-transition),
	            color var(--itwt-nav-transition);
}

.itwt-hero__cta:hover {
	background-color: var(--itwt-link);
	background-image: var(--itwt-gradient-action-hover);
	border-color: var(--itwt-link);
	color: var(--itwt-paper-raised);
	transform: translateY(var(--itwt-lift));
	box-shadow: var(--itwt-shadow-l);
}

.itwt-hero__cta--ghost {
	background-color: transparent;
	background-image: none;
	color: var(--itwt-brand);
	border-color: var(--itwt-brand);
	box-shadow: none;
}

.itwt-hero__cta--ghost:hover {
	background-color: var(--itwt-paper-raised);
	background-image: none;
	color: var(--itwt-brand-deep);
	border-color: var(--itwt-brand);
}

.itwt-hero__still {
	margin: 0;
	border-block-end: var(--itwt-rule-width-strong) solid var(--itwt-brand);
}

.itwt-hero__still img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 26rem;
	aspect-ratio: 2 / 1;
	object-fit: cover;
	object-position: center 40%;
}

.itwt-home-shop {
	background-color: var(--itwt-paper);
	padding-block: var(--itwt-space-xl);
	border-block-end: var(--itwt-rule-width-strong) solid var(--itwt-brand);
}

.itwt-home-shop__inner {
	display: grid;
	gap: var(--itwt-space-l);
}

.itwt-home-shop__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--itwt-space-s);
}

.itwt-home-shop__copy .itwt-label,
.itwt-home-shop__copy .itwt-section__title,
.itwt-home-shop__copy > p {
	margin: 0;
}

.itwt-home-shop__copy > p {
	max-width: 28rem;
}

.itwt-home-shop__picks {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--itwt-space-m);
}

.itwt-home-shop__picks img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	background-color: var(--itwt-paper-raised);
	border: var(--itwt-rule-width) solid var(--itwt-rule);
	border-radius: var(--itwt-radius);
}

.itwt-home-shop .itwt-hero__cta {
	width: auto;
	min-width: 10rem;
	margin-block-start: var(--itwt-space-xs);
}

@media (max-width: 47.999em) {
	.itwt-home-shop .itwt-hero__cta {
		width: 100%;
	}
}

@media (min-width: 48em) {
	.itwt-home-shop__inner {
		grid-template-columns: minmax(0, 1fr) minmax(18rem, 1fr);
		align-items: start;
		column-gap: var(--itwt-space-2xl);
	}
}

.itwt-search {
	display: flex;
	align-items: stretch;
	flex: 0 1 9rem;
	width: 9rem;
	max-width: 9rem;
	min-width: 0;
}

.itwt-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	min-height: var(--itwt-tap-min);
	margin: 0;
	border: var(--itwt-rule-width) solid var(--itwt-paper-soft);
	border-right: 0;
	border-radius: var(--itwt-radius) 0 0 var(--itwt-radius);
	background-color: var(--itwt-brand);
	color: var(--itwt-paper);
	padding: 0 var(--itwt-space-s);
	font-size: var(--itwt-size-small);
}

.itwt-search button {
	min-height: var(--itwt-tap-min);
	margin: 0;
	padding: 0 var(--itwt-space-s);
	border: var(--itwt-rule-width) solid var(--itwt-paper-raised);
	border-radius: 0 var(--itwt-radius) var(--itwt-radius) 0;
	background-color: var(--itwt-paper-raised);
	color: var(--itwt-brand);
	font-weight: var(--itwt-weight-strong);
	cursor: pointer;
}

@media (max-width: 47.999em) {
	.itwt-search {
		grid-column: 1;
		grid-row: 1;
		width: auto;
		max-width: none;
		flex: none;
		align-self: center;
		min-width: 0;
		margin-inline-end: var(--itwt-space-s);
	}

	.itwt-search button {
		padding: 0 0.65rem;
	}
}

/*
 * Mobile: name, still, then the two actions. display:contents lifts the bar
 * children into the hero grid so the photograph sits between title and CTAs.
 */
@media (max-width: 47.999em) {
	.itwt-hero {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		padding-block-start: var(--itwt-space-m);
	}

	.itwt-hero__bar {
		display: contents;
	}

	.itwt-hero__lead {
		grid-row: 1;
		padding-inline: var(--itwt-page-gutter);
		padding-block-end: var(--itwt-space-m);
	}

	.itwt-hero__still {
		grid-row: 2;
	}

	.itwt-hero__actions {
		grid-row: 3;
		padding: var(--itwt-space-l) var(--itwt-page-gutter);
	}
}

@media (min-width: 48em) {
	.itwt-hero__bar {
		display: flex;
		align-items: flex-end;
		justify-content: space-between;
		gap: var(--itwt-space-xl);
		padding-block: var(--itwt-space-xl) var(--itwt-space-l);
	}

	.itwt-hero__actions {
		flex-direction: row;
		flex-wrap: nowrap;
		flex: 0 1 auto;
		justify-content: flex-end;
	}

	.itwt-hero__cta {
		width: auto;
		min-width: 10rem;
	}
}

/* ---------------------------------------------------------------------------
 * Homepage bands — tinted doors under the still, then paper for the records.
 * ------------------------------------------------------------------------ */

.itwt-home-doors {
	background-color: var(--itwt-brand-tint);
	background-image: var(--itwt-gradient-surface);
	padding-block: var(--itwt-space-xl) var(--itwt-space-2xl);
	border-block-end: var(--itwt-rule-width-strong) solid var(--itwt-brand);
}

.itwt-home-recent {
	background-color: var(--itwt-paper);
	padding-block: var(--itwt-space-l);
}

.itwt-recent-fold > summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--itwt-space-xs) var(--itwt-space-m);
	cursor: pointer;
	list-style: none;
	min-height: var(--itwt-tap-min);
	padding-block: var(--itwt-space-s);
}

.itwt-recent-fold > summary::-webkit-details-marker {
	display: none;
}

.itwt-recent-fold > summary::after {
	content: "";
	width: 0.45em;
	height: 0.45em;
	margin-inline-start: auto;
	border-inline-end: var(--itwt-rule-width-strong) solid var(--itwt-brand);
	border-block-end: var(--itwt-rule-width-strong) solid var(--itwt-brand);
	transform: rotate(45deg) translateY(-0.15em);
	flex: 0 0 auto;
}

.itwt-recent-fold[open] > summary::after {
	transform: rotate(225deg) translateY(-0.1em);
}

.itwt-recent-fold__title {
	font-family: var(--itwt-font-head);
	font-size: var(--itwt-size-h3);
	font-weight: var(--itwt-weight-head);
	letter-spacing: var(--itwt-tracking-head);
	color: var(--itwt-brand);
}

.itwt-recent-list {
	list-style: none;
	margin: 0;
	padding: 0 0 var(--itwt-space-m);
	border-block-start: var(--itwt-rule-width) solid var(--itwt-rule);
}

.itwt-recent-list li {
	display: grid;
	grid-template-columns: 6.5rem minmax(0, 1fr) auto;
	gap: var(--itwt-space-s) var(--itwt-space-m);
	align-items: baseline;
	padding-block: var(--itwt-space-s);
	border-block-end: var(--itwt-rule-width) solid var(--itwt-rule);
}

.itwt-recent-list__type {
	font-size: var(--itwt-size-small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--itwt-ink-soft);
}

.itwt-recent-list a {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.itwt-recent-list time {
	font-size: var(--itwt-size-small);
	color: var(--itwt-ink-soft);
	white-space: nowrap;
}

@media (max-width: 35.999em) {
	.itwt-recent-list li {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.itwt-recent-list__type {
		grid-column: 1 / -1;
	}
}

/* ---------------------------------------------------------------------------
 * Entry trio — three equal ways into the archives, under the hero.
 * ------------------------------------------------------------------------ */

.itwt-entries {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--itwt-space-m);
}

@media (min-width: 42em) {
	.itwt-entries {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.itwt-entry {
	display: flex;
	flex-direction: column;
	gap: var(--itwt-space-s);
	min-height: var(--itwt-tap-min);
	padding: var(--itwt-space-l) var(--itwt-space-l) var(--itwt-space-xl);
	background-color: var(--itwt-paper-raised);
	border: var(--itwt-rule-width) solid var(--itwt-rule);
	border-block-start: 3px solid var(--itwt-brand);
	border-radius: var(--itwt-radius-card);
	box-shadow: var(--itwt-shadow-card);
	color: var(--itwt-ink);
	text-decoration: none;
	transition: transform var(--itwt-nav-transition),
	            box-shadow var(--itwt-nav-transition);
}

.itwt-entry:hover {
	transform: translateY(var(--itwt-lift));
	box-shadow: var(--itwt-shadow-card-hover);
	text-decoration: none;
}

.itwt-entry .itwt-label {
	margin: 0;
}

.itwt-entry__title {
	font-family: var(--itwt-font-head);
	font-size: var(--itwt-size-h3);
	font-weight: var(--itwt-weight-head);
	letter-spacing: var(--itwt-tracking-head);
	line-height: var(--itwt-line-head);
	color: var(--itwt-brand);
}

.itwt-entry__text {
	color: var(--itwt-ink-soft);
	font-size: var(--itwt-size-small);
	line-height: 1.5;
	margin-block-start: auto;
}

/* ---------------------------------------------------------------------------
 * Publication card grid (front page + topic archive)
 * ------------------------------------------------------------------------ */

.itwt-pub-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--itwt-space-l);
}

@media (min-width: 36em) {
	.itwt-pub-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 48em) {
	.itwt-pub-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.itwt-pub-card {
	display: flex;
	flex-direction: column;
	gap: var(--itwt-space-s);
	min-height: 12rem;
	padding: var(--itwt-space-l) var(--itwt-space-l) var(--itwt-space-xl);
	background-color: var(--itwt-paper-raised);
	border: var(--itwt-rule-width) solid var(--itwt-rule);
	border-block-start: 3px solid var(--itwt-brand);
	border-radius: var(--itwt-radius-card);
	box-shadow: var(--itwt-shadow-card);
	transition: transform var(--itwt-nav-transition),
	            box-shadow var(--itwt-nav-transition);
}

.itwt-pub-card:hover {
	transform: translateY(var(--itwt-lift));
	box-shadow: var(--itwt-shadow-card-hover);
}

.itwt-pub-card__title {
	font-family: var(--itwt-font-head);
	font-size: var(--itwt-size-h3);
	font-weight: var(--itwt-weight-head);
	line-height: var(--itwt-line-head);
	letter-spacing: var(--itwt-tracking-head);
	margin: 0;
	flex: 1 1 auto;
}

.itwt-pub-card__title a {
	text-decoration: none;
	color: var(--itwt-brand);
}

.itwt-pub-card__title a:hover {
	text-decoration: underline;
	text-decoration-thickness: var(--itwt-rule-width-strong);
}

.itwt-pub-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--itwt-space-xs) var(--itwt-space-s);
	font-size: var(--itwt-size-small);
	color: var(--itwt-ink-soft);
}

.itwt-pub-card__type {
	display: inline-block;
	margin: 0;
	padding: var(--itwt-space-3xs) var(--itwt-space-xs);
	background-color: var(--itwt-brand-tint);
	color: var(--itwt-brand);
	border-radius: var(--itwt-radius);
	font-weight: var(--itwt-weight-strong);
	font-size: var(--itwt-size-label);
	letter-spacing: var(--itwt-tracking-label);
	text-transform: uppercase;
	width: fit-content;
}

.itwt-pub-card__topic a {
	color: var(--itwt-ink-soft);
	text-decoration-color: var(--itwt-rule);
}

.itwt-pub-card__topic a:hover {
	color: var(--itwt-link);
}

/*
 * Placeholder cards: shown when there are no publications yet. They preview what
 * each content type will look like, so the page never feels empty or broken.
 */
.itwt-pub-card--placeholder {
	border-top-color: var(--itwt-rule);
	background: repeating-linear-gradient(
		-45deg,
		var(--itwt-paper-raised),
		var(--itwt-paper-raised) 10px,
		var(--itwt-paper) 10px,
		var(--itwt-paper) 20px
	);
	background-size: 200% 200%;
	opacity: 0.85;
}

.itwt-pub-card--placeholder .itwt-pub-card__meta {
	font-style: italic;
}

/* ---------------------------------------------------------------------------
 * Video card grid (Afleveringen archive — YouTube/Odysee style)
 * ------------------------------------------------------------------------ */

.itwt-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--itwt-space-l);
}

@media (min-width: 36em) {
	.itwt-card-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 48em) {
	.itwt-card-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.itwt-video-card {
	position: relative;
	display: flex;
	flex-direction: column;
	color: var(--itwt-ink);
	background-color: var(--itwt-paper-raised);
	border: var(--itwt-rule-width) solid var(--itwt-rule);
	border-radius: var(--itwt-radius-card);
	overflow: hidden;
	box-shadow: var(--itwt-shadow-card);
	transition: transform var(--itwt-nav-transition),
	            box-shadow var(--itwt-nav-transition);
}

.itwt-video-card:hover {
	transform: translateY(var(--itwt-lift));
	box-shadow: var(--itwt-shadow-card-hover);
}

.itwt-video-card__title a {
	color: var(--itwt-brand);
	text-decoration: none;
}

.itwt-video-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.itwt-video-card__topic {
	position: relative;
	z-index: 1;
}

.itwt-video-card__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: var(--itwt-brand-deep);
	overflow: hidden;
}

.itwt-video-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.itwt-video-card__placeholder {
	width: 100%;
	height: 100%;
	background-color: var(--itwt-brand-deep);
	background-image: var(--itwt-gradient-band);
}

.itwt-video-card__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 1;
}

.itwt-video-card__play::after {
	content: "";
	display: block;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 1.25rem 0 1.25rem 2rem;
	border-color: transparent transparent transparent var(--itwt-play-icon);
	transition: border-color var(--itwt-nav-transition);
}

.itwt-video-card:hover .itwt-video-card__play::after {
	border-color: transparent transparent transparent var(--itwt-play-icon-hover);
}

.itwt-video-card__body {
	padding: var(--itwt-space-m) var(--itwt-space-m) var(--itwt-space-l);
	display: flex;
	flex-direction: column;
	gap: var(--itwt-space-xs);
	flex: 1;
}

.itwt-video-card__title {
	font-family: var(--itwt-font-head);
	font-size: var(--itwt-size-h3);
	font-weight: var(--itwt-weight-head);
	letter-spacing: var(--itwt-tracking-head);
	line-height: var(--itwt-line-head);
	margin: 0;
	color: var(--itwt-ink);
}

.itwt-video-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--itwt-space-xs);
	font-size: var(--itwt-size-small);
	color: var(--itwt-ink-soft);
	margin-top: auto;
}

.itwt-video-card__topic a {
	color: var(--itwt-ink-soft);
	text-decoration: none;
}

.itwt-video-card__topic a:hover {
	color: var(--itwt-link);
}

/* ---------------------------------------------------------------------------
 * Topic label (inline)
 * ------------------------------------------------------------------------ */

.itwt-topic-label {
	color: var(--itwt-ink-soft);
	font-size: var(--itwt-size-small);
	text-decoration-color: var(--itwt-rule);
}

.itwt-topic-label:hover {
	color: var(--itwt-link);
}
