/* XYScope: the page is the instrument's bezel, the demo is its screen. */
:root {
	--xy-bezel: #2b2e33;
	--xy-key: #3a3e44;
	--xy-glass: #000;
	--xy-label: #ece8df;
	--xy-muted: #a7acb2;
	--xy-bass: #ff6a4d;
	--xy-mid: #66f29a;
	--xy-treble: #6aa6ff;
	--xy-face: "DIN Alternate", Bahnschrift, "D-DIN", "Avenir Next", system-ui, sans-serif;
	--wp--preset--color--base: var(--xy-bezel);
	--wp--preset--color--contrast: var(--xy-label);
}

body {
	background: var(--xy-bezel);
	color: var(--xy-label);
	font-family: var(--xy-face);
	font-size: 1.125rem;
	line-height: 1.55;
}
footer, .wp-site-blocks > footer { background: var(--xy-bezel); color: var(--xy-muted); }

h1, h2, h3, .wp-block-site-title { font-family: var(--xy-face); font-weight: 700; letter-spacing: 0; }
a { color: var(--xy-label); text-decoration-color: var(--xy-mid); text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible, .xy-file:focus-within, .wp-element-button:focus-visible {
	outline: 2px solid var(--xy-mid);
	outline-offset: 3px;
}
code, pre { font-size: 0.92em; }
pre.wp-block-code { background: var(--xy-glass); color: var(--xy-mid); border: 0; border-radius: 4px; padding: 1rem 1.2rem; overflow-x: auto; white-space: pre; }
h2.wp-block-heading { font-size: clamp(2rem, 5vw, 2.75rem); margin-block-start: 3rem; }
.site-bar a, .site-bar .wp-block-site-title a { color: var(--xy-label); text-decoration: none; font-weight: 700; }
.site-foot { color: var(--xy-muted); border-top: 1px solid #3d4147; }

/* The wordmark spells itself in the three Spectrum colours: bass, mids, treble. */
.xy-title { font-size: clamp(3rem, 9vw, 6rem); line-height: 1; margin-block-end: 0.2em; }
.xy-title .x { color: var(--xy-bass); }
.xy-title .y { color: var(--xy-mid); }
.xy-title .s { color: var(--xy-treble); }

.xy-lead { font-size: 1.3rem; color: var(--xy-label); max-width: 36em; }

/* The screen: black glass with an 8 × 8 graticule. */
.xy-demo { margin-block: 2rem 3rem; }
.xy-screen {
	aspect-ratio: 1;
	max-width: min(100%, 78vh);
	margin-inline: auto;
	background-color: var(--xy-glass);
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
	background-size: 12.5% 12.5%;
	background-position: -1px -1px;
	border: 10px solid #1c1e21;
	border-radius: 18px;
	box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
	overflow: hidden;
}
.xy-screen canvas { display: block; width: 100%; height: 100%; mix-blend-mode: screen; }

.xy-panel {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1rem;
	justify-content: center;
	align-items: center;
	margin-block-start: 1.2rem;
}
.xy-tones { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.xy-panel button, .xy-file {
	background: var(--xy-key);
	border: 1px solid #50555c;
	border-bottom-width: 3px;
	border-radius: 5px;
	color: var(--xy-label);
	cursor: pointer;
	font: 600 1rem/1 var(--xy-face);
	padding: 0.65em 0.9em;
}
.xy-panel button[aria-pressed="true"] {
	border-bottom-width: 1px;
	margin-block-start: 2px;
	color: var(--xy-glass);
	background: var(--xy-mid);
	border-color: var(--xy-mid);
}
.xy-play { min-width: 8.5em; }
.xy-file { position: relative; }
.xy-file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.xy-status { text-align: center; color: var(--xy-muted); font-size: 0.95rem; margin-block-start: 0.8rem; }

.xy-modes { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.xy-modes > * { margin-block-start: 0; }
.xy-modes h3 { margin-block: 0 0.2em; font-size: 1.15rem; }
.xy-modes p { color: var(--xy-muted); margin-block-start: 0; }

.xy-downloads .wp-element-button {
	background: var(--xy-label);
	color: var(--xy-glass);
	border-radius: 5px;
	font-weight: 700;
}

/* Header and footer bars sit inside the page margins. */
.site-bar { padding-inline: clamp(1rem, 4vw, 3rem); }
.site-bar .wp-block-site-title a, .site-bar a { text-decoration: none; font-weight: 600; }

/* Screenshots of the app: the scope's black glass, two to a row where they fit. */
.xy-shot img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--xy-glass); }
.xy-shot figcaption { color: var(--xy-muted); font-size: 0.95rem; text-align: left; }
.xy-gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.xy-gallery > .xy-shot { margin: 0; }
.wp-lightbox-overlay .scrim { background-color: var(--xy-glass) !important; opacity: 1 !important; }
.wp-lightbox-overlay .close-button { fill: var(--xy-label) !important; }
