/* Uwyn homepage — modernized catalogue layout.
   Palette carried over from style/content.css:
   page bg #f5f5fa, gray-green rgb(120,137,127), dark blue rgb(4,45,86),
   steel blue rgb(68,99,129), orange accent rgb(208,86,39). */

:root {
	--page-bg: #f5f5fa;
	--surface: #ffffff;
	--graygreen: rgb(120, 137, 127);
	--darkblue: rgb(4, 45, 86);
	--steelblue: rgb(68, 99, 129);
	--orange: rgb(208, 86, 39);
	--text: #333940;
	--text-soft: #5a6572;
	--card-border: rgba(120, 137, 127, 0.35);
}

* {
	box-sizing: border-box;
}

/* Keyboard focus ring, matching the brand palette */
a:focus-visible {
	outline: 3px solid var(--steelblue);
	outline-offset: 2px;
}

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.5;
	-webkit-font-smoothing: antialiased;
}

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

/* Header */

.hero {
	background: var(--darkblue);
	box-shadow: 0 8px 24px rgba(4, 45, 86, 0.18);
}

.hero .tagline {
	color: #bcd0e6;
}

.hero .community a {
	border-color: rgba(255, 255, 255, 0.55);
	color: #fff;
}

.hero .community a:hover {
	background-color: #fff;
	color: var(--darkblue);
}

.site-header {
	text-align: center;
	padding: 56px 0 44px;
}

.site-header img {
	height: 60px;
	width: auto;
}

.tagline {
	text-align: center;
	font-style: italic;
	color: var(--text-soft);
	line-height: 1.7;
	margin: 1.5em 0;
}

.community {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 1.5em 0 0;
}

.community a {
	display: inline-block;
	padding: 8px 20px;
	border: 1px solid var(--steelblue);
	border-radius: 999px;
	color: var(--steelblue);
	text-decoration: none;
	font-size: 0.95rem;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.community a:hover {
	background-color: var(--steelblue);
	color: #fff;
}

/* Section navigation */

html {
	scroll-behavior: smooth;
}

.section-nav {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 0;
	margin-top: 24px;
	background-color: rgba(245, 245, 250, 0.88);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.section-nav a {
	padding: 6px 14px;
	border-radius: 999px;
	color: var(--steelblue);
	text-decoration: none;
	font-size: 0.88rem;
	transition: background-color 0.15s ease, color 0.15s ease;
}

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

/* Catalogue grid */

.catalogue-section {
	scroll-margin-top: 64px;
}

.section-title {
	text-align: center;
	color: var(--darkblue);
	/* fluid size so long titles stay on one line on narrow screens */
	font-size: min(5vw, 1.3rem);
	font-weight: 700;
	margin: 48px 0 0;
}

.section-title::after {
	content: "";
	display: block;
	width: 44px;
	height: 3px;
	border-radius: 2px;
	background-color: var(--orange);
	margin: 10px auto 0;
}

.catalogue {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin: 28px 0 8px;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	text-align: center;
	background-color: var(--surface);
	border: 1px solid var(--card-border);
	border-radius: 12px;
	padding: 24px;
	color: inherit;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 28px rgba(4, 45, 86, 0.12);
	border-color: var(--orange);
	text-decoration: none;
}

.card.featured {
	grid-column: 1 / -1;
}

/* Featured card whose media spans the full content width, e.g. LinnStrument —
   aligns its image edges with the side-by-side hero card above it */
.card.full {
	padding: 24px;
}

.card.featured.full .card-media {
	width: 100%;
	height: auto;
	margin-bottom: 16px;
}

.card.featured.full .card-media img {
	width: 100%;
	height: auto;
	max-height: none;
	border-radius: 8px;
}

/* Side-by-side hero card, e.g. RouteMIDI — media left, text right */
.card.side {
	flex-direction: row;
	align-items: center;
	text-align: left;
	gap: 28px;
	padding: 24px;
}

.card.featured.side .card-media {
	flex: 0 0 46%;
	width: 46%;
	height: auto;
	margin-bottom: 0;
}

.card.featured.side .card-media img {
	width: 100%;
	height: auto;
	max-height: none;
}

.card.side .card-text {
	flex: 1;
	min-width: 0;
}

.card.side h3 {
	font-size: 1.15rem;
	margin: 0 0 8px;
}

.card.side p {
	max-width: none;
}

.card-media {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 150px;
	margin-bottom: 18px;
}

.card.featured .card-media {
	height: 220px;
}

.card-media img {
	max-height: 100%;
	max-width: 100%;
	width: auto;
	height: auto;
}

.card.framed .card-media img {
	border: 1px solid #d5d5d5;
	border-radius: 6px;
}

.card h3 {
	margin: 0 0 6px;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--darkblue);
}

.card p {
	margin: 0;
	font-size: 0.92rem;
	color: var(--text-soft);
	max-width: 46em;
}

/* Status badges — always pinned to the top-right corner of their card or row */
.badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background-color: var(--orange);
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 2px 9px;
	border-radius: 999px;
}

.badge.updated {
	background-color: var(--steelblue);
}

.card .badge {
	top: 14px;
	right: 14px;
}

/* Keep row titles clear of the corner badge */
.index-row .badge + .index-text .index-name {
	padding-right: 84px;
}

.logo-title {
	display: block;
	height: 28px;
	width: auto;
	margin-bottom: 10px;
}

/* RIFE2's wordmark has smaller lettering within its box; render larger so
   its letters visually match bld's (original site used 64px vs 50px) */
.logo-title.logo-title-lg {
	height: 36px;
}

/* When the logo rows sit side by side, rest both wordmarks on a shared
   baseline: the 8px height difference moves above the smaller logo, so
   the gaps below stay equal and the descriptions align */
@media (min-width: 641px) {
	.logo-title:not(.logo-title-lg) {
		margin-top: 8px;
	}
}

/* Compact index rows */

.index {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px 20px;
	margin: 24px 0 8px;
}

.index-row {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	background-color: var(--surface);
	border: 1px solid var(--card-border);
	border-radius: 10px;
	padding: 24px;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.index-row:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(4, 45, 86, 0.10);
	border-color: var(--orange);
}

.index-thumb {
	flex: 0 0 auto;
	width: 60px;
	height: 60px;
	object-fit: contain;
	border-radius: 8px;
}

.index-text {
	display: block;
	min-width: 0;
}

.index-name {
	display: block;
	color: var(--darkblue);
	font-weight: 700;
	font-size: 0.98rem;
}

.index-desc {
	display: block;
	color: var(--text-soft);
	font-size: 0.85rem;
	margin-top: 2px;
}

/* Content pages (contact, privacy) */

.page-head {
	background-color: var(--surface);
	border-bottom: 1px solid var(--card-border);
	box-shadow: 0 6px 20px rgba(4, 45, 86, 0.06);
}

.page-head .site-header {
	padding: 32px 0 20px;
}

.breadcrumb {
	font-size: 0.9rem;
	color: var(--graygreen);
}

.page-head .breadcrumb {
	text-align: center;
	margin: 14px 0 0;
}

.breadcrumb a {
	color: var(--steelblue);
	text-decoration: none;
}

.breadcrumb a:hover {
	text-decoration: underline;
}

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

.prose h1 {
	color: var(--darkblue);
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 0.8em;
}

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

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

.prose p,
.prose li,
.prose address {
	color: var(--text);
	font-size: 0.95rem;
	line-height: 1.6;
	font-style: normal;
}

.prose p {
	margin: 0.6em 0;
}

.prose ul {
	padding-left: 22px;
}

.prose .bold,
.prose strong {
	color: var(--darkblue);
	font-weight: 700;
}

.prose a {
	color: var(--steelblue);
}

/* Footer */

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

.site-footer a {
	color: var(--graygreen);
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
}

/* Responsive */

@media (max-width: 640px) {
	.site-header {
		padding: 36px 0 32px;
	}

	.catalogue {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.index {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.prose {
		padding: 24px 20px;
	}

	.card.side {
		flex-direction: column;
		text-align: center;
		gap: 16px;
		padding: 16px;
	}

	/* Stacked hero cards: reserve a white strip at the top so the
	   corner badge doesn't sit on the full-width image */
	.card.side:has(.badge) {
		padding-top: 46px;
	}

	.card.full {
		padding: 16px;
	}

	.index-row {
		padding: 16px;
	}

	.card.featured.side .card-media {
		flex: 0 0 auto;
		width: 100%;
	}

	.section-nav {
		gap: 4px;
	}

	.section-nav a {
		padding: 6px 10px;
		font-size: 0.82rem;
	}

	.card-media,
	.card.featured .card-media {
		height: 140px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.card,
	.community a,
	.index-row {
		transition: none;
	}

	.card:hover,
	.index-row:hover {
		transform: none;
	}
}
