/* Home page sections (Admin > CMS & Frontend > Custom Scripts & CSS).
   Everything is scoped under .mxh and follows the site theme colours. The class names are fixed: sections
   already saved on a site pick up any change made here. Scroll animations come from frontend/js/home-sections.js;
   without it (or with reduced motion) everything is simply shown. */
.mxh {
    --mxh-primary: var(--theme-primary, #1e293b);
    --mxh-accent: var(--theme-accent, #2563eb);
    --mxh-accent-soft: color-mix(in srgb, var(--mxh-accent) 9%, #fff);
    --mxh-accent-line: color-mix(in srgb, var(--mxh-accent) 28%, #fff);
    --mxh-dark: color-mix(in srgb, var(--mxh-primary) 82%, #000);
    --mxh-ink: #101828;
    --mxh-text: #344054;
    --mxh-muted: #667085;
    --mxh-line: #eaecf0;
    --mxh-line-hover: #d0d5dd;
    --mxh-soft: #f9fafb;
    --mxh-surface: #ffffff;
    --mxh-radius: 16px;
    --mxh-ease: cubic-bezier(.22, 1, .36, 1);
    --mxh-shadow-hover: 0 1px 2px rgba(16,24,40,.04), 0 16px 32px -18px rgba(16,24,40,.22);
    color: var(--mxh-text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.mxh *, .mxh *::before, .mxh *::after { box-sizing: border-box; }
.mxh h2, .mxh h3, .mxh h4 { color: var(--mxh-ink); margin: 0; line-height: 1.25; letter-spacing: -.015em; }
.mxh p { margin: 0; }
.mxh a { text-decoration: none; }
.mxh svg { flex-shrink: 0; }

/* section + heading */
.mxh-section { margin: 0 0 96px; }
.mxh-head { max-width: 620px; margin: 0 0 36px; }
.mxh-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--mxh-accent); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mxh-eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.mxh-head h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 750; }
.mxh-head p { margin-top: 12px; font-size: 16px; color: var(--mxh-muted); line-height: 1.6; }

/* buttons */
.mxh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 10px; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid transparent; transition: transform .25s var(--mxh-ease), background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .25s ease; }
.mxh-btn:hover { transform: translateY(-1px); }
.mxh-btn:active { transform: translateY(0); }
.mxh-btn-accent { background: var(--mxh-accent); color: #fff !important; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.mxh-btn-accent:hover { background: color-mix(in srgb, var(--mxh-accent) 88%, #000); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--mxh-accent) 80%, transparent); }
.mxh-btn-light { background: var(--mxh-surface); color: var(--mxh-ink) !important; border-color: var(--mxh-line-hover); box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.mxh-btn-light:hover { background: var(--mxh-soft); }
.mxh-btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.32); }
.mxh-btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.55); }

/* shared icon tile: soft accent square */
.mxh-hl-icon, .mxh-service-icon, .mxh-feature-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--mxh-accent); background: var(--mxh-accent-soft); border: 1px solid color-mix(in srgb, var(--mxh-accent) 14%, transparent); transition: background-color .3s ease, color .3s ease, border-color .3s ease; }

/* 1. highlights: one bar split into four */
.mxh-highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 8px 0 96px; border: 1px solid var(--mxh-line); border-radius: var(--mxh-radius); background: var(--mxh-surface); overflow: hidden; }
.mxh-hl { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px; }
.mxh-hl + .mxh-hl { border-left: 1px solid var(--mxh-line); }
.mxh-hl-icon { width: 38px; height: 38px; border-radius: 10px; }
.mxh-hl-icon svg { width: 19px; height: 19px; }
.mxh-hl h3 { font-size: 15px; font-weight: 650; }
.mxh-hl p { margin-top: 3px; font-size: 13.5px; color: var(--mxh-muted); line-height: 1.5; }

/* 2. services: cards with what the order needs */
.mxh-services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mxh-service { position: relative; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--mxh-line); border-radius: var(--mxh-radius); background: var(--mxh-surface); color: inherit; overflow: hidden; transition: transform .35s var(--mxh-ease), box-shadow .35s ease, border-color .3s ease; }
.mxh-service::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--mxh-accent); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--mxh-ease); }
.mxh-service:hover { transform: translateY(-3px); border-color: var(--mxh-line-hover); box-shadow: var(--mxh-shadow-hover); }
.mxh-service:hover::before { transform: scaleX(1); }
.mxh-service-icon { width: 44px; height: 44px; margin-bottom: 20px; border-radius: 12px; }
.mxh-service:hover .mxh-service-icon { background: var(--mxh-accent); border-color: var(--mxh-accent); color: #fff; }
.mxh-service h3 { font-size: 17px; font-weight: 700; }
.mxh-service > p { margin-top: 6px; font-size: 14.5px; color: var(--mxh-muted); line-height: 1.55; }
.mxh-service-need { align-self: flex-start; margin-top: 16px; padding: 5px 10px; border-radius: 8px; background: var(--mxh-soft); border: 1px solid var(--mxh-line); font-size: 12.5px; font-weight: 500; color: var(--mxh-text); }
.mxh-service .mxh-list { display: none; }
.mxh-list { list-style: none; margin: 16px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mxh-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--mxh-text); }
.mxh-list li::before { content: ""; width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; background: var(--mxh-accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.mxh-service-link { margin-top: auto; padding-top: 20px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; color: var(--mxh-accent); }
.mxh-service-link svg { transition: transform .3s var(--mxh-ease); }
.mxh-service:hover .mxh-service-link svg { transform: translateX(4px); }

/* 3. steps: a progress track that fills as the steps come into view */
.mxh-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.mxh-step { position: relative; padding: 0 28px 0 0; }
.mxh-step::before, .mxh-step::after { content: ""; position: absolute; top: 17px; left: 0; right: 0; height: 2px; }
.mxh-step::before { background: var(--mxh-line); }
.mxh-step::after { background: var(--mxh-accent); transform-origin: left; }
.mxh-step:last-child::before, .mxh-step:last-child::after { right: auto; width: 36px; }
.mxh-step-num { position: relative; z-index: 1; width: 36px; height: 36px; margin: 0 0 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--mxh-surface); border: 2px solid var(--mxh-accent); color: var(--mxh-accent); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 6px var(--mxh-surface); transition: background-color .4s ease, color .4s ease; }
.mxh-step h3 { font-size: 17px; font-weight: 700; }
.mxh-step p { margin-top: 6px; font-size: 14.5px; color: var(--mxh-muted); line-height: 1.55; }

/* 4. features: one panel split into a grid */
.mxh-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--mxh-line); border-radius: var(--mxh-radius); background: var(--mxh-line); overflow: hidden; }
.mxh-feature { display: flex; align-items: flex-start; gap: 16px; padding: 26px 24px; background: var(--mxh-surface); transition: background-color .3s ease; }
.mxh-feature:hover { background: var(--mxh-soft); }
.mxh-feature-icon { width: 38px; height: 38px; border-radius: 10px; }
.mxh-feature-icon svg { width: 19px; height: 19px; }
.mxh-feature:hover .mxh-feature-icon { background: var(--mxh-accent); border-color: var(--mxh-accent); color: #fff; }
.mxh-feature h3 { font-size: 16px; font-weight: 650; }
.mxh-feature p { margin-top: 5px; font-size: 14.5px; color: var(--mxh-muted); line-height: 1.55; }

/* 5. API / reseller band: dark theme panel with a faint grid */
.mxh-band { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 56px; border-radius: 20px; color: rgba(255,255,255,.78); background: var(--mxh-dark); }
.mxh-band::before { content: ""; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: radial-gradient(ellipse at 85% 30%, #000 0%, transparent 65%); mask-image: radial-gradient(ellipse at 85% 30%, #000 0%, transparent 65%); }
.mxh-band .mxh-eyebrow { color: #fff; opacity: .85; }
.mxh-band h2 { color: #fff; font-size: clamp(24px, 2.8vw, 32px); font-weight: 750; }
.mxh-band p { margin-top: 12px; font-size: 16px; line-height: 1.6; }
.mxh-band-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.mxh-band .mxh-btn-light { border-color: #fff; }
.mxh-band-card { padding: 26px 28px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); }
.mxh-band-card .mxh-list { margin: 0; gap: 0; }
.mxh-band-card .mxh-list li { padding: 13px 0; color: #fff; font-size: 15px; font-weight: 500; }
.mxh-band-card .mxh-list li + li { border-top: 1px solid rgba(255,255,255,.1); }
.mxh-band-card .mxh-list li:first-child { padding-top: 0; }
.mxh-band-card .mxh-list li:last-child { padding-bottom: 0; }
.mxh-band-card .mxh-list li::before { margin-top: 3px; background: color-mix(in srgb, var(--mxh-accent) 70%, #fff); }

/* 6. FAQ: rows divided by lines; .mxh-split puts the heading beside them */
.mxh-faq { max-width: 820px; display: flex; flex-direction: column; border-top: 1px solid var(--mxh-line); }
.mxh-faq details { border-bottom: 1px solid var(--mxh-line); }
.mxh-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; cursor: pointer; list-style: none; color: var(--mxh-ink); font-size: 16.5px; font-weight: 600; transition: color .2s ease; }
.mxh-faq summary:hover { color: var(--mxh-accent); }
.mxh-faq summary:focus-visible { outline: 2px solid var(--mxh-accent); outline-offset: 4px; border-radius: 4px; }
.mxh-faq summary::-webkit-details-marker { display: none; }
.mxh-faq summary::after { content: ""; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--mxh-line-hover); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .35s var(--mxh-ease), border-color .25s ease, background-color .25s ease; }
.mxh-faq details[open] summary::after { transform: rotate(45deg); border-color: var(--mxh-accent-line); background-color: var(--mxh-accent-soft); }
.mxh-faq details > p { padding: 0 56px 22px 0; font-size: 15px; color: var(--mxh-muted); line-height: 1.7; }
.mxh-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.mxh-split > .mxh-head { margin: 0; position: sticky; top: 100px; }

/* 7. closing call to action */
.mxh-cta { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 44px 48px; border-radius: 20px; border: 1px solid var(--mxh-accent-line); background: var(--mxh-accent-soft); }
.mxh-cta::before { content: ""; position: absolute; z-index: -1; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--mxh-accent) 22%, transparent) 1px, transparent 1px); background-size: 16px 16px; -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000); mask-image: linear-gradient(90deg, transparent 35%, #000); }
.mxh-cta h2 { color: var(--mxh-ink); font-size: clamp(22px, 2.5vw, 28px); font-weight: 750; }
.mxh-cta p { margin-top: 6px; color: var(--mxh-muted); font-size: 16px; }
.mxh-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

/* scroll reveal: home-sections.js puts html.mxh-anim and data-mxh-reveal on the blocks, then .is-in as they come into view */
html.mxh-anim .mxh [data-mxh-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--mxh-ease), transform .8s var(--mxh-ease), box-shadow .35s ease, border-color .3s ease, background-color .3s ease; transition-delay: var(--mxh-delay, 0s); }
html.mxh-anim .mxh [data-mxh-reveal="zoom"] { transform: translateY(14px) scale(.985); }
html.mxh-anim .mxh [data-mxh-reveal].is-in { opacity: 1; transform: none; }
/* after the entrance, hover movement works again without the reveal delay */
html.mxh-anim .mxh [data-mxh-reveal].is-done { transition-delay: 0s; transition-duration: .35s; }
html.mxh-anim .mxh .mxh-service.is-done:hover { transform: translateY(-3px); }
/* steps: the track fills from left to right, one step after another */
html.mxh-anim .mxh .mxh-step::after { transform: scaleX(0); transition: transform .7s var(--mxh-ease); transition-delay: calc(var(--mxh-delay, 0s) + .25s); }
html.mxh-anim .mxh .mxh-step.is-in::after { transform: scaleX(1); }
html.mxh-anim .mxh .mxh-step .mxh-step-num { transition-delay: calc(var(--mxh-delay, 0s) + .2s); }
html.mxh-anim .mxh .mxh-step.is-in .mxh-step-num { background: var(--mxh-accent); color: #fff; }
html:not(.mxh-anim) .mxh .mxh-step-num { background: var(--mxh-accent); color: #fff; }

/* tablet */
@media (max-width: 1199px) {
    .mxh-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mxh-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
    .mxh-step:nth-child(2)::before, .mxh-step:nth-child(2)::after { right: auto; width: 36px; }
    .mxh-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mxh-hl:nth-child(3) { border-left: 0; }
    .mxh-hl:nth-child(n+3) { border-top: 1px solid var(--mxh-line); }
    .mxh-band { grid-template-columns: 1fr; padding: 44px; gap: 32px; }
}
@media (max-width: 991px) {
    .mxh-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mxh-cta { flex-direction: column; align-items: flex-start; }
    .mxh-split { grid-template-columns: 1fr; gap: 24px; }
    .mxh-split > .mxh-head { position: static; }
}
/* phone */
@media (max-width: 640px) {
    .mxh { font-size: 14px; }
    .mxh-section { margin-bottom: 64px; }
    .mxh-head { margin-bottom: 28px; }
    .mxh-head p { font-size: 15px; }
    .mxh-highlights { grid-template-columns: 1fr; margin-bottom: 64px; }
    .mxh-hl { padding: 16px 18px; }
    .mxh-hl + .mxh-hl { border-left: 0; border-top: 1px solid var(--mxh-line); }
    .mxh-services, .mxh-features { grid-template-columns: 1fr; }
    .mxh-service { padding: 22px 20px; }
    .mxh-service-icon { margin-bottom: 16px; }
    .mxh-steps { grid-template-columns: 1fr; row-gap: 0; }
    .mxh-step { display: grid; grid-template-columns: 36px 1fr; column-gap: 16px; padding: 0 0 28px; }
    .mxh-step::before, .mxh-step::after, .mxh-step:nth-child(2)::before, .mxh-step:nth-child(2)::after { top: 36px; bottom: 0; left: 17px; right: auto; width: 2px; height: auto; }
    .mxh-step::after { transform-origin: top; }
    html.mxh-anim .mxh .mxh-step::after { transform: scaleY(0); }
    html.mxh-anim .mxh .mxh-step.is-in::after { transform: scaleY(1); }
    .mxh-step:last-child { padding-bottom: 0; }
    .mxh-step:last-child::before, .mxh-step:last-child::after { display: none; }
    .mxh-step-num { grid-row: span 2; margin: 0; }
    .mxh-step h3 { align-self: end; margin-top: 6px; }
    .mxh-feature { padding: 20px 18px; }
    .mxh-band { padding: 32px 22px; border-radius: 18px; }
    .mxh-band-card { padding: 20px; }
    .mxh-band-actions .mxh-btn, .mxh-cta-actions .mxh-btn { flex: 1 1 100%; }
    .mxh-cta { padding: 30px 22px; border-radius: 18px; }
    .mxh-cta-actions { width: 100%; }
    .mxh-faq summary { padding: 17px 0; font-size: 15.5px; }
    .mxh-faq details > p { padding: 0 0 18px; font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
    .mxh *, .mxh *::before, .mxh *::after { transition: none !important; animation: none !important; }
    html.mxh-anim .mxh [data-mxh-reveal] { opacity: 1; transform: none; }
}
@media print {
    html.mxh-anim .mxh [data-mxh-reveal] { opacity: 1 !important; transform: none !important; }
}

/* dark mode (html.mx-dark, chosen by the visitor) */
html.mx-dark .mxh { --mxh-ink: #f5f7fa; --mxh-text: #cbd5e1; --mxh-muted: #94a3b8; --mxh-line: rgba(148,163,184,.16); --mxh-line-hover: rgba(148,163,184,.32); --mxh-soft: #131c30; --mxh-surface: #0f1729; --mxh-accent-soft: color-mix(in srgb, var(--mxh-accent) 14%, transparent); --mxh-accent-line: color-mix(in srgb, var(--mxh-accent) 35%, transparent); --mxh-dark: #0b1222; --mxh-shadow-hover: 0 16px 32px -18px rgba(0,0,0,.6); }
html.mx-dark .mxh-eyebrow, html.mx-dark .mxh-service-link { color: color-mix(in srgb, var(--mxh-accent) 65%, #fff); }
html.mx-dark .mxh-hl-icon, html.mx-dark .mxh-service-icon, html.mx-dark .mxh-feature-icon { color: color-mix(in srgb, var(--mxh-accent) 65%, #fff); }
html.mx-dark .mxh-band { border: 1px solid rgba(148,163,184,.16); }
html.mx-dark .mxh-band .mxh-btn-light { background: #fff; color: #0b1220 !important; }
html.mx-dark .mxh-faq summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E"); }
