/* Jonah's Music Coaching chrome: what the header, menu panel and footer still need from CSS. Their colours, type, spacing, radius
   and shadows are block attributes and style variations in the parts (tools/build-site.py), so the Site Editor shows
   and edits them. Kept here: the sticky part wrapper, the phone header, the menu link animation, the menu panel rows,
   the header over the hero. Token variables only (raw values: 0, 1px hairlines, media-query breakpoints). */

/* ---------- page frame ---------- */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- header ---------- */
/* The part wrapper would limit sticky to its own height: let its children sit directly in .wp-site-blocks. */
.wp-block-template-part:has(> .jmc-header-wrap) { display: contents; }
.jmc-header-wrap { z-index: var(--wp--custom--z--sticky); transition: background-color var(--wp--custom--transition--base), color var(--wp--custom--transition--base), box-shadow var(--wp--custom--transition--base); }
/* the brand group is one link: the title link stretches over the badge */
.jmc-brand { position: relative; flex: none; }
.jmc-brand .wp-block-site-title { margin: 0; }
.jmc-brand .wp-block-site-title a::after { content: ""; position: absolute; inset: 0; }
.jmc-header-cta { flex: none; margin: 0; }

/* navigation: inline from 1280px, the menu panel below (core switches at 600px, so move the switch; this site: the big logo, title and the long header button leave too little room for four links below 1280px; the site title sits on two lines beside the wide JMC logo) */
.jmc-nav { margin-right: auto; margin-left: var(--wp--preset--spacing--50); }
.jmc-nav .wp-block-navigation-item__content { position: relative; padding: var(--wp--preset--spacing--30) 0; }
.jmc-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content::after { content: ""; position: absolute; left: 0; right: 100%; bottom: var(--wp--preset--spacing--20); height: var(--wp--custom--border--strong); border-radius: var(--wp--custom--radius--badge); background: var(--wp--preset--color--accent-1); transition: right var(--wp--custom--transition--base); }
.jmc-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content:hover::after,
.jmc-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after { right: 0; }
.jmc-nav .wp-block-navigation__responsive-container-open { display: none; width: var(--wp--custom--control--min); height: var(--wp--custom--control--min); align-items: center; justify-content: center; border-radius: var(--wp--custom--radius--icon-button); color: currentColor; background: transparent; border: 0; padding: 0; cursor: pointer; }
.jmc-nav .wp-block-navigation__responsive-container-open:hover { background: var(--wp--preset--color--accent-5); }
.jmc-nav .wp-block-navigation__responsive-container-open svg { width: var(--wp--custom--icon--md); height: var(--wp--custom--icon--md); }
@media (max-width: 1279px) {
	.jmc-nav { order: 3; margin: 0; }
	.jmc-header-cta { margin-left: auto; }
	.jmc-nav .wp-block-navigation__responsive-container-open { display: flex !important; }
	.jmc-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
}
@media (min-width: 1280px) {
	.jmc-header { min-height: var(--wp--custom--layout--header-height) !important; }
}

/* centered: logo in the middle and the button on the right, the menu on its own row below (from 1024px) */
@media (min-width: 1024px) {
	.jmc-header.jmc-header--centered { display: grid !important; grid-template-columns: 1fr auto 1fr; grid-template-areas: ". brand cta" "nav nav nav"; align-items: center; row-gap: var(--wp--preset--spacing--20); padding-block: var(--wp--preset--spacing--30); }
	.jmc-header--centered .jmc-brand { grid-area: brand; }
	.jmc-header--centered .jmc-header-cta { grid-area: cta; justify-self: end; }
	.jmc-header--centered .jmc-nav { grid-area: nav; justify-self: center; margin: 0; }
}

/* over the hero (content.json layout.header.over_hero): transparent while the page sits at the top of a hero that runs
   under the header (.jmc-hero--under-header), solid once it scrolls (assets/js/header-scroll.js sets body.jmc-is-scrolled).
   Only with JavaScript (html.jmc-js, printed in the head), so without it the header stays solid. */
html.jmc-js body:not(.jmc-is-scrolled):has(.jmc-hero--under-header) .jmc-header-wrap--over-hero { background-color: transparent !important; }
html.jmc-js body:not(.jmc-is-scrolled):has(.jmc-hero--under-header.jmc-hero--tone-dark) .jmc-header-wrap--over-hero { color: var(--wp--preset--color--on-accent); }
body.jmc-is-scrolled .jmc-header-wrap { box-shadow: 0 1px 0 var(--wp--preset--color--accent-6); }
/* the open menu panel must not inherit the transparent header's colours */
.jmc-header-wrap:has(.wp-block-navigation__responsive-container.is-menu-open) { background: var(--wp--preset--color--base) !important; color: var(--wp--preset--color--contrast); }

/* ---------- menu panel (navigation overlay; the panel's look is in the part) ---------- */
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--overlay); padding: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--preset--spacing--40)) var(--wp--preset--spacing--40) var(--wp--preset--spacing--40); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content > * { display: block; height: auto; }
.jmc-drawer { width: 100%; max-width: var(--wp--custom--layout--drawer); margin-left: auto; box-sizing: border-box; }
/* core's overlay rule sets display:block on the panel's children: keep the head a row */
.jmc-drawer__head { display: flex !important; }
.jmc-drawer .wp-block-navigation-overlay-close { display: inline-grid; place-items: center; width: var(--wp--custom--control--min); height: var(--wp--custom--control--min); border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--border-strong); border-radius: var(--wp--custom--radius--icon-button); background: var(--wp--preset--color--surface); color: var(--wp--preset--color--contrast); cursor: pointer; padding: 0; position: static; }
.jmc-drawer .wp-block-navigation-overlay-close:hover { background: var(--wp--preset--color--accent-5); }
.jmc-drawer .wp-block-navigation-overlay-close svg { width: var(--wp--custom--icon--md); height: var(--wp--custom--icon--md); fill: currentColor; }
.jmc-drawer__nav .wp-block-navigation__container { display: grid; width: 100%; gap: 0; }
.jmc-drawer__nav .wp-block-navigation-item { display: block; border-bottom: var(--wp--custom--border--hairline) solid var(--wp--preset--color--accent-6); }
.jmc-drawer__nav .wp-block-navigation-item:last-child { border-bottom: 0; }
.jmc-drawer__nav .wp-block-navigation-item__content { display: flex; align-items: center; justify-content: space-between; min-height: var(--wp--custom--control--min); padding: var(--wp--preset--spacing--20) 0; }
.jmc-drawer__nav .wp-block-navigation-item__content::after { content: ""; width: var(--wp--custom--icon--sm); height: var(--wp--custom--icon--sm); flex: none; background: var(--wp--preset--color--accent-4); -webkit-mask: url(../icons/wp/caret-right.svg) center / contain no-repeat; mask: url(../icons/wp/caret-right.svg) center / contain no-repeat; transition: transform var(--wp--custom--transition--fast); }
.jmc-drawer__nav .wp-block-navigation-item__content:hover::after { transform: translateX(3px); background: var(--wp--preset--color--contrast); }
.jmc-drawer__contact a { display: inline-flex; flex-wrap: wrap; align-items: center; align-content: center; min-height: var(--wp--custom--control--min); }
.jmc-email-part { display: inline-block; text-decoration: inherit; }

/* ---------- footer (colours, spacing and type are in the part) ---------- */
.jmc-footer a { text-decoration: none; }
.jmc-footer a:hover { text-decoration: underline; }
.jmc-footer .wp-block-column { min-width: 0; }
.jmc-footer .wp-block-navigation-item__content { display: inline-flex; align-items: center; min-height: var(--wp--custom--control--min); }
.jmc-footer p > a:is([href^="mailto:"], [href^="tel:"]) { display: inline-flex; flex-wrap: wrap; align-items: center; align-content: center; min-height: var(--wp--custom--control--min); }
.jmc-footer__bottom > * { margin: 0; }
.jmc-footer__bottom .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--on-accent); }
/* social logos stay core brand marks: 44px round targets that invert on hover */
.jmc-footer .wp-block-social-links { gap: var(--wp--preset--spacing--20); }
.jmc-footer .wp-block-social-links .wp-social-link { background: transparent !important; color: var(--wp--preset--color--on-accent) !important; border-radius: var(--wp--custom--radius--icon-button); }
.jmc-footer .wp-block-social-links .wp-social-link a { display: grid; place-items: center; width: var(--wp--custom--control--min); height: var(--wp--custom--control--min); padding: 0; color: inherit; }
.jmc-footer .wp-block-social-links .wp-social-link a:hover,
.jmc-footer .wp-block-social-links .wp-social-link a:focus-visible { background: var(--wp--preset--color--on-accent); color: var(--wp--preset--color--accent-3) !important; text-decoration: none; border-radius: var(--wp--custom--radius--icon-button); }
.jmc-footer .wp-block-social-links .wp-social-link a:hover svg,
.jmc-footer .wp-block-social-links .wp-social-link a:focus-visible svg { fill: var(--wp--preset--color--accent-3); }
.jmc-footer .wp-block-social-links svg { width: var(--wp--custom--icon--md); height: var(--wp--custom--icon--md); }

/* ---------- Version B header: big logo and heavy title; on phones a smaller logo and the title on two lines ---------- */
.jmc-brand__logo { margin: 0; }
/* header title on two lines at every width: the wide JMC logo (2026-11-18) left four links too little room in the 1200px header */
.jmc-header .jmc-brand .wp-block-site-title { max-width: 9em; line-height: var(--wp--custom--line-height--display); }
@media (max-width: 1023px) {
	.jmc-brand__logo img { width: var(--wp--custom--layout--logo-mobile) !important; height: auto; }
	.jmc-header .jmc-brand .wp-block-site-title { max-width: 9em; line-height: var(--wp--custom--line-height--display); font-size: var(--wp--preset--font-size--large); }
}

/* Header button: hidden until it fits beside the logo and menu button (its longer label overflowed 481-639px) */
@media (max-width: 639px) {
	.jmc-header .wp-block-buttons.jmc-header-cta { display: none; } /* beats core's .wp-block-buttons.is-layout-flex */
}
