/* ==========================================================================
   Organ detail pages (site/organs/organlayout.php, 02_<id>.php, 02_<id>_stops.php)
   LAYOUT-1 (28.11.2026): rules moved from prospectum.css (before the redesign).
   LAYOUT-3 (28.11.2026): rebuilt for the redesign "Nocturne" (mockup orgelseite_maihingen_desktop.html):
   hero, full-width bands, galleries, sound examples, prose, specification (pspStops()),
   temperament wheel, highlights/requirements, sound demos, latest version.
   The base (tokens, components, page frame, picture/panorama viewer) is in ../prospectum.css.
   Markup:
     <div class="organ-page">
       <section class="organ-hero"> backdrop · .organ-hero__inner (h1.organ-hero__title, .organ-hero__figure)
       <section class="organ-section [organ-section--alt]"><div class="container"> h2.organ-section__title …
       <div class="organ-version">
   Selectors start with .organ-page where they have to win over the generic rules of
   prospectum.css (.site-main li, .site-main ul …).
   ========================================================================== */


/* ---------- Hero ---------- */

/* The main pictures are small (544-950 px wide) and show the whole organ: they are never
   upscaled or cropped. Full-width atmosphere comes from a blurred, darkened copy behind them. */
.organ-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: calc(var(--header-h) + clamp(12px, 2vw, 32px)) 0 clamp(48px, 6vw, 88px);
	background: var(--c-bg);
}
@media (max-width: 1099.98px) {
	.organ-hero { padding-top: calc(var(--header-h-mobile) + 20px); }
}
.organ-hero__backdrop {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
}
.organ-hero__backdrop img {
	position: absolute;
	top: -10%;
	left: -10%;
	width: 120%;
	height: 120%;
	max-width: none;
	object-fit: cover;
	filter: blur(42px) saturate(.8) brightness(.42);
	transform: translateZ(0);
}
.organ-hero__backdrop::after {   /* gradient of the design system (hero with photo) */
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(18, 16, 13, .78) 0%, rgba(18, 16, 13, .25) 30%, rgba(18, 16, 13, .45) 62%, var(--c-bg) 100%);
}
.organ-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
/* headings are stored in capitals: smaller than the H1 scale, tracked, balanced lines */
.organ-page .organ-hero__title {
	max-width: 24em;
	margin: 0 0 clamp(24px, 3.5vw, 44px);
	font-size: clamp(1.3rem, 0.55rem + 3.4vw, 3.25rem);
	line-height: 1.14;
	letter-spacing: .06em;
	text-wrap: balance;
	overflow-wrap: anywhere;
	text-shadow: 0 2px 24px rgba(0, 0, 0, .45);
}
.organ-page .organ-hero__title::before {   /* gold rule as in the kicker of the design */
	content: "";
	display: block;
	width: 40px;
	height: 1px;
	margin: 0 auto clamp(16px, 2vw, 24px);
	background: var(--c-gold);
}
/* old colour markup inside a heading (organ.10: "FREE!" in red) -> accent colour of the design */
.organ-page .organ-hero__title [style*="color"] { color: var(--c-gold) !important; }
.organ-hero__figure {
	max-width: 100%;
	margin: 0;
	line-height: 0;
	border: 1px solid rgba(237, 230, 216, .16);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 8px rgba(18, 16, 13, .35);
}
.organ-hero__figure img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: min(70vh, 640px);
}
@media (max-width: 767.98px) {
	.organ-page .organ-hero__title { letter-spacing: .04em; }
	.organ-hero__figure { box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
	.organ-hero__figure img { max-height: none; }
}


/* ---------- Bands ---------- */

.organ-section { padding-block: var(--section-y); }
.organ-section--alt {
	background: var(--c-surface);
	border-top: 1px solid var(--c-line);
	border-bottom: 1px solid var(--c-line);
}
.organ-hero + .organ-section { padding-top: clamp(32px, 5vw, 72px); }
.organ-page .organ-section__title {
	margin: 0 0 clamp(28px, 4vw, 48px);
	font-size: var(--fs-h2);
	line-height: 1.05;
}
.organ-page .organ-section__title::before {
	content: "";
	display: block;
	width: 40px;
	height: 1px;
	margin-bottom: clamp(14px, 2vw, 22px);
	background: var(--c-gold);
}
.organ-page .organ-subtitle {
	margin: clamp(48px, 6vw, 80px) 0 clamp(16px, 2vw, 28px);
	font-size: var(--fs-h3);
}


/* ---------- Galleries (pspGallery(): pictures, panoramas, GUI) ---------- */

.psp-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 28px 16px;
	align-items: start;
}
.psp-gallery-item { min-width: 0; margin: 0; }
.psp-gallery-item > a { display: block; text-decoration: none; }
/* frame: thumbnails are small (about 150-300 px high), so they are shown at most in their own size */
.psp-gallery-img {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 2;
	padding: 8px;
	overflow: hidden;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	transition: border-color .3s, box-shadow .3s;
}
.organ-section--alt .psp-gallery-img { background: var(--c-bg); }
.psp-gallery img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	filter: saturate(.92) brightness(.95);
	transition: transform .6s ease, filter .4s ease;
}
.psp-gallery-item > a:hover .psp-gallery-img,
.psp-gallery-item > a:focus-visible .psp-gallery-img {
	border-color: var(--c-gold);
	box-shadow: 0 10px 26px var(--c-shadow);
}
.psp-gallery-item > a:hover img,
.psp-gallery-item > a:focus-visible img { transform: scale(1.04); filter: none; }
.psp-gallery-item figcaption {
	margin-top: 10px;
	font-size: var(--fs-small);
	line-height: 1.5;
	color: var(--c-muted);
}
@media (max-width: 767.98px) {
	.psp-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
	.psp-gallery-img { padding: 6px; }
	.psp-gallery-item figcaption { font-size: 13px; }
}


/* ---------- Sound examples (external links) ---------- */

.organ-page .organ-sounds {
	max-width: none;
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--c-line);
}
.organ-page .organ-sounds > li { margin: 0; padding: 0; border-bottom: 1px solid var(--c-line); }
.organ-sound {
	display: flex;
	align-items: center;
	gap: 14px clamp(14px, 2vw, 24px);
	min-height: var(--tap);
	padding: 18px 0;
	color: var(--c-text);
	text-decoration: none;
}
.organ-sound__play {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1px solid var(--c-gold);
	border-radius: 50%;
	color: var(--c-gold);
	transition: background-color .2s, color .2s;
}
.organ-sound__play svg { margin-left: 3px; }
.organ-sound__title {
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--f-display);
	font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.375rem);
	line-height: 1.35;
	transition: color .2s;
}
.organ-sound__dur {
	flex: none;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	color: var(--c-text-2);
}
.organ-sound__ext { display: flex; flex: none; color: var(--c-muted); }
.organ-sound:hover { color: var(--c-text); }
.organ-sound:hover .organ-sound__play,
.organ-sound:focus-visible .organ-sound__play { background: var(--c-gold); color: var(--c-on-gold); }
.organ-sound:hover .organ-sound__title { color: var(--c-gold-hover); }
@media (max-width: 767.98px) {
	.organ-sound { align-items: flex-start; padding: 16px 0; }
	.organ-sound__play { width: 40px; height: 40px; }
	.organ-sound__dur { font-size: 14px; padding-top: 3px; }
	.organ-sound__ext { display: none; }
}


/* ---------- Description / about the virtual organ (content templates) ---------- */

.organ-prose {
	max-width: var(--measure);
	color: var(--c-text-2);
	font-weight: 300;
}
.organ-prose :is(b, strong) { color: var(--c-text); font-weight: 600; }
.organ-prose i { color: var(--c-text); }
.organ-prose sup { color: var(--c-gold); font-weight: 400; }
.organ-prose u { text-decoration: none; color: var(--c-text); font-weight: 400; }
.organ-page .organ-prose ul {
	max-width: none;
	margin: 1.4em 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--c-line);
}
.organ-page .organ-prose li {
	margin: 0;
	padding: 12px 0;
	border-bottom: 1px solid var(--c-line);
	color: var(--c-text-2);
}
.organ-page .organ-prose li > sup:first-child {   /* literature list: footnote number as a gold column */
	display: inline-block;
	min-width: 1.6em;
	font-size: .85em;
	line-height: 1;
	vertical-align: baseline;
}
.organ-page .organ-prose--about li { padding: 18px 0; }
.organ-page .organ-prose--about li > b:first-child {   /* innovations: title of the item */
	display: block;
	margin-bottom: 4px;
	font-family: var(--f-display);
	font-size: clamp(1.1875rem, 1rem + 0.5vw, 1.5rem);
	font-weight: 400;
	line-height: 1.3;
}
/* trial version note: in the templates a red bold <span style="color:rgb(200,0,0);font-weight:bold;">
   inside the text -> highlighted box in the same place, same wording */
.organ-prose span[style*="200,0,0"] {
	display: block;
	margin: .4em 0 -.6em;
	padding: clamp(20px, 3vw, 32px);
	border: 1px solid var(--c-gold);
	background: rgba(200, 164, 101, .06);
	color: var(--c-text) !important;
	font-weight: 400 !important;
	line-height: 1.65;
}
.organ-prose span[style*="200,0,0"] + br { display: none; }


/* ---------- Specification (pspStops() in organlayout.php) ---------- */

.stops__divisions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: clamp(32px, 4vw, 48px);
	align-items: start;
}
.organ-page .stops__name {
	margin: 0;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--c-gold);
	font-size: clamp(1.375rem, 1.1rem + 0.7vw, 1.75rem);
	line-height: 1.25;
}
.organ-page .stops__name sup { font-size: .55em; }
.organ-page .stops__list {
	max-width: none;
	margin: 0;
	padding: 0;
	list-style: none;
}
.organ-page .stops__list + .stops__list { margin-top: 28px; }   /* next group (e.g. couplers) */
.organ-page .stops__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 9px 0;
	border-bottom: 1px solid var(--c-line);
	color: var(--c-text);
	font-size: 16px;
	line-height: 1.45;
}
.stops__stop { min-width: 0; }
.stops__stop i { color: var(--c-text-2); }
.stops__pitch {
	flex: none;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	color: var(--c-gold);
}
.organ-page .stops__list--plain .stops__row { color: var(--c-text-2); font-size: 15px; }
/* rows with an extra cell (organ 10: audio player per stop): stop | pitch | player */
.organ-page .stops__row--extra { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(220px, 340px); align-items: center; column-gap: 24px; }
.stops__extra { min-width: 0; }
.stops__extra audio { width: 100%; max-width: 100%; height: 40px; }
/* one division only: not stretched over the whole width */
.stops__divisions--1 { grid-template-columns: minmax(0, 860px); }
.stops__divisions--4 .stops__name { font-size: clamp(1.25rem, 1.05rem + 0.5vw, 1.5rem); }
.stops__notes {
	margin-top: clamp(40px, 5vw, 64px);
	padding-top: clamp(28px, 4vw, 40px);
	border-top: 1px solid var(--c-line);
	color: var(--c-text-2);
	font-size: 15px;
}
.stops__note { max-width: var(--measure); margin: 0 0 6px; }
.stops__note i { color: var(--c-text-2); }
.stops__note--temperament { max-width: none; margin-top: clamp(28px, 4vw, 48px); font-size: var(--fs-body); }
@media (max-width: 767.98px) {
	.organ-page .stops__row { font-size: 15px; padding: 8px 0; }
	.organ-page .stops__row--extra { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
	.stops__extra { grid-column: 1 / -1; }
}

/* fallback: original table when pspStops() could not rewrite it (no ext/dom, unexpected markup) */
.organ-page table.stops { width: 100% !important; margin: 0 !important; color: var(--c-text-2); line-height: 1.5; }
.organ-page table.stops table.stops { width: 100% !important; }
.organ-page td.stops, .organ-page table.stops td { padding: 1px 8px; vertical-align: top; }
.organ-page table.stops b { font-family: var(--f-display); font-weight: 400; font-size: 1.15em; color: var(--c-text); }
.organ-page table.stops font { color: inherit; }
@media (max-width: 767.98px) {
	.organ-page td.stops:has(> table.stops) { display: block; }
	.organ-page td.stops:has(> table.stops) + td.stops { margin-top: 14px; }
}


/* ---------- Temperament wheel (TEMP-1, site/temperament.js) ---------- */

.psp-temperament {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: center;
	gap: 24px clamp(32px, 4vw, 56px);
	white-space: normal;
}
.psp-temperament-wheel { flex: 1.3 1 440px; max-width: 640px; min-width: 0; margin: 0; }
.psp-temperament-wheel svg { display: block; width: 100%; height: auto; overflow: visible; }
.psp-temperament-wheel figcaption {
	margin-top: 8px;
	text-align: center;
	font-size: 12px;
	line-height: 1.5;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--c-muted);
}
.psp-temperament-side {
	display: flex;
	flex: 1 1 320px;
	flex-direction: column;
	gap: 28px;
	min-width: 0;
	max-width: 520px;
	font-size: 15px;
	line-height: 1.55;
}
.psp-temperament-select {   /* label of the dropdown list / of the button group */
	display: block;
	margin-bottom: 10px;
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--c-muted);
}
.site-main .psp-temperament-side select { width: 100%; font-family: var(--f-display); font-size: 18px; }
.organ-page .psp-temperament-name { margin: 0; font-family: var(--f-display); font-size: clamp(1.375rem, 1.1rem + 0.7vw, 1.75rem); line-height: 1.25; color: var(--c-text); }
/* two temperaments: button group instead of the dropdown list (aria-pressed) */
.psp-temperament-choice { display: flex; flex-wrap: wrap; border: 1px solid var(--c-line); }
.site-main .psp-temperament-choice button {
	flex: 1 1 150px;
	min-height: var(--btn-h);
	margin: 0;
	padding: 6px 18px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--c-text);
	font-family: var(--f-display);
	font-size: 18px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.25;
	text-transform: none;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.site-main .psp-temperament-choice button + button { border-left: 1px solid var(--c-line); }
.site-main .psp-temperament-choice button:hover { background: var(--c-surface-2); color: var(--c-gold-hover); }
.site-main .psp-temperament-choice button[aria-pressed="true"] { background: var(--c-gold); color: var(--c-on-gold); }
.site-main .psp-temperament-choice button:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; position: relative; z-index: 1; }
table.psp-temperament-cents {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	table-layout: fixed;
	font-variant-numeric: tabular-nums;
}
table.psp-temperament-cents caption { padding-bottom: 12px; text-align: left; font-size: 14px; line-height: 1.5; color: var(--c-muted); }
.organ-page table.psp-temperament-cents th,
.organ-page table.psp-temperament-cents td { padding: 0 2px; text-align: center; }
.organ-page table.psp-temperament-cents th {
	padding-top: 10px;
	border-top: 1px solid var(--c-line);
	font-family: var(--f-display);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--c-text);
}
.organ-page table.psp-temperament-cents td {
	padding-bottom: 12px;
	font-size: 15px;
	white-space: nowrap;
	overflow-wrap: normal;
	color: var(--c-text-2);
}
.organ-page table.psp-temperament-cents td.is-zero { color: var(--c-gold); }
.organ-page table.psp-temperament-cents tr:last-child td { border-bottom: 1px solid var(--c-line); }
.organ-page ul.psp-temperament-legend {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: none;
	margin: 0;
	padding: 0;
	list-style: none;
}
.organ-page ul.psp-temperament-legend li {
	display: flex;
	gap: 14px;
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--c-text-2);
}
ul.psp-temperament-legend li::before { content: none; }
ul.psp-temperament-legend svg { flex: none; margin-top: 2px; color: var(--c-gold); }
@media (max-width: 767.98px) {
	.site-main .psp-temperament-choice button { flex-basis: 120px; padding: 6px 12px; font-size: 16px; }
	.organ-page table.psp-temperament-cents th { font-size: 17px; }
	.organ-page table.psp-temperament-cents td { font-size: 13px; }
}


/* ---------- Highlights, requirements ---------- */

.organ-page .organ-points {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	column-gap: 48px;
	max-width: none;
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--c-line);
}
.organ-page .organ-points > li {
	position: relative;
	margin: 0;
	padding: 15px 0 15px 32px;
	border-top: 1px solid var(--c-line);
	font-size: 16px;
	line-height: 1.6;
	color: var(--c-text-2);
}
.organ-page .organ-points > li::before {   /* short gold rule */
	content: "";
	position: absolute;
	left: 0;
	top: calc(15px + .8em);
	width: 16px;
	height: 1px;
	background: var(--c-gold);
}
.organ-page .organ-points--highlights > li::before {   /* star (line icon of the mockup) */
	top: calc(15px + .3em);
	width: 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8A465' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.6 5.6L20 9.5l-4 4 1 6-5-2.8-5 2.8 1-6-4-4 5.4-.9z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.organ-page .organ-points--requirements { grid-template-columns: minmax(0, 1fr); max-width: 760px; }   /* data lines: one column */
@media (max-width: 767.98px) {
	.organ-page .organ-points > li { font-size: 15px; padding: 13px 0 13px 28px; }
}


/* ---------- Sound demos (audio players) ---------- */

.organ-page .organ-demos {
	max-width: none;
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--c-line);
}
.organ-page .organ-demo {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
	align-items: center;
	gap: 10px 32px;
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid var(--c-line);
}
.organ-demo__title {
	order: -1;
	font-family: var(--f-display);
	font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
	line-height: 1.35;
	color: var(--c-text);
}
.organ-demo audio { width: 100%; max-width: none; height: 40px; color-scheme: dark; }
@media (max-width: 767.98px) {
	.organ-page .organ-demo { grid-template-columns: minmax(0, 1fr); }
}


/* ---------- Latest version ---------- */

.organ-version { padding-block: 28px; border-top: 1px solid var(--c-line); }
.organ-section--alt + .organ-version { border-top: 0; }
.organ-page .organ-version p { margin: 0; font-size: var(--fs-label); letter-spacing: .14em; color: var(--c-muted); }
.organ-version__label { text-transform: uppercase; }
.organ-version__number { color: var(--c-text); font-variant-numeric: tabular-nums; letter-spacing: .04em; }


@media (prefers-reduced-motion: reduce) {
	.psp-gallery img, .psp-gallery-img, .organ-sound__play, .organ-sound__title { transition: none; }
	.psp-gallery-item > a:hover img { transform: none; }
}
