/* ==========================================================================
   Lone Mangrove — details that theme.json cannot express
   ========================================================================== */

/* --- Header ------------------------------------------------------------- */

.lm-header {
	position: relative;
	z-index: 20;
}

.lm-utility-bar {
	min-height: 48px;
	display: flex;
	align-items: center;
}

.lm-utility-bar .wp-block-group {
	width: 100%;
}

.lm-utility-bar .wp-block-social-links {
	margin: 0;
}

.lm-utility-bar .wp-social-link {
	opacity: .75;
	transition: opacity .2s ease;
}

.lm-utility-bar .wp-social-link:hover {
	opacity: 1;
}

.lm-nav-bar {
	min-height: 83px;
	display: flex;
	align-items: center;
}

.lm-nav-bar > .wp-block-group {
	width: 100%;
}

.lm-brand {
	gap: .875rem;
}

.lm-brand .wp-block-site-logo img {
	display: block;
	width: 68px;
	height: auto;
}

.lm-site-title a,
.lm-site-title a:hover {
	color: #fff;
	text-decoration: none;
}

/* Nav: uppercase, letterspaced, gold underline on hover and current page. */

.lm-primary-nav .wp-block-navigation-item__content {
	position: relative;
	padding-block: .5rem;
	text-decoration: none;
}

.lm-primary-nav .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 2px;
	background: var(--wp--preset--color--gold);
	transform: scaleX(0);
	transition: transform .25s ease;
}

.lm-primary-nav .wp-block-navigation-item__content:hover::after,
.lm-primary-nav .current-menu-item > .wp-block-navigation-item__content::after,
.lm-primary-nav .current_page_item > .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

.lm-primary-nav .current-menu-item > .wp-block-navigation-item__content,
.lm-primary-nav .current_page_item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--gold);
}

/* Mobile overlay menu */
.lm-primary-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 2rem 1.5rem;
}

.lm-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after {
	display: none;
}

/* --- Hero --------------------------------------------------------------- */

.lm-hero {
	min-height: 78vh;
}

.lm-hero .wp-block-cover__inner-container {
	max-width: 960px;
}

.lm-hero-title {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 3px;
	color: #fff;
}

.lm-hero-sub {
	color: #fff;
	max-width: 42rem;
}

@media (max-width: 781px) {
	.lm-hero {
		min-height: 60vh;
	}
}

/* --- Section rhythm ----------------------------------------------------- */

.lm-section {
	padding-block: 4rem;
}

.lm-section--tight {
	padding-block: 2.5rem;
}

.lm-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--wp--preset--color--grey);
}

/*
 * Short gold rule under section headings.
 *
 * The element stays a full-width constrained child so WordPress's layout CSS
 * keeps it aligned with the surrounding text; the visible 56px bar is painted
 * with a gradient instead. Fighting the layout rule's "margin: auto !important"
 * would pull the rule out to the container's padding edge.
 */
.wp-block-separator.lm-rule:not(.is-style-wide):not(.is-style-dots) {
	width: auto;
	height: 2px;
	border: 0;
	opacity: 1;
	margin-block: 1rem 1.5rem;
	background: linear-gradient(
		to right,
		var(--wp--preset--color--gold) 0 56px,
		transparent 56px
	);
}

.wp-block-separator.lm-rule.aligncenter:not(.is-style-wide):not(.is-style-dots) {
	background: linear-gradient(
		to right,
		transparent calc(50% - 28px),
		var(--wp--preset--color--gold) calc(50% - 28px) calc(50% + 28px),
		transparent calc(50% + 28px)
	);
}

/* --- Pull quote --------------------------------------------------------- */

.lm-quote p {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	font-style: italic;
	line-height: 1.6;
	color: #fff;
}

.lm-quote cite {
	display: block;
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: .8rem;
	font-style: normal;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}

/* --- Blog listing ------------------------------------------------------- */

.lm-post-card:last-child {
	border-bottom: 0 !important;
}

.lm-post-card .wp-block-post-title a {
	color: var(--wp--preset--color--grey);
	text-decoration: none;
	transition: color .2s ease;
}

.lm-post-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--gold);
}

.lm-post-thumb img {
	transition: transform .4s ease;
}

.lm-post-thumb:hover img {
	transform: scale(1.02);
}

/* --- Gallery ------------------------------------------------------------ */

.lm-gallery .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --- Footer ------------------------------------------------------------- */

.lm-footer .wp-block-navigation-item__content {
	color: var(--wp--preset--color--grey);
	text-decoration: none;
	font-size: .9375rem;
	text-transform: none;
	letter-spacing: 0;
}

.lm-footer .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--gold);
}

.lm-footer a {
	text-decoration: none;
}

.lm-footer a:hover {
	text-decoration: underline;
}

.lm-copyright .wp-block-group {
	width: 100%;
	gap: .5rem 1.5rem;
}

/* --- Misc --------------------------------------------------------------- */

:where(.wp-block-post-content) a {
	text-underline-offset: 3px;
}

.wp-block-separator.has-gold-background-color {
	height: 2px;
	border: 0;
	max-width: 56px;
	margin-inline: 0;
	opacity: 1;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* --- Contact form ------------------------------------------------------- */

.lm-contact-form {
	max-width: 34rem;
	margin: 2.5rem auto 0;
	text-align: left;
}

.lm-field {
	margin: 0 0 1.25rem;
}

.lm-field label {
	display: block;
	margin-bottom: .4rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--wp--preset--color--grey);
}

.lm-field input,
.lm-field textarea {
	width: 100%;
	padding: .8rem .9rem;
	font-family: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--black);
	background: #fff;
	border: 1px solid #d5d7d6;
	border-radius: 0;
	transition: border-color .2s ease;
}

.lm-field input:focus,
.lm-field textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--gold);
}

.lm-field textarea {
	resize: vertical;
}

.lm-contact-form button {
	width: 100%;
	cursor: pointer;
	border: 0;
}

/* --- Footer backdrop ---------------------------------------------------- */

/*
 * The photo lives in the theme rather than the media library so the footer
 * looks right on any host without rewriting an uploads URL.
 */
.lm-footer-cover {
	position: relative;
	background-image: url("../images/footer-reels.jpeg");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* --- Header / main seam ------------------------------------------------- */

/*
 * WordPress puts a 1.5rem block gap between every top-level block, which
 * leaves a white strip between the dark header and a full-bleed hero.
 * The header and footer should butt straight up against the page content.
 */
:root :where(.wp-site-blocks) > main {
	margin-block-start: 0;
}

:root :where(.wp-site-blocks) > footer {
	margin-block-start: 0;
}

/* --- Menu legibility ---------------------------------------------------- */

/*
 * Core ships ".wp-block-navigation .wp-block-navigation-item__content
 * .wp-block-navigation-item__content { color: inherit }" - the class is
 * doubled deliberately to raise specificity, which beats theme.json's
 * ":root :where(...)" rule. Links therefore inherited black from the body and
 * were invisible against the dark bar. Matching that specificity fixes it.
 */
.lm-primary-nav .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: #fff;
	font-size: 0.875rem;
	letter-spacing: 1.5px;
}

.lm-primary-nav .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.lm-primary-nav .wp-block-navigation-item__content.wp-block-navigation-item__content:focus {
	color: var(--wp--preset--color--gold);
}

.lm-primary-nav .current-menu-item > .wp-block-navigation-item__content.wp-block-navigation-item__content,
.lm-primary-nav .current_page_item > .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--wp--preset--color--gold);
}

/* Mobile overlay sits on the dark ground too. */
.lm-primary-nav .wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: #fff;
	font-size: 1.125rem;
	letter-spacing: 1.5px;
}

/* Footer menu had the same inheritance problem. */
.lm-footer .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--wp--preset--color--grey-light);
}

.lm-footer .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--gold);
}
