/*
 * Baldridge — "one archive, eight rooms".
 *
 * Eight former iWeb sites now live under one roof. They share an architecture
 * (header, single content column, one type scale) but each keeps the light,
 * palette and surface of its original. Every value below is a modernized
 * reading of that site's iWeb theme; the source page is named in the comment.
 *
 * Tokens live on :root and are overridden per `body.section-<slug>`:
 *   --bg       page background (color or texture)
 *   --panel    content surface, for rooms that float the column on a field
 *   --fg       body text            --head   heading colour
 *   --accent   links / rule / button
 *   --hair     hairline colour
 *   --font     body + display family
 *   --tracking heading letter-spacing (Futura rooms use caps + tracking)
 */

:root {
	--bg: #fbfaf7;
	--panel: transparent;
	--fg: #1e1c1a;
	--head: #111010;
	--ui: #1e1c1a; /* header / footer / nav text — always legible on --bg */
	--accent: #2b6cb0;
	--hair: #e5e0d5;
	--font: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--tracking: normal;
	--panel-pad: 0rem;
	--panel-shadow: none;
}

/* tbaldridge — iWeb body bg rgb(0,0,0), white Arial (tbaldridge/Navajo.html) */
body.section-tbaldridge {
	--bg: #0b0b0b;
	--fg: #e7e4df;
	--head: #ffffff;
	--ui: #ffffff;
	--accent: #c8a24a;
	--hair: #272727;
}

/* lilting — iWeb body bg rgb(0,141,27), white Arial Bold (lilting/Introduction.html) */
body.section-lilting {
	--bg: #0b7d24;
	--fg: #eefbec;
	--head: #ffffff;
	--ui: #ffffff;
	--accent: #ffe083;
	--hair: #2f9c46;
}

/* teoria — iWeb white bg, grey headers rgb(167,167,167), warm-grey body (teoria/Acordes.html) */
body.section-teoria {
	--bg: #ffffff;
	--fg: #3c3636;
	--head: #9a9a9a; /* iWeb teoria used grey headers rgb(167,167,167) */
	--ui: #333333;
	--accent: #7c1d2b;
	--hair: #e7e4e2;
}

/* salmos — iWeb parchment rgb(218,204,174), brown-grey text (salmos/Ideas.html) */
body.section-salmos {
	--bg: #e6d8b8;
	--panel: #f2e9d2;
	--fg: #493e2d;
	--head: #5b4127;
	--ui: #5b4127;
	--accent: #8a5320;
	--hair: #cbba93;
	--font: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
	--panel-pad: clamp(1.5rem, 5vw, 3rem);
	--panel-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 2px 12px rgba(74, 58, 34, 0.12);
}

/* cantos — iWeb grey field rgb(96,96,96), Cochin serif (cantos/El_Vive.html) */
body.section-cantos {
	--bg: #5b5b5b;
	--panel: #f4f2ec;
	--fg: #262626;
	--head: #333333;
	--ui: #efeae0;
	--accent: #7c5a3a;
	--hair: #d9d3c6;
	--font: Cochin, "Cochin LT Std", Optima, Georgia, "Times New Roman", serif;
	--panel-pad: clamp(1.5rem, 5vw, 3rem);
	--panel-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

/* stns — iWeb "PhotoGray": charcoal linen texture, white Futura (STNS/Creacion.html) */
body.section-stns {
	--bg: #333333 url("../assets/photogray-texture.jpg") repeat top left;
	--fg: #f1f1f1;
	--head: #ececec;
	--ui: #ececec;
	--accent: #cf9f52;
	--hair: #4b4b4b;
	--font: Futura, "Futura PT", "Century Gothic", "Trebuchet MS", sans-serif;
	--tracking: 0.06em;
}

/* worldmusic — same iWeb "PhotoGray" theme (MNUworldmusic/Welcome.html) */
body.section-worldmusic {
	--bg: #333333 url("../assets/photogray-texture.jpg") repeat top left;
	--fg: #f1f1f1;
	--head: #ececec;
	--ui: #ececec;
	--accent: #d98b3c;
	--hair: #4b4b4b;
	--font: Futura, "Futura PT", "Century Gothic", "Trebuchet MS", sans-serif;
	--tracking: 0.06em;
}

/* folksong — iWeb body bg rgb(0,0,0), white Helvetica (Appalachian_Folksong/Introduction.html) */
body.section-folksong {
	--bg: #000000;
	--fg: #e9e9e9;
	--head: #ffffff;
	--ui: #ffffff;
	--accent: #b9772f;
	--hair: #222222;
	--font: Helvetica, "Helvetica Neue", Arial, sans-serif;
}

/* ---- apply the tokens ------------------------------------------------------ */

body {
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
}

body a,
body .wp-block-post-content a {
	color: var(--accent);
}

h1, h2, h3, h4,
.wp-block-post-title,
.wp-block-heading {
	color: var(--head);
	font-family: var(--font);
	letter-spacing: var(--tracking);
}

/* Futura rooms: geometric caps on the page title, the iWeb PhotoGray signature */
body.section-stns .wp-block-post-title,
body.section-worldmusic .wp-block-post-title {
	text-transform: uppercase;
	font-weight: 500;
}

/* header + footer sit on the room's field, divided by the accent rule */
.wp-site-blocks > header {
	background: var(--bg);
	border-bottom: 3px solid var(--accent) !important;
}
.wp-site-blocks > footer {
	background: var(--bg);
	border-top: 1px solid var(--hair) !important;
}
.wp-site-blocks > header,
.wp-site-blocks > header a,
.wp-site-blocks > footer,
.wp-site-blocks > footer a,
.wp-block-site-title a,
.wp-block-navigation,
.wp-block-navigation a {
	color: var(--ui);
}

/* signature: a section eyebrow above every page title */
.tb-eyebrow {
	margin: 0 0 0.4rem;
	font-family: var(--font);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

/* content column: floated on a surface for the rooms that define --panel */
main.wp-block-group {
	background: var(--panel);
	padding: var(--panel-pad);
	border-radius: 2px;
	box-shadow: var(--panel-shadow);
}
body.section-cantos main.wp-block-group,
body.section-salmos main.wp-block-group {
	max-width: 48rem;
	margin-inline: auto;
}

/* media keeps its own light ground so score scans / PDFs read on dark rooms */
.wp-block-image img,
.wp-block-video video {
	max-width: 100%;
	height: auto;
}
.wp-block-image {
	width: fit-content;
	max-width: 100%;
	margin-inline: 0;
	background: #fff;
	padding: 8px;
	border-radius: 2px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.wp-block-image img {
	display: block;
}
.wp-block-image:has(> a) { /* linked thumbnail: no paper frame */
	background: transparent;
	padding: 0;
	box-shadow: none;
}

/* file block -> a single clean "download" pill (the core __button link,
   which is a redundant second "Download", is hidden) */
.wp-block-file {
	display: flex;
	gap: 0.9rem;
	align-items: center;
	flex-wrap: wrap;
}
.wp-block-file a:not(.wp-block-file__button) {
	display: inline-flex;
	align-items: baseline;
	gap: 0.45rem;
	padding: 0.4em 1em;
	border: 1px solid var(--accent);
	border-radius: 999px;
	color: var(--accent);
	font-weight: 600;
	text-decoration: none;
}
.wp-block-file a:not(.wp-block-file__button)::before {
	content: "\2193"; /* ↓ */
}
.wp-block-file__button {
	display: none;
}

/* audio: a framed strip so the player is obviously present on every room */
.wp-block-audio {
	background: rgba(128, 128, 128, 0.14);
	border: 1px solid var(--hair);
	border-radius: 4px;
	padding: 0.6rem;
}
/* <audio> has no intrinsic size like <video>/<img> do, so a bare `height:
   auto` resolves to 0 in Chromium and collapses the whole native player --
   give it an explicit height instead. */
.wp-block-audio audio {
	display: block;
	width: 100%;
	min-width: 240px;
	height: 40px;
}
.wp-block-audio figcaption {
	color: var(--fg);
	opacity: 0.8;
}

@media (max-width: 48rem) {
	main.wp-block-group {
		padding: clamp(1rem, 5vw, 1.5rem);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.wp-block-navigation a {
		transition: opacity 0.15s ease;
	}
}
