/* Google reCAPTCHA (all forms) + enquiry popup */

/* ---------- captcha ---------- */
.mc-captcha { position: relative; }
.mc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mc-captcha-slot { width: 304px; min-height: 78px; background: #f9f9f9; border-radius: 3px; }
.mc-captcha-slot:has(iframe) { background: transparent; }
.mc-captcha .is-invalid ~ .invalid-feedback { display: block; }
@media (max-width: 359.98px) {
    .mc-captcha-slot { transform: scale(.88); transform-origin: left top; height: 69px; min-height: 0; }
}

/* ---------- popup ---------- */
.mce {
    --mce-deep: #014a44; --mce-darker: #012b27; --mce-field: #eef6f6; --mce-ink: #0f2a28;
    --mce-teal: #008080; --mce-orange: #ff7043; --mce-green: #2fd287;
    position: fixed; inset: 0; z-index: 100000; display: flex; padding: 16px; overflow-y: auto;
    background: rgba(1, 43, 39, .62); color: var(--mce-ink); opacity: 0; transition: opacity .3s ease;
}
.mce[hidden] { display: none; }
.mce.is-open { opacity: 1; }
.mce.is-closing { opacity: 0; transition-duration: .2s; }
.mce-shell {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); width: min(1000px, 100%); margin: auto;
    border-radius: 16px; overflow: hidden; background: #fff; outline: 0; box-shadow: 0 30px 80px rgba(1, 43, 39, .42);
}

/* the platform side */
.mce-side { display: flex; flex-direction: column; min-width: 0; padding: 34px 30px 26px; background: var(--mce-deep); color: #fff; overflow: hidden; }
.mce-title { font-size: clamp(32px, 3.2vw, 42px); font-weight: 700; line-height: 1.05; letter-spacing: -.03em; color: #fff; margin: 0 0 12px; }
.mce-lead { font-size: 16px; line-height: 1.5; color: #d9eeeb; margin: 0 0 16px; }
.mce-scene { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 215px; padding-bottom: 8px; }

/* the platform: vehicles, machines and environment feed one live dashboard through MICROCIL */
.mce-sys { position: relative; width: min(100%, 370px); aspect-ratio: 360 / 210; margin: 0 auto; }
.mce-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mce-link { fill: none; stroke: #2b7f77; stroke-width: 2; }
.mce-pulse { fill: none; stroke: #ffb199; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 14 86; stroke-dashoffset: 14; }
.mce-node { position: absolute; left: 11.2%; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: #0b6b63; color: #fff; font-size: 19px; }
.mce-node small { position: absolute; top: 37px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; line-height: 1.2; color: #d9eeeb; white-space: nowrap; }
.mce-node-a { top: 16.7%; }
.mce-node-b { top: 50%; }
.mce-node-c { top: 83.3%; }
.mce-hub { position: absolute; left: 43.3%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; overflow: hidden; background: var(--mce-teal); box-shadow: 0 0 0 4px rgba(255, 255, 255, .22); }
.mce-hub img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mce-board { position: absolute; left: 57.2%; right: 0; top: 7%; bottom: 7%; display: flex; flex-direction: column; gap: 6px; padding: 9px; border-radius: 9px; background: #fff; color: var(--mce-ink); }
.mce-board-top { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.mce-live { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--mce-green); }
.mce-chart { display: block; width: 100%; flex: 1; min-height: 0; }
.mce-chart-line { fill: none; stroke: var(--mce-teal); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mce-bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.mce-bars span { flex: 1; height: 100%; border-radius: 2px 2px 0 0; background: var(--mce-teal); transform-origin: bottom; }
.mce-bars span:nth-child(1) { transform: scaleY(.45); } .mce-bars span:nth-child(2) { transform: scaleY(.7); }
.mce-bars span:nth-child(3) { transform: scaleY(.55); } .mce-bars span:nth-child(4) { transform: scaleY(.9); background: var(--mce-orange); }
.mce-bars span:nth-child(5) { transform: scaleY(.62); } .mce-bars span:nth-child(6) { transform: scaleY(.8); } .mce-bars span:nth-child(7) { transform: scaleY(.5); }
.mce-states { display: flex; gap: 4px; }
.mce-states span { flex: 1; height: 5px; border-radius: 3px; background: var(--mce-green); }
.mce-states span:nth-child(2) { background: #ffc043; }
.mce-direct { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 16px; }
.mce-direct a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #fff; text-decoration: none; }
.mce-direct a:hover { color: #ffc4b2; }
.mce-direct i { color: #ff9a7c; font-size: 16px; }

/* the form side */
.mce-main { position: relative; min-width: 0; padding: 30px 30px 26px; background: #fff; }
.mce-close {
    position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--mce-field); color: var(--mce-ink); font-size: 21px;
    transition: background .2s ease, color .2s ease, transform .3s ease;
}
.mce-close:hover { background: var(--mce-orange); color: #fff; transform: rotate(90deg); }
.mce-close:focus-visible, .mce-send:focus-visible { outline: 3px solid var(--mce-orange); outline-offset: 2px; }
.mce-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 22px; }
.mce-form[hidden] { display: none; }
.mce-wide { grid-column: 1 / -1; }
.mce-field label { display: block; font-size: 14px; font-weight: 600; color: var(--mce-ink); margin-bottom: 5px; }
.mce-field label span { font-weight: 400; color: #4b5563; }
.mce .form-control {
    width: 100%; min-height: 46px; padding: 10px 13px; font-size: 16px; color: var(--mce-ink);
    background-color: var(--mce-field); border: 2px solid transparent; border-radius: 8px; box-shadow: none;
    transition: border-color .2s ease, background-color .2s ease;
}
.mce select.form-control { appearance: auto; }
.mce textarea.form-control { min-height: 62px; resize: vertical; }
.mce .form-control:focus { color: var(--mce-ink); background-color: #fff; border-color: var(--mce-teal); box-shadow: none; }
.mce .form-control.is-invalid { background-image: none; border-color: #dc3545; padding-right: 13px; }
.mce-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.mce-send {
    display: inline-flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 7px 6px 20px; border: 0; border-radius: 8px;
    background: var(--mce-teal); color: #fff; font-size: 16px; font-weight: 700; transition: background .25s ease, transform .15s ease;
}
.mce-send:hover { background: var(--mce-darker); }
.mce-send:active { transform: scale(.97); }
.mce-send:disabled { opacity: .7; cursor: wait; }
.mce-send-arrow { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 6px; background: var(--mce-orange); font-size: 19px; transition: transform .25s ease; }
.mce-send:hover .mce-send-arrow { transform: translateX(2px); }
.mce-done-close { padding-right: 22px; }
.mce-error { margin: 0; padding: 10px 14px; border-radius: 8px; background: #fdecea; color: #a4231a; font-size: 14px; font-weight: 600; }
.mce-error[hidden] { display: none; }
.mce-done { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 100%; outline: 0; }
.mce-done[hidden] { display: none; }
.mce-done-mark { display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 50%; background: var(--mce-green); color: var(--mce-darker); font-size: 38px; margin-bottom: 20px; animation: mcePop .5s cubic-bezier(.34, 1.56, .64, 1) both; }
.mce-done h3 { font-size: 34px; font-weight: 700; letter-spacing: -.02em; color: var(--mce-teal); margin: 0 0 8px; }
.mce-done p { font-size: 17px; line-height: 1.5; color: var(--mce-ink); margin: 0 0 22px; overflow-wrap: anywhere; }

html.mce-lock { overflow: hidden; }
#contactForm { scroll-margin-top: 150px; }

/* motion */
@media (prefers-reduced-motion: no-preference) {
    .mce.is-open .mce-shell { animation: mceRise .5s cubic-bezier(.16, 1, .3, 1) both; }
    .mce.is-open .mce-field { animation: mceField .45s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(140ms + var(--i) * 50ms); }
    .mce.is-closing .mce-shell { animation: mceOut .2s ease both; }

    /* data travels from each source into MICROCIL and out to the dashboard */
    .mce.is-open .mce-pulse { animation: mceData 1.5s linear infinite; }
    .mce.is-open .mce-pulse-b { animation-delay: .35s; }
    .mce.is-open .mce-pulse-c { animation-delay: .7s; }
    .mce.is-open .mce-pulse-d { animation-delay: .5s; animation-duration: .9s; }
    .mce.is-open .mce-node { animation: mceNode .5s cubic-bezier(.16, 1, .3, 1) both; }
    .mce.is-open .mce-node-b { animation-delay: .1s; }
    .mce.is-open .mce-node-c { animation-delay: .2s; }
    .mce.is-open .mce-hub { animation: mceHub 1.8s ease-in-out infinite; }
    .mce.is-open .mce-board { animation: mceBoard .6s .2s cubic-bezier(.16, 1, .3, 1) both; }
    .mce.is-open .mce-live { animation: mceLive 1.2s ease-in-out infinite; }
    .mce.is-open .mce-chart-line { stroke-dasharray: 100; animation: mceChart 3.6s ease-in-out infinite; }
    .mce.is-open .mce-bars span { animation: mceBar 1.8s ease-in-out infinite alternate; }
    .mce.is-open .mce-bars span:nth-child(2) { animation-delay: -.5s; }
    .mce.is-open .mce-bars span:nth-child(3) { animation-delay: -1.1s; }
    .mce.is-open .mce-bars span:nth-child(4) { animation-delay: -.2s; }
    .mce.is-open .mce-bars span:nth-child(5) { animation-delay: -1.5s; }
    .mce.is-open .mce-bars span:nth-child(6) { animation-delay: -.8s; }
    .mce.is-open .mce-bars span:nth-child(7) { animation-delay: -1.3s; }
    .mce.is-open .mce-states span:nth-child(2) { animation: mceLive 1.6s ease-in-out infinite; }

    /* request sent: every link and status turns green */
    .mce.is-sent .mce-pulse { stroke: var(--mce-green); }
    .mce.is-sent .mce-states span { background: var(--mce-green); animation: none; }
}
@keyframes mceRise { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes mceOut { to { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes mceField { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mcePop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mceData { from { stroke-dashoffset: 14; opacity: 1; } 90% { opacity: 1; } to { stroke-dashoffset: -86; opacity: 0; } }
@keyframes mceNode { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes mceHub { 50% { box-shadow: 0 0 0 9px rgba(255, 255, 255, .08); } }
@keyframes mceBoard { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes mceLive { 50% { opacity: .35; } }
@keyframes mceChart { 0% { stroke-dashoffset: 100; } 55%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
@keyframes mceBar { from { transform: scaleY(.3); } to { transform: scaleY(1); } }

/* tablets and phones: a small live dashboard rides beside the title */
@media (max-width: 860px) {
    .mce { padding: 8px; }
    .mce-shell { display: block; }
    .mce-side { position: relative; display: block; min-height: 84px; padding: 16px 150px 14px 16px; }
    .mce-title { font-size: 25px; margin: 0; text-align: left; }
    .mce-lead { font-size: 14px; margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .mce-direct { display: none; }
    .mce-scene { position: absolute; right: 54px; top: 8px; bottom: 8px; width: 88px; min-height: 0; padding: 0; }
    .mce-sys { width: 100%; height: 100%; aspect-ratio: auto; }
    .mce-links, .mce-node, .mce-hub, .mce-board-top, .mce-chart { display: none; }
    .mce-board { inset: 0; gap: 4px; padding: 6px; }
    .mce-bars { flex: 1; height: auto; min-height: 0; }
    .mce-states span { height: 4px; }
    .mce-main { position: static; padding: 14px 16px 18px; }
    .mce-close { top: 8px; right: 8px; background: rgba(255, 255, 255, .16); color: #fff; }
    .mce-shell { position: relative; }
    .mce-form { padding-top: 0; gap: 11px; }
    .mce .form-control { min-height: 42px; padding-top: 7px; padding-bottom: 7px; }
    .mce textarea.form-control { min-height: 46px; height: 46px; }
    .mce-field label { margin-bottom: 3px; }
    .mce-send { justify-content: space-between; width: 100%; }
    .mce-done { padding: 14px 2px; }
}
@media (max-width: 480px) {
    .mce-form { grid-template-columns: 1fr; }
    .mce-lead { display: none; }
    .mce-side { min-height: 70px; display: flex; align-items: flex-start; justify-content: center; }
}
@media (max-height: 720px) and (min-width: 861px) {
    .mce-scene { min-height: 150px; }
    .mce-sys { width: min(100%, 270px); }
    .mce-title { font-size: 32px; }
    .mce-main { padding-top: 22px; padding-bottom: 18px; }
    .mce-form { gap: 9px 14px; }
}
