/*
Theme Name: Lyric Trail
Theme URI: https://example.com/lyric-trail
Author: Your Name
Description: A light, fully customisable music theme for song lyrics, translations and artist pages. Colours, fonts, layout and homepage text are all in Appearance > Customize > Lyric Trail Options. The post/page editor shows the same design as the site.
Version: 1.1.0
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lyric-trail
*/

/* ---------- Defaults. Every value here can be changed from the Customizer ---------- */
:root {
	--ink: #14122b;
	--dark: #14122b;
	--ink-2: #26224d;
	--bg: #f6f2ea;
	--tint: #efe9dd;
	--card: #ffffff;
	--line: #e3dccd;
	--muted: #6a6780;
	--accent: #ff6b3d;
	--accent-dark: #e4511f;
	--accent-2: #18a999;
	--radius: 18px;
	--fs: 16px;
	--w-wide: 1180px;
	--w-narrow: 760px;
	--cols: 4;
	--shadow: 0 10px 30px rgba(20, 18, 43, 0.08);
	--font-head: 'Fraunces', Georgia, serif;
	--font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--fs);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
.menu, .chips, .rows, .people { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 1em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--dark); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; }

.wrap { width: min(var(--w-wide), 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(var(--w-narrow), 100% - 32px); }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(246, 242, 234, 0.92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s, box-shadow .2s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.lt-nosticky .site-header { position: relative; top: 0; }
.site-header.is-stuck { border-color: var(--line); box-shadow: 0 4px 18px rgba(20, 18, 43, 0.05); }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }

.brand__link { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark {
	display: grid; place-items: center;
	width: 36px; height: 36px; border-radius: 12px;
	background: var(--accent); color: #fff; font-size: 20px;
	transform: rotate(-6deg);
}
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; }
.brand .custom-logo { max-height: 44px; width: auto; }

.nav-toggle {
	display: grid; place-items: center;
	width: 44px; height: 44px; border: 0; border-radius: 12px;
	background: var(--dark); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
	content: ''; display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; position: relative;
}
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

.site-nav {
	display: none;
	position: absolute; left: 0; right: 0; top: 100%;
	background: var(--bg); border-bottom: 1px solid var(--line);
	padding: 8px 16px 18px;
}
.site-nav.is-open { display: block; }
.site-nav .menu a { display: block; padding: 12px 4px; font-weight: 500; border-bottom: 1px solid var(--line); }

@media (min-width: 820px) {
	.nav-toggle { display: none; }
	.site-nav { display: block; position: static; background: none; border: 0; padding: 0; }
	.site-nav .menu { display: flex; gap: 6px; }
	.site-nav .menu a { border: 0; padding: 8px 16px; border-radius: 999px; font-size: .95rem; }
	.site-nav .menu a:hover { background: var(--tint); color: var(--ink); }
}

/* Small "edit" pills, only shown to people who can edit */
.edit-link { margin: 14px 0 0; }
.edit-link a, .lt-quick {
	display: inline-block; font-size: .78rem; font-weight: 600; padding: 5px 12px; border-radius: 999px;
	background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .3);
}
.edit-link a:hover, .lt-quick:hover { background: #fff; color: var(--dark); }
.lt-quick { margin-top: 14px; }
.fb .lt-quick { background: var(--tint); color: var(--ink); border-color: var(--line); margin: 0; }

/* ---------- Hero ---------- */
.hero {
	background:
		radial-gradient(600px 300px at 85% 10%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%),
		radial-gradient(500px 300px at 0% 100%, color-mix(in srgb, var(--accent-2) 28%, transparent), transparent 70%),
		var(--dark);
	color: #fff;
	padding: 56px 0 64px;
	overflow: hidden;
}
.hero-in { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); margin: 10px 0 16px; }
.hero__lead { color: #cfcce6; max-width: 52ch; font-size: 1.05rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 600; color: var(--accent); margin: 0; }
.eyebrow--dark { color: var(--accent-dark); }

.search { display: flex; gap: 8px; margin: 22px 0; max-width: 520px; }
.search input {
	flex: 1; min-width: 0; padding: 14px 18px;
	border-radius: 999px; border: 2px solid transparent;
	font: inherit; background: #fff; color: var(--ink);
}
.search input:focus { outline: none; border-color: var(--accent); }
.search button {
	padding: 0 22px; border: 0; border-radius: 999px;
	background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.search button:hover { background: var(--accent-dark); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.btn--accent { background: #fff; color: var(--ink); }
.btn--accent:hover { background: var(--accent); color: #fff; }
.btn--ghost { border: 1.5px solid rgba(255, 255, 255, .4); color: #fff; }
.btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }

/* Featured card */
.feature {
	background: var(--card); color: var(--ink);
	border-radius: 26px; overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
	transform: rotate(1.2deg);
	max-width: 440px; width: 100%;
	justify-self: center;
}
.feature__media { display: block; aspect-ratio: 1 / 1; background: var(--tint); }
.feature__media img, .feature__media .tile { width: 100%; height: 100%; object-fit: cover; }
.feature__body { padding: 20px 22px 24px; }
.feature__body h2 { font-size: 1.5rem; margin: 10px 0 6px; }
.feature__artist { color: var(--muted); margin-bottom: 10px; }
.feature__cta { font-weight: 600; color: var(--accent-dark); }

@media (min-width: 900px) {
	.hero { padding: 80px 0 90px; }
	.hero-in { grid-template-columns: 1.15fr .85fr; }
}

/* ---------- Suggestion box (under the intro) ---------- */
.fb { padding: 40px 0 0; }
.fb__card {
	position: relative; display: grid; gap: 22px;
	background: var(--card); border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 8px);
	padding: 24px; box-shadow: var(--shadow);
}
.fb h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin: 6px 0 10px; }
.fb__intro p { color: var(--muted); margin: 0; }
.fb-form { display: grid; gap: 12px; }
.fb-types { position: relative; display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.fb-types input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fb-types label {
	padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line);
	background: var(--bg); font-weight: 500; font-size: .9rem; cursor: pointer;
}
.fb-types input:checked + label { background: var(--dark); color: #fff; border-color: var(--dark); }
.fb-types input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-form textarea, .fb-form input[type="text"], .fb-form input[type="email"] {
	width: 100%; font: inherit; padding: 12px 14px; color: var(--ink);
	border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg);
}
.fb-form textarea { min-height: 110px; resize: vertical; }
.fb-form textarea:focus, .fb-form input:focus { outline: none; border-color: var(--accent); }
.fb-row { display: grid; gap: 12px; }
.fb-form button {
	justify-self: start; padding: 13px 26px; border: 0; border-radius: 999px;
	background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.fb-form button:hover { background: var(--accent-dark); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-note { padding: 12px 16px; border-radius: 14px; font-weight: 500; margin: 0 0 4px; }
.fb-note--ok { background: color-mix(in srgb, var(--accent-2) 20%, var(--card)); }
.fb-note--err { background: #fde8e4; color: #8a2a12; }
@media (min-width: 600px) { .fb-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
	.fb__card { grid-template-columns: .8fr 1.2fr; gap: 40px; padding: 36px; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section--tint { background: var(--tint); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-top: 4px; }
.more { font-weight: 600; font-size: .9rem; white-space: nowrap; color: var(--accent-dark); }
.more:hover { text-decoration: underline; }

.tag {
	display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
	padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--muted);
}
.tag--accent { background: var(--accent); color: #fff; }

/* Genre chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 10px 18px; border-radius: 999px;
	background: var(--card); border: 1.5px solid var(--line); font-weight: 500;
	transition: transform .15s, border-color .15s;
}
.chips a:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.chips a span { font-size: .75rem; color: var(--muted); background: var(--tint); padding: 2px 8px; border-radius: 999px; }
.chips--small a { padding: 6px 14px; font-size: .85rem; }
.chips--big a { padding: 14px 24px; font-size: 1.05rem; }

/* Trending rows */
.rows { display: grid; gap: 12px; }
.row {
	display: grid; grid-template-columns: 34px 56px 1fr auto; align-items: center; gap: 14px;
	background: var(--card); border-radius: 16px; padding: 10px 16px 10px 14px;
	border: 1px solid var(--line);
	transition: transform .15s, box-shadow .15s;
}
.row:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.row__rank { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--accent); }
.row__thumb { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--tint); }
.row__thumb img, .row__thumb .tile { width: 100%; height: 100%; object-fit: cover; }
.row__title { font-family: var(--font-body); font-weight: 600; font-size: 1rem; }
.row__artist { margin: 0; font-size: .85rem; color: var(--muted); }
.row__go {
	display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	background: var(--dark); color: #fff; font-size: 1.1rem;
}
.row__go:hover { background: var(--accent); color: #fff; }
@media (min-width: 900px) {
	.rows:not(.rows--full) { grid-template-columns: 1fr 1fr; gap: 12px 20px; }
}

/* Cards grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(var(--cols), 1fr); } }
.card {
	background: var(--card); border-radius: var(--radius); overflow: hidden;
	border: 1px solid var(--line);
	transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media { display: block; aspect-ratio: 1 / 1; background: var(--tint); overflow: hidden; }
.card__media img, .card__media .tile { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 14px 16px 18px; }
.card__title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 8px 0 4px; line-height: 1.3; }
.card__artist { margin: 0; font-size: .85rem; color: var(--muted); }

/* Letter tile fallback */
.tile {
	display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 2rem;
	color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* People */
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
@media (min-width: 700px) { .people { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .people--all { grid-template-columns: repeat(6, 1fr); } }
.people a { display: block; text-align: center; }
.people__photo {
	display: block; width: 100%; max-width: 150px; aspect-ratio: 1 / 1; margin: 0 auto 10px;
	border-radius: 50%; overflow: hidden; background: var(--tint);
	border: 3px solid var(--card); box-shadow: var(--shadow);
	transition: transform .18s;
}
.people a:hover .people__photo { transform: scale(1.05); }
.people__photo img, .people__photo .tile { width: 100%; height: 100%; object-fit: cover; }
.people strong { display: block; font-weight: 600; }
.people small { color: var(--muted); }
.people__photo--big { width: 120px; max-width: 120px; margin: 0; flex-shrink: 0; }

/* ---------- Page heads ---------- */
.page-head { background: var(--dark); color: #fff; padding: 48px 0; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 6px; }
.page-head__in { display: flex; align-items: center; gap: 24px; }
.page-head__desc { color: #cfcce6; margin: 10px 0 0; max-width: 60ch; }
.page-head__search .search { margin-bottom: 0; }

/* ---------- Single song ---------- */
.song__head { background: var(--dark); color: #fff; padding: 48px 0 40px; }
.song__head h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 14px 0 10px; }
.song__artist { font-size: 1.1rem; color: #e2dff5; margin: 0 0 6px; }
.song__artist a { color: var(--accent); }
.song__meta { font-size: .85rem; color: #9c99b8; margin: 0; }
.song__cover { margin: -20px 0 28px; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.song__cover img { width: 100%; }
.song .chips { padding-bottom: 40px; }

/* ---------- Post / page content (also used by the editor) ---------- */
.song__content, .entry { font-size: 1.1rem; line-height: 1.9; }
.song__content { padding: 20px 0 10px; }
.entry { padding: 40px 0 56px; }
.song__content h2, .entry h2 { font-size: 1.6rem; margin: 1.6em 0 .5em; }
.song__content h3, .entry h3 { font-size: 1.25rem; margin: 1.4em 0 .4em; }
.song__content a, .entry a { color: var(--accent-dark); text-decoration: underline; }
.song__content blockquote, .entry blockquote, .wp-block-quote {
	margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent);
	color: var(--ink-2); background: none;
}
.song__content table, .entry table { width: 100%; border-collapse: collapse; }
.song__content td, .song__content th, .entry td, .entry th { border: 1px solid var(--line); padding: 8px 12px; }
.wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* Layout of page content: narrow by default, "wide" and "full" blocks break out */
.entry > *, .entry .is-layout-constrained > *, .entry .lt-band > * {
	width: min(var(--w-narrow), 100% - 32px); margin-inline: auto;
}
.entry > .alignwide, .entry .is-layout-constrained > .alignwide { width: min(var(--w-wide), 100% - 32px); }
.entry > .alignfull, .entry .is-layout-constrained > .alignfull { width: 100%; }
.entry .lt-band.alignfull { padding-inline: 0; }
.entry > .alignleft, .entry > .alignright { width: auto; }

/* Buttons from the block editor */
.wp-block-button__link, .wp-element-button {
	display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 999px;
	padding: 12px 24px; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
}
.song__content .wp-block-button__link, .entry .wp-block-button__link { color: #fff; text-decoration: none; }
.wp-block-button__link:hover { background: var(--accent-dark); color: #fff; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }
.is-style-outline > .wp-block-button__link {
	background: transparent; border: 1.5px solid currentColor; color: var(--ink);
}
.song__content .is-style-outline > .wp-block-button__link, .entry .is-style-outline > .wp-block-button__link { color: var(--ink); }
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 24px; margin: 1.4em 0; }
.wp-block-column { flex: 1 1 220px; min-width: 0; }

/* Bands: use the "Lyric Trail" patterns in the editor to add these */
.lt-band { padding: 56px 0; margin: 0; }
.lt-band--dark { background: var(--dark); color: #fff; }
.lt-band--dark h1, .lt-band--dark h2, .lt-band--dark h3 { color: #fff; }
.lt-band--dark .is-style-outline > .wp-block-button__link { color: #fff; }
.lt-band--dark .wp-block-button:not(.is-style-outline) > .wp-block-button__link { background: #fff; color: var(--ink); }
.lt-band--tint { background: var(--tint); }
.lt-band--accent { background: var(--accent); color: #fff; }
.lt-band--accent .wp-block-button__link { background: var(--dark); color: #fff; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; margin-top: 40px; }
.pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; margin: 0 3px;
	border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 500;
}
.pagination .current { background: var(--dark); color: #fff; border-color: var(--dark); }
.pagination a.page-numbers:hover { border-color: var(--accent); }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #cfcce6; padding-top: 56px; }
.footer-in { display: grid; gap: 32px; padding-bottom: 36px; }
@media (min-width: 800px) { .footer-in { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { margin-top: 14px; max-width: 32ch; }
.footer-col h2 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer-col .menu a { display: inline-block; padding: 4px 0; }
.footer-col .menu a:hover { color: var(--accent); }
.footer-base {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
	border-top: 1px solid rgba(255, 255, 255, .12); padding: 20px 0 28px; font-size: .85rem;
}

/* WordPress core alignment helpers */
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { margin-inline: auto; display: block; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
.entry--landing { padding: 0; }
.entry--landing .edit-link { padding: 16px 0; }
.entry--landing .edit-link a { background: var(--dark); border-color: var(--dark); }
.hero__text { min-width: 0; }
