/* ==========================================================================
   MBM — Homepage section styles
   Loaded on is_front_page() (frontend) and unconditionally in the editor.
   All color/font values use --wp--preset--* vars from theme.json.
   Spacing rules are scoped to two classes (0,2,0) to survive WP layout resets.
   ========================================================================== */

/* =====================================================
   HERO SECTION
   ===================================================== */


/* Shimmer layer — replaces .hero-shimmer div; CSS-only pseudo-element */
.wp-block-mbm-cover-parallax::before {
    animation: mbm-shimmer 6s ease-in-out infinite alternate;
    background: radial-gradient(ellipse 60% 40% at 50% 60%, rgba(184, 206, 222, 0.05) 0%, transparent 70%);
    content: '';
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

/* Secondary radial-gradient supplement on the overlay div */
.wp-block-mbm-cover-parallax .parallax-overlay::after {
    background: radial-gradient(ellipse 80% 60% at 50% 110%, rgba(106, 158, 138, 0.12) 0%, transparent 60%);
    content: '';
    inset: 0;
    position: absolute;
}

/* Reset quote-variant constraints on the inner wrapper */
.wp-block-mbm-cover-parallax .parallax-inner {
    max-width: 100%;
    padding-top: 0;
}

/* --- Content group ----------------------------------------------------- */

.wp-block-mbm-cover-parallax .hero__content {
    align-items: center;
    color: var(--wp--preset--color--silver);
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
    padding: 40px 32px 120px;
    text-align: center;
}

/* --- Eyebrow ----------------------------------------------------------- */

.hero__content .hero__eyebrow {
    align-items: center;
    animation: mbm-fade-up 0.8s ease 0.2s forwards;
    color: var(--wp--preset--color--accent);
    display: inline-flex;
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 500;
    gap: 10px;
    letter-spacing: 0.16em;
    margin-bottom: 28px;
    opacity: 0;
    text-transform: uppercase;
}

.hero__content .hero__eyebrow::before {
    background: var(--wp--preset--color--accent);
    content: '';
    display: block;
    flex-shrink: 0;
    height: 1px;
    width: 28px;
}

/* --- Title ------------------------------------------------------------- */

.hero__content .hero__title {
    animation: mbm-fade-up 0.9s ease 0.4s forwards;
    font-size: clamp(3rem, 7vw, var(--wp--preset--font-size--6-xl));
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.08;
    margin-bottom: 12px;
    max-width: 720px;
    opacity: 0;
}

.hero__content .hero__title em {
    color: var(--wp--preset--color--mist);
    font-style: italic;
}

/* --- Body paragraph ---------------------------------------------------- */

.hero__content .hero__body {
    animation: mbm-fade-up 0.9s ease 0.55s forwards;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 560px;
    opacity: 0;
}

/* --- Urgency paragraph ------------------------------------------------- */

.hero__content .hero__urgency {
    animation: mbm-fade-up 0.9s ease 0.82s forwards;
    font-family: var(--wp--preset--font-family--display);
    font-size: 24px;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 40px;
    opacity: 0;
}

/* --- Badge ------------------------------------------------------------- */

.hero__content .hero__badge-wrap {
    align-items: center;
    animation: mbm-fade-up 0.9s ease 0.85s forwards;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
}

.hero__badge-wrap .hero__badge-pill {
    align-items: center;
    cursor: default;
    display: inline-flex;
    padding: 0;
    position: relative;
    width: fit-content;
}

/* CSS @property enables --mbm-angle interpolation for the spinning border */
@property --mbm-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.hero__badge-wrap .hero__badge-pill::before {
    animation: mbm-border-spin 3.5s linear infinite;
    background: conic-gradient(
            from var(--mbm-angle, 0deg),
            rgba(184, 206, 222, 0) 0deg,
            rgba(184, 206, 222, 0.9) 60deg,
            rgba(106, 158, 138, 0.8) 120deg,
            rgba(196, 132, 90, 0.6) 180deg,
            rgba(184, 206, 222, 0.9) 240deg,
            rgba(184, 206, 222, 0) 300deg,
            rgba(184, 206, 222, 0) 360deg
    );
    border-radius: var(--wp--custom--border--radius-pill);
    content: '';
    inset: -2px;
    position: absolute;
    z-index: 0;
}

.hero__badge-pill .hero__badge-inner {
    align-items: center;
    backdrop-filter: blur(12px);
    background: rgba(20, 32, 44, 0.85);
    border-radius: var(--wp--custom--border--radius-pill);
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: space-evenly;
    padding: 14px 30px;
    position: relative;
    width: 359px;
    z-index: 1;
}

.hero__badge-pill .hero__glow {
    animation: mbm-glow-pulse 3s ease-in-out infinite alternate;
    background: radial-gradient(ellipse, rgba(106, 158, 138, 0.15) 0%, transparent 70%);
    border-radius: 80px;
    inset: -20px;
    position: absolute;
    z-index: -1;
}

.hero__badge-inner .hero__badge-stars {
    align-items: center;
    color: var(--wp--preset--color--silver);
    display: flex;
    gap: 5px;
    margin-top: 4px;
}

.hero__badge-inner .hero__badge-stars span {
    animation: mbm-star-float 2.4s ease-in-out infinite;
    display: inline-block;
    font-size: 14px;
}

.hero__badge-inner .hero__badge-stars span:nth-child(2) {
    animation-delay: 0.4s;
}

.hero__badge-inner .hero__badge-stars span:nth-child(3) {
    animation-delay: 0.8s;
}

.hero__badge-inner .hero__badge-label {
    color: var(--wp--preset--color--silver);
    font-family: var(--wp--preset--font-family--display);
    font-size: 2rem;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    padding: 10px;
    white-space: nowrap;
}

.hero__badge-inner .hero__badge-year {
    background: rgba(106, 158, 138, 0.15);
    border: 1px solid rgba(106, 158, 138, 0.3);
    border-radius: 20px;
    color: var(--wp--preset--color--accent);
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--lg);
    font-weight: 500;
    letter-spacing: 0.12em;
    padding: 3px 10px;
    text-transform: uppercase;
}

/* --- Scroll hint ------------------------------------------------------- */

.wp-block-mbm-cover-parallax .hero__scroll-hint {
    align-items: center;
    animation: mbm-fade-in 1s ease 1.5s forwards;
    bottom: 36px;
    color: var(--wp--preset--color--blue-grey);
    display: flex;
    flex-direction: column;
    font-size: var(--wp--preset--font-size--xs);
    gap: 8px;
    left: 50%;
    letter-spacing: 0.1em;
    opacity: 0;
    position: absolute;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.wp-block-mbm-cover-parallax .hero__scroll-hint .scroll-dot {
    animation: mbm-scroll-pulse 2s ease-in-out infinite;
    background: linear-gradient(to bottom, var(--wp--preset--color--blue-grey), transparent);
    height: 40px;
    width: 1px;
}

/* --- Keyframe animations ----------------------------------------------- */

@keyframes mbm-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mbm-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes mbm-shimmer {
    from {
        opacity: 0.6;
    }
    to {
        opacity: 1;
    }
}

@keyframes mbm-border-spin {
    to {
        --mbm-angle: 360deg;
    }
}

@keyframes mbm-glow-pulse {
    from {
        opacity: 0.7;
    }
    to {
        opacity: 1;
    }
}

@keyframes mbm-star-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes mbm-scroll-pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 768px) {
    .wp-block-mbm-cover-parallax .hero__content {
        padding: 60px 20px 0;
    }

    .hero__badge-pill .hero__badge-inner {
        padding: 12px 22px;
    }

    .wp-block-mbm-cover-parallax .hero__scroll-hint {
        display: none;
    }
}

/* =====================================================
   HOW IT WORKS SECTION
   ===================================================== */

.mbm-section--how-it-works {
    padding-bottom: var(--wp--custom--spacing--section);
    padding-top: var(--wp--custom--spacing--section);
}

/* --- Header group — space before grid ---------------------------------- */

.mbm-section--how-it-works .how-it-works__header {
    margin-bottom: 64px;
}

/* --- Label -------------------------------------------------------------- */

.mbm-section--how-it-works .how-it-works__label {
    align-items: center;
    color: var(--wp--preset--color--accent);
    display: flex;
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 500;
    gap: 10px;
    letter-spacing: 0.16em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.mbm-section--how-it-works .how-it-works__label::before {
    background: var(--wp--preset--color--accent);
    content: '';
    display: block;
    flex-shrink: 0;
    height: 1px;
    width: 24px;
}

/* --- Title -------------------------------------------------------------- */

.mbm-section--how-it-works .how-it-works__title {
    color: var(--wp--preset--color--deep);
    font-size: clamp(2rem, 4vw, var(--wp--preset--font-size--4-xl));
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.mbm-section--how-it-works .how-it-works__title em {
    color: var(--wp--preset--color--slate);
    font-style: italic;
}

/* --- Intro -------------------------------------------------------------- */

.mbm-section--how-it-works .how-it-works__intro {
    color: var(--wp--preset--color--slate);
    font-size: var(--wp--preset--font-size--lg);
    font-weight: 300;
    line-height: 1.7;
    margin: 0;
}

/* --- Grid --------------------------------------------------------------- */

.mbm-section--how-it-works .how-it-works__grid {
    gap: 40px;
}

.mbm-section--how-it-works .how-it-works__grid .wp-block-column {
    display: flex;
    flex-direction: column;
}

/* --- Card --------------------------------------------------------------- */

.mbm-section--how-it-works .how-it-works__card {
    background: var(--wp--preset--color--silver);
    border: 1px solid var(--wp--preset--color--pale);
    border-radius: var(--wp--custom--border--radius-lg);
    flex: 1;
    padding: 36px 32px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mbm-section--how-it-works .how-it-works__card:hover {
    box-shadow: 0 16px 40px rgba(30, 45, 61, 0.08);
    transform: translateY(-4px);
}

/* Stagger reveal transition-delays via nth-child on column wrappers */
.mbm-section--how-it-works .wp-block-column:nth-child(1) .how-it-works__card {
    transition-delay: 0.1s;
}

.mbm-section--how-it-works .wp-block-column:nth-child(2) .how-it-works__card {
    transition-delay: 0.2s;
}

.mbm-section--how-it-works .wp-block-column:nth-child(3) .how-it-works__card {
    transition-delay: 0.3s;
}

/* --- Step number -------------------------------------------------------- */

.mbm-section--how-it-works .how-it-works__card .how-it-works__step-number {
    color: var(--wp--preset--color--pale);
    font-family: var(--wp--preset--font-family--display);
    font-size: 4.5rem;
    font-weight: 300;
    line-height: 1;
    margin: 0;
    position: absolute;
    right: 24px;
    top: 20px;
    user-select: none;
}

/* --- Step icon ---------------------------------------------------------- */

.mbm-section--how-it-works .how-it-works__card .how-it-works__step-icon {
    align-items: center;
    background: var(--wp--preset--color--deep);
    border-radius: var(--wp--custom--border--radius);
    display: flex;
    height: 44px;
    justify-content: center;
    margin-bottom: 20px;
    width: 44px;
}

.mbm-section--how-it-works .how-it-works__card .how-it-works__step-icon svg {
    color: var(--wp--preset--color--mist);
    height: 22px;
    width: 22px;
}

/* --- Step title --------------------------------------------------------- */

.mbm-section--how-it-works .how-it-works__card .how-it-works__step-title {
    color: var(--wp--preset--color--deep);
    font-size: var(--wp--preset--font-size--xl);
    font-weight: 600;
    margin-bottom: 10px;
}

/* --- Step body ---------------------------------------------------------- */

.mbm-section--how-it-works .how-it-works__card .how-it-works__step-body {
    color: var(--wp--preset--color--slate);
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 300;
    line-height: 1.7;
    margin: 0;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 768px) {
    .mbm-section--how-it-works .how-it-works__grid {
        gap: 20px;
    }
}
