.mod-magictrails-hero {
    --mt-hero-bg-image: none;
    --mt-hero-blue: var(--mt-header-bg, #061936);
    --mt-hero-gold: var(--mt-accent-color, #d8a13a);
    --mt-hero-gold-light: #efbf55;
    --mt-hero-white: #ffffff;
    --mt-hero-text-shadow: 0 2px 12px rgba(0, 0, 0, .38);
    position: relative;
    min-height: 34rem;
    overflow: hidden;
    isolation: isolate;
    max-width: 100%;
    width: 100%;
    background-color: var(--mt-hero-blue);
}

.mod-magictrails-hero[style*="--mt-hero-custom-height"] {
    min-height: var(--mt-hero-custom-height);
}

.mod-magictrails-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--mt-hero-bg-image);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform-origin: center;
    animation: mtHeroKenBurns 34s ease-in-out infinite alternate;
}

.mod-magictrails-hero.has-background-video::before {
    z-index: -3;
    animation: none;
}

.mt-hero__background-video {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.mt-hero--height-compact {
    min-height: clamp(22rem, 42vh, 28rem);
}

.mt-hero--height-standard {
    min-height: clamp(30rem, 58vh, 36rem);
}

.mt-hero--height-large {
    min-height: clamp(38rem, 74vh, 46rem);
}

.mt-hero--height-full {
    min-height: calc(100svh - var(--mt-header-height, 76px));
}

.mt-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(3, 12, 28, .84) 0%, rgba(3, 12, 28, .58) 38%, rgba(3, 12, 28, .18) 72%, rgba(3, 12, 28, 0) 100%);
}

.mt-hero--overlay-center .mt-hero__overlay {
    background: radial-gradient(circle at center, rgba(3, 12, 28, .42), rgba(3, 12, 28, .78));
}

.mt-hero--overlay-dark .mt-hero__overlay {
    background: rgba(3, 12, 28, .72);
}

.mt-hero--overlay-custom .mt-hero__overlay {
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--mt-hero-overlay-color, #030c1c) var(--mt-hero-overlay-opacity, 70%), transparent) 0%,
        color-mix(in srgb, var(--mt-hero-overlay-color, #030c1c) var(--mt-hero-overlay-opacity, 70%), transparent) var(--mt-hero-overlay-coverage, 60%),
        transparent min(100%, calc(var(--mt-hero-overlay-coverage, 60%) + 20%))
    );
}

.mt-hero--overlay-none .mt-hero__overlay {
    display: none;
}

.mt-hero__inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: inherit;
    width: min(100% - 2rem, var(--mt-container-width, 1180px));
    margin: 0 auto;
    padding: 4rem 0;
}

.mt-hero--layout-split .mt-hero__inner {
    align-items: center;
    display: grid;
    gap: clamp(2rem, 5vw, 5rem);
    grid-template-columns: minmax(18rem, 0.92fr) minmax(0, 1.45fr);
}

.mt-hero__module-zone {
    min-width: 0;
    position: relative;
    z-index: 2;
}

.mt-hero__module-zone > * {
    max-width: 100%;
}

.mt-hero__content {
    width: min(100%, 42rem);
    color: var(--mt-hero-white);
    min-width: 0;
    overflow-wrap: anywhere;
    container-type: inline-size;
}

.mt-hero--layout-split .mt-hero__content {
    justify-self: start;
    width: min(100%, 52rem);
}

.mt-hero--align-center .mt-hero__inner {
    justify-content: center;
    text-align: center;
}

.mt-hero--layout-split.mt-hero--align-center .mt-hero__inner {
    text-align: left;
}

.mt-hero--align-center .mt-hero__content {
    margin: 0 auto;
}

.mt-hero__eyebrow {
    margin: 0 0 1rem;
    color: var(--mt-hero-gold);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mt-hero__title {
    margin: 0;
    color: var(--mt-hero-white);
    font-family: var(--mt-font-heading, "Cormorant Garamond", Georgia, "Times New Roman", serif);
    /* Size against the text column, not the full viewport. */
    font-size: clamp(2rem, 8cqi, 4.5rem);
    font-weight: 400;
    line-height: 1.08;
    text-shadow: var(--mt-hero-text-shadow);
}

.mt-hero__title span {
    display: block;
    max-width: 100%;
    overflow-wrap: normal;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-2rem);
    animation: mtHeroSlideText .8s ease forwards;
}

.mt-hero--align-center .mt-hero__title span {
    transform: translateY(1rem);
}

.mt-hero__title span:nth-child(2) {
    animation-delay: .2s;
}

.mt-hero__title span:nth-child(3) {
    animation-delay: .4s;
}

.mt-hero__title span:nth-child(4) {
    animation-delay: .6s;
}

.mt-hero__title .is-gold {
    color: var(--mt-hero-gold);
}

.mt-hero__divider {
    display: flex;
    align-items: center;
    width: min(22rem, 100%);
    margin: 2rem 0;
    color: var(--mt-hero-gold);
    opacity: 0;
    transform: scaleX(.5);
    transform-origin: center;
    animation: mtHeroDividerGrow .8s ease .7s forwards;
}

.mt-hero--align-center .mt-hero__divider {
    margin-right: auto;
    margin-left: auto;
}

.mt-hero__divider::before,
.mt-hero__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, currentColor);
}

.mt-hero__divider::after {
    background: linear-gradient(to left, transparent, currentColor);
}

.mt-hero__divider-star {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-inline: .9rem;
}

.mt-hero__text {
    max-width: 37rem;
    margin: 0 0 2rem;
    color: var(--mt-hero-white);
    font-size: clamp(1.05rem, 3vw, 1.35rem);
    line-height: 1.6;
    text-shadow: var(--mt-hero-text-shadow);
    opacity: 0;
    transform: translateY(1rem);
    animation: mtHeroTextFade .9s ease .9s forwards;
}

.mt-hero--align-center .mt-hero__text {
    margin-right: auto;
    margin-left: auto;
}

.mt-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    opacity: 0;
    transform: translateY(1rem);
    animation: mtHeroTextFade .9s ease 1.1s forwards;
}

.mt-hero--align-center .mt-hero__actions {
    justify-content: center;
}

.mt-hero__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: .9rem 1.8rem;
    border: 1px solid var(--mt-hero-gold);
    border-radius: var(--mt-border-radius, 4px);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.mt-hero__button--primary {
    background: var(--mt-hero-gold);
    color: var(--mt-hero-white);
}

.mt-hero__button--secondary {
    background: rgba(255, 255, 255, .04);
    color: var(--mt-hero-gold);
}

.mt-hero__button:hover,
.mt-hero__button:focus {
    border-color: var(--mt-hero-gold-light);
    background: var(--mt-hero-gold-light);
    color: var(--mt-hero-white);
    text-decoration: none;
    transform: translateY(-2px);
}

.mt-hero__flower {
    position: absolute;
    z-index: 1;
    right: max(1rem, 8vw);
    top: 50%;
    width: min(28rem, 44vw);
    opacity: .48;
    pointer-events: none;
    transform: translateY(-50%);
    animation: mtHeroFlowerBreath 18s ease-in-out infinite;
}

.mt-hero__flower svg {
    display: block;
    width: 100%;
    height: auto;
}

.mt-hero__flower-lines circle {
    fill: none;
    stroke: var(--mt-hero-gold-light);
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .82;
    vector-effect: non-scaling-stroke;
}

.mt-hero__flower-lines .ring {
    opacity: .92;
    stroke-width: 1.2;
}

.mt-hero__flower-sparkles {
    fill: #fff3b8;
    stroke: #ffd060;
    stroke-linecap: round;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.mt-hero__flower-sparkle {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: mtHeroFlowerSparkle 5.8s ease-in-out infinite;
}

.mt-hero__flower-sparkle.sparkle-1 { animation-delay: -1.1s; }
.mt-hero__flower-sparkle.sparkle-2 { animation-delay: -2.7s; }
.mt-hero__flower-sparkle.sparkle-3 { animation-delay: -4.4s; }
.mt-hero__flower-sparkle.sparkle-4 { animation-delay: -.3s; }
.mt-hero__flower-sparkle.sparkle-5 { animation-delay: -3.5s; }
.mt-hero__flower-sparkle.sparkle-6 { animation-delay: -5.2s; }
.mt-hero__flower-sparkle.sparkle-7 { animation-delay: -1.9s; }

.mt-hero__flower-lines .draw {
    pathLength: 1;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: mtHeroSvgDraw 3.2s ease forwards;
}

.mt-hero__flower-lines .l0 {
    animation-delay: .1s;
}

.mt-hero__flower-lines .l1 {
    animation-delay: .45s;
}

.mt-hero__flower-lines .l2 {
    animation-delay: .85s;
}

.mt-hero__flower-lines .l3 {
    animation-delay: 1.25s;
}

.mt-hero__flower-lines .ring {
    animation-delay: 1.75s;
}

@media (max-width: 1199.98px) {
    .mt-hero__inner {
        width: min(100% - 3rem, var(--mt-container-width, 1180px));
    }

    .mt-hero--layout-split .mt-hero__inner {
        gap: clamp(1.5rem, 4vw, 3rem);
        grid-template-columns: minmax(17rem, .9fr) minmax(0, 1.25fr);
    }

    .mt-hero__title {
        font-size: clamp(2rem, 8cqi, 4rem);
    }
}

@media (max-width: 991.98px) {
    .mt-hero--layout-split .mt-hero__inner {
        grid-template-columns: 1fr;
        padding-block: 2.5rem;
    }

    .mt-hero__module-zone,
    .mt-hero__content {
        justify-self: center;
        width: min(100%, 42rem);
    }

    .mt-hero--layout-split .mt-hero__content {
        width: min(100%, 42rem);
    }
}

@media (max-width: 767.98px) {
    .mod-magictrails-hero {
        min-height: 34rem;
    }

    .mod-magictrails-hero[style*="--mt-hero-custom-height"] {
        min-height: var(--mt-hero-custom-height);
    }

    .mt-hero--height-compact {
        min-height: 24rem;
    }

    .mt-hero--height-standard {
        min-height: 32rem;
    }

    .mt-hero--height-large {
        min-height: 38rem;
    }

    .mt-hero--height-full {
        min-height: calc(100svh - var(--mt-header-height, 76px));
    }

    .mt-hero__inner {
        align-items: center;
        width: min(100% - 1.5rem, var(--mt-container-width, 1180px));
        padding: 2rem 0;
    }

    .mt-hero--layout-split .mt-hero__inner {
        align-items: stretch;
        display: grid;
        gap: 2rem;
        grid-template-columns: 1fr;
    }

    .mt-hero__overlay {
        background: rgba(3, 12, 28, .72);
    }

    .mt-hero__divider {
        width: min(15rem, 100%);
        margin: 1.5rem 0;
    }

    .mt-hero__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .mt-hero--align-center .mt-hero__actions {
        align-items: center;
    }

    .mt-hero__button {
        width: 100%;
        max-width: 22rem;
    }

    .mt-hero__flower {
        right: -5rem;
        top: 56%;
        width: 15rem;
        opacity: .18;
    }
}

@media (max-width: 575.98px) {
    .mod-magictrails-hero:not([data-mt-private]),
    .mod-magictrails-hero:not([data-mt-private])[style*="--mt-hero-custom-height"] {
        min-height: 0;
    }

    .mt-hero__inner {
        width: min(100% - 1rem, var(--mt-container-width, 1180px));
        padding-block: 1rem 2rem;
    }

    .mt-hero--layout-split .mt-hero__inner {
        gap: 1.5rem;
    }

    .mt-hero__title {
        font-size: clamp(1.85rem, 10cqi, 3rem);
        line-height: 1.02;
    }

    .mt-hero__title span {
        hyphens: auto;
        overflow-wrap: break-word;
        text-wrap: balance;
        white-space: normal;
    }

    .mt-hero__eyebrow {
        font-size: .72rem;
    }

    .mt-hero__text {
        font-size: 1rem;
    }

    .mt-hero__button {
        max-width: none;
        padding-inline: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mt-hero__background-video {
        display: none;
    }

    .mod-magictrails-hero::before,
    .mt-hero__flower,
    .mt-hero__title span,
    .mt-hero__divider,
    .mt-hero__text,
    .mt-hero__actions,
    .mt-hero__flower-lines .draw,
    .mt-hero__flower-sparkle {
        animation: none;
        opacity: 1;
        transform: none;
        stroke-dashoffset: 0;
    }

    .mt-hero__flower-sparkle {
        opacity: .38;
    }
}

@keyframes mtHeroKenBurns {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.035);
    }
}

@keyframes mtHeroFlowerBreath {
    0%,
    100% {
        transform: translateY(-50%) scale(1);
        opacity: .24;
    }

    50% {
        transform: translateY(-50%) scale(1.05);
        opacity: .42;
    }
}

@keyframes mtHeroSlideText {
    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@keyframes mtHeroDividerGrow {
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

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

@keyframes mtHeroSvgDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes mtHeroFlowerSparkle {
    0%,
    68%,
    100% {
        opacity: 0;
        transform: scale(.35) rotate(0deg);
    }

    74% {
        opacity: .95;
        transform: scale(1) rotate(20deg);
    }

    80% {
        opacity: .18;
        transform: scale(1.45) rotate(45deg);
    }

    86% {
        opacity: 0;
        transform: scale(.55) rotate(70deg);
    }
}

/* Optional right-side content, preserving the incumbent left-module layout. */
.mt-hero--module-right .mt-hero__inner { grid-template-columns: minmax(0, 1.45fr) minmax(128px, .65fr); }
.mt-hero__module-zone--right { justify-self: center; }
/* Fix both axes: a minimum-height grid may stretch an aspect-ratio-only item. */
.mt-hero__portrait {
    --mt-hero-portrait-size: clamp(128px, 15vw, 192px);
    position: relative;
    width: var(--mt-hero-portrait-size);
    height: var(--mt-hero-portrait-size);
    align-self: center;
}
.mt-hero__portrait img,
.mt-hero__portrait svg {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.mt-hero__portrait img {
    position: absolute;
    inset: 0;
    z-index: 1;
    border: 2px solid rgba(230, 197, 118, .75);
}
.mt-hero__portrait svg {
    padding: 20px;
    background: rgba(255,255,255,.12);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    color: #fff;
}
.mt-hero__portrait img[hidden] { display: none; }
.mt-hero__portrait:has(img:not([hidden])) svg { visibility: hidden; }

@media (max-width: 767.98px) {
    .mt-hero--module-right .mt-hero__inner { grid-template-columns: minmax(0, 1fr); }
    .mt-hero__module-zone--right { justify-self: start; }

    /* Own portrait: greeting, comfortably sized photo, then accompanying copy. */
    .mt-hero--own-portrait .mt-hero__inner {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 16px;
        row-gap: 12px;
        align-content: center;
        justify-items: center;
        text-align: center;
    }
    .mt-hero--own-portrait .mt-hero__content { display: contents; }
    .mt-hero--own-portrait .mt-hero__content > * { grid-column: 1 / -1; }
    .mt-hero--own-portrait .mt-hero__eyebrow { grid-row: 1; margin: 0; }
    .mt-hero--own-portrait .mt-hero__title {
        grid-column: 1;
        grid-row: 2;
        align-self: center;
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    .mt-hero--own-portrait .mt-hero__title span {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .mt-hero--own-portrait .mt-hero__portrait {
        --mt-hero-portrait-size: clamp(112px, 32vw, 144px);
        grid-column: 1;
        grid-row: 3;
        justify-self: center;
    }
    .mt-hero--own-portrait .mt-hero__portrait svg { padding: 16px; }
    .mt-hero--own-portrait .mt-hero__divider { grid-row: 4; margin-block: 8px; }
    .mt-hero--own-portrait .mt-hero__text { grid-row: 5; margin: 0; }
    .mt-hero--own-portrait .mt-hero__actions { grid-row: 6; justify-content: center; }
}

/* Explicit image-free surfaces are independent of image dimming. */
.mod-magictrails-hero.mt-hero--surface { background: var(--mt-hero-surface, #215c52); }
.mt-hero--surface::before, .mt-hero--surface .mt-hero__overlay { display: none; }
