/*
 * Kontradiktion — brand foundation for Divi-free edition content.
 *
 * The stylesheet is split by surface/concern (all loaded site-wide, in this
 * cascade order — includes/assets.php chains them):
 *   base.css    — tokens, element ownership, shell, buttons, motifs, shared components
 *   chrome.css  — sticky header, nav, wordmark, footer
 *   landing.css — the edition landing (hero index, filmstrip, below-the-fold)
 *   media.css   — media presentation on pieces (images, video, audio player, embeds, lightbox)
 *   piece.css   — the single-piece page (head, prose measure + breakout grid, about, nav)
 *
 * Everything is scoped to .k-piece / .k-edition / body.k-site so it never
 * touches legacy Divi pages (docs/adr/0003).
 */

/* Text for screen readers only — the piece navigation is bare arrows visually
   (the owner asked for no labels), but "‹" alone tells a screen-reader user
   nothing, so the destination rides along here. */
.k-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Generic content scoping (applies wherever piece/edition markup renders). */
.k-piece,
.k-edition {
	max-width: 46rem;
	margin-inline: auto;
	padding-inline: 1.25rem;
}

/* Native smooth scrolling for in-page anchors (e.g. the landing's "Bläddra").
   The plugin renders the whole document on its surfaces, so :has(body.k-site)
   scopes the html element without touching Divi pages. */
@media (prefers-reduced-motion: no-preference) {
	html:has(body.k-site) {
		scroll-behavior: smooth;
	}
}

/* =====================================================================
 * Plugin-rendered surfaces (body.k-site only — never touches Divi pages)
 * Brand: fixed black background, white text, Kepler Std (light) serif.
 * Identity cues from the current site: a big tracked KONTRADIKTION wordmark,
 * down chevrons between sections, /// slash motifs (content-driven), outlined
 * buttons, an airy centred rhythm. Tokens keep richer theming a wiring change
 * (docs/adr/0001).
 * ===================================================================== */
body.k-site {
	--k-bg: #000;
	--k-fg: #fff;
	--k-muted: rgba(255, 255, 255, 0.66);
	--k-rule: rgba(255, 255, 255, 0.16);
	--k-measure: 42rem;   /* prose column — the reading measure */
	--k-shell: 66rem;     /* breakout limit — how wide visual work may grow */
	--k-gutter: 1.5rem;   /* minimum breathing room at the viewport edges */
	--k-header-h: 4rem;
	margin: 0;
	background: var(--k-bg) !important;
	color: var(--k-fg);
	font-family: kepler-std, Georgia, "Times New Roman", serif;
	font-weight: 300;
	font-size: 1.0625rem;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
body.k-site a {
	color: inherit;
}
body.k-site img,
body.k-site video {
	max-width: 100%;
	height: auto;
}
body.k-site iframe {
	max-width: 100%;
}
/* Own the bare elements so any residual Divi base typography can't leak in. */
.k-site h1,
.k-site h2,
.k-site h3,
.k-site h4,
.k-site h5,
.k-site h6,
.k-site p,
.k-site li,
.k-site a,
.k-site figcaption,
.k-site blockquote {
	font-family: inherit;
	color: inherit;
}
.k-site h1,
.k-site h2,
.k-site h3,
.k-site h4 {
	font-weight: 300;
	line-height: 1.15;
}

.k-site .k-site__inner {
	max-width: var(--k-shell);
	margin-inline: auto;
	padding: 3rem var(--k-gutter) 5rem;
}

/* --- Down-chevron motif between sections --- */
.k-chevron {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	margin: 2.5rem 0;
	opacity: 0.5;
}
.k-chevron i {
	display: block;
	width: 0.7rem;
	height: 0.7rem;
	border-right: 1px solid var(--k-fg);
	border-bottom: 1px solid var(--k-fg);
	transform: rotate(45deg);
}

/* --- Outlined buttons (e.g. Förord / link-out) --- */
.k-site .wp-block-button__link,
.k-site .wp-element-button,
.k-btn {
	display: inline-block;
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
	border-radius: 0;
	padding: 0.7em 1.8em;
	text-decoration: none;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 0.8rem;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.k-site .wp-block-button__link:hover,
.k-site .wp-element-button:hover,
.k-btn:hover {
	background: var(--k-fg);
	color: var(--k-bg);
}

/* --- Artists: shared component (aggregate on landing + inline on piece) --- */
.k-edition__artists-title,
.k-about__title {
	text-align: center;
	font-weight: 300;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	font-size: 0.8rem;
	color: var(--k-fg);
	margin: 0 0 2rem;
}
.k-artists {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	gap: 2.5rem;
}
.k-artist__portrait img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	margin-bottom: 0.75rem;
}
.k-artist__name {
	font-weight: 400;
	font-size: 1.05rem;
	margin: 0 0 0.5rem;
}
.k-artist__handle {
	font-style: italic;
	font-weight: 300;
	color: var(--k-muted);
}
.k-artist__bio {
	color: var(--k-muted);
	font-size: 0.92rem;
	line-height: 1.6;
}
.k-artist__links {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1.1rem;
	padding: 0;
	margin: 0.75rem 0 0;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
