/*
Theme Name: LM2
Theme URI: https://lm2.au/
Author: Leinster Marine Lodge of Australia No.2
Description: A fast, lightweight block theme for Leinster Marine Lodge of Australia No.2. Navy and gold, featured-image heroes, no page builder required.
Version: 1.1.5
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lm2
*/

/* Small extras that theme.json cannot express. Everything else lives in theme.json. */

html, body { overflow-x: clip; }

/* Header */
.lm2-header { position: relative; z-index: 20; }
.lm2-header .lm2-brand { gap: 0.75rem; text-decoration: none; }
.lm2-header .lm2-brand img { width: 40px; height: auto; display: block; }
.lm2-header .wp-block-site-title a { text-decoration: none; }
.lm2-header .wp-block-navigation a:hover,
.lm2-header .wp-block-navigation a:focus-visible { color: var(--wp--preset--color--gold-light); }
.lm2-header .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--navy) !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	padding: 0.4rem 0;
}
.lm2-header .wp-block-loginout a {
	display: inline-block;
	padding: 0.45rem 1rem;
	border: 1px solid var(--wp--preset--color--gold);
	border-radius: 999px;
	color: var(--wp--preset--color--gold-light);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.04em;
	white-space: nowrap;
}
.lm2-header .wp-block-loginout a:hover,
.lm2-header .wp-block-loginout a:focus-visible {
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--navy);
}
@media (max-width: 600px) {
	.lm2-header .wp-block-site-title { font-size: 1rem !important; }
}

/* Home page: the header floats over the ocean hero instead of sitting above it */
body.home .wp-site-blocks { position: relative; }
body.home .wp-site-blocks > header.wp-block-template-part {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 30;
}
body.home .lm2-header {
	background: linear-gradient(to bottom, rgba(0, 13, 30, 0.55), rgba(0, 13, 30, 0)) !important;
	padding-bottom: 2rem !important;
}
body.home .lm2-header .wp-block-site-title,
body.home .lm2-header .wp-block-navigation { text-shadow: 0 1px 8px rgba(0, 12, 30, 0.5); }

/* Page and post hero: keeps the title readable on any featured image */
.lm2-hero-title .wp-block-post-title { text-wrap: balance; text-shadow: 0 2px 16px rgba(0, 12, 30, 0.45); }

/* Readable long-form content converted from WPBakery */
.wp-block-post-content :where(img) { height: auto; }
.wp-block-post-content :where(details) {
	border-bottom: 1px solid var(--wp--preset--color--mist);
	padding: 0.75rem 0;
}
.wp-block-post-content :where(summary) {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--navy);
}

/* Headings inside a coloured section take that section's text colour (e.g. white on navy) */
.wp-block-post-content .has-text-color :where(h1, h2, h3, h4, h5, h6) { color: inherit; }

/* Visible keyboard focus everywhere */
:where(a, button, summary, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
}
