/* MidiWrist Unleashed site — the original dark color scheme (black page,
   #222 surfaces, light gray text), structured like uwyn.com and accented
   with the dark-tuned uwyn terracotta #e8794c. */

:root {
	--page-bg: #000000;
	--surface: #222222;
	--band: #181818;
	--text: #cccccc;
	--text-soft: #9a9a9a;
	--heading: #ffffff;
	--terracotta: #e8794c;
	--card-border: rgba(255, 255, 255, 0.12);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	background-color: var(--page-bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.container {
	max-width: 860px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Links follow the original GECO scheme: body gray, underlined */
a {
	color: var(--text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

a:hover {
	color: #ffffff;
}

a:focus-visible {
	outline: 3px solid var(--terracotta);
	outline-offset: 2px;
}

/* Masthead band */

.band {
	background: var(--band);
	border-bottom: 1px solid var(--card-border);
	text-align: center;
	padding: 40px 0 34px;
}

.band .logo-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
}

.band .logo-title img {
	display: block;
	width: 72px;
	height: 72px;
}

/* Title block sits beside the icon; the product name and (on subpages) the
   section label stack together so the section reads as a pair with the
   product rather than a floating word */
.band .titles {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

.band .product {
	color: var(--heading);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
	margin: 0;
}

.band .page {
	color: var(--text);
	font-size: 1.15rem;
	font-weight: 500;
	line-height: 1.2;
	margin: 3px 0 0;
}

/* The tagline sits below the row on every page, so the masthead height
   stays the same when navigating between home and subpages */
.band .subtitle {
	color: var(--text-soft);
	font-style: italic;
	/* fluid size so the tagline stays on one line on narrow screens */
	font-size: min(3.9vw, 1rem);
	margin: 14px 0 0;
}

/* Section navigation chips */

.site-nav {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	padding: 14px 16px;
}

.site-nav a,
.site-nav .current {
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 0.88rem;
	text-decoration: none;
}

.site-nav a {
	color: var(--text);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
	background-color: var(--terracotta);
	color: #fff;
}

.site-nav .current {
	background-color: var(--terracotta);
	color: #fff;
	font-weight: 600;
}

/* Content card */

main.prose {
	background-color: var(--surface);
	border: 1px solid var(--card-border);
	border-radius: 12px;
	padding: 36px 40px;
	margin: 0 0 8px;
}

/* The docs float section screenshots to the side of their text, so headings,
   rules and back-links have to clear them or the image bleeds into the next
   section and its text wraps around it */
.prose h2,
.prose h3,
.prose h4,
.prose hr,
.prose p.toc-back {
	clear: both;
}

.prose h2 {
	color: var(--heading);
	font-size: 1.25rem;
	font-weight: 700;
	margin: 1.8em 0 0.5em;
}

.prose > h2:first-child {
	margin-top: 0;
}

.prose h2::after {
	content: "";
	display: block;
	width: 44px;
	height: 3px;
	border-radius: 2px;
	background-color: var(--terracotta);
	margin-top: 8px;
}

.prose h3 {
	color: var(--terracotta);
	font-size: 1.05rem;
	font-weight: 700;
	margin: 1.6em 0 0.4em;
}

.prose h4 {
	color: var(--heading);
	font-size: 1rem;
	font-weight: 700;
	margin: 1.4em 0 0.3em;
}

.prose p,
.prose li {
	font-size: 0.98rem;
}

.prose img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

/* Every image in an image-only paragraph stacks the same way, so siblings
   line up instead of the first one centering and the rest sitting left */
.prose p > img {
	display: block;
	margin: 0 auto;
}

.prose img.inlined,
.prose img.inlinedialog {
	float: right;
	margin: 0 0 1em 1.5em;
}

/* Docs section screenshots sit beside their explanation */
.prose img.shot {
	float: left;
	margin: 0 1em 1em 0;
}

.prose p.info {
	font-style: italic;
	color: var(--text-soft);
	text-align: center;
	font-size: 0.9rem;
}

/* Own formatting context so a list next to a floated screenshot is placed
   beside it; otherwise the list box slides under the image and its markers
   are drawn on top of it */
.prose ul,
.prose ol {
	display: flow-root;
	padding-left: 24px;
}

.prose li {
	margin: 0.35em 0;
}

/* Responsive embedded video */

.video {
	position: relative;
	aspect-ratio: 16 / 9;
	margin: 1.5em 0;
	border-radius: 10px;
	overflow: hidden;
	background: #000;
}

.video.video43 {
	aspect-ratio: 4 / 3;
}

.video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Store buttons and highlighted notes on the front page */

.store-buttons {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 1.2em 0;
}

.store-buttons a {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 999px;
	background-color: var(--terracotta);
	color: #fff;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 600;
	transition: background-color 0.15s ease;
}

.store-buttons a:hover {
	background-color: #d9622e;
}

.availability {
	text-align: center;
	margin: 2.2em 0 0;
}

.availability .press-badges {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-bottom: 14px;
}

.availability .press-badges img {
	border-radius: 0;
}

.availability h2::after {
	margin-left: auto;
	margin-right: auto;
}

.note {
	border: 1px solid var(--card-border);
	border-left: 4px solid var(--terracotta);
	border-radius: 8px;
	background: rgba(232, 121, 76, 0.08);
	padding: 12px 18px;
	font-size: 0.92rem;
	margin: 1.5em 0;
}

/* OSC path tables in the docs */

table.oscpaths {
	border-collapse: collapse;
}

table.oscpaths td {
	font-family: Menlo, Monaco, Consolas, monospace;
	font-size: 0.85rem;
	padding: 2px 2em 2px 0;
}

/* Footer */

.site-footer {
	color: var(--text-soft);
	text-align: center;
	font-size: 0.9rem;
	padding: 40px 0;
}

.site-footer a {
	color: var(--text-soft);
	text-decoration: underline;
}

.site-footer a:hover {
	color: var(--text);
}

/* Responsive */

@media (max-width: 640px) {
	.band {
		padding: 28px 0 24px;
	}

	.site-nav {
		gap: 6px;
		padding: 12px 10px;
	}

	.site-nav a,
	.site-nav .current {
		padding: 5px 10px;
		font-size: 0.8rem;
	}

	.band .logo-title img {
		width: 56px;
		height: 56px;
	}

	.band .product {
		/* fluid so the product name stays beside the logo on one line on narrow screens */
		font-size: min(1.5rem, 6.2vw);
	}

	.band .page {
		font-size: min(1.05rem, 4.3vw);
	}

	main.prose {
		padding: 24px 20px;
	}

	.prose img.inlined,
	.prose img.inlinedialog {
		float: none;
		display: block;
		margin: 1em auto;
	}

	/* Beside a float the text column gets too narrow to read here, so the
	   screenshot stacks above its explanation instead */
	.prose img.shot {
		float: none;
		display: block;
		margin: 0 0 1em;
	}
}

@media (max-width: 360px) {
	.site-nav {
		gap: 5px;
	}

	.site-nav a,
	.site-nav .current {
		padding: 4px 8px;
		font-size: 0.76rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-nav a,
	.store-buttons a {
		transition: none;
	}
}

/* MidiWrist content-specific elements */

.prose blockquote {
	font-style: italic;
	border-left: 3px solid var(--card-border);
	margin: 1.4em 0;
	padding: 2px 0 2px 16px;
	color: var(--text-soft);
}

.prose blockquote.home {
	font-size: 0.85rem;
}

.prose hr {
	border: 0;
	border-top: 1px solid var(--card-border);
	margin: 2em 0;
}

.prose hr.double {
	height: 4px;
	border-top: 1px solid var(--card-border);
	border-bottom: 1px solid var(--card-border);
}

.prose p.toc-back {
	font-size: 0.85rem;
	font-weight: 600;
	margin-top: 0.5em;
}

/* Row of Apple Watch screenshots on the front page */
.watch-shots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin: 1.5em 0;
}

.watch-shots img {
	width: 150px;
	max-width: 40%;
	height: auto;
	border-radius: 12px;
}
