/*
Theme Name: LMGN
Theme URI: https://example.org/
Author: Legacy Missions Global Network
Description: Lightweight block theme (Full Site Editing) for Legacy Missions Global Network. No page builder, no jQuery, no front-end JavaScript of its own.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lmgn
*/

/* ---------- Layout helpers (used via className in patterns) ---------- */
.lmgn-section { padding-block: var(--wp--preset--spacing--70); }
.lmgn-section--tight { padding-block: var(--wp--preset--spacing--60); }
.lmgn-narrow { max-width: 42rem; }
.lmgn-narrow.has-text-align-center, .has-text-align-center.lmgn-narrow { margin-inline: auto; }

/* ---------- Hero: the lighthouse beam is the one memorable element ---------- */
.lmgn-hero { position: relative; overflow: hidden; }
.lmgn-hero::before {
	content: ""; position: absolute; inset: 0 0 0 auto; width: min(62%, 780px);
	background: linear-gradient(100deg, rgba(212,165,58,0) 0%, rgba(212,165,58,.20) 100%);
	clip-path: polygon(0 46%, 100% 8%, 100% 66%);
	pointer-events: none;
}
.lmgn-hero .wp-block-cover__inner-container { position: relative; z-index: 1; padding-block: var(--wp--preset--spacing--70); }
.lmgn-hero p { max-width: 38rem; }
@media (max-width: 781px) { .lmgn-hero::before { width: 100%; opacity: .6; clip-path: polygon(0 60%, 100% 25%, 100% 80%); } }

/* ---------- Cards: top rule instead of shadow, small radius ---------- */
.lmgn-card {
	border-top: 4px solid var(--wp--preset--color--primary);
	border-radius: 2px;
	height: 100%;
}
.lmgn-card h3 { margin-top: 0; }
.lmgn-card h3 a { text-decoration: none; }
.lmgn-card h3 a:hover, .lmgn-card h3 a:focus { text-decoration: underline; text-underline-offset: .2em; }
.lmgn-card--gold { border-top-color: var(--wp--preset--color--gold); }
.lmgn-link { font-family: var(--wp--preset--font-family--montserrat); font-weight: 600; font-size: var(--wp--preset--font-size--nav); margin-bottom: 0; }

/* ---------- Stat band ---------- */
.lmgn-stat-number { font-family: var(--wp--preset--font-family--montserrat); font-weight: 700; line-height: 1; margin: 0; }

/* ---------- Buttons ---------- */
.wp-element-button, .wp-block-button__link { transition: filter .15s ease, background-color .15s ease; }
.wp-element-button:hover, .wp-block-button__link:hover { filter: brightness(1.12); }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 2px solid currentColor; background: transparent; }

/* ---------- Focus (visible on light and dark surfaces) ---------- */
:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--gold);
	outline-offset: 3px;
	box-shadow: 0 0 0 1px var(--wp--preset--color--secondary);
}

/* ---------- Header ---------- */
.lmgn-header .wp-block-site-title { max-width: 11rem; line-height: 1.15; }
.lmgn-header .wp-block-site-title a { text-decoration: none; }
.lmgn-header .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--border); min-width: 16rem; }
@media (max-width: 479px) { .lmgn-header .wp-block-site-title { display: none; } }

/* Raise the mobile-menu breakpoint from 600px to 1024px (7 top-level items need the room) */
@media (min-width: 600px) and (max-width: 1023px) {
	.lmgn-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.lmgn-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}

/* ---------- Footer ---------- */
.lmgn-dark a { text-underline-offset: .2em; }
.lmgn-footer .lmgn-footer-links { list-style: none; padding: 0; margin: 0; }
.lmgn-footer .lmgn-footer-links li { margin-bottom: .5rem; }

/* ---------- Media + motion ---------- */
img { height: auto; max-width: 100%; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Added: spacing for cards, dark surfaces, logos, main flow ---------- */
.lmgn-card { padding: var(--wp--preset--spacing--50); }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks main.wp-block-group > * { margin-block: 0; }
.is-layout-constrained > .lmgn-narrow { max-width: 42rem; margin-inline-start: 0 !important; margin-inline-end: auto !important; }
.is-layout-constrained > .lmgn-narrow.has-text-align-center { margin-inline: auto !important; }
.lmgn-hero.lmgn-hero .wp-block-cover__inner-container > * { margin-inline-start: 0 !important; }
.lmgn-hero h1 { max-width: 18ch; }
.lmgn-logo img { height: 3rem; width: auto; }
.lmgn-logo { margin: 0; }
.lmgn-logo-full img { width: 11rem; height: auto; }
.lmgn-dark :is(h1, h2, h3, h4) { color: inherit; }
.lmgn-dark a:not(.wp-element-button) { color: inherit; }
.lmgn-dark a:not(.wp-element-button):hover { color: inherit; text-decoration-thickness: 2px; }
.lmgn-panel { display: flex; align-items: center; justify-content: center; min-height: 18rem; }
.lmgn-panel img { width: min(70%, 18rem); height: auto; }

/* ---------- Placeholders (visible only until real content replaces them) ---------- */
.lmgn-placeholder { border: 2px dashed var(--wp--preset--color--primary); background: var(--wp--preset--color--surface); padding: var(--wp--preset--spacing--50); border-radius: 2px; }
.lmgn-placeholder p { margin: 0; color: var(--wp--preset--color--muted); }
.wp-block-details { border-top: 1px solid var(--wp--preset--color--border); padding-block: .75rem; }
.wp-block-details summary { font-family: var(--wp--preset--font-family--montserrat); font-weight: 600; cursor: pointer; }
.wp-block-post-content > .alignwide + *, .wp-block-post-content > * + .alignwide { margin-block-start: var(--wp--preset--spacing--60); }
.wp-block-post-content > h2 { margin-block-start: var(--wp--preset--spacing--60); }

/* ---------- Social icons: white on dark surfaces, clear focus, comfortable tap size ---------- */
.lmgn-dark .wp-block-social-links.is-style-logos-only .wp-social-link,
.lmgn-dark .wp-block-social-links.is-style-logos-only .wp-social-link a { color: var(--wp--preset--color--surface) !important; }
.wp-block-social-links .wp-social-link a { padding: .5rem; }
.lmgn-follow { margin-bottom: 0; }
