/*
Theme Name: PianoSecrets
Theme URI: https://pianosecrets.com
Author: Eric Rader
Author URI: https://pianosecrets.com
Description: A clean, modern block theme for PianoSecrets.com — piano lessons, books and tools. Built for easy reading, with large type and simple layouts.
Version: 1.1.1
Requires at least: 6.5
Tested up to: 6.8
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: pianosecrets
Tags: block-patterns, full-site-editing, one-column, two-columns, blog, education, custom-colors
*/

/* ---------- Basics ---------- */
html { scroll-behavior: smooth; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(.wp-site-blocks) :focus-visible { outline: 2px solid var(--wp--preset--color--link); outline-offset: 3px; }
img { height: auto; }

.ps-eyebrow {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-muted);
	margin-bottom: 0.25rem;
}
.has-ink-background-color .ps-eyebrow,
.has-charcoal-background-color .ps-eyebrow { color: var(--wp--preset--color--gold); }

/* ---------- Header ---------- */
.ps-announce p { margin: 0; }
.ps-announce a { color: inherit; text-decoration: none; }
.ps-announce a strong { text-decoration: underline; font-weight: 600; }
.ps-announce mark.ps-new {
	display: inline-block;
	margin-right: 0.6rem;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-decoration: none !important;
}
.ps-header { border-bottom: 1px solid var(--wp--preset--color--border); }
.ps-header .wp-block-image { margin: 0; }
.ps-header .wp-block-image img { border-radius: 0; }
.ps-header .wp-block-navigation__container { gap: 0.25rem 1.6rem; }
.ps-header .wp-block-navigation-item.current-menu-item > a,
.ps-header .wp-block-navigation-item a[aria-current="page"] { box-shadow: inset 0 -2px 0 currentColor; }
.ps-header .wp-block-navigation-item a { padding: 0.5rem 0; }
.ps-header-cta .wp-block-button__link { padding: 0.75rem 1.25rem; font-size: 0.9375rem; }
@media (max-width: 600px) {
	.ps-logo img { width: 150px !important; }
	.ps-header-cta { display: none !important; }
}

/* Images that should not get rounded corners or borders */
.ps-logo img, .ps-footer img, .ps-hero-image img, .ps-plain-image img { border-radius: 0 !important; }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--ink);
	padding: calc(1rem - 1.5px) calc(1.75rem - 1.5px);
}
.wp-block-button.is-style-ps-dark > .wp-block-button__link {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}
.wp-block-button.is-style-ps-dark > .wp-block-button__link:hover { background: #2B2F3A; }

/* ---------- Cards & boxes ---------- */
.is-style-ps-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--white);
	padding: clamp(1.25rem, 3vw, 1.9rem);
}
.has-ink-background-color .is-style-ps-card,
.has-charcoal-background-color .is-style-ps-card {
	background: var(--wp--preset--color--charcoal);
	border-color: #2E323C;
	color: var(--wp--preset--color--white);
}
.is-style-ps-callout {
	border: 1px solid #F1D99B;
	border-radius: var(--wp--custom--radius--small);
	background: var(--wp--preset--color--gold-soft);
	padding: 1.4rem 1.5rem;
	font-size: 1rem;
	color: #3A3220;
}
.is-style-ps-callout > :first-child { margin-top: 0; }
.ps-rounded-lg { border-radius: var(--wp--custom--radius--large); overflow: hidden; }

/* Book covers */
.wp-block-image.is-style-ps-book img {
	border-radius: 6px;
	box-shadow: var(--wp--preset--shadow--book);
}

/* Checklist */
.is-style-ps-checklist { list-style: none; padding-left: 0; }
.is-style-ps-checklist li { position: relative; padding-left: 2.2rem; margin-bottom: 0.7rem; }
.is-style-ps-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.15em;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 999px;
	background: var(--wp--preset--color--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315171C' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 0.85rem no-repeat;
}

.has-gold-background-color .is-style-ps-checklist li::before {
	background-color: var(--wp--preset--color--ink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FEB703' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}
.has-gold-background-color .ps-eyebrow { color: #3A2E05; }
.ps-gold-link a { color: var(--wp--preset--color--gold); text-decoration: none; }
.ps-gold-link a:hover { text-decoration: underline; }
.has-ink-background-color .wp-block-heading { color: inherit; }

/* Tag on a card ("FREE + S&H", "COMING SOON") */
.ps-tag {
	display: inline-block;
	padding: 0.35rem 0.8rem;
	border-radius: 999px;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1.3;
}
.ps-tag.is-gold { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--ink); }

/* Five steps */
.ps-step-number {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	line-height: 1;
	margin: 0 !important;
}

/* Songstep tool icons */
.ps-tool-icon img { border-radius: 20px; }

/* Testimonials */
.ps-quote-card { display: flex; flex-direction: column; justify-content: space-between; }
.ps-quote-card::before {
	content: "\201C";
	display: block;
	font-family: Georgia, serif;
	font-size: 4rem;
	line-height: 0.8;
	height: 2rem;
	color: var(--wp--preset--color--gold);
}
.ps-quote-name { font-weight: 600; margin-bottom: 0 !important; }
.ps-quote-role { font-size: 0.875rem; color: var(--wp--preset--color--text-muted); margin-top: 0 !important; }

/* Blog cards (query loops) */
.ps-post-grid .wp-block-post-featured-image { margin-bottom: 1rem; }
.ps-post-grid .wp-block-post-terms a { color: var(--wp--preset--color--text-muted); text-decoration: none; font-weight: 600; }
.ps-post-grid .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ps-post-grid .wp-block-post-title a:hover { text-decoration: underline; }
.ps-post-grid .wp-block-post-excerpt { color: var(--wp--preset--color--text-muted); font-size: 1rem; }
.ps-post-grid .wp-block-post-excerpt__more-text { display: none; }

/* ---------- Single post / lesson ---------- */
.ps-breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.9rem; color: var(--wp--preset--color--text-muted); }
.ps-breadcrumbs a { color: var(--wp--preset--color--text-muted); text-decoration: none; }
.ps-breadcrumbs a:hover { text-decoration: underline; }
.ps-breadcrumbs [aria-current] { color: var(--wp--preset--color--ink); }

.ps-pill {
	display: inline-block;
	padding: 0.35rem 0.8rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--text-soft);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}
.ps-pill:hover { border-color: var(--wp--preset--color--text-muted); }
.ps-intro { font-size: 1.25rem; line-height: 1.6; color: var(--wp--preset--color--text-soft); margin-bottom: 0; }

.ps-byline { display: flex; align-items: center; gap: 0.9rem; font-size: 0.9rem; color: var(--wp--preset--color--text-muted); }
.ps-byline__avatar { width: 44px; height: 44px; border-radius: 999px; }
.ps-byline__name { display: block; font-weight: 600; color: var(--wp--preset--color--ink); }
.ps-byline__meta { display: block; }

.ps-article .wp-block-post-content { font-size: 1.125rem; line-height: 1.75; color: #262A33; }
.ps-article .wp-block-post-content > h2 { margin-top: 2.75rem; scroll-margin-top: 1.5rem; }

.ps-box {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	padding: 1.5rem;
}
.ps-box__label { margin: 0 0 0.75rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--text-muted); }
.ps-toc ul { list-style: none; margin: 0; padding: 0; }
.ps-toc li { padding: 0.4rem 0; font-size: 0.95rem; }
.ps-toc a { color: var(--wp--preset--color--text-soft); text-decoration: none; }
.ps-toc a:hover { color: var(--wp--preset--color--ink); text-decoration: underline; }

.ps-sidebar { position: sticky; top: 2rem; }
@media (max-width: 781px) { .ps-sidebar { position: static; } }

.ps-steps-list { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.ps-steps-list li { counter-increment: step; display: flex; align-items: center; gap: 0.75rem; padding: 0.35rem 0; font-size: 0.95rem; }
.ps-steps-list li::before {
	content: counter(step);
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.65rem;
	height: 1.65rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	font-size: 0.8rem;
	font-weight: 600;
}

.ps-post-nav { border-top: 1px solid var(--wp--preset--color--border); padding-top: 2rem; }
.ps-post-nav .wp-block-post-navigation-link {
	flex: 1 1 240px;
	padding: 1rem 1.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	font-weight: 600;
}
.ps-post-nav .wp-block-post-navigation-link a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ps-post-nav .post-navigation-link-next { text-align: right; }
.ps-post-nav .wp-block-post-navigation-link:empty { display: none; }

.ps-author-box {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	align-items: center;
	padding: 1.75rem;
	border-radius: 18px;
	background: var(--wp--preset--color--surface);
	margin-top: 2.5rem;
}
.ps-author-box__avatar { width: 72px; height: 72px; border-radius: 999px; }
.ps-author-box > div { flex: 1 1 280px; }
.ps-author-box__name { margin: 0 0 0.25rem; font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 1.125rem; }
.ps-author-box__bio { margin: 0; font-size: 1rem; color: var(--wp--preset--color--text-soft); }

.ps-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.75rem; }
.ps-related__item { display: block; color: var(--wp--preset--color--ink); text-decoration: none; }
.ps-related__img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; margin-bottom: 1rem; }
.ps-related__cat { display: block; font-size: 0.85rem; font-weight: 600; color: var(--wp--preset--color--text-muted); margin-bottom: 0.35rem; }
.ps-related__title { display: block; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.25rem; line-height: 1.3; }
.ps-related__item:hover .ps-related__title { text-decoration: underline; }

/* Keyboard diagram pattern */
.ps-keyboard-figure { border: 1px solid var(--wp--preset--color--border); border-radius: 18px; background: var(--wp--preset--color--surface); padding: 1.75rem; }
.ps-keyboard-figure svg { display: block; width: 100%; max-width: 480px; height: auto; margin: 0 auto; }

/* ---------- Footer ---------- */
.ps-footer .wp-block-image img { border-radius: 0; }
.ps-copyright { margin: 0; font-size: 0.95rem; line-height: 2; color: #A7ABB6; text-align: center; }
.ps-copyright a { color: #E3E5EA; text-decoration: none; }
.ps-copyright a:hover { text-decoration: underline; }
.ps-copyright__sep { margin: 0 0.6rem; }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	.ps-hide-mobile { display: none !important; }
	.wp-block-buttons .wp-block-button { flex: 1 1 100%; }
	.wp-block-buttons .wp-block-button__link { width: 100%; }
}

/* Keep the footer at the bottom on short pages */
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main, .wp-site-blocks > .wp-block-group:where(main) { flex: 1 0 auto; }
.wp-site-blocks > footer { margin-top: auto; }
.ps-post-grid { margin-top: var(--wp--preset--spacing--40) !important; }
