/*
Theme Name: Gilmore
Theme URI: https://drmargaretgilmore.com
Author: Sekou Tyler
Author URI: https://sqlsekou.com
Description: A block theme for Dr. Margaret Gilmore, education leadership speaker and consultant. Built with core blocks and theme.json. No page builder, no framework, no build step.
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
Version: 0.1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gilmore
Tags: block-theme, full-site-editing, one-column, custom-colors, custom-menu, custom-logo, featured-images, block-styles, wide-blocks, accessibility-ready, translation-ready
*/

/*
 * Nearly all styling lives in theme.json.
 * Only rules the block editor cannot express belong here.
 */

/* Respect reduced-motion preferences.
   The Lovable source animated the hero with no such guard, which is an
   accessibility failure the block theme should not inherit. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Skip link, required for keyboard navigation and the accessibility-ready tag. */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999999;
	padding: 0.75rem 1.5rem;
	background-color: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	text-decoration: none;
}

.skip-link:focus {
	left: 0;
}

/* Visible focus ring for keyboard users on any focusable element that
   theme.json does not already cover. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--gold-dark);
	outline-offset: 2px;
}

/* Smooth scrolling, but only when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* ------------------------------------------------------------------
   Block style variations registered in functions.php.
   These are the only "components" in the theme. Everything else is a
   core block configured through theme.json.
   ------------------------------------------------------------------ */

/* Button: outlined, for use on navy backgrounds. */
.wp-block-button.is-style-outline-light > .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--off-white);
	border: 1px solid rgba(251, 250, 249, 0.45);
}

.wp-block-button.is-style-outline-light > .wp-block-button__link:hover,
.wp-block-button.is-style-outline-light > .wp-block-button__link:focus {
	background-color: rgba(251, 250, 249, 0.12);
	color: var(--wp--preset--color--off-white);
	border-color: var(--wp--preset--color--off-white);
}

/* Button: outlined, for use on light backgrounds. */
.wp-block-button.is-style-outline-dark > .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--border);
}

.wp-block-button.is-style-outline-dark > .wp-block-button__link:hover,
.wp-block-button.is-style-outline-dark > .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--gold-dark);
}

/* Button: solid navy, the secondary CTA on light sections. */
.wp-block-button.is-style-navy-solid > .wp-block-button__link {
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--off-white);
}

.wp-block-button.is-style-navy-solid > .wp-block-button__link:hover,
.wp-block-button.is-style-navy-solid > .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--navy-light);
	color: var(--wp--preset--color--off-white);
}

/* Group: card surface on light sections. */
.wp-block-group.is-style-card {
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.75rem;
	padding: var(--wp--preset--spacing--50);
	box-shadow: var(--wp--preset--shadow--elegant);
}

/* Group: translucent card, for use on navy sections. */
.wp-block-group.is-style-card-translucent {
	background-color: rgba(251, 250, 249, 0.05);
	border: 1px solid rgba(251, 250, 249, 0.10);
	border-radius: 0.75rem;
	padding: var(--wp--preset--spacing--40);
}

/* Cards in a columns row must fill the full column height, otherwise each
   card shrinks to its own content and a heading that wraps to two lines
   knocks that card out of alignment with its neighbours. */
.wp-block-columns > .wp-block-column > .wp-block-group.is-style-card,
.wp-block-columns > .wp-block-column > .wp-block-group.is-style-card-translucent {
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* Same treatment for cards rendered inside a Query Loop's Post Template,
   which uses a grid of <li> elements rather than Columns. Without this each
   card sizes to its own content and the rows stagger. */
.wp-block-post-template > li {
	display: flex;
	/* Column direction matters. Without it, a Post Template whose item is a
	   set of sibling blocks (a quote plus its attribution, say) lays them out
	   side by side and squeezes the second one into a narrow strip. */
	flex-direction: column;
}

.wp-block-post-template > li > .wp-block-group.is-style-card,
.wp-block-post-template > li > .wp-block-group.is-style-card-translucent {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* Push the call to action to the bottom of the card so buttons line up
   across a row regardless of how long each card's copy runs. */
.is-style-card > .wp-block-buttons,
.is-style-card-translucent > .wp-block-buttons {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--40);
}

/* Taxonomy terms render as a plain list of underlined links by default.
   Make them the chips the design calls for. */
.wp-block-post-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--30);
}

.wp-block-post-terms__separator {
	display: none;
}

.wp-block-post-terms a {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	border-radius: 9999px;
	background-color: var(--wp--preset--color--secondary, #EDEFF2);
	background-color: rgba(23, 28, 38, 0.06);
	color: var(--wp--preset--color--muted-text);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
}

.wp-block-post-terms a:hover,
.wp-block-post-terms a:focus {
	background-color: rgba(223, 166, 32, 0.16);
	color: var(--wp--preset--color--gold-dark);
	text-decoration: none;
}

/* Long single words (for example "Transformational") were splitting
   mid-word in narrow grid cells. Hyphenate properly instead. */
.wp-block-post-template h1,
.wp-block-post-template h2,
.wp-block-post-template h3,
.wp-block-post-template .wp-block-post-title {
	overflow-wrap: break-word;
	word-break: normal;
	hyphens: auto;
	-webkit-hyphens: auto;
}

/* Collapse the outer margins theme.json gives headings and paragraphs, so
   card padding is the only thing setting the internal spacing. */
.is-style-card > :first-child,
.is-style-card-translucent > :first-child {
	margin-top: 0;
}

.is-style-card > :last-child,
.is-style-card-translucent > :last-child {
	margin-bottom: 0;
}

/* Paragraph: gold badge pill above section headings.
   Uses gold-dark for AA contrast on light backgrounds. */
.wp-block-paragraph.is-style-badge,
p.is-style-badge {
	display: inline-block;
	padding: 0.375rem 1rem;
	border-radius: 9999px;
	background-color: rgba(223, 166, 32, 0.12);
	color: var(--wp--preset--color--gold-dark);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.4;
}

/* Badge on a navy background can use the brighter gold safely. */
.has-navy-background-color .is-style-badge,
.is-style-card-translucent .is-style-badge {
	background-color: rgba(223, 166, 32, 0.16);
	color: var(--wp--preset--color--gold);
}

/* Paragraph: letterspaced uppercase kicker, used under the wordmark. */
.wp-block-paragraph.is-style-kicker,
p.is-style-kicker {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted-text);
	margin: 0;
}

/* Sticky header needs a solid backdrop so content does not show through.
   Do NOT add backdrop-filter, filter, transform or will-change here. Any of
   those makes this element a containing block for position:fixed descendants,
   which traps WordPress's mobile navigation overlay inside the header box and
   clips it to two or three visible links instead of covering the viewport. */
.gilmore-header {
	background-color: var(--wp--preset--color--off-white);
}

/* The mobile overlay must escape the header and fill the screen. */
.wp-block-navigation__responsive-container.is-menu-open {
	position: fixed;
	inset: 0;
	z-index: 100000;
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--30);
	width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open a {
	font-size: var(--wp--preset--font-size--large);
	text-decoration: none;
}

/* Navigation: active page gets gold, meeting contrast via gold-dark. */
.wp-block-navigation .current-menu-item > a,
.wp-block-navigation .current_page_item > a {
	color: var(--wp--preset--color--gold-dark);
	font-weight: 600;
}

/* On navy, links and nav flip to off-white. */
.has-navy-background-color a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--gold-light);
}

.has-navy-background-color a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--off-white);
}
