/* ============================================================
   Macro Market — Hero Slider widget
   Brand tokens (deep navy / warm sand / midnight blue / gold).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Oswald:wght@500;600;700&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

.mm-hero {
    --mmh-text:        #E7D8C4;
    --mmh-text-soft:   rgba(231, 216, 196, 0.78);
    --mmh-cta-bg:      #E7D8C4;
    --mmh-cta-fg:      #1E2A3A;
    --mmh-cta-bg-h:    #FFFFFF;
    --mmh-ink:         #0E1620;
    --mmh-accent-blue: #2F588C;
    --mmh-accent-gold: #C9A24A;
    --mmh-content-max: 720px;
    --mmh-ease:        cubic-bezier(0.22, 0.61, 0.36, 1);

    position: relative;
    /* Full-bleed: break out of any boxed Elementor container */
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    background: var(--mmh-ink);
    overflow: hidden;
    isolation: isolate;
    color: var(--mmh-text);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    display: flex;
}

/* Inside the Elementor editor preview, keep it boxed so the canvas isn't horizontal-scrolled. */
.elementor-editor-active .mm-hero,
body.elementor-editor-preview .mm-hero {
    width: 100%;
    margin-left: 0;
    transform: none;
}

.mm-hero--compact  { min-height: clamp(480px, 60vh, 720px); }
.mm-hero--standard { min-height: clamp(560px, 80vh, 900px); }
.mm-hero--full     { min-height: 100vh; }

.mm-hero__swiper {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: inherit;
}
.mm-hero .swiper-wrapper,
.mm-hero .swiper-slide {
    min-height: inherit;
}

.mm-hero__slide {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-height: inherit;
    overflow: hidden;
    color: var(--mmh-text);
}

/* Real <img> behind the slide — sharp at any breakpoint, srcset-driven. */
.mm-hero__bg {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: var(--mmh-focal-x, 50%) var(--mmh-focal-y, 50%);
    z-index: 1;
    will-change: transform;
    transform: scale(1.045);
    transition: transform 1400ms var(--mmh-ease);
}
.mm-hero__slide.swiper-slide-active .mm-hero__bg { transform: scale(1); }

/* Layered atmosphere — radial vignette + cool key-light + bottom darken + grain */
.mm-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(120% 95% at 20% 80%, rgba(14, 22, 32, var(--mmh-overlay, 0.55)) 0%, rgba(14, 22, 32, 0) 60%),
        radial-gradient(110% 100% at 82% 0%, rgba(47, 88, 140, calc(var(--mmh-overlay, 0.55) * 0.42)) 0%, rgba(14, 22, 32, 0) 60%),
        linear-gradient(180deg, rgba(14, 22, 32, calc(var(--mmh-overlay, 0.55) * 0.22)) 0%, rgba(14, 22, 32, 0) 32%, rgba(14, 22, 32, calc(var(--mmh-overlay, 0.55) * 0.9)) 100%);
}
.mm-hero__overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.6;
    mix-blend-mode: overlay;
}

.mm-hero__inner {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: clamp(48px, 8vh, 120px) clamp(20px, 6vw, 96px) clamp(72px, 14vh, 150px);
    display: grid;
}
.mm-hero__slide--left   .mm-hero__inner { justify-items: start;  text-align: left; }
.mm-hero__slide--center .mm-hero__inner { justify-items: center; text-align: center; }
.mm-hero__slide--right  .mm-hero__inner { justify-items: end;    text-align: right; }

.mm-hero__content {
    max-width: var(--mmh-content-max);
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vh, 26px);
}

/* Brand device — short rule above eyebrow (faint topo line) */
.mm-hero__content::before {
    content: "";
    width: 64px;
    height: 1px;
    background: linear-gradient(90deg, var(--mmh-text) 0%, transparent 100%);
    opacity: 0.55;
}
.mm-hero__slide--center .mm-hero__content::before { margin: 0 auto; }
.mm-hero__slide--right  .mm-hero__content::before { margin-left: auto; transform: scaleX(-1); }

.mm-hero__eyebrow {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--mmh-text-soft);
    margin: 0;
}

.mm-hero__heading {
    font-family: 'Anton', 'Oswald', 'Brunson', 'Arial Narrow', sans-serif;
    font-weight: 400; /* Anton is single-weight; the impact comes from size */
    font-size: clamp(40px, 6.4vw, 92px);
    line-height: 1.02;
    letter-spacing: -0.015em;
    margin: 0;
    text-wrap: balance;
    color: var(--mmh-text);
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22), 0 14px 32px rgba(0, 0, 0, 0.4);
}

.mm-hero__sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.55;
    color: var(--mmh-text-soft);
    margin: 0;
    max-width: 56ch;
}

.mm-hero__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
    padding: 16px 22px 14px;
    background: var(--mmh-cta-bg);
    color: var(--mmh-cta-fg);
    font-family: 'JetBrains Mono', 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    border: 0;
    border-radius: 2px;
    transition:
        transform 280ms var(--mmh-ease),
        background-color 280ms var(--mmh-ease),
        box-shadow 360ms var(--mmh-ease);
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.18),
        0 14px 28px -10px rgba(47, 88, 140, 0.45),
        0 24px 56px -16px rgba(0, 0, 0, 0.55);
    will-change: transform;
}
.mm-hero__cta svg {
    width: 18px;
    height: 18px;
    transition: transform 280ms var(--mmh-ease);
}
.mm-hero__cta:hover {
    background: var(--mmh-cta-bg-h);
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.18),
        0 18px 36px -12px rgba(47, 88, 140, 0.55),
        0 32px 70px -16px rgba(0, 0, 0, 0.6);
}
.mm-hero__cta:hover svg { transform: translateX(5px); }
.mm-hero__cta:active   { transform: translateY(0); }
.mm-hero__cta:focus-visible {
    outline: 2px solid var(--mmh-accent-gold);
    outline-offset: 4px;
}

/* ============================================================
   Controls — one aligned bar at the bottom of the hero:
   progress bars on the left, prev/next on the right, sharing a
   single baseline. (Previously the arrows floated at vertical
   center, disconnected from the bottom-aligned content.)
   On-brand: squared buttons like the CTA, warm-sand hover,
   gold active bar + gold focus ring.
   ============================================================ */
.mm-hero__controls {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: clamp(20px, 4vh, 40px);
    pointer-events: none; /* clicks pass through the empty bar; children re-enable */
}
.mm-hero__controls-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 40px);
    width: 100%;
    padding-inline: clamp(20px, 6vw, 96px);
}

/* Progress bars (left) */
.mm-hero .swiper-pagination.mm-hero__pagination {
    position: static;
    z-index: auto;
    inset: auto;
    display: flex;
    gap: 10px;
    width: auto;
    flex: 1 1 auto;
    max-width: 460px;
    margin: 0;
    justify-content: flex-start;
    pointer-events: auto;
}
.mm-hero .swiper-pagination .swiper-pagination-bullet {
    flex: 1;
    height: 3px;
    max-width: 88px;
    margin: 0;
    border-radius: 0;
    background: rgba(231, 216, 196, 0.22);
    opacity: 1;
    transition:
        background-color 360ms var(--mmh-ease),
        transform 360ms var(--mmh-ease);
    cursor: pointer;
}
.mm-hero .swiper-pagination .swiper-pagination-bullet:hover {
    background: rgba(231, 216, 196, 0.45);
}
.mm-hero .swiper-pagination .swiper-pagination-bullet-active {
    background: var(--mmh-accent-gold);
    transform: scaleY(1.8);
}

/* Prev / next (right) */
.mm-hero__nav {
    display: inline-flex;
    gap: 10px;
    flex: 0 0 auto;
    pointer-events: auto;
}
.mm-hero__prev,
.mm-hero__next {
    width: 50px;
    height: 50px;
    /* Reset the theme's global `button { padding:14px 22px }` which otherwise
       leaks in and shoves the chevron off-center to the right. */
    padding: 0;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    background: rgba(14, 22, 32, 0.42);
    color: var(--mmh-text);
    border: 1px solid rgba(231, 216, 196, 0.30);
    border-radius: 2px;
    cursor: pointer;
    transition:
        background-color 240ms var(--mmh-ease),
        border-color 240ms var(--mmh-ease),
        color 240ms var(--mmh-ease),
        transform 240ms var(--mmh-ease);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.mm-hero__prev:hover,
.mm-hero__next:hover {
    background: var(--mmh-cta-bg);
    color: var(--mmh-cta-fg);
    border-color: var(--mmh-cta-bg);
    transform: translateY(-2px);
}
.mm-hero__prev:active,
.mm-hero__next:active { transform: translateY(0); }
/* display:block removes the inline-SVG baseline gap that pushed the chevrons
   slightly low; combined with the button's grid place-items:center this
   centers the glyph optically in both axes. */
.mm-hero__prev svg,
.mm-hero__next svg { width: 20px; height: 20px; display: block; }
.mm-hero__prev:focus-visible,
.mm-hero__next:focus-visible {
    outline: 2px solid var(--mmh-accent-gold);
    outline-offset: 3px;
}

@media (max-width: 720px) {
    .mm-hero__nav { display: none; }
    .mm-hero .swiper-pagination.mm-hero__pagination { max-width: none; }
}

/* Staggered reveal */
.mm-hero__eyebrow,
.mm-hero__heading,
.mm-hero__sub,
.mm-hero__cta,
.mm-hero__content::before {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 760ms var(--mmh-ease),
        transform 760ms var(--mmh-ease);
}
.mm-hero__slide.swiper-slide-active .mm-hero__content::before,
.mm-hero__slide.swiper-slide-active .mm-hero__eyebrow,
.mm-hero__slide.swiper-slide-active .mm-hero__heading,
.mm-hero__slide.swiper-slide-active .mm-hero__sub,
.mm-hero__slide.swiper-slide-active .mm-hero__cta {
    opacity: 1;
    transform: translateY(0);
}
.mm-hero__slide.swiper-slide-active .mm-hero__content::before { transition-delay: 80ms; }
.mm-hero__slide.swiper-slide-active .mm-hero__eyebrow        { transition-delay: 160ms; }
.mm-hero__slide.swiper-slide-active .mm-hero__heading        { transition-delay: 240ms; }
.mm-hero__slide.swiper-slide-active .mm-hero__sub            { transition-delay: 380ms; }
.mm-hero__slide.swiper-slide-active .mm-hero__cta            { transition-delay: 500ms; }

@media (prefers-reduced-motion: reduce) {
    .mm-hero__bg,
    .mm-hero__eyebrow,
    .mm-hero__heading,
    .mm-hero__sub,
    .mm-hero__cta,
    .mm-hero__content::before {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

/* Editor — make sure widget is visible inside the Elementor canvas */
.elementor-editor-active .mm-hero { min-height: 600px; }
