/*
Theme Name:   MusicPro
Template:     musicpro
Description:  Ayub Ogada child theme of Musicpro 3.3.1: readability and mobile fixes, page
              background and footer. Styling only: no templates are overridden and no page
              content is changed. Keep the name "MusicPro" and the version "3.3.1": MusicPro
              builds its upload folder (logo, header, background) from the active theme's
              name and shows an update notice if the version is lower than its own.
Version:      3.3.1
Text Domain:  musicpro-child
*/

/* -----------------------------------------------------------------------------
   Palette. Warm browns and the gold of the header sky, taken from the existing site.
   -------------------------------------------------------------------------- */
:root {
	--ao-ink: #f7f1ea;          /* body text */
	--ao-ink-soft: #dccdbb;     /* secondary text */
	--ao-panel: rgba(34, 21, 12, 0.84);
	--ao-panel-edge: rgba(255, 236, 210, 0.08);
	--ao-gold: #f5c451;         /* links and accents */
	--ao-gold-light: #ffe29a;
	--ao-bar: rgba(24, 14, 7, 0.94);
	--ao-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* -----------------------------------------------------------------------------
   Base text: larger, calmer type with room to breathe.
   -------------------------------------------------------------------------- */
body.bd,
body.bd.light {
	color: var(--ao-ink);
	font-family: var(--ao-text);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body.bd #main-content {
	font-size: 1.125rem;   /* 18px */
	line-height: 1.7;
}

body.bd #main-content p,
body.bd #main-content li,
body.bd #main-content td,
body.bd #main-content dd {
	color: var(--ao-ink);
	font-family: var(--ao-text);
}

body.bd #main-content p {
	margin: 0 0 1.1em;
}

body.bd #main-content strong,
body.bd #main-content b {
	color: inherit;
}

body.bd #main-content h1,
body.bd #main-content h2,
body.bd #main-content h3,
body.bd #main-content h4,
body.bd #main-content h5,
body.bd #main-content h6 {
	color: #fff;
	letter-spacing: 0.02em;
	line-height: 1.25;
	margin: 1.4em 0 0.6em;
}

/* Blog post titles and dates (the theme forces titles to black). */
body.bd #main-content .entry-title,
body.bd #main-content .entry-title a,
body.bd #main-content .post .entry-title a {
	color: #fff !important;
	text-decoration: none;
}
body.bd #main-content .entry-title a:hover,
body.bd #main-content .entry-title a:focus {
	color: var(--ao-gold-light) !important;
}
body.bd.light #main-content .entry-meta,
body.bd.light #main-content .meta,
body.bd.light #main-content .meta a,
body.bd.light #main-content .entry-meta a {
	color: var(--ao-ink-soft) !important;
	font-size: 0.85em;
}
body.bd.light #main-content .meta a:hover,
body.bd.light #main-content .meta a:focus {
	color: var(--ao-gold) !important;
}

/* Forms (Press Pack password, contact). 16px stops phones zooming in on focus. */
body.bd #main-content input[type="text"],
body.bd #main-content input[type="email"],
body.bd #main-content input[type="password"],
body.bd #main-content input[type="search"],
body.bd #main-content textarea {
	box-sizing: border-box;
	max-width: 100%;
	padding: 10px 12px;
	font-size: 16px;
	font-family: var(--ao-text);
	color: #2a1a0e;
	background: #f7f1ea;
	border: 1px solid rgba(255, 236, 210, 0.35);
	border-radius: 6px;
}
body.bd.light #main-content a.more-link,
body.bd.light #main-content a.buy-button,
body.bd.light #main-content input[type="submit"],
body.bd.light #main-content button[type="submit"] {
	padding: 10px 20px;
	font-size: 16px;
	font-family: var(--ao-text);
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #2a1a0e !important;
	background-color: var(--ao-gold) !important;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}
body.bd.light #main-content a.more-link:hover,
body.bd.light #main-content a.more-link:focus,
body.bd.light #main-content a.buy-button:hover,
body.bd.light #main-content a.buy-button:focus,
body.bd.light #main-content input[type="submit"]:hover,
body.bd.light #main-content input[type="submit"]:focus {
	background-color: var(--ao-gold-light) !important;
}

/* Links: gold and underlined so they read as links on the dark panel. */
body.bd #main-content a {
	color: var(--ao-gold);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}
body.bd #main-content a:hover,
body.bd #main-content a:focus {
	color: var(--ao-gold-light);
}
body.bd #main-content a:has(img),
body.bd #main-content a.rs-layer {
	text-decoration: none;
}

body.bd a:focus-visible,
body.bd [role="button"]:focus-visible {
	outline: 2px solid var(--ao-gold);
	outline-offset: 3px;
	border-radius: 2px;
}

::selection {
	background: var(--ao-gold);
	color: #2a1a0e;
}

/* -----------------------------------------------------------------------------
   Page background. The theme tiled a single wide 1480x643 picture (stretched about
   15% sideways in the file), which repeats with visible seams on tall screens and
   misbehaves on iPhones (they ignore background-attachment: fixed). Instead, one
   fixed layer fills the screen, keeps the picture's proportions and never tiles.
   page-bg-desktop.jpg / page-bg-phone.jpg are clean, undistorted redraws of the
   original artwork (landscape and portrait). page-bg-stopgap.jpg is the old picture
   narrowed by 15%, kept only as a fallback.
   -------------------------------------------------------------------------- */
body.bd,
body.bd.light {
	background: #4a2f1d !important;
}
body.bd::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: #4a2f1d url("images/page-bg-desktop.jpg") 70% 50% / cover no-repeat;
}
@media (orientation: portrait) and (max-width: 900px) {
	body.bd::before {
		background-image: url("images/page-bg-phone.jpg");
		background-position: 75% 35%;
	}
}

/* -----------------------------------------------------------------------------
   Reading panel: the text sits on a dark, slightly translucent panel instead of
   straight on the mottled background, so contrast no longer depends on the texture.
   -------------------------------------------------------------------------- */
body.bd #main-content.wrap {
	box-sizing: border-box;
	max-width: 860px;
	margin: 36px auto 64px;
	padding: 44px 52px 36px;
	background: var(--ao-panel);
	border: 1px solid var(--ao-panel-edge);
	border-radius: 10px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

/* One column: the right-hand sidebar is empty on every page. */
body.bd #primary {
	float: none;
	width: auto;
	margin: 0;
}
body.bd #secondary {
	float: none;
	width: auto;
}
body.bd #primary img {
	max-width: 100%;
	height: auto;
}

/* Pictures beside text get a proper gutter. */
body.bd #main-content .alignleft {
	margin: 0.3em 1.6em 1em 0;
}
body.bd #main-content .alignright {
	margin: 0.3em 0 1em 1.6em;
}
body.bd #main-content .aligncenter {
	display: block;
	margin: 0.5em auto 1.4em;
}

/* Embedded players never spill out of the panel. */
body.bd #main-content iframe,
body.bd #main-content embed,
body.bd #main-content object,
body.bd #main-content video {
	max-width: 100%;
}
/* Full-width videos start below any picture floated beside them instead of covering it. */
body.bd #main-content .fluid-width-video-wrapper {
	clear: both;
	margin: 0.5em 0 1.2em;
}
body.bd #main-content iframe[src*="youtube"]:not(.fluid-width-video-wrapper iframe),
body.bd #main-content iframe[src*="vimeo"]:not(.fluid-width-video-wrapper iframe) {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

/* Home page: the album banner runs edge to edge straight under the header. */
body.bd.home #main-content.wrap {
	margin-top: 0;
	padding-top: 0;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	border-top: 0;
}
body.bd.home #main-content rs-fullwidth-wrap,
body.bd.home #main-content rs-module-wrap {
	margin-bottom: 40px !important;
}

/*
 * Album banner height. Slider Revolution lays the slide out on a fixed grid per screen
 * size and scales it with the screen width (height = grid height x width / grid width).
 * The grids are 900 (desktop, 1240 wide), 960 (tablet, 778 wide) and 720 (phone,
 * 480 wide) tall, but the visible content ends at about 552 (cover), 500 and 430
 * (Spotify buttons, whose images have ~16% transparent space below the button),
 * leaving the bottom third empty. These caps cut the banner so the gap below the
 * content equals the gap above the title's capitals (about 29, 38 and 27 grid units),
 * and scale the same way the slider does, so it stays in proportion at every width.
 * Proper long-term fix: lower the slide heights in Slider Revolution.
 */
body.bd.home #main-content rs-module-wrap,
body.bd.home #main-content rs-module {
	overflow: hidden !important;
}
/* cqw = 1% of the page width without the scrollbar, which is what the slider spans;
   vw (kept first as a fallback) includes the scrollbar on desktop browsers.
   The container goes on #page, not body: on body it would hide the fixed background layer. */
body.bd.home #page {
	container-type: inline-size;
}
@media screen and (min-width: 778px) {
	body.bd.home #main-content rs-fullwidth-wrap,
	body.bd.home #main-content rs-module-wrap,
	body.bd.home #main-content rs-module {
		max-height: min(581px, 46.85vw) !important;  /* (552 + 29) / 1240 */
		max-height: min(581px, 46.85cqw) !important;
	}
}
@media screen and (min-width: 480px) and (max-width: 777.98px) {
	body.bd.home #main-content rs-fullwidth-wrap,
	body.bd.home #main-content rs-module-wrap,
	body.bd.home #main-content rs-module {
		max-height: 69.15vw !important;               /* (500 + 38) / 778 */
		max-height: 69.15cqw !important;
	}
}
@media screen and (max-width: 479.98px) {
	body.bd.home #main-content rs-fullwidth-wrap,
	body.bd.home #main-content rs-module-wrap,
	body.bd.home #main-content rs-module {
		max-height: 95.25vw !important;               /* (430 + 27) / 480 */
		max-height: 95.25cqw !important;
	}
}

/* -----------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
/* The strip above the header only holds an empty top menu. */
body.bd #hello-bar:not(:has(a, img, form, iframe)) {
	display: none;
}

/* Desktop menu: bigger, on a soft dark band so it reads against the bright sky. */
body.bd #primary-menu {
	display: inline-block;
	padding: 0 18px;
	background: rgba(28, 16, 8, 0.5);
	border-radius: 999px;
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}
body.bd #primary-menu > li {
	margin-left: 22px;
}
body.bd #primary-menu > li:first-child {
	margin-left: 0;
}
body.bd #primary-menu a {
	font-size: 17px;
	letter-spacing: 0.06em;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
body.bd .site-navigation a:hover,
body.bd .site-navigation a:focus,
body.bd #primary-menu .current-menu-item > a {
	color: var(--ao-gold-light) !important;
}

/* Page titles on the banner photo. */
body.bd #intro h1 {
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55), 1px 1px 0 rgba(0, 0, 0, 0.6);
	letter-spacing: 0.03em;
}

/* -----------------------------------------------------------------------------
   Footer: a simple sign-off (parts/site-footer.html, printed by functions.php)
   replaces the theme's footer, which only held a grey-on-black back-to-top link.
   The floating back-to-top arrow still appears when scrolling.
   -------------------------------------------------------------------------- */
body.bd footer#colophon {
	display: none;
}
.ao-site-footer {
	position: relative;
	padding: 56px 20px 52px;
	text-align: center;
	background: #150d07;
	border-top: 1px solid rgba(245, 196, 81, 0.18);
}
.ao-site-footer p {
	margin: 0;
}
.ao-site-footer__name {
	font-family: 'UbuntuCondensedRegular', var(--ao-text);
	font-size: clamp(24px, 3.2vw, 32px);
	line-height: 1.1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ao-ink);
}
.ao-site-footer__rule {
	display: block;
	width: 44px;
	height: 2px;
	margin: 16px auto 14px;
	background: var(--ao-gold);
	border-radius: 2px;
}
.ao-site-footer__credit {
	font-family: var(--ao-text);
	font-size: 13px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #b9aea2;
}
.ao-site-footer__credit a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid rgba(185, 174, 162, 0.35);
	padding-bottom: 2px;
	transition: color 0.2s ease, border-color 0.2s ease;
}
.ao-site-footer__credit a:hover,
.ao-site-footer__credit a:focus {
	color: var(--ao-gold);
	border-color: var(--ao-gold);
}

/* -----------------------------------------------------------------------------
   Tablets and phones
   -------------------------------------------------------------------------- */
@media screen and (max-width: 800px) {
	/* Menu bar: a clear, full-width button that stays at the top while scrolling. */
	body.bd #mobile-menu-container {
		position: -webkit-sticky;
		position: sticky;
		top: 0;
		z-index: 100;
		margin: 0;
		background: var(--ao-bar);
		border-bottom: 1px solid rgba(255, 236, 210, 0.1);
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
	}
	body.bd #mobile-menu-container #mobile-menu-dropdown {
		margin: 0;
		padding: 0;
		list-style: none;
	}
	body.bd #mobile-menu-container #mobile-menu-dropdown li {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 12px;
		min-height: 54px;
		margin: 0;
		padding: 0 20px;
		border: 0;
		background: none;
		color: var(--ao-ink);
		font-size: 18px;
		line-height: 1;
		letter-spacing: 0.16em;
		-webkit-tap-highlight-color: transparent;
		user-select: none;
	}
	/* Three-line menu icon, drawn in CSS. */
	body.bd #mobile-menu-container #mobile-menu-dropdown li::before {
		content: "";
		flex: none;
		width: 22px;
		height: 15px;
		background:
			linear-gradient(currentColor, currentColor) top / 100% 2px no-repeat,
			linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
			linear-gradient(currentColor, currentColor) bottom / 100% 2px no-repeat;
	}
	body.bd #mobile-menu-container #mobile-menu-dropdown li[aria-expanded="true"] {
		color: var(--ao-gold);
	}

	body.bd #mobile-menu-container #mobile-menu,
	body.bd #mobile-menu-container .default-menu {
		margin: 0;
		padding: 0 0 8px;
	}
	body.bd #mobile-menu-container ul li,
	body.bd #mobile-menu-container .default-menu li,
	body.bd.light #mobile-menu-container ul li,
	body.bd.light #mobile-menu-container ul li:first-child {
		border-top: 1px solid rgba(255, 236, 210, 0.08);
		border-bottom: 0;
		line-height: 1.3;
	}
	body.bd #mobile-menu-container #mobile-menu-dropdown li {
		border-top: 0;
	}
	body.bd #mobile-menu-container #mobile-menu a,
	body.bd #mobile-menu-container .default-menu a {
		display: block;
		padding: 15px 20px;
		color: var(--ao-ink) !important;
		font-size: 19px;
		letter-spacing: 0.1em;
		line-height: 1.3;
		text-align: center;
		text-decoration: none;
	}
	body.bd #mobile-menu-container #mobile-menu a:hover,
	body.bd #mobile-menu-container #mobile-menu a:focus,
	body.bd #mobile-menu-container #mobile-menu .current-menu-item > a {
		color: var(--ao-gold) !important;
	}

	/* Header: tighter, with the title clear of the photo's busiest part. */
	body.bd header#masthead .table-head {
		margin: 14px 0 6px;
	}
	body.bd #logo-container {
		float: none;
		display: block;
		padding: 0 16px;
	}
	body.bd #logo-container img {
		max-width: min(78vw, 300px);
	}
	body.bd #intro {
		padding: 0 16px 1.4em;
	}

	/* Panel runs edge to edge on narrow screens; every pixel goes to the text. */
	body.bd #main-content.wrap {
		width: 100%;
		max-width: none;
		margin: 0 0 40px;
		padding: 28px 20px 16px;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}
	body.bd.home #main-content.wrap {
		padding-top: 0;
	}

	body.bd #main-content {
		font-size: 1.0625rem;   /* 17px */
		line-height: 1.65;
	}
}

@media screen and (max-width: 600px) {
	/* Pictures stop squeezing text into a sliver beside them. */
	body.bd #main-content .alignleft,
	body.bd #main-content .alignright {
		float: none;
		display: block;
		margin: 0.2em auto 1.2em;
	}
	body.bd #main-content .wp-caption {
		max-width: 100%;
	}
}
