/* Meridian FX (part of the Meridian plugin): motion + a few global fixes for the generated Elementor templates. Values measured on the Framer site. */

/* The Hello theme colours bare links and buttons pink (#c36); anything Elementor does not style falls back to Meridian blue. */
a { color: #000AD2; }
a:active, a:hover { color: #0008A8; }
[type=button], [type=submit], button { border-color: #000AD2; color: #000AD2; }
[type=button]:focus, [type=button]:hover, [type=submit]:focus, [type=submit]:hover, button:focus, button:hover { background-color: #000AD2; color: #fff; }

/* Elementor stretches "auto" width widgets inside column containers; badges/pills must hug their text. */
.elementor-widget.elementor-widget__width-auto { width: fit-content !important; }

/* Wave / dot layers injected by fx.js sit behind the container content. */
.mfx-layer { position: absolute !important; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; overflow: hidden; }
[class*="mfx-wave--"], .mfx-dotgrid, .mfx-grid { position: relative; overflow: hidden; }
[class*="mfx-wave--"] > :not(.mfx-layer), .mfx-dotgrid > :not(.mfx-layer), .mfx-grid > :not(.mfx-layer) { position: relative; z-index: 1; }

/* Hero column lines (5 lines, 300px apart, inside the 1200px grid). */
.mfx-grid::after {
    content: ""; position: absolute; top: 0; bottom: 0; z-index: 0; pointer-events: none;
    left: calc(50% - 600px); width: 1201px;
    background: linear-gradient(90deg, rgba(0,0,0, .07) 1px, transparent 1px) 0 0 / 300px 100% repeat-x;
}
@media (max-width: 1240px) { .mfx-grid::after { display: none; } }

/* Hero appear: fade + rise (Framer: 12 to 48px, staggered after the preloader). */
html.mfx-js body:not(.elementor-editor-active) .mfx-up {
    opacity: 0; transform: translateY(var(--mfx-y, 20px)) scale(var(--mfx-s, 1));
    transition: opacity .9s ease, transform .9s cubic-bezier(.16, 1, .3, 1), filter .9s ease;
    transition-delay: var(--mfx-d, 0s);
}
html.mfx-js body:not(.elementor-editor-active) .mfx-blur { filter: blur(20px); }
html.mfx-js body:not(.elementor-editor-active) .mfx-up.is-in { opacity: 1; transform: none; filter: none; }
.mfx-y12 { --mfx-y: 12px; } .mfx-y16 { --mfx-y: 16px; } .mfx-y24 { --mfx-y: 24px; }
.mfx-y48 { --mfx-y: 48px; --mfx-s: .97; } .mfx-y0 { --mfx-y: 0px; }

/* Section titles: word by word, blur 4px + 32px rise. */
.mfx-w { display: inline-block; }
html.mfx-js body:not(.elementor-editor-active) .mfx-words .mfx-w {
    opacity: 0; filter: blur(4px); transform: translateY(32px);
    transition: opacity .7s ease, filter .7s ease, transform .7s cubic-bezier(.16, 1, .3, 1);
    transition-delay: calc(var(--i) * 70ms);
}
html.mfx-js body:not(.elementor-editor-active) .mfx-words.is-in .mfx-w { opacity: 1; filter: none; transform: none; }

/* Scroll reveal: words go from 28% to full opacity as the block scrolls up. */
html.mfx-js body:not(.elementor-editor-active) .mfx-scrub .mfx-w { opacity: .28; transition: opacity .25s linear; }

/* Weekly Letter dot chart + Go deeper dot grid. */
.mfx-dots svg, .mfx-layer svg { display: block; width: 100%; height: 100%; }
.mfx-dots { height: 100%; min-height: 360px; }
.mfx-dots circle { transition: r .35s ease, fill .35s ease; }
.mfx-orbit-in, .mfx-orbit { transform-box: view-box; transform-origin: 300px 200px; }
.mfx-orbit-in { opacity: 0; transform: scale(.6); transition: opacity .9s ease, transform 1.2s cubic-bezier(.16, 1, .3, 1); }
.is-in > .mfx-orbit-in { opacity: 1; transform: none; }
.mfx-orbit { animation: mfx-spin 45s linear infinite; }
@keyframes mfx-spin { to { transform: rotate(360deg); } }

/* Buttons and links: Framer-like easing on hover. */
.elementor-button { transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease; }
.elementor-button:hover { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
    html.mfx-js .mfx-up, html.mfx-js .mfx-words .mfx-w, html.mfx-js .mfx-scrub .mfx-w { opacity: 1 !important; filter: none !important; transform: none !important; transition: none !important; }
    .mfx-orbit { animation: none; }
    .mfx-orbit-in { opacity: 1; transform: none; }
}

/* Disclaimer popup backdrop: navy 40% (set in the popup) + 4px blur, as on Framer. */
.elementor-popup-modal { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
/* On short phones the popup fits the visible screen (not the iOS 100vh behind the toolbar) and scrolls inside. */
.elementor-popup-modal.dialog-type-lightbox .dialog-widget-content, .elementor-popup-modal.dialog-type-lightbox .dialog-message { max-height: calc(100dvh - 24px - var(--wp-admin--admin-bar--height, 0px)); }
.elementor-popup-modal.dialog-type-lightbox .dialog-message { overflow-y: auto; overscroll-behavior: contain; }
/* Elementor switches popups to position:sticky when the WordPress admin bar shows, which pushes them below the screen on
   phones; popups always stay fixed to the screen. */
body.admin-bar .elementor-popup-modal.dialog-type-lightbox { position: fixed; top: var(--wp-admin--admin-bar--height, 0px); bottom: 0; height: auto; }
/* Touch screens: no backdrop blur behind popups (heavy on phones, and Safari handles it badly over a moving page). */
@media (hover: none) and (pointer: coarse) { .elementor-popup-modal { -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* Preloader (markup printed by meridian-fx.php on every page). Values from the Framer loader component. */
#mrd-pre { position: fixed; inset: 0; z-index: 999999; overflow: hidden; }
#mrd-pre.is-open { pointer-events: none; }
#mrd-pre .mrd-h { position: absolute; top: 0; bottom: 0; width: 50.5%; background: #000AD2; transition: transform .8s cubic-bezier(.9, .03, .2, 1.01); }
#mrd-pre .mrd-l { left: 0; }
#mrd-pre .mrd-r { right: 0; }
#mrd-pre.is-open .mrd-l { transform: translateX(-101%); }
#mrd-pre.is-open .mrd-r { transform: translateX(101%); }
#mrd-pre .mrd-words { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; transition: opacity .2s; }
#mrd-pre.is-open .mrd-words { opacity: 0; }
#mrd-pre .mrd-w {
    position: absolute; display: flex; white-space: nowrap; opacity: 0; transform: translateY(12px);
    font: 500 clamp(48px, 7vw, 100px)/1 "Apfel Grotezk", sans-serif; letter-spacing: -.05em;
}
#mrd-pre .mrd-w svg { height: clamp(40px, 5.6vw, 80px); width: auto; display: block; }
#mrd-pre .mrd-w.is-on { opacity: 1; transform: none; transition: opacity .22s cubic-bezier(.22, 1, .36, 1), transform .22s cubic-bezier(.22, 1, .36, 1); }
#mrd-pre .mrd-w.is-off { opacity: 0; transform: translateY(-12px); transition: opacity .16s, transform .16s; }
@media (prefers-reduced-motion: reduce) { #mrd-pre { display: none; } }

/* Tawk.to chat: its iframes force visibility/opacity inline and render before Tawk_API.onLoad, so fade its body-level
   container instead while the preloader curtain is closed or a popup (disclaimer) is open (class set by fx.js).
   Tawk also styles that container by #id with !important, hence the ID-weight :not(#mrd-none). */
body:has(#mrd-pre:not(.is-open)) > div:has(iframe[title="chat widget" i]),
body.mrd-popup-open > div:not(#mrd-none):has(iframe[title="chat widget" i]),
body.mrd-side-open > div:not(#mrd-none):has(iframe[title="chat widget" i]) { opacity: 0 !important; pointer-events: none !important; }

/* Footer newsletter form: the email field takes the room left after the Subscribe button, so the button text never
   squeezes against its edges on tablets (the form's 75/25 columns were too narrow there). */
.elementor-location-footer .elementor-form .elementor-form-fields-wrapper { flex-wrap: nowrap; }
.elementor-location-footer .elementor-form .elementor-field-group.elementor-field-type-email { flex: 1 1 auto; width: auto; min-width: 0; }
.elementor-location-footer .elementor-form .elementor-field-group.elementor-field-type-submit { flex: 0 0 auto; width: auto; }
.elementor-location-footer .elementor-form .elementor-field-type-submit .elementor-button { white-space: nowrap; }

/* Sticky glass navbar like Framer (header bg is rgba(245,246,248,.72) + 20px backdrop blur, set in the template). */
.elementor-location-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 1000; }

/* Lenis (recommended base styles from the Lenis docs). */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Pricing Pro card: the wave sits behind the feature list, so it is softened with a blur (client feedback). */
.mfx-wave--pricing > .mfx-layer { filter: blur(26px); transform: scale(1.12); opacity: .9; }

/* Notable calls: cards stretch to the row height and the status box sits at the bottom, so the boxes line up. */
.mrd-calls > .elementor { display: flex; flex-direction: column; }
.mrd-calls > .elementor > .e-con { flex: 1 1 auto; }
.mrd-calls .elementor-element-100005d { margin-top: auto; }

/* "Coming soon" in a region tab (Indonesia) fades in from a blur each time the tab opens. */
.e-n-tabs .mrd-empty { animation: mrd-soon .9s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes mrd-soon { from { opacity: 0; filter: blur(10px); transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .e-n-tabs .mrd-empty { animation: none; } }

/* About page. Roller: the blue band holds its stage on screen while the words roll (fx.js section 10). */
.mrd-roll__words ul, .mrd-lens ul { list-style: none; margin: 0; padding: 0; }
.mrd-roll__words li { line-height: 1.05; }
.mrd-roll__lead p, .mrd-roll__end p, .mrd-lens p { margin: 0; }
html.mfx-js .mrd-roll.is-live { min-height: 280vh; }
html.mfx-js .mrd-roll.is-live { justify-content: flex-start; }
html.mfx-js .mrd-roll.is-live > .e-con-inner { position: sticky; top: 0; flex: 0 0 auto; height: auto; min-height: 100vh; min-height: 100svh; justify-content: center; }
/* Column lines like the home hero, in white: they scroll past while the words hold still. */
.mrd-roll { position: relative; }
.mrd-roll::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 600px); width: 1201px; z-index: 0; pointer-events: none; background: linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px) 0 0 / 300px 100% repeat-x; }
.mrd-roll > .e-con-inner { position: relative; z-index: 1; }
@media (max-width: 1240px) { .mrd-roll::after { display: none; } }
/* One word shows at a time; the gap under each word keeps the next word's tall letters out of the window. */
.mrd-roll.is-live .mrd-roll__words ul { height: 1.2em; overflow: hidden; }
.mrd-roll.is-live .mrd-roll__words li { line-height: 1.2; padding-bottom: .4em; transform: translateY(calc(var(--i, 0) * -100%)); transition: transform .8s cubic-bezier(.16, 1, .3, 1); }
.mrd-roll.is-live .mrd-roll__end { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .8s cubic-bezier(.16, 1, .3, 1); }
.mrd-roll.is-live.is-end .mrd-roll__end { opacity: 1; transform: none; }
/* Lens: the item in focus is large and black, the others small and grey; the list keeps its height as focus moves. */
.mrd-lens li { line-height: 1.15; }
.mrd-lens.is-live li { color: #B9BEC8; font-size: .56em; transition: font-size .6s cubic-bezier(.16, 1, .3, 1), color .4s ease; cursor: default; }
.mrd-lens.is-live li + li { margin-top: .12em; }
.mrd-lens.is-live li.is-on { color: #000000; font-size: 1em; }
@media (prefers-reduced-motion: reduce) { .mrd-lens.is-live li { transition: none; } }

/* Customer support FAQ (dashboard): each question is a button, its answer opens below it. */
.mrd-faq { display: grid; gap: 12px; }
.mrd-faq__item { background: #fff; border-radius: 14px; box-shadow: inset 0 0 0 1px #E6E9EF; }
.mrd-faq__item > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-weight: 500; color: #000000; }
.mrd-faq__item > summary::-webkit-details-marker { display: none; }
.mrd-faq__item > summary::after { content: "+"; color: #000AD2; font-size: 22px; line-height: 1; transition: transform .25s ease; }
.mrd-faq__item[open] > summary::after { transform: rotate(45deg); }
.mrd-faq__item > summary:focus-visible { outline: 2px solid #000AD2; outline-offset: 2px; border-radius: 14px; }
.mrd-faq__a { padding: 0 20px 20px; color: #333333; animation: mrd-soon .5s cubic-bezier(.16, 1, .3, 1) both; }
.mrd-faq__a p { margin: 0 0 12px; }
.mrd-faq__ok { color: #12A46B; font-weight: 500; }
.mrd-faq textarea { width: 100%; border: 1px solid #D9DEE7; border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 14px; color: #000000; background: #fff; }
.mrd-faq textarea:focus { outline: 2px solid rgba(0,10,210,.25); border-color: #000AD2; }
.mrd-faq .mrd-form .mrd-btn { width: auto; }
.mrd-faq .mrd-faq__a .mrd-btn { padding: 12px 18px; line-height: 1; }
.mrd-faq .mrd-faq__a .mrd-btn--ghost { box-shadow: inset 0 0 0 1px #D9DEE7; }
@media (prefers-reduced-motion: reduce) { .mrd-faq__a { animation: none; } }
