/*
Theme Name: Matthew Larsen
Theme URI: https://matthewlarsen.com
Author: Matthew Larsen
Author URI: https://matthewlarsen.com
Description: A simple, full-width, no-sidebar theme built for a singer-songwriter site. Full-screen background hero with centered name, tagline, and a row of hoverable music/social icons, plus clean templates for a Shows page and a Music page.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: matthew-larsen
*/

/* -------------------------------------------------------------------- */
/*  Reset & base                                                        */
/* -------------------------------------------------------------------- */

:root {
	--ml-ink: #1a1a1a;
	--ml-paper: #faf8f5;
	--ml-white: #ffffff;
	--ml-muted: rgba(255, 255, 255, 0.82);
	--ml-hairline: rgba(0, 0, 0, 0.1);
	--ml-max-width: 760px;
	--ml-serif: "EB Garamond", Georgia, "Times New Roman", serif;
	--ml-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--ml-paper);
	color: var(--ml-ink);
	font-family: var(--ml-serif);
	font-size: 18px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* -------------------------------------------------------------------- */
/*  Hero (front page)                                                   */
/* -------------------------------------------------------------------- */

.ml-hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 8vh 5vw;
	background-color: #10131a;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: fixed;
	overflow: hidden;
}

@supports (-webkit-touch-callout: none) {
	/* background-attachment: fixed is unreliable on iOS Safari */
	.ml-hero {
		background-attachment: scroll;
	}
}

.ml-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.45) 0%,
		rgba(0, 0, 0, 0.35) 40%,
		rgba(0, 0, 0, 0.55) 100%
	);
	pointer-events: none;
}

.ml-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	xmax-width: 900px;
}

.ml-hero__name {
	margin: 0;
	color: var(--ml-white);
	font-family: var(--ml-sans);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-size: clamp(2rem, 6vw, 3.75rem);
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.ml-hero__tagline {
	margin: 1.1rem 0 0;
	color: var(--ml-muted);
	font-family: var(--ml-serif);
	font-style: italic;
	font-size: clamp(1rem, 2vw, 1.25rem);
	xmax-width: 640px;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

/* Social / profile icon row */

.ml-icons {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	margin: 2.25rem 0 0;
	padding: 0;
}

.ml-icons__item {
	margin: 0;
}

.ml-icons__link {
	--brand: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	color: var(--ml-muted);
	transition: transform 0.22s ease, color 0.22s ease, background-color 0.22s ease;
}

.ml-icons__link:hover,
.ml-icons__link:focus-visible {
	color: var(--brand);
	background-color: rgba(255, 255, 255, 0.12);
	transform: scale(1.18);
}

.ml-icons__link svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	display: block;
}

/* Small nav under the hero content, links to Shows / Music */

.ml-hero__nav {
	margin-top: 2.75rem;
}

.ml-hero__nav ul {
	list-style: none;
	display: flex;
	gap: 2rem;
	margin: 0;
	padding: 0;
}

.ml-hero__nav a {
	font-family: var(--ml-sans);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ml-muted);
	padding-bottom: 4px;
	border-bottom: 1px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.ml-hero__nav a:hover,
.ml-hero__nav a:focus-visible {
	color: var(--ml-white);
	border-color: rgba(255, 255, 255, 0.6);
}

.ml-scroll-cue {
	position: absolute;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%);
	color: var(--ml-muted);
	opacity: 0.7;
	z-index: 1;
	animation: ml-bounce 2.2s ease-in-out infinite;
}

.ml-scroll-cue svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

@keyframes ml-bounce {
	0%, 100% { transform: translate(-50%, 0); }
	50% { transform: translate(-50%, 8px); }
}

/* -------------------------------------------------------------------- */
/*  Simple top bar used on interior pages (Shows, Music, generic pages) */
/* -------------------------------------------------------------------- */

.ml-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 1.75rem 6vw;
	border-bottom: 1px solid var(--ml-hairline);
}

.ml-topbar__name {
	font-family: var(--ml-sans);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 0.95rem;
	text-decoration: none;
	color: var(--ml-ink);
}

.ml-topbar__nav ul {
	list-style: none;
	display: flex;
	gap: 1.75rem;
	margin: 0;
	padding: 0;
}

.ml-topbar__nav a {
	font-family: var(--ml-sans);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ml-ink);
	opacity: 0.65;
	transition: opacity 0.2s ease;
}

.ml-topbar__nav a:hover,
.ml-topbar__nav a:focus-visible,
.ml-topbar__nav a[aria-current="page"] {
	opacity: 1;
}

/* -------------------------------------------------------------------- */
/*  Page content wrapper (Shows / Music / generic pages)                */
/* -------------------------------------------------------------------- */

.ml-page {
	max-width: var(--ml-max-width);
	margin: 0 auto;
	padding: 4rem 6vw 6rem;
}

.ml-page__title {
	font-family: var(--ml-sans);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-size: 1.6rem;
	margin: 0 0 2.5rem;
}

.ml-page .entry-content > * + * {
	margin-top: 1.4em;
}

.ml-page .entry-content h2 {
	font-family: var(--ml-sans);
	font-size: 1.15rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-top: 2.4em;
}

.ml-page .entry-content h3 {
	font-family: var(--ml-sans);
	font-size: 1rem;
	letter-spacing: 0.04em;
}

.ml-page .entry-content img {
	border-radius: 4px;
}

.ml-page .entry-content figure {
	margin: 0;
}

.ml-page .entry-content a {
	color: var(--ml-ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* -------------------------------------------------------------------- */
/*  Shows page                                                          */
/* -------------------------------------------------------------------- */

.ml-bandsintown {
	margin-bottom: 3rem;
	padding: 1.5rem;
	border: 1px solid var(--ml-hairline);
	border-radius: 6px;
}

.ml-bandsintown__placeholder {
	font-family: var(--ml-sans);
	font-size: 0.85rem;
	opacity: 0.6;
	text-align: center;
	padding: 2rem 0;
}

.ml-tour-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
	margin: 1.5rem 0 2rem;
}

.ml-tour-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
}

@media (max-width: 560px) {
	.ml-tour-gallery {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------------- */
/*  Music page — albums & songs                                        */
/* -------------------------------------------------------------------- */

.ml-album {
	padding: 2.5rem 0;
	border-top: 1px solid var(--ml-hairline);
}

.ml-album:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.ml-album__title {
	font-family: var(--ml-sans);
	font-weight: 700;
	font-size: 1.3rem;
	letter-spacing: 0.02em;
	margin: 0 0 0.4rem;
}

.ml-album__meta {
	font-family: var(--ml-sans);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.55;
	margin: 0 0 1.5rem;
}

.ml-song {
	margin: 0 0 0.6rem;
	border: 1px solid var(--ml-hairline);
	border-radius: 6px;
	overflow: hidden;
}

.ml-song > summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.9rem 1.1rem;
	font-family: var(--ml-sans);
	font-size: 0.95rem;
	font-weight: 600;
}

.ml-song > summary::-webkit-details-marker {
	display: none;
}

.ml-song > summary::after {
	content: "+";
	font-size: 1.2rem;
	font-weight: 400;
	line-height: 1;
	opacity: 0.5;
	transition: transform 0.2s ease;
}

.ml-song[open] > summary::after {
	transform: rotate(45deg);
}

.ml-song__body {
	padding: 0 1.1rem 1.3rem;
}

.ml-song__lyrics {
	font-family: var(--ml-serif);
	font-size: 1rem;
	white-space: pre-line;
	line-height: 1.7;
	margin: 0 0 1.1rem;
}

.ml-bandcamp-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--ml-sans);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ml-white);
	background: #408294;
	padding: 0.55rem 1rem;
	border-radius: 999px;
	transition: opacity 0.2s ease;
}

.ml-bandcamp-btn:hover,
.ml-bandcamp-btn:focus-visible {
	opacity: 0.85;
}

.ml-bandcamp-btn svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

/* Native Gutenberg "Details" block, styled the same as .ml-song, so Matthew
   can build song entries with core blocks alone (Heading + Details + a
   Bandcamp link) without needing custom markup. */
.ml-page .entry-content details {
	margin: 0 0 0.6rem;
	border: 1px solid var(--ml-hairline);
	border-radius: 6px;
	padding: 0;
	overflow: hidden;
}

.ml-page .entry-content details > summary {
	list-style: none;
	cursor: pointer;
	padding: 0.9rem 1.1rem;
	font-family: var(--ml-sans);
	font-size: 0.95rem;
	font-weight: 600;
}

.ml-page .entry-content details > summary::-webkit-details-marker {
	display: none;
}

.ml-page .entry-content details > summary::after {
	content: "+";
	float: right;
	font-size: 1.2rem;
	font-weight: 400;
	opacity: 0.5;
}

.ml-page .entry-content details[open] > summary::after {
	content: "\2212";
}

.ml-page .entry-content details > :not(summary) {
	padding: 0 1.1rem;
}

.ml-page .entry-content details > :last-child {
	padding-bottom: 1.2rem;
}

/* Auto-style plain bandcamp links typed straight into page content */
.ml-page .entry-content a[href*="bandcamp.com"] {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--ml-sans);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ml-white) !important;
	background: #408294;
	padding: 0.5rem 0.95rem;
	border-radius: 999px;
}

/* -------------------------------------------------------------------- */
/*  Footer                                                              */
/* -------------------------------------------------------------------- */

.ml-footer {
	padding: 3rem 6vw 4rem;
	text-align: center;
	font-family: var(--ml-sans);
	font-size: 0.78rem;
	letter-spacing: 0.05em;
	opacity: 0.5;
}

/* -------------------------------------------------------------------- */
/*  WP core alignment helpers                                          */
/* -------------------------------------------------------------------- */

.alignwide {
	max-width: 1100px;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

@media (max-width: 700px) {
	.ml-topbar {
		flex-direction: column;
		align-items: flex-start;
	}
}
