/**
 * moa/assets/css/single-story.css
 *
 * Styles for the Single Story template.
 *
 * Uses ONLY the brand tokens defined in theme.json:
 *   Colors:  var(--wp--preset--color--white | black | accent)
 *   Fonts:   var(--wp--preset--font-family--noir-pro | lora)
 *   Sizes:   matches home.css patterns — max(rem, vw)
 *
 * Section colors:
 *   Hero banner            → WHITE bg + black title + GOLD eyebrow
 *   Hero photo             → (Featured Image full-bleed)
 *   Chapter separators     → GOLD bg + white text  (the "walls" of drama)
 *   Chapter content split  → WHITE bg + black text
 *   Standalone images      → WHITE bg
 *   Triptych               → WHITE bg
 *   Return CTA             → GOLD bg + white text
 */

 body.single-moa_story .main-navigation a,
 body.single-moa_story .header-extras .wp-block-button__link {
     color: var(--wp--preset--color--black) !important;
     border-color: var(--wp--preset--color--black);
 }
 
 body.single-moa_story .header-extras .wp-block-button__link:hover {
     background-color: var(--wp--preset--color--black) !important;
     color: var(--wp--preset--color--white) !important;
 }
 
 body.single-moa_story .custom-logo,
 body.single-moa_story .menu-toggle {
     filter: invert(1)!important;
 }

 /* Header drop-in animation on page load — mirrors the homepage behavior */
 body.single-moa_story .site-header {
    animation: moaHeaderDescent 1s 1.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

body.single-moa_story .site-footer,
body.single-moa_story footer.site-footer {
    background-color: var(--wp--preset--color--white) !important;
    color: var(--wp--preset--color--black);
}

/* Reset any inherited story background on footer descendants */
body.single-moa_story .site-footer * {
    background-color: transparent;
}

@keyframes moaHeaderDescent {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ============================================================
   PAGE FOUNDATION
   ============================================================ */

   body.single-moa_story .moa-page-curtain {
    display: none !important;
}

body.single-moa_story {
    background-color: var(--wp--preset--color--white);
}

.moa-story {
    position: relative;
}


/* ============================================================
   1. HERO BANNER  (white bg, black title, gold eyebrow)
   ============================================================ */

.moa-story__hero-banner {
    width: 100%;
    background-color: transparent;
    padding: 60px 50px;
    text-align: center;
}

.moa-story__hero-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.moa-story__eyebrow {
    font-family: var(--wp--preset--font-family--noir-pro);
    font-weight: 400;
    font-size: max(0.9rem, 1.447vw);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wp--preset--color--black);
    margin: 0 0 1.75rem;

    opacity: 0;
    transform: translateY(20px);
    animation: moaStoryFadeUp 1.2s 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.moa-story__title {
    font-family: var(--wp--preset--font-family--lora);
    font-weight: 400;
    font-size: max(3rem, 7vw);
    line-height: 1.05;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--wp--preset--color--black);
    margin: 0;

    opacity: 0;
    transform: translateY(30px);
    animation: moaStoryFadeUp 1.6s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.moa-story__meta {
    font-family: var(--wp--preset--font-family--noir-pro);
    font-weight: 400;
    font-size: max(0.8rem, 1.2vw);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wp--preset--color--black);
    margin: 1.75rem 0 0;

    opacity: 0;
    transform: translateY(15px);
    animation: moaStoryFadeUp 1.0s 1.0s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes moaStoryFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   2. HERO PHOTO (full-bleed landscape)
   ============================================================ */

   .moa-story__hero-photo {
        width: 100%;
        height: 130vh;
        min-height: 600px;
        margin: 0;
        overflow: hidden;
        position: relative;
    }

    .moa-story__hero-photo-img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }


/* ============================================================
   3. BODY CONTAINER + Gutenberg block widths
   Matches theme.json: contentSize 800px, wideSize 1200px
   ============================================================ */

.moa-story__body {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Default block width (centered narrow column) — matches contentSize */
.moa-story__body > * {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    margin-bottom: 2rem;
}

/* alignwide → 1200px to match theme.json wideSize */
.moa-story__body > .alignwide {
    max-width: 1200px;
}

/* alignfull → edge to edge */
.moa-story__body > .alignfull {
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.moa-story__body > .moa-chapter {
    margin: 0;
}

/* Padding on all chapters EXCEPT --ceremony (Chapter III)
   The Image Duo is not a .moa-chapter, so already excluded */
.moa-story__body > .moa-chapter:not(.moa-chapter--ceremony) {
    padding-left: 50px;
    padding-right: 57px;
}

.moa-story__body p {
    font-family: var(--wp--preset--font-family--noir-pro);
    color: var(--wp--preset--color--black);
}

.moa-story__body img,
.moa-story__body figure {
    max-width: 100%;
    height: auto;
}


/* ============================================================
   4. CHAPTER SEPARATOR  (full-bleed GOLD section with title)
   ============================================================ */

.moa-story__body .moa-chapter-separator {
    background-color: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: max(5rem, 10vw) 1.2rem;
    margin-bottom: 0;
}

/* "Chapter X" small eyebrow */
.moa-chapter-eyebrow {
    font-family: var(--wp--preset--font-family--noir-pro);
    font-weight: 400;
    font-size: max(0.9rem, 1.447vw);
    letter-spacing: 0.04em;
    color: var(--wp--preset--color--black);
    opacity: 0.85;
    margin: 0 0 2.5rem;
}

/* Big chapter title */
.moa-chapter-title {
    font-family: var(--wp--preset--font-family--lora);
    font-weight: 400;
    font-size: clamp(3rem, 11vw, 11rem);
    line-height: 0.95;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--wp--preset--color--black);
    margin: 0;
}

/* Variant: Chapter II has an intro paragraph below the title */
.moa-chapter-intro {
    max-width: 800px;
    margin: 3rem auto 0;
    font-family: var(--wp--preset--font-family--lora);
    font-weight: 400;
    font-size: max(1.125rem, 1.62vw);
    line-height: 1.6;
    color: var(--wp--preset--color--black);
    text-align: center;
}


/* ============================================================
   5. CHAPTER CONTENT  (image + text split, white bg)
   ============================================================ */

.moa-story__body .moa-chapter-content {
    padding-top: max(6rem, 12vw);
    padding-bottom: max(6rem, 12vw);
    gap: 8vw;
}

.moa-chapter-content .wp-block-column {
    flex-basis: 50% !important;
}

.moa-chapter-image img {
    width: 100%;
    height: auto;
    display: block;
}

.moa-chapter-text {
    font-family: var(--wp--preset--font-family--lora) !important;
    font-weight: 400;
    font-size: max(1.125rem, 1.4vw) !important;
    line-height: 1.65 !important;
    color: var(--wp--preset--color--black);
    max-width: 500px;
    margin-top: 2.5rem;
}


/* ============================================================
   7. PARALLAX TRIPTYCH  (3 portrait images, staggered)
   ============================================================ */

.moa-story__body .moa-triptych {
    padding: max(5rem, 10vw) 1.2rem max(8rem, 16vw);
    gap: 2rem;
}

.moa-triptych .wp-block-column {
    will-change: transform;
}

.moa-triptych .wp-block-image,
.moa-triptych-image {
    margin: 0 !important;
}

.moa-triptych-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   7b. IMAGE DUO  (2 photos side by side at 50vw each, full-bleed)
   ============================================================ */

   .moa-story__body > .moa-image-duo {
    padding: 0 !important;
    gap: 0 !important;
    margin: 0;
}

.moa-image-duo .wp-block-column {
    flex-basis: 50% !important;
    padding: 0 !important;
}

.moa-image-duo .wp-block-image,
.moa-image-duo-image {
    position: relative;
    margin: 0 !important;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.moa-image-duo-image img {
    position: absolute;
    top: -3%;
    left: 0;
    width: 100%;
    height: 140%;
    object-fit: cover;
    max-width: none !important;

    will-change: transform;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
}


/* ============================================================
   8. RETURN CTA  (gold bg, white text)
   ============================================================ */

.moa-story__return {
    width: 100%;
    background-color: transparent;
    padding: max(6rem, 12vw) 1.2rem;
    text-align: center;
    color: var(--wp--preset--color--black);
}

.moa-story__return-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.moa-story__return-link:hover {
    transform: translateY(-4px);
}

.moa-story__return-eyebrow {
    font-family: var(--wp--preset--font-family--noir-pro);
    font-weight: 400;
    font-size: max(0.9rem, 1.447vw);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wp--preset--color--black);
    opacity: 0.85;
}

.moa-story__return-text {
    display: inline-flex;
    align-items: center;
    gap: 1.75rem;
    font-family: var(--wp--preset--font-family--lora);
    font-weight: 400;
    font-size: clamp(1.75rem, 4vw, 3.5rem);
    line-height: 1.1;
    color: var(--wp--preset--color--black);
}

.moa-story__return-arrow {
    display: inline-flex;
    align-items: center;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.moa-story__return-link:hover .moa-story__return-arrow {
    transform: translateX(-12px);
}


/* ============================================================
   9. WORD REVEAL ANIMATION
   ============================================================ */

.moa-word-reveal .moa-word {
    display: inline-block;
    opacity: 0.2;
    transition: opacity 0.5s ease-out;
}

.moa-word-reveal .moa-word.is-revealed {
    opacity: 1;
}


/* ============================================================
   10. EXIT ANIMATION
   ============================================================ */

body.moa-story-exiting .moa-story {
    animation: moaStoryExit 0.7s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes moaStoryExit {
    to {
        transform: scale(1.04);
        opacity: 0;
    }
}

/* ============================================================
   13. CHAPTER INK DISSOLVE REVEAL (canvas version)
   Canvas overlay erases organic patches from center outward,
   revealing eyebrow + title underneath.
   ============================================================ */

   .moa-chapter-eyebrow,
   .moa-chapter-title {
       visibility: hidden;
   }
   
   .moa-chapter-reveal {
       position: relative;
       display: block;
       width: 100%;
       text-align: center;
   }
   
   .moa-chapter-reveal .moa-chapter-eyebrow,
   .moa-chapter-reveal .moa-chapter-title {
       visibility: visible;
   }
   
   .moa-chapter-reveal__canvas {
       position: absolute;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       pointer-events: none;
       z-index: 2;
   }
   
   @media (prefers-reduced-motion: reduce) {
       .moa-chapter-eyebrow,
       .moa-chapter-title {
           visibility: visible !important;
       }
       .moa-chapter-reveal__canvas {
           display: none !important;
       }
   }

@media (max-width: 999px) {
    .moa-story__body > .moa-chapter:not(.moa-chapter--ceremony) {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 920px) {
    .site-header:not(.is-scrolled):not(.menu-open) .header-extras .wp-block-button__link {
        color: var(--wp--preset--color--black) !important;
        border-color: var(--wp--preset--color--black) !important;
    }

    body.single-moa_story .menu-open .menu-toggle {
        filter: invert(0) !important;
    }
}

/* ============================================================
   11. MOBILE (≤ 768px)
   ============================================================ */

@media (max-width: 768px) {

    .moa-story__hero-banner {
        padding: max(4rem, 10vh) 1.2rem max(3rem, 6vh);
    }

    .moa-story__hero-photo {
        height: 70vh;
        min-height: 480px;
    }

    .moa-story__body .moa-chapter-content {
        padding: max(3rem, 8vw) 1.2rem;
    }

    .moa-chapter-content .wp-block-column {
        flex-basis: 100% !important;
    }

    .moa-chapter-text {
        margin-top: 1.5rem;
        max-width: none;
    }

    .moa-story__body > .moa-standalone-image,
    .moa-standalone-image {
        width: calc(100% - 2.4rem) !important;
        margin: 2rem 1.2rem !important;
    }

    .moa-story__body .moa-triptych {
        padding: 3rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .moa-triptych .wp-block-column {
        transform: none !important;
    }

    .moa-story__body .moa-chapter-separator {
        padding: max(4rem, 8vw) 1.2rem;
        min-height: 70vh;
    }

    .moa-story__return {
        padding: 4rem 1rem;
    }

    .moa-story__return-text {
        gap: 1rem;
    }

    /* Duo → stack vertically on mobile */
    .moa-image-duo .wp-block-column {
        flex-basis: 100% !important;
    }

    .moa-image-duo-image img {
        height: 60vh;
    }

    /* Reversed chapters: keep image first on mobile */
    .moa-chapter-content--reversed .wp-block-column:nth-child(1) {
        order: 2;
    }
    .moa-chapter-content--reversed .wp-block-column:nth-child(2) {
        order: 1;
    }
}

@media screen and (max-width: 517px) {
    .moa-story__eyebrow {
        margin: 0 0 1rem;
    }

    .moa-story__title {
        font-size: max(2rem, 7vw);
    }
}
 

/* ============================================================
   12. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .moa-story__eyebrow,
    .moa-story__title,
    .moa-story__meta {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .moa-word-reveal .moa-word {
        opacity: 1 !important;
        transition: none !important;
    }

    .moa-triptych .wp-block-column {
        transform: none !important;
    }

    body.moa-story-exiting .moa-story {
        animation: none !important;
    }
}