/*
Theme Name: Manna Grove — Editable Block Theme V3.1
Theme URI: https://layersbecomelegacy.com
Author: Manna Grove
Description: Editable full-site block theme preserving the approved Manna Grove design, with a dynamic latest-three-posts section and Local Index support.
Version: 3.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: manna-grove
Tags: full-site-editing, block-patterns, custom-colors, custom-logo, featured-images
*/

:root {
    --mg-forest: #243b31;
    --mg-deep: #172a22;
    --mg-cream: #f3efe4;
    --mg-paper: #faf8f2;
    --mg-sage: #76887a;
    --mg-silver: #a5afa7;
    --mg-clay: #a46f55;
    --mg-gold: #b08b4f;
    --mg-charcoal: #30312f;
    --mg-white: #fff;
    --mg-max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--mg-cream);
    color: var(--mg-charcoal);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.58;
}

body.admin-bar .mg-site-nav {
    top: 32px;
}

a {
    color: inherit;
}

.mg-home a {
    text-decoration: none;
}

.mg-home img {
    display: block;
    max-width: 100%;
}

.mg-wrap {
    width: min(var(--mg-max), calc(100% - 56px));
    margin: 0 auto;
}

.mg-eyebrow {
    color: var(--mg-sage);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.mg-home h1,
.mg-home h2,
.mg-home h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    line-height: 1.04;
}

.mg-home h2 {
    font-size: clamp(2.5rem, 5vw, 4.2rem);
}

.mg-home h3 {
    font-size: 1.8rem;
}

.mg-home p {
    margin: 0;
}

.mg-site-nav {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    padding: 14px 28px;
    background: linear-gradient(to bottom, rgba(14, 27, 21, 0.62), rgba(14, 27, 21, 0));
    color: var(--mg-white);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.mg-site-nav.is-scrolled {
    background: rgba(36, 59, 49, 0.97);
    box-shadow: 0 4px 18px rgba(11, 21, 16, 0.14);
    backdrop-filter: blur(10px);
}

.mg-brand {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    letter-spacing: 0.14em;
}

.mg-navlinks {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.mg-navlinks a {
    padding: 8px 0;
    border-bottom: 1px solid transparent;
}

.mg-navlinks a:hover,
.mg-navlinks a:focus-visible {
    border-color: currentColor;
}

.mg-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.55);
    background: transparent;
    color: inherit;
}

.mg-menu-toggle > span:not(.screen-reader-text) {
    display: block;
    width: 100%;
    height: 1px;
    margin: 4px 0;
    background: currentColor;
}

.mg-hero {
    position: relative;
    min-height: 680px;
    height: 94vh;
    background-image: url("assets/images/manna-grove-01.jpg");
    background-position: center 58%;
    background-size: cover;
}

.mg-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(11,22,17,.18) 0%, rgba(11,22,17,.08) 45%, rgba(11,22,17,.76) 100%);
}

.mg-hero-copy {
    position: absolute;
    z-index: 2;
    bottom: 9%;
    left: 50%;
    width: min(var(--mg-max), calc(100% - 56px));
    transform: translateX(-50%);
    color: var(--mg-white);
}

.mg-hero .mg-eyebrow {
    margin-bottom: 14px;
    color: rgba(255,255,255,.82);
}

.mg-hero h1 {
    max-width: 930px;
    font-size: clamp(3.5rem, 8vw, 6.8rem);
}

.mg-hero-sub {
    max-width: 760px;
    margin-top: 24px !important;
    color: rgba(255,255,255,.92);
    font-size: clamp(1.02rem, 2vw, 1.35rem);
}

.mg-button {
    display: inline-block;
    margin-top: 28px;
    padding: 13px 18px;
    border: 1px solid currentColor;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mg-button:hover,
.mg-button:focus-visible {
    background: var(--mg-white);
    color: var(--mg-forest);
}

.mg-intro {
    padding: 110px 0 90px;
}

.mg-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
    gap: 70px;
    align-items: start;
}

.mg-intro-lead {
    margin-top: 12px !important;
    color: var(--mg-forest);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3.6vw, 3.1rem);
    line-height: 1.16;
}

.mg-intro-copy {
    max-width: 670px;
    font-size: 1.1rem;
}

.mg-section {
    padding: 100px 0;
}

.mg-section-head {
    display: flex;
    gap: 36px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 44px;
}

.mg-section-head h2 {
    margin-top: 8px;
    color: var(--mg-forest);
}

.mg-section-head > p {
    max-width: 560px;
    color: var(--mg-sage);
}

.mg-happening {
    background: var(--mg-paper);
}

.mg-now-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.mg-story-card {
    display: flex;
    min-width: 0;
    min-height: 500px;
    flex-direction: column;
    overflow: hidden;
    background: var(--mg-white);
    box-shadow: 0 14px 34px rgba(27, 45, 37, 0.07);
}

.mg-story-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 1.904 / 1;
    margin: 0;
    background: #d8ddd8 url("assets/images/manna-grove-03.jpg") center / cover no-repeat;
}

.mg-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.mg-story-card:hover .mg-story-image img {
    transform: scale(1.025);
}

.mg-story-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 28px;
}

.mg-tag {
    margin-bottom: 12px;
    color: var(--mg-clay);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.mg-story-body h3 {
    margin-bottom: 14px;
    color: var(--mg-forest);
}

.mg-story-body p {
    color: #555;
    font-size: 0.94rem;
}

.mg-read-more {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 24px;
    color: var(--mg-forest);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.mg-read-more::after {
    content: "  →";
}

.mg-dark {
    background: var(--mg-forest);
    color: var(--mg-cream);
}

.mg-dark .mg-eyebrow,
.mg-dark .mg-section-head > p {
    color: var(--mg-silver);
}

.mg-dark .mg-section-head h2 {
    color: var(--mg-cream);
}

.mg-layers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.22);
}

.mg-layer {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: var(--mg-deep);
}

.mg-layer > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.mg-layer:hover > img {
    transform: scale(1.035);
}

.mg-layer::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(15,27,22,.86), rgba(15,27,22,.04) 62%);
}

.mg-layer-copy {
    position: absolute;
    z-index: 2;
    right: 24px;
    bottom: 26px;
    left: 24px;
}

.mg-layer-num {
    margin-bottom: 8px;
    color: rgba(255,255,255,.65);
    font-size: 0.68rem;
    letter-spacing: .15em;
}

.mg-layer h3 {
    margin-bottom: 8px;
    font-size: 2rem;
}

.mg-layer p {
    color: rgba(255,255,255,.8);
    font-size: .88rem;
}

.mg-grow-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.mg-grow-card {
    padding: 34px;
    border-top: 1px solid rgba(36,59,49,.25);
    background: rgba(255,255,255,.25);
}

.mg-number {
    color: var(--mg-silver);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 4rem;
    line-height: 1;
}

.mg-grow-card h3 {
    margin: 10px 0;
    color: var(--mg-forest);
}

.mg-grow-card p {
    max-width: 520px;
}

.mg-learning {
    background:
        radial-gradient(circle at 14% 18%, rgba(176,139,79,.08) 0 1px, transparent 2px),
        radial-gradient(circle at 82% 70%, rgba(118,136,122,.1) 0 1px, transparent 2px),
        var(--mg-cream);
}

.mg-learning h2 {
    max-width: 820px;
    margin-top: 10px;
    color: var(--mg-forest);
}

.mg-questions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 44px;
}

.mg-question {
    padding: 34px;
    border-left: 3px solid var(--mg-gold);
    background: var(--mg-white);
}

.mg-question-label {
    margin-bottom: 14px;
    color: var(--mg-sage);
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mg-question h3 {
    color: var(--mg-forest);
}

.mg-field-record {
    background: var(--mg-paper);
}

.mg-season-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: rgba(36,59,49,.15);
}

.mg-season-grid article {
    min-height: 250px;
    padding: 30px;
    background: var(--mg-white);
}

.mg-season-grid span {
    color: var(--mg-clay);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.mg-season-grid h3 {
    margin: 20px 0 14px;
    color: var(--mg-forest);
}

.mg-season-grid p {
    color: #555;
    font-size: .92rem;
}

.mg-closing {
    position: relative;
    display: grid;
    min-height: 690px;
    overflow: hidden;
    place-items: center;
    background:
        linear-gradient(rgba(16,31,24,.6), rgba(16,31,24,.68)),
        url("assets/images/manna-grove-02.jpg") center / cover;
    color: var(--mg-white);
    text-align: center;
}

.mg-closing-copy {
    position: relative;
    z-index: 2;
    width: min(830px, calc(100% - 40px));
    padding: 80px 0;
}

.mg-closing .mg-eyebrow {
    margin-bottom: 18px;
    color: rgba(255,255,255,.78);
}

.mg-closing h2 {
    font-size: clamp(2.5rem, 5.2vw, 4.35rem);
    line-height: 1.08;
}

.mg-closing h2 span {
    display: block;
}

.mg-closing blockquote {
    max-width: 680px;
    margin: 30px auto 6px;
    color: rgba(255,255,255,.92);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.08rem, 2.1vw, 1.38rem);
    font-style: italic;
}

.mg-closing cite {
    font-size: .7rem;
    font-style: normal;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.mg-home-footer {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    padding: 42px 0;
    background: var(--mg-deep);
    color: rgba(255,255,255,.76);
}

.mg-footer-contours {
    position: absolute;
    inset: 0;
    opacity: .48;
    pointer-events: none;
}

.mg-footer-contours svg {
    width: 100%;
    height: 100%;
}

.mg-footer-contours path {
    fill: none;
    stroke: rgba(216,203,168,.82);
    stroke-width: 1.15;
    vector-effect: non-scaling-stroke;
}

.mg-footer-grid {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 166px;
    gap: 30px;
    align-items: center;
    justify-content: space-between;
}

.mg-footer-brand {
    color: var(--mg-white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
    letter-spacing: .1em;
}

.mg-footer-tagline {
    margin-top: 5px;
    font-size: .78rem;
}

.mg-footer-location {
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* Standard WordPress pages, posts and plugin output. */
.mg-page-shell {
    min-height: 70vh;
    background: var(--mg-cream);
}

.mg-standard-page {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0;
}

.mg-standard-page__title {
    margin: 0 0 32px;
    color: var(--mg-forest);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    line-height: 1.05;
}

.mg-standard-page img {
    max-width: 100%;
    height: auto;
}

.mg-topographic-footer {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    background: var(--mg-forest);
    color: var(--mg-cream);
}

.mg-topographic-footer__lines {
    position: absolute;
    inset: -18% -4%;
    width: 108%;
    height: 136%;
    opacity: .48;
}

.mg-topographic-footer__lines path {
    fill: none;
    stroke: #d8cba8;
    stroke-width: 1.15;
    vector-effect: non-scaling-stroke;
}

.mg-topographic-footer__copy {
    position: relative;
    z-index: 1;
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 78px 0 58px;
}

.mg-topographic-footer__brand {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: .08em;
}

.mg-topographic-footer__tagline {
    margin: 8px 0 0;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .8;
}

@media (max-width: 900px) {
    body.admin-bar .mg-site-nav {
        top: 46px;
    }

    .mg-site-nav {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .mg-menu-toggle {
        display: block;
    }

    .mg-navlinks {
        display: none;
        width: calc(100% + 56px);
        margin: 12px -28px -14px;
        padding: 10px 28px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        background: rgba(36,59,49,.98);
    }

    .mg-navlinks.is-open {
        display: flex;
    }

    .mg-intro-grid,
    .mg-now-grid,
    .mg-grow-grid,
    .mg-questions {
        grid-template-columns: 1fr;
    }

    .mg-layers,
    .mg-season-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mg-section-head {
        display: block;
    }

    .mg-section-head > p {
        margin-top: 18px;
    }

    .mg-story-card {
        min-height: 0;
    }

    .mg-layer {
        height: 420px;
    }
}

@media (max-width: 620px) {
    .mg-wrap,
    .mg-hero-copy {
        width: calc(100% - 36px);
    }

    .mg-site-nav {
        padding: 13px 18px;
    }

    .mg-navlinks {
        width: calc(100% + 36px);
        margin-right: -18px;
        margin-left: -18px;
        padding-right: 18px;
        padding-left: 18px;
    }

    .mg-hero {
        min-height: 650px;
    }

    .mg-hero h1 {
        font-size: clamp(3.2rem, 16vw, 5.2rem);
    }

    .mg-intro,
    .mg-section {
        padding: 74px 0;
    }

    .mg-intro-grid {
        gap: 28px;
    }

    .mg-layers,
    .mg-season-grid {
        grid-template-columns: 1fr;
    }

    .mg-layer {
        height: 420px;
    }

    .mg-footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* Block-theme compatibility and editor-friendly layout. */
.wp-site-blocks {
    min-height: 100vh;
}

.wp-site-blocks > * {
    margin-block-start: 0;
}

.mg-home-content,
.mg-home-content.wp-block-post-content {
    margin: 0;
    padding: 0;
}

.mg-site-nav.wp-block-group {
    max-width: none;
}

.mg-brand.wp-block-site-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 400;
}

.mg-brand a,
.mg-brand a:hover {
    text-decoration: none;
}

.mg-navlinks.wp-block-navigation {
    font-size: .72rem;
}

.mg-navlinks .wp-block-navigation-item__content {
    padding: 8px 0;
    text-decoration: none;
}

.mg-navlinks .wp-block-navigation-item__content:hover,
.mg-navlinks .wp-block-navigation-item__content:focus-visible {
    border-bottom: 1px solid currentColor;
}

.mg-hero.wp-block-cover {
    padding: 0;
}

.mg-hero > .wp-block-cover__background {
    background: linear-gradient(180deg, rgba(11,22,17,.18) 0%, rgba(11,22,17,.08) 45%, rgba(11,22,17,.76) 100%) !important;
    opacity: 1 !important;
}

.mg-hero::after {
    display: none;
}

.mg-hero > .wp-block-cover__inner-container {
    position: static;
    width: 100%;
}

.mg-hero-copy.wp-block-group {
    margin: 0;
}

.mg-button.wp-block-button {
    margin-top: 28px;
    padding: 0;
    border: 0;
}

.mg-button.wp-block-button .wp-block-button__link {
    padding: 13px 18px;
    border: 1px solid currentColor;
    border-radius: 0;
    background: transparent;
    color: var(--mg-white);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mg-button.wp-block-button .wp-block-button__link:hover,
.mg-button.wp-block-button .wp-block-button__link:focus-visible {
    background: var(--mg-white);
    color: var(--mg-forest);
}

.mg-intro-grid.wp-block-group,
.mg-section-head.wp-block-group,
.mg-now-grid.wp-block-post-template,
.mg-layers.wp-block-group,
.mg-grow-grid.wp-block-group,
.mg-questions.wp-block-group,
.mg-season-grid.wp-block-group,
.mg-footer-grid.wp-block-group {
    max-width: none;
}

.mg-now-grid.wp-block-post-template {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mg-story-card.wp-block-post {
    margin: 0;
}

.mg-story-featured.wp-block-post-featured-image {
    margin: 0;
    width: 100%;
    height: 100%;
}

.mg-story-featured.wp-block-post-featured-image a {
    width: 100%;
    height: 100%;
}

.mg-story-featured.wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mg-story-body.wp-block-group {
    margin: 0;
}

.mg-story-body .wp-block-post-date {
    margin-bottom: 12px;
}

.mg-story-body .wp-block-post-title {
    margin-bottom: 14px;
}

.mg-story-body .wp-block-post-title a {
    text-decoration: none;
}

.mg-story-body .wp-block-post-excerpt {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin: 0;
}

.mg-story-body .wp-block-post-excerpt__excerpt {
    margin: 0;
}

.mg-story-body .wp-block-post-excerpt__more-text {
    margin-top: auto;
    padding-top: 24px;
}

.mg-story-body .wp-block-post-excerpt__more-link {
    color: var(--mg-forest);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-decoration: none;
    text-transform: uppercase;
}

.mg-story-body .wp-block-post-excerpt__more-link::after {
    content: "  →";
}

.mg-layer.wp-block-cover {
    padding: 0;
}

.mg-layer > .wp-block-cover__background {
    background: linear-gradient(to top, rgba(15,27,22,.86), rgba(15,27,22,.04) 62%) !important;
    opacity: 1 !important;
}

.mg-layer::after {
    display: none;
}

.mg-layer > .wp-block-cover__inner-container {
    position: static;
}

.mg-layer-copy.wp-block-group {
    margin: 0;
}

.mg-grow-card.wp-block-group,
.mg-question.wp-block-group,
.mg-season-grid > .wp-block-group {
    margin: 0;
}

.mg-season-grid > .wp-block-group > p:first-child {
    color: var(--mg-clay);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.mg-closing.wp-block-cover {
    padding: 0;
    background: none;
}

.mg-closing > .wp-block-cover__background {
    background: rgba(16,31,24,.65) !important;
    opacity: 1 !important;
}

.mg-closing > .wp-block-cover__inner-container {
    width: 100%;
}

.mg-closing-copy.wp-block-group {
    margin-right: auto;
    margin-left: auto;
}

.mg-closing blockquote.wp-block-quote {
    border: 0;
    padding: 0;
}

.mg-closing blockquote.wp-block-quote cite {
    display: block;
    margin-top: 8px;
}

.mg-home-footer.wp-block-group {
    max-width: none;
}

.mg-footer-contours.wp-block-html {
    margin: 0;
}

.mg-standard-page .wp-block-post-content > * {
    max-width: 100%;
}

.mg-standard-page .wp-block-post-content a {
    color: var(--mg-forest);
}

body:not(.home) .mg-site-nav {
    position: relative;
    background: var(--mg-forest);
}

body:not(.home).admin-bar .mg-site-nav {
    top: 0;
}

body.home .mg-site-nav {
    position: fixed;
}

@media (max-width: 900px) {
    .mg-navlinks.wp-block-navigation {
        display: flex;
        width: auto;
        margin: 0;
        padding: 0;
        background: transparent;
    }

    .mg-navlinks .wp-block-navigation__responsive-container.is-menu-open {
        padding: 28px;
        background: var(--mg-forest);
        color: var(--mg-white);
    }

    .mg-navlinks .wp-block-navigation__responsive-container-content {
        align-items: flex-start;
    }
}

/* Make the design readable while editing in Appearance > Editor. */
.editor-styles-wrapper .mg-site-nav {
    position: relative;
    top: 0;
    background: var(--mg-forest);
}

.editor-styles-wrapper .mg-hero {
    height: 760px;
}
