/* ================================================================
   MACHINENOVA — SITE LAYER
   Loaded last on every page. Owns:
   1. One typeface (Lexend, as on eCitizen) everywhere, icon fonts protected
   2. Rounded-corner system
   3. Scrolling (native smooth scroll, header offset, one progress bar)
   4. Screenshot / gallery / phone components
   5. Lazy-image fade-in
   ================================================================ */

:root {
  --font: 'Lexend', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-primary: var(--font);
  --font-heading: var(--font);
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;
  --header-h: 96px;   /* kept in sync with the real header by site.js */
  --subnav-h: 0px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 1. Typography: a single family ─────────────────────────────── */
html, body, body *:not(i):not(.fa):not([class*="fa-"]) {
  font-family: var(--font) !important;
}
h1, h2, h3, .cx-page-hero h1 { letter-spacing: -0.02em; }
h1, h2 { font-weight: 800 !important; }

/* Icon fonts must never inherit the text font */
html body .fa, html body .fas, html body .fa-solid,
html body .far, html body .fa-regular {
  font-family: 'Font Awesome 6 Free' !important;
  font-style: normal;
}
html body .fa, html body .fas, html body .fa-solid { font-weight: 900 !important; }
html body .far, html body .fa-regular { font-weight: 400 !important; }
html body .fab, html body .fa-brands {
  font-family: 'Font Awesome 6 Brands' !important;
  font-weight: 400 !important;
  font-style: normal;
}

/* ── 2. Scrolling ───────────────────────────────────────────────── */
html { scroll-behavior: auto !important; }
html.smooth-scroll { scroll-behavior: smooth !important; }
html {
  scroll-padding-top: calc(var(--header-h) + var(--subnav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  opacity: 1 !important;           /* no blank-page fade; content paints immediately */
  overscroll-behavior-y: none;
  text-rendering: optimizeLegibility;
}
html.nav-open, html.nav-open body { overflow: hidden; }

.header {
  position: sticky !important;
  top: 0;
  z-index: 1000;
  transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease !important;
  will-change: auto !important;
}
.header.is-scrolled {
  background: rgba(10, 10, 10, 0.86) !important;
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35) !important;
}

/* single progress bar, GPU-composited */
.scroll-progress { display: none !important; }
.mn-progress-bar {
  position: fixed; inset: 0 0 auto 0; height: 3px; width: 100% !important;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--blue), #B47CFF);
  z-index: 10001; pointer-events: none;
}

/* Reveal: only hidden once JS opts in, so content never disappears without JS */
/* Reveal styles live in the "SCROLL REVEAL" block at the end of this file */

/* ── 3. Rounded corners ─────────────────────────────────────────── */
.cx-btn, .cx-btn-outline, .btn, .cta-btn, .phone-btn,
.btn-primary, .btn-secondary, .btn-next, .btn-prev, .btn-submit {
  border-radius: var(--r-pill) !important;
}
.cx-btn, .cx-btn-outline { padding: .9rem 1.6rem; display: inline-flex; align-items: center; gap: .55rem; }
.cx-btn i, .cx-btn-outline i { font-size: .85em; transition: transform .25s var(--ease); }
.cx-btn:hover i, .cx-btn-outline:hover i { transform: translateX(3px); }
.cx-btn-full { display: flex !important; justify-content: center; }

.cx-form input, .cx-form select, .cx-form textarea,
.form-group input, .form-group select, .form-group textarea,
input, select, textarea { border-radius: var(--r-sm) !important; }

.hero-box { border-radius: var(--r-xl) !important; }
.cx-form-card, .cx-data-card, .cx-cmd-card, .cx-case-card, .cx-sec-card,
.cx-ap-plat, .cx-ap-why-item, .form-step, .booking-form, .booking-container {
  border-radius: var(--r-lg) !important;
}
.cx-dc-s, .cx-mob-row, .dropdown-menu { border-radius: var(--r-sm) !important; }
.cx-case-tag, .cx-cs-tag, .cx-cmd-st, .cx-photo-badge { border-radius: var(--r-pill) !important; }
.cx-photo-badge { padding: .55rem 1rem; }
.cx-bar-track, .cx-bar-fill, .cx-cmd-track, .cx-cmd-fill, .mn-bar-wrap, .mn-bar { border-radius: var(--r-pill) !important; }
.cx-photo-wrap, .cx-ap-photo-main, .cx-ap-photo-side { border-radius: var(--r-lg) !important; }
.cx-social a { border-radius: var(--r-sm) !important; }

/* Joined grids become separated rounded cards */
.cx-overview-grid, .cx-for-grid {
  gap: 1rem !important; background: transparent !important; border: 0 !important;
  border-radius: 0 !important; overflow: visible !important;
}
.cx-ov-card, .cx-for-card {
  border: 1px solid var(--border-d); border-radius: var(--r-lg);
  transition: background .25s ease, border-color .25s ease, transform .35s var(--ease) !important;
}
.cx-ov-card:hover, .cx-for-card:hover { transform: translateY(-4px); border-color: rgba(139,44,245, .5); }
.cx-ov-card--featured { border-color: var(--blue); }

/* Security pillars & feature items become soft cards */
.cx-sec-pillar, .cx-feat-item {
  border: 1px solid var(--border-d) !important;
  border-radius: var(--r-md);
  padding: 1.1rem 1.15rem !important;
  background: rgba(255, 255, 255, .02);
  transition: border-color .25s ease, background .25s ease;
}
.cx-sec-pillar:hover, .cx-feat-item:hover { border-color: rgba(139,44,245, .55) !important; background: rgba(139,44,245, .05); }
.cx-spotlight-list li { border-left: 0 !important; padding-left: 0 !important; display: flex; gap: .7rem; align-items: baseline; }
.cx-faq { border: 1px solid var(--border-d) !important; border-radius: var(--r-md); padding: 0 1.2rem; margin-bottom: .7rem; background: rgba(255,255,255,.02); }
.cx-faq.open { border-color: rgba(139,44,245, .5) !important; }

/* Icon chips */
.mn-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: var(--r-sm);
  background: rgba(139,44,245, .12);
  color: #B47CFF;
  font-size: 1rem;
  margin-bottom: .9rem;
}
.cx-ov-card--featured .mn-ico { background: rgba(255,255,255,.18); color: #fff; }
.mn-ico--sm { width: 32px; height: 32px; font-size: .82rem; margin: 0 0 .6rem; border-radius: 10px; }
.cx-spotlight-list li i { color: var(--blue); font-size: .8rem; }
.cx-faq-icon { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(139,44,245,.12); font-size: .75rem !important; }
.cx-cta-details div { display: flex; align-items: center; gap: .7rem; }
.cx-cta-details i, .cx-footer-col i { color: var(--blue); width: 16px; text-align: center; }
.dd-arrow { font-size: .65rem !important; margin-left: .15rem; }
.cx-social:empty { display: none; }

/* Header nav polish */
.nav-menu a.active { color: var(--white); }
.cta-btn { display: inline-flex; align-items: center; gap: .5rem; }

/* Hero */
.hero h1, .hero h1 .word { color: var(--white); }
.phone-screen--shot { padding: 0 !important; background: #fff !important; overflow: hidden; }
.phone-screen--shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

/* ── 4. Lazy images ─────────────────────────────────────────────── */
img { max-width: 100%; height: auto; }

/* ── 5. Screenshot components ───────────────────────────────────── */
.shot {
  display: block; position: relative; margin: 0;
  border-radius: var(--r-lg); overflow: hidden;
  background: #f4f5f3;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .4);
  cursor: zoom-in;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.shot:hover { transform: translateY(-4px); box-shadow: 0 40px 80px -24px rgba(139,44,245, .35), 0 0 0 1px rgba(139,44,245, .35); }
.shot img { display: block; width: 100%; height: auto; }
.shot::before { /* browser-chrome strip */
  content: ''; display: block; height: 26px;
  position: static !important; width: auto !important; transform: none !important;
  background-color: #1b1b1b;
  background-image: radial-gradient(circle at 16px 13px, #ff5f57 4px, transparent 4.5px),
                    radial-gradient(circle at 32px 13px, #febc2e 4px, transparent 4.5px),
                    radial-gradient(circle at 48px 13px, #28c840 4px, transparent 4.5px);
}
.shot--bare::before { display: none; }
.shot figcaption, .shot-cap {
  font-size: .8rem; color: var(--gray-l); line-height: 1.5;
}
.shot-cap { margin-top: .85rem; display: flex; gap: .6rem; align-items: baseline; }
.shot-cap strong { color: var(--white); font-weight: 700; white-space: nowrap; }

.shot-stack { display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: calc(var(--header-h) + 24px); }
.shot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Phone frame for mobile app screenshots */
.phone-shot {
  position: relative; display: block;
  border-radius: 34px; padding: 9px;
  background: linear-gradient(160deg, #2a2a2a, #111);
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255,255,255,.06);
  cursor: zoom-in;
  transition: transform .45s var(--ease);
}
.phone-shot:hover { transform: translateY(-6px) rotate(-.4deg); }
.phone-shot img { display: block; width: 100%; height: auto; border-radius: 26px; background: #fff; }
.phone-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; align-items: start;
}
.phone-row figure { margin: 0; }
.phone-row figcaption { margin-top: 1rem; font-size: .82rem; color: var(--gray-l); line-height: 1.55; }
.phone-row figcaption strong { display: block; color: var(--white); font-size: .9rem; margin-bottom: .2rem; }

/* Section shell used by new sections */
.mn-section { padding: 110px 0; border-top: 1px solid var(--border-d); background: var(--black); }
.mn-section--alt { background: var(--dark); }
.mn-head { max-width: 760px; margin-bottom: 3rem; }
.mn-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.mn-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: var(--white); line-height: 1.15; margin-bottom: 1rem; }
.mn-head p { color: var(--gray-l); font-size: 1rem; line-height: 1.8; }

/* Tabbed gallery */
.mn-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap; padding: .35rem;
  background: var(--card-d); border: 1px solid var(--border-d);
  border-radius: var(--r-pill); width: fit-content; max-width: 100%;
  margin: 0 auto 2.2rem; overflow-x: auto; scrollbar-width: none;
}
.mn-tabs::-webkit-scrollbar { display: none; }
.mn-tab {
  border: 0; background: transparent; color: var(--gray-l);
  font-weight: 600; font-size: .85rem; padding: .7rem 1.15rem;
  border-radius: var(--r-pill); cursor: pointer; white-space: nowrap;
  display: inline-flex; gap: .5rem; align-items: center;
  transition: background .25s ease, color .25s ease;
}
.mn-tab:hover { color: var(--white); }
.mn-tab[aria-selected="true"] { background: var(--blue); color: #fff; }
.mn-panel { display: grid; grid-template-columns: 1.55fr 1fr; gap: 3rem; align-items: center; }
.mn-panel[hidden] { display: none; }
.mn-panel h3 { font-size: 1.5rem; color: var(--white); margin-bottom: .8rem; line-height: 1.25; }
.mn-panel p { color: var(--gray-l); font-size: .95rem; line-height: 1.8; margin-bottom: 1.2rem; }
.mn-panel.is-entering { animation: mnFade .5s var(--ease); }
@keyframes mnFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.mn-checks { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .65rem; }
.mn-checks li { display: flex; gap: .7rem; align-items: baseline; color: var(--gray-l); font-size: .9rem; line-height: 1.6; }
.mn-checks li i { color: var(--blue); font-size: .8rem; flex-shrink: 0; }
.mn-checks li strong { color: var(--white); }

/* Horizontal scroll-snap strip */
.mn-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 34%);
  gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .5rem .25rem 1.5rem; scrollbar-width: thin; scrollbar-color: #333 transparent;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.mn-strip > * { scroll-snap-align: start; }
.mn-strip::-webkit-scrollbar { height: 6px; }
.mn-strip::-webkit-scrollbar-thumb { background: #333; border-radius: 99px; }

/* Steps */
.mn-steps { counter-reset: step; display: grid; gap: 1rem; margin: 0 0 1.8rem; padding: 0; list-style: none; }
.mn-steps li {
  counter-increment: step; position: relative;
  padding: 1rem 1.1rem 1rem 3.6rem;
  border: 1px solid var(--border-d); border-radius: var(--r-md);
  background: rgba(255,255,255,.02); color: var(--gray-l); font-size: .88rem; line-height: 1.65;
}
.mn-steps li::before {
  content: counter(step); position: absolute; left: 1rem; top: 1rem;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 800; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}
.mn-steps li strong { display: block; color: var(--white); margin-bottom: .15rem; }

/* Data tables (roles, glossary, troubleshooting) */
.mn-table-wrap { border: 1px solid var(--border-d); border-radius: var(--r-lg); overflow: hidden; overflow-x: auto; background: var(--card-d); }
.mn-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 560px; }
.mn-table th { text-align: left; font-size: .7rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gray); font-weight: 700; padding: 1rem 1.2rem; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--border-d); }
.mn-table td { padding: 1rem 1.2rem; color: var(--gray-l); border-bottom: 1px solid var(--border-d); vertical-align: top; line-height: 1.6; }
.mn-table tr:last-child td { border-bottom: 0; }
.mn-table td:first-child { color: var(--white); font-weight: 600; white-space: nowrap; }

.mn-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; padding: .28rem .7rem; border-radius: var(--r-pill); white-space: nowrap; }
.mn-pill--green { background: rgba(34,197,94,.14); color: #4ade80; }
.mn-pill--amber { background: rgba(245,158,11,.14); color: #fbbf24; }
.mn-pill--red { background: rgba(239,68,68,.14); color: #f87171; }
.mn-pill--blue { background: rgba(139,44,245,.16); color: #B47CFF; }
.mn-pill--grey { background: rgba(255,255,255,.08); color: #bbb; }

/* Card grid */
.mn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.mn-grid--4 { grid-template-columns: repeat(4, 1fr); }
.mn-grid--2 { grid-template-columns: repeat(2, 1fr); }
.mn-card {
  background: var(--card-d); border: 1px solid var(--border-d); border-radius: var(--r-lg);
  padding: 1.6rem; transition: border-color .25s ease, transform .35s var(--ease);
}
.mn-card:hover { border-color: rgba(139,44,245,.5); transform: translateY(-3px); }
.mn-card h4 { color: var(--white); font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.mn-card p { color: var(--gray-l); font-size: .86rem; line-height: 1.7; margin: 0; }
.mn-card .mn-pill { margin-bottom: .8rem; }

/* Callout */
.mn-callout {
  display: flex; gap: 1rem; align-items: flex-start;
  border: 1px solid rgba(139,44,245,.35); background: rgba(139,44,245,.07);
  border-radius: var(--r-md); padding: 1.1rem 1.2rem; margin: 0 0 1.5rem;
}
.mn-callout i { color: #B47CFF; margin-top: .2rem; }
.mn-callout p { margin: 0 !important; font-size: .88rem !important; color: #cfd8ff !important; line-height: 1.7 !important; }
.mn-callout strong { color: var(--white); }

/* Stats band */
.mn-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.mn-stat { background: var(--card-d); border: 1px solid var(--border-d); border-radius: var(--r-lg); padding: 1.5rem; }
.mn-stat b { display: block; font-size: 2rem; font-weight: 800; color: var(--white); letter-spacing: -.02em; line-height: 1.1; }
.mn-stat span { font-size: .8rem; color: var(--gray-l); }

/* Platform sub-nav: sticky, pill style */
.cx-plat-nav { position: sticky; top: var(--header-h); z-index: 900; background: rgba(20,20,20,.9) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.cx-plat-nav .container { gap: .35rem !important; padding-top: .6rem; padding-bottom: .6rem; overflow-x: auto; scrollbar-width: none; }
.cx-plat-nav .container::-webkit-scrollbar { display: none; }
.cx-plat-nav a { border: 0 !important; border-radius: var(--r-pill); padding: .6rem 1.05rem !important; }
.cx-plat-nav a.is-active { background: var(--blue); color: #fff !important; }

/* ── Lightbox ───────────────────────────────────────────────────── */
.mn-lightbox {
  border: 0; padding: 0; margin: auto; background: transparent;
  max-width: min(1400px, 94vw); max-height: 92vh; overflow: visible;
}
.mn-lightbox::backdrop { background: rgba(0,0,0,.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mn-lightbox img { display: block; max-width: min(1400px, 94vw); max-height: 84vh; width: auto; height: auto; border-radius: var(--r-md); margin: 0 auto; background: #fff; }
.mn-lightbox p { color: #ddd; text-align: center; font-size: .9rem; margin-top: .9rem; }
.mn-lightbox button {
  position: absolute; top: -18px; right: -18px; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: #fff; color: #111; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

/* Toast (used by booking.js) */
.mn-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 10002;
  background: #111; color: #fff; border: 1px solid var(--border-d);
  border-left: 3px solid var(--blue); border-radius: var(--r-md);
  padding: .95rem 1.2rem; font-size: .9rem; max-width: 360px;
  box-shadow: 0 20px 40px rgba(0,0,0,.45);
  animation: mnFade .35s var(--ease);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .mn-panel { grid-template-columns: 1fr; gap: 1.8rem; }
  .mn-grid, .mn-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .phone-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mn-stats { grid-template-columns: repeat(2, 1fr); }
  .shot-stack { position: static; }
  .mn-strip { grid-auto-columns: minmax(260px, 70%); }
}
@media (max-width: 768px) {
  :root { --header-h: 89px; }
  .mn-section { padding: 72px 0; }
  .cx-overview, .cx-about, .cx-for, .cx-spotlight, .cx-security-block, .cx-cases-teaser,
  .cx-faqs, .cx-contact-cta, .cx-plat-section, .cx-about-page-section { padding: 72px 0 !important; }
  .mn-grid, .mn-grid--4, .mn-grid--2 { grid-template-columns: 1fr; }
  .shot-pair { grid-template-columns: 1fr; }
  .hero-box { border-radius: var(--r-lg) !important; }
  .mn-tabs { border-radius: var(--r-md); width: 100%; flex-wrap: nowrap; justify-content: flex-start; }
  .mn-strip { grid-auto-columns: 82%; }
  .mn-lightbox button { top: 8px; right: 8px; }
  .cx-plat-nav { top: var(--header-h); }
}
@media (max-width: 480px) {
  .phone-row { gap: 1rem; }
  .mn-stats { grid-template-columns: 1fr 1fr; }
  .mn-stat b { font-size: 1.5rem; }
}

/* Header CTA is a link now */
a.cta-btn { text-decoration: none; white-space: nowrap; }
a.logo { text-decoration: none; }
.dropdown-menu li a { display: flex !important; align-items: center; gap: .7rem; }
.dropdown-menu li a i { width: 18px; text-align: center; color: var(--blue); font-size: .85rem; }
.cx-footer-col ul li { display: flex; align-items: center; gap: .55rem; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.shot-pair figure, .mn-strip figure { margin: 0; }
.mn-strip .shot { box-shadow: 0 20px 40px -18px rgba(0,0,0,.6); }
.cx-plat-text .mn-head h2, .mn-head .cx-plat-num { display: block; }
.cx-feat-item .mn-ico--sm { margin-bottom: .55rem; }

/* Case studies: copy + supporting screen */
.cx-cs-item { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem 3.5rem; align-items: start; }
.cx-cs-item > .cx-cs-meta { grid-column: 1 / -1; margin-bottom: 0; }
.cx-cs-visual { position: sticky; top: calc(var(--header-h) + 24px); }
.cx-cs-platform i { color: var(--blue); margin-right: .3rem; }
.cx-cs-outcome { background: var(--card-d); border: 1px solid var(--border-d); border-radius: var(--r-md); padding: 1rem 1.2rem; }
.cx-cs-outcomes { flex-wrap: wrap; gap: 1rem !important; }
@media (max-width: 1024px) { .cx-cs-item { grid-template-columns: 1fr; } .cx-cs-visual { position: static; } }

/* Markup-level .reveal must never stay hidden without the observer */
html:not(.js-reveal) .reveal { opacity: 1 !important; transform: none !important; }

/* Keep phones in paired layouts at a sensible size */
.shot-pair .phone-shot { max-width: 250px; margin: 0 auto; }
.shot-pair { align-items: center; }
/* Grid children may shrink, so wide tables scroll inside their wrapper instead of widening the page */
.cx-plat-grid > *, .mn-panel > *, .mn-grid > *, .cx-cs-item > *, .cx-ap-grid > * { min-width: 0; }

/* Mobile menu: full height below the header, scrollable, never clipped */
@media (max-width: 768px) {
  .header .cta-btn { display: none !important; }
  .nav-menu.active {
    max-height: calc(100dvh - var(--header-h)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
  .nav-menu li { padding: 0 !important; }
  .nav-menu > li > a { display: flex !important; align-items: center; justify-content: space-between; padding: 1rem 1.25rem !important; min-height: 52px; }
  .nav-dropdown.open .dd-arrow { transform: rotate(180deg); }
  .dropdown-menu li a { padding: .85rem 1.5rem !important; }
}

/* ================================================================
   BRAND PALETTE — taken from the logo
   purple #8B2CF5 · magenta #E030C0 · teal #14C0A0
   ================================================================ */
:root {
  --blue: #8B2CF5;          /* legacy name, now the logo purple */
  --blue-d: #7419D9;
  --blue-l: #F3EBFF;
  --blue-hover: #7419D9;
  --purple: #8B2CF5;
  --purple-soft: #B47CFF;
  --magenta: #E030C0;
  --teal: #14C0A0;
  --grad: linear-gradient(120deg, #8B2CF5 0%, #B02CE8 55%, #E030C0 100%);
}

/* Primary actions carry the logo gradient */
.cx-btn, .btn-primary, .cta-btn, .btn-next, .btn-submit, .mn-tab[aria-selected="true"], .cx-plat-nav a.is-active {
  background: var(--grad) !important; background-color: var(--purple) !important; border: 0 !important; color: #fff !important;
}
.cx-btn:hover, .btn-primary:hover, .cta-btn:hover { filter: brightness(1.08); box-shadow: 0 10px 28px -8px rgba(176, 44, 232, .55) !important; }
.cx-ov-card--featured { background: var(--grad) !important; border-color: transparent !important; }
.mn-progress-bar { background: var(--grad); }
.cx-label, .cx-plat-num, .cx-for-num, .cx-sec-num, .cx-ap-plat-num { color: var(--purple-soft) !important; }
.mn-ico { background: rgba(139, 44, 245, .14); color: var(--purple-soft); }
.mn-steps li::before { background: var(--grad); }

/* A touch of the logo teal */
.mn-checks li i, .cx-spotlight-list li i, .cx-cmd-live, .mn-live-badge { color: var(--teal) !important; }
.cx-trust-dot, .cx-mdot { color: var(--teal) !important; }
.cx-faq-icon { background: rgba(20, 192, 160, .12); color: var(--teal) !important; }
.cx-footer-col i, .cx-cta-details i { color: var(--teal) !important; }

/* Theme toggle */
.mn-header-actions { display: flex; align-items: center; gap: .75rem; }
.mn-theme-toggle {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border-d); background: var(--card-d); color: var(--white);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: border-color .2s ease, transform .3s var(--ease);
}
.mn-theme-toggle:hover { border-color: var(--purple); transform: rotate(-15deg); }
.mn-theme-toggle:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.mn-theme-toggle i { position: absolute; transition: opacity .25s ease, transform .35s var(--ease); }
.mn-theme-toggle .fa-sun { color: #f5b301; }
.mn-theme-toggle .fa-moon { color: var(--purple-soft); opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="light"] .mn-theme-toggle .fa-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
[data-theme="light"] .mn-theme-toggle .fa-moon { opacity: 1; transform: none; }
@media (max-width: 768px) {
  .header-content { gap: .5rem; }
  .logo { margin-right: auto; }
  .mn-header-actions { order: 2; }
  .nav { order: 3; }
}
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease !important;
}

/* ================================================================
   LIGHT THEME
   Legacy components are handled by body.light-mode rules in effects.css;
   variables below flip everything built on machinenova.css + site.css.
   ================================================================ */
html[data-theme="light"] {
  color-scheme: light;
  --black: #ffffff;
  --dark: #f7f5fc;
  --card-d: #ffffff;
  --white: #17121f;          /* text */
  --gray: #6f6880;
  --gray-l: #4d4659;
  --border-d: #e7e1f0;
  --bg-alt: #f7f5fc;
  --purple-soft: #7419D9;
}
html[data-theme="light"] body { background: #ffffff !important; color: #17121f !important; }
html[data-theme="light"] .header,
html[data-theme="light"] .nav-menu { background: rgba(255,255,255,.92) !important; border-bottom-color: #ece7f3 !important; }
html[data-theme="light"] .header.is-scrolled { background: rgba(255,255,255,.85) !important; box-shadow: 0 8px 30px rgba(40, 20, 80, .08) !important; }
html[data-theme="light"] .nav-menu a { color: #2a2335 !important; }
html[data-theme="light"] .nav-menu a:hover, html[data-theme="light"] .nav-menu a.active { color: var(--purple) !important; }
html[data-theme="light"] .hamburger span { background: #17121f !important; }
html[data-theme="light"] .dropdown-menu { background: #fff !important; border-color: #ece7f3 !important; box-shadow: 0 18px 40px rgba(40,20,80,.12) !important; }
html[data-theme="light"] .dropdown-menu li a { color: #2a2335 !important; }
html[data-theme="light"] .dropdown-menu li a:hover { background: #f3ebff !important; }
html[data-theme="light"] .logo-icon { filter: none !important; }
html[data-theme="light"] .cx-footer-logo { filter: none !important; }

html[data-theme="light"] .hero { background: #ffffff !important; }
html[data-theme="light"] .hero-box { background: linear-gradient(160deg, #faf7ff, #f3ecff) !important; border-color: #e9def9 !important; }
html[data-theme="light"] .hero h1, html[data-theme="light"] .hero h1 .word { color: #17121f !important; }
html[data-theme="light"] .hero-desc, html[data-theme="light"] .hero-label, html[data-theme="light"] .hero-stat-label { color: #4d4659 !important; }
html[data-theme="light"] .hero-stats { border-top-color: #e3daf0 !important; }
html[data-theme="light"] .hero-stat-num { color: var(--purple) !important; }
html[data-theme="light"] .btn-secondary { background: #fff !important; color: #17121f !important; border-color: #d9cfe8 !important; }

html[data-theme="light"] section, html[data-theme="light"] .cx-trust-strip, html[data-theme="light"] .cx-marquee { border-color: #ece7f3 !important; }
html[data-theme="light"] .cx-marquee-inner span { color: #17121f !important; }
html[data-theme="light"] h1, html[data-theme="light"] h2, html[data-theme="light"] h3,
html[data-theme="light"] h4, html[data-theme="light"] h5 { color: #17121f; }
html[data-theme="light"] .cx-ov-card--featured h3, html[data-theme="light"] .cx-ov-card--featured p,
html[data-theme="light"] .cx-ov-card--featured .cx-ov-link, html[data-theme="light"] .cx-ov-card--featured .cx-ov-num { color: #fff !important; }
html[data-theme="light"] .cx-about-cta { background: var(--grad) !important; }
html[data-theme="light"] .cx-about-cta h2, html[data-theme="light"] .cx-about-cta p { color: #fff !important; }
html[data-theme="light"] .cx-about-cta .cx-btn { background: #fff !important; color: var(--purple) !important; }

/* cards & surfaces */
html[data-theme="light"] .mn-card, html[data-theme="light"] .mn-stat, html[data-theme="light"] .mn-table-wrap,
html[data-theme="light"] .cx-feat-item, html[data-theme="light"] .cx-sec-pillar, html[data-theme="light"] .cx-faq,
html[data-theme="light"] .mn-steps li, html[data-theme="light"] .cx-ov-card:not(.cx-ov-card--featured), html[data-theme="light"] .cx-for-card {
  background: #ffffff !important; border-color: #e7e1f0 !important; box-shadow: 0 1px 2px rgba(40,20,80,.04);
}
html[data-theme="light"] .mn-section--alt .mn-card, html[data-theme="light"] .cx-plat-section--alt .cx-feat-item { background: #ffffff !important; }
html[data-theme="light"] .mn-table th { background: #faf8fd; }
html[data-theme="light"] .mn-tabs { background: #f3eefa; border-color: #e7e1f0; }
html[data-theme="light"] .mn-tab { color: #4d4659; }
html[data-theme="light"] .cx-plat-nav { background: rgba(255,255,255,.9) !important; }
html[data-theme="light"] .cx-plat-nav a:not(.is-active) { color: #4d4659 !important; }
html[data-theme="light"] .mn-callout { background: #f6f0ff; border-color: #dcc7fb; }
html[data-theme="light"] .mn-callout p { color: #3b2a57 !important; }
html[data-theme="light"] .mn-callout i { color: var(--purple); }
html[data-theme="light"] .mn-pill--green { color: #0f8a5f; background: rgba(16,185,129,.12); }
html[data-theme="light"] .mn-pill--amber { color: #a15c00; background: rgba(245,158,11,.14); }
html[data-theme="light"] .mn-pill--red { color: #c0262d; background: rgba(239,68,68,.1); }
html[data-theme="light"] .mn-pill--blue { color: #6a1fd0; background: rgba(139,44,245,.1); }
html[data-theme="light"] .mn-pill--grey { color: #5b5566; background: #f0edf5; }
html[data-theme="light"] .shot { border-color: #e7e1f0; box-shadow: 0 24px 50px -22px rgba(60, 30, 120, .28), 0 0 0 1px rgba(60,30,120,.06); }
html[data-theme="light"] .phone-shot { box-shadow: 0 24px 50px -20px rgba(60, 30, 120, .35); }
html[data-theme="light"] .mn-toast { background: #fff; color: #17121f; }
html[data-theme="light"] .mn-lightbox::backdrop { background: rgba(23, 18, 31, .78); }
html[data-theme="light"] .cx-form input, html[data-theme="light"] .cx-form select, html[data-theme="light"] .cx-form textarea,
html[data-theme="light"] .form-group input, html[data-theme="light"] .form-group select, html[data-theme="light"] .form-group textarea {
  background: #fbfafd !important; color: #17121f !important; border-color: #ddd5e8 !important;
}
html[data-theme="light"] .cx-footer { background: #faf8fd !important; }
html[data-theme="light"] .cx-footer-bottom { color: #8a8396 !important; }
html[data-theme="light"] .page-hero, html[data-theme="light"] .booking-section { background: #fff !important; }

/* Nav links: neutral text, purple only for hover/active */
html body .nav-menu > li > a { color: #d9d3e6 !important; }
html body .nav-menu > li > a:hover, html body .nav-menu > li > a.active { color: #C9A2FF !important; }
html[data-theme="light"] body .nav-menu > li > a { color: #2a2335 !important; }
html[data-theme="light"] body .nav-menu > li > a:hover, html[data-theme="light"] body .nav-menu > li > a.active { color: var(--purple) !important; }
.nav-menu a.active::after, .nav-menu a:hover::after { background: var(--grad) !important; }

/* Marquee follows the theme */
html[data-theme="light"] .cx-marquee { background: #f7f5fc !important; }
html[data-theme="light"] .cx-marquee-inner span:not(.cx-mdot) { color: #2a2335 !important; }
html[data-theme="light"] .mn-theme-toggle .fa-moon { color: var(--purple); }
h2::after { background: var(--grad) !important; }
.mn-head--center h2, .cx-about-cta h2, .cx-sec-cta h2 { position: relative; }
.mn-head--center h2::after, .cx-about-cta h2::after, .cx-sec-cta h2::after { left: 50% !important; transform: translateX(-50%); }
.cx-about-cta h2::after { background: #fff !important; opacity: .7; }

/* Body-text default (replaces a global !important grey in styles.css) */
:root { --text-body: #b3b3b3; }
html[data-theme="light"] { --text-body: #4d4659; }
html[data-theme="light"] .mn-steps li, html[data-theme="light"] .mn-checks li,
html[data-theme="light"] .cx-footer-col ul li, html[data-theme="light"] .cx-cs-platform { color: #4d4659 !important; }
html[data-theme="light"] .cx-ov-link, html[data-theme="light"] .cx-case-link { color: var(--purple) !important; }
html[data-theme="light"] .cx-ov-num { color: #6f6880 !important; }
html[data-theme="light"] .cx-cs-tag, html[data-theme="light"] .cx-case-tag { color: #6a1fd0 !important; background: rgba(139,44,245,.1) !important; }
html[data-theme="light"] .step-label { color: #6f6880 !important; }
.mn-teal { color: #2dd4bf; } .mn-amber { color: #fbbf24; }
html[data-theme="light"] .mn-teal { color: #0d8a73; } html[data-theme="light"] .mn-amber { color: #a15c00; }

/* Links: accent as a default only; components choose their own colours */
:root { --link: #C9A2FF; --link-hover: #E0C6FF; }
html[data-theme="light"] { --link: #7419D9; --link-hover: #5B12B0; }

/* Sticky bars: solid enough to read over scrolled content */
html body .header.is-scrolled { background: rgba(10, 10, 10, .95) !important; }
html[data-theme="light"] body .header.is-scrolled { background: rgba(255, 255, 255, .96) !important; }
html body .cx-plat-nav { background: rgba(16, 16, 18, .97) !important; }
html[data-theme="light"] body .cx-plat-nav { background: rgba(255, 255, 255, .97) !important; border-bottom: 1px solid #ece7f3 !important; }
html body .cx-plat-nav a:not(.is-active) { color: #bdb6cc !important; }
html body .cx-plat-nav a:not(.is-active):hover { color: #fff !important; }
html[data-theme="light"] body .cx-plat-nav a:not(.is-active) { color: #4d4659 !important; }
html[data-theme="light"] body .cx-plat-nav a:not(.is-active):hover { color: var(--purple) !important; }
html body .cx-plat-nav a.is-active { color: #fff !important; }
/* Toggle: show exactly one icon (legacy CSS forces opacity/colour on header icons) */
html body .mn-theme-toggle i.fa-moon { display: none !important; }
html body .mn-theme-toggle i.fa-sun { display: inline-block !important; color: #f5b301 !important; opacity: 1 !important; transform: none !important; }
html[data-theme="light"] body .mn-theme-toggle i.fa-sun { display: none !important; }
html[data-theme="light"] body .mn-theme-toggle i.fa-moon { display: inline-block !important; color: var(--purple) !important; opacity: 1 !important; transform: none !important; }

/* ================================================================
   ROUNDED PANELS — every page block is a curved card, no square seams
   ================================================================ */
:root { --page-bg: #050505; --panel-gap: 14px; --panel-r: 32px; }
html[data-theme="light"] { --page-bg: #efebf6; }
html body { background: var(--page-bg) !important; }

body > section:not(.hero),
body > .cx-trust-strip,
body > .cx-marquee,
body > nav.cx-plat-nav,
body > footer.cx-footer {
  margin: var(--panel-gap) var(--panel-gap) 0 !important;
  border-radius: var(--panel-r) !important;
  border: 1px solid var(--border-d) !important;
}
body > footer.cx-footer { margin-bottom: var(--panel-gap) !important; }
body > .cx-marquee, body > .cx-trust-strip { overflow: hidden; }

/* Hero sits on the page background; its inner box is already rounded */
body > section.hero { background: transparent !important; border: 0 !important; }

/* Sticky sub-nav keeps its curve while pinned under the header */
body > nav.cx-plat-nav { top: calc(var(--header-h) + 8px) !important; }
body > nav.cx-plat-nav .container { padding-left: .75rem; padding-right: .75rem; }

/* Header: rounded bottom edge instead of a straight rule */
html body .header { border-radius: 0 0 var(--panel-r) var(--panel-r); border-bottom: 1px solid var(--border-d) !important; }

@media (max-width: 768px) {
  :root { --panel-gap: 8px; --panel-r: 22px; }
  html body .header { border-radius: 0 0 22px 22px; }
}

/* Header: floating rounded bar, curved on all four corners */
html body .header {
  top: var(--panel-gap) !important;
  margin: var(--panel-gap) var(--panel-gap) 0 !important;
  border-radius: var(--panel-r) !important;
  border: 1px solid var(--border-d) !important;
}
body > nav.cx-plat-nav { top: calc(var(--header-h) + var(--panel-gap) * 2) !important; }
html { scroll-padding-top: calc(var(--header-h) + var(--subnav-h) + var(--panel-gap) * 3 + 8px) !important; }
@media (max-width: 768px) {
  html body .header { border-radius: 22px !important; }
  .nav-menu { border-radius: 0 0 22px 22px; }
}
@media (max-width: 768px) { .nav-menu:not(.active) { border: 0 !important; } }

/* Lexend is wider than Inter: keep the header on one line on laptops/tablets */
@media (min-width: 769px) and (max-width: 1280px) {
  .nav-menu { gap: 1.1rem !important; margin-right: .75rem !important; }
  .nav-menu > li > a { font-size: .88rem !important; }
  .logo-icon { height: 42px !important; }
  .header .cta-btn { padding: .65rem 1.1rem !important; font-size: .85rem !important; }
  .mn-header-actions { gap: .5rem; }
}
@media (min-width: 769px) and (max-width: 1080px) {
  .header .cta-btn { display: none !important; }   /* "Contact" in the menu covers it */
  .nav-menu { gap: .9rem !important; }
}
@media (min-width: 769px) { .nav-menu > li > a { white-space: nowrap; } }
@media (min-width: 769px) and (max-width: 960px) {
  .nav-menu { gap: .65rem !important; margin-right: .4rem !important; }
  .nav-menu > li > a { font-size: .8rem !important; }
  .logo-icon { height: 34px !important; }
  .header .container { padding-left: 1rem !important; padding-right: 1rem !important; }
}

/* Sticky bars: fully solid, and the strip above the floating header is masked
   with the page background so scrolled content never peeks through */
html body .header, html body .header.is-scrolled {
  background: #0b0b0d !important;
  box-shadow: 0 -40px 0 18px var(--page-bg), 0 10px 30px rgba(0,0,0,.25) !important;
}
html[data-theme="light"] body .header, html[data-theme="light"] body .header.is-scrolled {
  background: #ffffff !important;
  box-shadow: 0 -40px 0 18px var(--page-bg), 0 10px 30px rgba(40,20,80,.08) !important;
}
html body .cx-plat-nav { background: #101012 !important; }
html[data-theme="light"] body .cx-plat-nav { background: #ffffff !important; }


/* ================================================================
   SCROLL REVEAL — staggered entrances (set up by site.js)
   ================================================================ */
.js-reveal .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  /* !important so legacy hover transitions can't cancel the entrance;
     hover properties are folded in, the stagger comes from --rd */
  transition: opacity .85s var(--ease), transform 1s var(--ease), filter .85s var(--ease),
              background-color .25s ease, border-color .25s ease, box-shadow .35s ease, color .25s ease !important;
  transition-delay: var(--rd, 0ms), var(--rd, 0ms), var(--rd, 0ms), 0ms, 0ms, 0ms, 0ms !important;
  will-change: opacity, transform;
}
.js-reveal .reveal.reveal--rise   { transform: translate3d(0, 36px, 0); }
.js-reveal .reveal.reveal--card   { transform: translate3d(0, 34px, 0) scale(.96); }
.js-reveal .reveal.reveal--zoom   { transform: translate3d(0, 24px, 0) scale(.94); filter: saturate(.6); }
.js-reveal .reveal.reveal--from-right { transform: translate3d(56px, 0, 0) scale(.97); }
.js-reveal .reveal.reveal--from-left  { transform: translate3d(-56px, 0, 0) scale(.97); }
.js-reveal .reveal.is-visible {
  opacity: 1; transform: none; filter: none; will-change: auto;
}
/* Reduced-motion: gentle fades only, nothing moves */
.js-reveal.motion-soft .reveal { transform: none !important; transition: opacity .9s ease !important; transition-delay: var(--rd, 0ms) !important; }

/* ================================================================
   LAZY IMAGES — shimmer while loading, blur-up when ready
   ================================================================ */
.js-lazy img[loading="lazy"] {
  opacity: 0; filter: blur(16px); transform: scale(1.04);
  transition: opacity .7s ease, filter .9s var(--ease), transform 1.1s var(--ease);
}
.js-lazy img[loading="lazy"].is-loaded { opacity: 1; filter: none; transform: none; }
.img-loading {
  background-color: #17161b !important;
  background-image: linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(180,124,255,.14) 50%, rgba(255,255,255,0) 80%) !important;
  background-size: 220% 100% !important;
  animation: mnShimmer 1.4s linear infinite;
}
.shot.img-loading img, .phone-shot.img-loading img { min-height: 140px; }
html[data-theme="light"] .img-loading {
  background-color: #f1ecf8 !important;
  background-image: linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(139,44,245,.12) 50%, rgba(255,255,255,0) 80%) !important;
}
@keyframes mnShimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ================================================================
   MARQUEE — always moving; slower and pause-on-hover
   ================================================================ */
.cx-marquee-inner { animation: cxmarquee 28s linear infinite !important; will-change: transform; }
.cx-marquee:hover .cx-marquee-inner { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  html.smooth-scroll { scroll-behavior: auto !important; }
  .cx-marquee-inner { animation-duration: 60s !important; }
  .js-lazy img[loading="lazy"] { filter: none; transform: none; transition: opacity .6s ease; }
  .img-loading { animation: none; }
}
/* keep hover lifts working after an element has revealed */
.js-reveal .reveal.is-visible:is(.shot, .cx-ov-card, .cx-for-card, .mn-card):hover { transform: translateY(-4px); }
.js-reveal .reveal.is-visible.phone-shot:hover { transform: translateY(-6px) rotate(-.4deg); }
.js-reveal:not(.motion-soft) .reveal.is-visible:is(.cx-case-card, .cx-sec-card, .cx-feat-item):hover { transform: translateY(-3px); }
.js-reveal .reveal.is-done {
  transition: opacity .3s ease, transform .35s var(--ease), filter .3s ease,
              background-color .25s ease, border-color .25s ease, box-shadow .35s ease, color .25s ease !important;
  transition-delay: 0ms !important;
}
/* Side-slide entrances must never widen the page */
body > section, body > footer { overflow-x: clip; }
@media (max-width: 1024px) {
  .js-reveal .reveal.reveal--from-right, .js-reveal .reveal.reveal--from-left { transform: translate3d(0, 28px, 0) scale(.97); }
}

/* Booking wizard: option cards and placeholders in light mode */
.checkbox-item { border-radius: var(--r-md) !important; transition: border-color .2s ease, background-color .2s ease; }
.checkbox-item:has(input:checked) { border-color: var(--purple) !important; box-shadow: 0 0 0 1px var(--purple) inset; }
html[data-theme="light"] .checkbox-item { background: #ffffff !important; border: 1px solid #e3dcee !important; }
html[data-theme="light"] .checkbox-item:hover { border-color: #c9b3f0 !important; background: #fbf8ff !important; }
html[data-theme="light"] .checkbox-item span { color: #17121f !important; }
html[data-theme="light"] .checkbox-item p { color: #5d5669 !important; }
html[data-theme="light"] .checkbox-item i { color: var(--purple) !important; }
html[data-theme="light"] :is(input, textarea)::placeholder { color: #8a8396 !important; }
html[data-theme="light"] .step-number { background: #f1ecf8 !important; color: #4d4659 !important; border-color: #e3dcee !important; }
html[data-theme="light"] .progress-step.active .step-number { background: var(--grad) !important; color: #fff !important; }
