/* ==========================================================================
   RACHYET - NAVBAR
   Palette is sampled from the ribbon mark: indigo → electric blue → sky,
   and violet → pink → orange.
   ========================================================================== */

:root {
    --rc-sky: #8AD9FF;
    --rc-azure: #4CC6FF;
    --rc-blue: #2D5BFF;
    --rc-navy: #1F27B8;
    --rc-navy-deep: #151F55;
    --rc-violet-light: #A87BFF;
    --rc-violet: #7B3CF5;
    --rc-amber: #FFB347;
    --rc-orange: #FF9A2E;
    --rc-pink: #FF3D9A;
    --rc-ink: #0B1438;

    --rc-gradient-brand: linear-gradient(120deg, var(--rc-navy) 0%, var(--rc-blue) 45%, var(--rc-violet) 100%);
    --rc-gradient-spectrum: linear-gradient(90deg, var(--rc-navy) 0%, var(--rc-blue) 25%, var(--rc-violet) 50%, var(--rc-pink) 75%, var(--rc-orange) 100%);

    --nav-height: 76px;
}

html { scroll-padding-top: calc(var(--nav-height) + 16px); }

/* -------------------------------------------------------
   BAR
------------------------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    padding: 0.9rem 0;
    transition: padding 0.35s var(--ease-premium), transform 0.3s var(--ease-premium);
}

/* Slides away while scrolling down, back in on scroll up (toggled in main.js).
   The transform only exists while hidden: a transform on .navbar would trap
   the position:fixed mobile drawer, and the drawer is never open while hidden. */
.navbar.nav-hidden { transform: translateY(-100%); }

/* Glass background lives on a pseudo-element so .navbar itself has no
   backdrop-filter — otherwise it would become the containing block for the
   position:fixed mobile drawer and trap it inside the bar. */
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid rgba(31, 39, 184, 0.07);
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.navbar.scrolled { padding: 0.55rem 0; }
/* Open drawer must sit above the cookie notice (1150) and toasts (1200) */
.navbar.menu-open { z-index: 1300; }
.navbar.scrolled::before {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px -12px rgba(21, 31, 85, 0.18);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
}

/* -------------------------------------------------------
   BRAND
------------------------------------------------------- */
.navbar-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-premium);
}
.navbar-brand:hover { transform: translateY(-1px); }

.brand-logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
    transition: height 0.35s var(--ease-premium);
}
.navbar.scrolled .brand-logo-img { height: 38px; }

/* -------------------------------------------------------
   DESKTOP LINKS
------------------------------------------------------- */
.navbar-nav-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(31, 39, 184, 0.035);
    border: 1px solid rgba(31, 39, 184, 0.08);
    border-radius: var(--radius-full);
    padding: 0.3rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.15rem;
    position: relative;
}

/* Sliding hover pill (JS-positioned) */
.nav-indicator {
    position: absolute;
    top: 0.3rem;
    left: 0;
    height: calc(100% - 0.6rem);
    width: 0;
    background: #ffffff;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 10px rgba(21, 31, 85, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease-premium), width 0.4s var(--ease-premium), opacity 0.2s ease;
    z-index: 0;
}

.nav-item { position: relative; z-index: 1; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: -0.005em;
    color: #2B3350;
    padding: 0.55rem 1.05rem;
    border-radius: var(--radius-full);
    transition: color 0.25s ease, transform 0.25s var(--ease-premium);
    position: relative;
    white-space: nowrap;
}
.nav-link:hover { color: var(--rc-navy); }
.nav-link:active { transform: scale(0.97); }

.nav-link-icon { display: none; }

/* Active page: navy text + a spectrum underline taken from the logo */
.nav-link.active { color: var(--rc-navy); }
.nav-link.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0.2rem;
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--rc-azure), var(--rc-violet-light), var(--rc-orange));
    transform: translateX(-50%);
}
.has-dropdown .nav-link.active::after { left: calc(50% - 0.55rem); }

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--rc-blue);
    transition: transform 0.3s var(--ease-premium);
}
.has-dropdown:hover .dropdown-arrow,
.has-dropdown:focus-within .dropdown-arrow { transform: rotate(180deg); }

/* -------------------------------------------------------
   MEGA DROPDOWN (desktop)
------------------------------------------------------- */
/* Dropdowns are centred under the whole nav pill (not their own link), so
   wide panels stay on-screen whichever item opens them. */
.navbar-nav-container .has-dropdown { position: static; }

.mega-dropdown {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.985);
    transform-origin: top center;
    width: min(720px, calc(100vw - 2rem));
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 40px 80px -20px rgba(21, 31, 85, 0.35), 0 0 0 1px rgba(31, 39, 184, 0.06);
    opacity: 0;
    visibility: hidden;
    /* Small close delay = hover intent, so diagonal mouse moves don't flicker it shut */
    transition: opacity 0.25s ease 0.08s, transform 0.3s var(--ease-premium) 0.08s, visibility 0s linear 0.33s;
    z-index: 1001;
}
/* Invisible bridge across the gap between pill and panel */
.mega-dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -18px;
    height: 18px;
}
.mega-dropdown-inner { display: flex; flex-direction: column; border-radius: inherit; overflow: hidden; }

.has-dropdown:hover .mega-dropdown,
.has-dropdown:focus-within .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    transition: opacity 0.3s var(--ease-premium), transform 0.4s var(--ease-premium), visibility 0s;
}

/* -------------------------------------------------------
   ABOUT MEGA-MENU (feature panel + link cards)
------------------------------------------------------- */
.mega-about { width: min(800px, calc(100vw - 2rem)); }
.mega-about-inner { flex-direction: row; }

.mega-about-feature {
    position: relative;
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.6rem 1.6rem 1.5rem;
    color: var(--gray-800);
    background: linear-gradient(180deg, #F8FAFE 0%, #F1F4FB 100%);
    border-right: 1px solid rgba(31, 39, 184, 0.07);
    overflow: hidden;
    isolation: isolate;
}

/* Decorative layers: logo-colour aurora + triangle mosaic echoing the mark */
.maf-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.maf-aurora { position: absolute; border-radius: 50%; filter: blur(46px); }
.maf-aurora-blue   { width: 210px; height: 210px; top: -90px; right: -60px; background: rgba(76, 198, 255, 0.28); }
.maf-aurora-green  { width: 170px; height: 170px; top: 38%; left: -90px; background: rgba(168, 123, 255, 0.22); }
.maf-aurora-orange { width: 190px; height: 190px; bottom: -100px; right: -50px; background: rgba(255, 154, 46, 0.24); }
.maf-mosaic {
    position: absolute;
    top: 14px;
    right: -18px;
    width: 128px;
    height: auto;
    opacity: 0.16;
    transform: rotate(8deg);
    -webkit-mask-image: linear-gradient(225deg, #000 20%, transparent 85%);
            mask-image: linear-gradient(225deg, #000 20%, transparent 85%);
}
.maf-mosaic polygon { transform-box: fill-box; transform-origin: center; }
.maf-sheen {
    position: absolute;
    top: 0; bottom: 0; left: -60%;
    width: 45%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent);
    transform: skewX(-18deg);
}
.has-dropdown:hover .maf-sheen,
.has-dropdown:focus-within .maf-sheen { animation: mafSheen 1.4s var(--ease-premium) 0.15s both; }
.has-dropdown:hover .maf-aurora-blue   { animation: mafDrift 9s ease-in-out infinite alternate; }
.has-dropdown:hover .maf-aurora-green  { animation: mafDrift 11s ease-in-out infinite alternate-reverse; }
.has-dropdown:hover .maf-aurora-orange { animation: mafDrift 10s ease-in-out infinite alternate; }
.has-dropdown:hover .maf-mosaic polygon { animation: mafTile 0.6s var(--ease-premium) backwards; }
.has-dropdown:hover .maf-mosaic polygon:nth-child(2) { animation-delay: 0.04s; }
.has-dropdown:hover .maf-mosaic polygon:nth-child(3) { animation-delay: 0.08s; }
.has-dropdown:hover .maf-mosaic polygon:nth-child(4) { animation-delay: 0.12s; }
.has-dropdown:hover .maf-mosaic polygon:nth-child(5) { animation-delay: 0.16s; }
.has-dropdown:hover .maf-mosaic polygon:nth-child(6) { animation-delay: 0.2s; }
.has-dropdown:hover .maf-mosaic polygon:nth-child(7) { animation-delay: 0.24s; }
.has-dropdown:hover .maf-mosaic polygon:nth-child(8) { animation-delay: 0.28s; }
.has-dropdown:hover .maf-mosaic polygon:nth-child(9) { animation-delay: 0.32s; }
@keyframes mafSheen { from { left: -60%; } to { left: 130%; } }
@keyframes mafDrift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-20px, 16px) scale(1.12); } }
@keyframes mafTile { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }

.maf-top { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1.2rem; }
.maf-emblem {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 10px 22px -12px rgba(21, 31, 85, 0.45), 0 0 0 1px rgba(31, 39, 184, 0.06);
}
.maf-emblem img { width: 28px; height: auto; }
.maf-eyebrow {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.32rem 0.75rem 0.32rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--rc-navy);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(31, 39, 184, 0.1);
    box-shadow: 0 4px 12px -8px rgba(21, 31, 85, 0.4);
}
.maf-dot {
    position: relative; width: 7px; height: 7px; border-radius: 50%;
    background: var(--rc-violet-light); box-shadow: 0 0 6px rgba(168, 123, 255, 0.9);
}
.maf-dot::after {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    border: 1px solid var(--rc-violet-light); opacity: 0;
    animation: mafPulse 2s ease-out infinite;
}
@keyframes mafPulse { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }

.maf-title {
    font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.01em;
    color: var(--gray-900); margin: 0 0 0.6rem;
}
.maf-title-accent {
    background: linear-gradient(90deg, var(--rc-azure) 0%, var(--rc-violet) 50%, var(--rc-pink) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.maf-desc { font-size: 0.8125rem; line-height: 1.6; color: var(--gray-500); margin: 0 0 1.35rem; }

.maf-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    width: 100%;
    margin-bottom: 1.4rem;
}
.maf-stat {
    --stat-color: var(--rc-blue);
    position: relative;
    min-width: 0;
    padding: 0.8rem 0.85rem 0.75rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(31, 39, 184, 0.07);
    box-shadow: 0 10px 22px -18px rgba(21, 31, 85, 0.45);
    overflow: hidden;
}
.maf-stat:nth-child(2) { --stat-color: var(--rc-pink); }
.maf-stat::before {
    content: ''; position: absolute; top: 0; left: 0.85rem; right: 0.85rem; height: 3px;
    border-radius: 0 0 3px 3px; background: var(--stat-color);
}
.maf-stat-value {
    display: block;
    font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--rc-navy);
}
.maf-stat-label { display: block; margin-top: 0.35rem; font-size: 0.7rem; line-height: 1.35; color: var(--gray-500); }

.maf-cta {
    display: inline-flex; align-items: center; gap: 0.7rem;
    margin-top: auto;
    padding: 0.4rem 0.4rem 0.4rem 1.1rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading); font-size: 0.82rem; font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rc-navy-deep) 0%, var(--rc-navy) 60%, var(--rc-blue) 100%);
    box-shadow: 0 14px 26px -14px rgba(21, 31, 85, 0.75);
    transition: transform 0.3s var(--ease-premium), box-shadow 0.3s ease;
}
.maf-cta-arrow {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    font-size: 0.72rem; color: var(--rc-navy);
    background: #ffffff;
    overflow: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}
.maf-cta-arrow i { transition: transform 0.35s var(--ease-premium); }
.maf-cta:hover { color: #ffffff; transform: translateY(-2px); box-shadow: 0 18px 30px -14px rgba(21, 31, 85, 0.8); }
.maf-cta:hover .maf-cta-arrow { color: #ffffff; background: linear-gradient(135deg, var(--rc-orange), var(--rc-pink)); }
.maf-cta:hover .maf-cta-arrow i { animation: mafArrow 0.5s var(--ease-premium); }
@keyframes mafArrow { 0% { transform: translateX(0); } 45% { transform: translateX(18px); } 46% { transform: translateX(-18px); } 100% { transform: translateX(0); } }

.mega-about-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 1rem;
    align-content: start;
}

.mega-about-card {
    --card-color: var(--rc-blue);
    --card-tint: rgba(45, 91, 255, 0.09);
    position: relative;
    display: flex;
    gap: 0.85rem;
    padding: 1.1rem;
    border-radius: 16px;
    border: 1px solid transparent;
    color: inherit;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease-premium), box-shadow 0.3s ease;
}
.mega-about-card.accent-navy   { --card-color: var(--rc-navy); --card-tint: rgba(31, 39, 184, 0.08); }
.mega-about-card.accent-green  { --card-color: var(--rc-violet); --card-tint: rgba(168, 123, 255, 0.15); }
.mega-about-card.accent-orange { --card-color: var(--rc-pink); --card-tint: rgba(255, 154, 46, 0.14); }

.mega-about-card:hover,
.mega-about-card:focus-visible {
    background: #F6F8FC;
    border-color: rgba(31, 39, 184, 0.07);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -14px rgba(21, 31, 85, 0.3);
}
.mega-about-card.is-current { background: var(--card-tint); }

.mega-about-card-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    background: var(--card-tint);
    color: var(--card-color);
    transition: var(--transition);
}
.mega-about-card:hover .mega-about-card-icon { background: var(--card-color); color: #ffffff; transform: rotate(-5deg) scale(1.05); }

.mega-about-card-body { display: flex; flex-direction: column; min-width: 0; }
.mega-about-card-title { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; color: var(--gray-900); margin-bottom: 0.25rem; }
.mega-about-card-desc { font-size: 0.8rem; line-height: 1.5; color: var(--gray-500); margin-bottom: 0.6rem; }
.mega-about-card-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--card-color);
}
.mega-about-card-more i { font-size: 0.7rem; transition: transform 0.25s var(--ease-premium); }
.mega-about-card:hover .mega-about-card-more i { transform: translateX(4px); }

.has-dropdown:hover .mega-about-card,
.has-dropdown:focus-within .mega-about-card { animation: dropdownItemIn 0.4s var(--ease-premium) backwards; }
.has-dropdown:hover .mega-about-card:nth-child(2) { animation-delay: 0.05s; }
.has-dropdown:hover .mega-about-card:nth-child(3) { animation-delay: 0.1s; }
.has-dropdown:hover .mega-about-card:nth-child(4) { animation-delay: 0.15s; }
.has-dropdown:hover .mega-about-card:nth-child(5) { animation-delay: 0.2s; }
.has-dropdown:hover .mega-about-card:nth-child(6) { animation-delay: 0.25s; }

.has-dropdown:hover .mega-dropdown-category,
.has-dropdown:focus-within .mega-dropdown-category {
    animation: dropdownItemIn 0.4s var(--ease-premium) backwards;
}
.has-dropdown:hover .mega-dropdown-category:nth-child(1) { animation-delay: 0.04s; }
.has-dropdown:hover .mega-dropdown-category:nth-child(2) { animation-delay: 0.08s; }
.has-dropdown:hover .mega-dropdown-category:nth-child(3) { animation-delay: 0.12s; }
.has-dropdown:hover .mega-dropdown-category:nth-child(4) { animation-delay: 0.16s; }
.has-dropdown:hover .mega-dropdown-category:nth-child(5) { animation-delay: 0.2s; }
.has-dropdown:hover .mega-dropdown-category:nth-child(6) { animation-delay: 0.24s; }
@keyframes dropdownItemIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-all-services { display: none; }

.mega-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
    padding: 1rem;
}

.mega-dropdown-category {
    --cat-color: var(--rc-blue);
    --cat-tint: rgba(45, 91, 255, 0.09);
    display: flex;
    flex-direction: column;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    transition: background 0.25s ease, opacity 0.3s ease;
}
/* Cycle the three logo colour families across categories */
.mega-dropdown-category:nth-child(3n+2) { --cat-color: var(--rc-violet); --cat-tint: rgba(168, 123, 255, 0.14); }
.mega-dropdown-category:nth-child(3n)   { --cat-color: var(--rc-pink); --cat-tint: rgba(255, 154, 46, 0.13); }

.mega-dropdown-category:hover { background: #F6F8FC; }
.mega-dropdown-grid.has-focus .mega-dropdown-category:not(:hover) { opacity: 0.5; }

.category-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
}
.category-icon-badge {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cat-tint);
    color: var(--cat-color);
    font-size: 1rem;
    transition: var(--transition);
}
.mega-dropdown-category:hover .category-icon-badge {
    background: var(--cat-color);
    color: #ffffff;
    transform: scale(1.06) rotate(-4deg);
}
.category-title-wrap h6 { margin: 0; font-size: 0.9rem; line-height: 1.3; flex: 1; }
.category-title-wrap a { color: var(--gray-900); }
.category-title-wrap a:hover { color: var(--cat-color); }

.category-toggle { display: none; }

.mega-dropdown-links { display: flex; flex-direction: column; gap: 0.35rem; }

.service-menu-link {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    color: var(--gray-600);
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0.25rem 0;
    transition: var(--transition);
}
.service-menu-link i {
    font-size: 0.7rem;
    margin-top: 0.3rem;
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-5px);
    transition: var(--transition);
    color: var(--cat-color);
}
.service-menu-link:hover { color: var(--cat-color); padding-left: 0.2rem; }
.service-menu-link:hover i { opacity: 1; transform: translateX(0); }
.service-menu-more { font-weight: 600; color: var(--cat-color); }
.service-menu-more i { opacity: 1; transform: none; margin-top: 0.28rem; }


/* -------------------------------------------------------
   SERVICES MEGA-MENU (category rail + swappable panels)
------------------------------------------------------- */
.mega-services { width: min(920px, calc(100vw - 2rem)); }
.ms-mobile { display: none; }

.ms-layout { display: flex; min-height: 420px; }

.ms-rail {
    position: relative;
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    padding: 1.4rem 0.9rem 1rem;
    background: linear-gradient(180deg, #F8FAFE 0%, #F1F4FB 100%);
    border-right: 1px solid rgba(31, 39, 184, 0.07);
    overflow: hidden;
    isolation: isolate;
}
.ms-rail-head { padding: 0 0.7rem 0.9rem; }
.ms-rail-head .maf-top { margin-bottom: 0.9rem; }
.ms-rail-title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--gray-900);
}

.ms-tabs { position: relative; display: flex; flex-direction: column; gap: 0.2rem; }
.ms-tab-indicator {
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px -14px rgba(21, 31, 85, 0.35), 0 0 0 1px rgba(31, 39, 184, 0.06);
    transition: transform 0.4s var(--ease-premium), height 0.4s var(--ease-premium);
    pointer-events: none;
}
.ms-tab-indicator::before {
    content: '';
    position: absolute;
    left: 0; top: 22%; bottom: 22%;
    width: 3px;
    border-radius: 3px;
    background: var(--ms-accent, var(--rc-blue));
    transition: background 0.3s ease;
}

.ms-tab {
    --tab-color: var(--rc-blue);
    --tab-tint: rgba(45, 91, 255, 0.1);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 14px;
    color: var(--gray-800);
    transition: color 0.25s ease;
}
.ms-tab.accent-green  { --tab-color: var(--rc-violet); --tab-tint: rgba(168, 123, 255, 0.16); }
.ms-tab.accent-orange { --tab-color: var(--rc-pink); --tab-tint: rgba(255, 154, 46, 0.15); }
.ms-tab-icon {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    color: var(--tab-color);
    background: var(--tab-tint);
    transition: background 0.3s ease, color 0.3s ease, transform 0.35s var(--ease-premium);
}
.ms-tab-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ms-tab-name { font-family: var(--font-heading); font-weight: 700; font-size: 0.875rem; line-height: 1.3; color: var(--gray-900); }
.ms-tab-count { font-size: 0.72rem; color: var(--gray-500); margin-top: 0.1rem; }
.ms-tab-chevron {
    font-size: 0.7rem;
    color: var(--tab-color);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.25s ease, transform 0.3s var(--ease-premium);
}
.ms-tab.is-active .ms-tab-icon { background: var(--tab-color); color: #ffffff; transform: scale(1.04); }
.ms-tab.is-active .ms-tab-chevron { opacity: 1; transform: translateX(0); }

/* Compact rail: one line per tab (the panel shows the count). The rail never
   scrolls; on shorter screens the menu tightens up instead (see max-height rules). */
.ms-rail-head { padding-bottom: 0.6rem; }
.ms-rail-head .maf-top { margin-bottom: 0.6rem; }
.ms-rail > * { flex-shrink: 0; }
.ms-tabs { gap: 0.05rem; }
.ms-tab { gap: 0.65rem; padding: 0.45rem 0.65rem; border-radius: 12px; }
.ms-tab-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 0.8rem; }
.ms-tab-count { display: none; }
.ms-rail-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; margin: 0.8rem 0.25rem 0; }
.ms-rail-links .ms-all-link { margin: 0; padding: 0.6rem 0.45rem; font-size: 0.78rem; }
.ms-rail-links .ms-all-link + .ms-all-link { margin-top: 0; }
.ms-rail-links .ms-all-link { justify-content: center; }
.ms-rail-links .ms-all-link span { gap: 0.4rem; white-space: nowrap; }
.ms-rail-links .ms-all-link i { display: none; }  /* no room for icons at half width */
.ms-rail .ms-expert { margin-top: 0.6rem; padding: 0.65rem 0.8rem; }
.ms-rail .ms-expert-icon { width: 34px; height: 34px; }

/* Shorter screens (laptops, zoomed browsers): keep everything visible without scrolling */
@media (min-width: 1025px) and (max-height: 860px) {
    .mega-services .ms-rail { padding-top: 1rem; }
    .mega-services .ms-rail-head .maf-top { display: none; }
    .mega-services .ms-rail-title { font-size: 1rem; }
    .mega-services .ms-panel { padding-top: 1.1rem; }
    .mega-services .ms-panel-head { padding-bottom: 0.7rem; margin-bottom: 0.6rem; }
    .mega-services .ms-panel-head p { display: none; }
    .mega-services .ms-card { padding: 0.55rem 0.7rem; }
    .mega-services .ms-card-desc { -webkit-line-clamp: 1; }
}
@media (min-width: 1025px) and (max-height: 720px) {
    .mega-services .ms-layout { min-height: 0; }
    .mega-services .ms-rail { padding: 0.8rem 0.75rem 0.8rem; }
    .mega-services .ms-rail-head { display: none; }
    .mega-services .ms-tab { padding: 0.36rem 0.6rem; }
    .mega-services .ms-tab-icon { width: 26px; height: 26px; font-size: 0.72rem; }
    .mega-services .ms-panel { padding: 0.9rem 1.25rem 0.9rem; }
    .mega-services .ms-card { padding: 0.45rem 0.6rem; }
    .mega-services .ms-card-icon { width: 30px; height: 30px; font-size: 0.8rem; }
    .mega-services .ms-card-desc { display: none; }
}
@media (min-width: 1025px) and (max-height: 640px) {
    .mega-services .ms-panel-foot { display: none; }
    .mega-services .ms-rail-links { margin-top: 0.6rem; }
    .mega-services .ms-rail .ms-expert { margin-top: 0.5rem; padding: 0.5rem 0.75rem; }
}

.ms-all-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.9rem 0.25rem 0;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--rc-navy);
    border: 1px dashed rgba(31, 39, 184, 0.2);
    transition: background 0.25s ease, border-color 0.25s ease;
}
.ms-all-link span { display: inline-flex; align-items: center; gap: 0.5rem; }
.ms-all-link > i { font-size: 0.75rem; transition: transform 0.25s var(--ease-premium); }
.ms-all-link:hover { color: var(--rc-navy); background: #ffffff; border-color: rgba(31, 39, 184, 0.35); border-style: solid; }
.ms-all-link:hover > i { transform: translateX(4px); }

.ms-expert {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: auto 0.25rem 0;
    padding: 0.85rem;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(140deg, var(--rc-navy-deep) 0%, var(--rc-navy) 60%, var(--rc-blue) 100%);
    overflow: hidden;
    box-shadow: 0 14px 28px -16px rgba(21, 31, 85, 0.7);
    transition: transform 0.3s var(--ease-premium), box-shadow 0.3s ease;
}
.ms-expert::after {
    content: '';
    position: absolute; top: -40px; right: -30px;
    width: 110px; height: 110px; border-radius: 50%;
    background: radial-gradient(circle, rgba(138, 217, 255, 0.35), transparent 70%);
}
.ms-expert-icon {
    flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--rc-amber);
    background: rgba(255, 255, 255, 0.1);
}
.ms-expert-text { position: relative; display: flex; flex-direction: column; min-width: 0; }
.ms-expert-text strong { font-size: 0.82rem; color: #ffffff; }
.ms-expert-text span { font-size: 0.74rem; color: rgba(226, 232, 255, 0.78); }
.ms-expert-text span i { font-size: 0.65rem; margin-left: 0.2rem; transition: transform 0.25s var(--ease-premium); }
.ms-expert:hover { color: #ffffff; transform: translateY(-2px); box-shadow: 0 18px 32px -16px rgba(21, 31, 85, 0.8); }
.ms-expert:hover .ms-expert-text span i { transform: translateX(3px); }

/* Panels stack in one grid cell so the menu height never jumps between categories */
.ms-panels { flex: 1; min-width: 0; display: grid; }
.ms-panel {
    --ms-color: var(--rc-blue);
    --ms-tint: rgba(45, 91, 255, 0.09);
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    padding: 1.4rem 1.5rem 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(12px);
    transition: opacity 0.25s ease, transform 0.35s var(--ease-premium), visibility 0s linear 0.35s;
}
.ms-panel.accent-green  { --ms-color: var(--rc-violet); --ms-tint: rgba(168, 123, 255, 0.15); }
.ms-panel.accent-orange { --ms-color: var(--rc-pink); --ms-tint: rgba(255, 154, 46, 0.14); }
.ms-panel.is-active {
    opacity: 1;
    /* inherit, not visible: a visible child would escape the closed menu's
       visibility:hidden and catch hovers, popping the menu open by itself */
    visibility: inherit;
    transform: none;
    transition: opacity 0.35s ease 0.05s, transform 0.45s var(--ease-premium) 0.05s, visibility 0s;
}

.ms-panel-head { padding-bottom: 1rem; margin-bottom: 0.9rem; border-bottom: 1px solid rgba(31, 39, 184, 0.07); }
.ms-panel-eyebrow {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--ms-color);
}
.ms-panel-eyebrow::before { content: ''; width: 16px; height: 2px; border-radius: 2px; background: currentColor; }
.ms-panel-head h5 { margin: 0.35rem 0 0.3rem; font-size: 1.2rem; color: var(--gray-900); }
.ms-panel-head p { margin: 0; font-size: 0.82rem; line-height: 1.55; color: var(--gray-500); max-width: 520px; }

.ms-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.6rem; align-content: start; }
.ms-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.8rem;
    border-radius: 14px;
    border: 1px solid transparent;
    color: inherit;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease-premium), box-shadow 0.3s ease;
}
.ms-card-icon {
    flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    color: var(--ms-color);
    background: var(--ms-tint);
    transition: background 0.3s ease, color 0.3s ease, transform 0.35s var(--ease-premium);
}
.ms-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ms-card-title {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem;
    font-family: var(--font-heading); font-weight: 700; font-size: 0.84rem; line-height: 1.35; color: var(--gray-900);
}
.ms-card-desc {
    margin-top: 0.2rem;
    font-size: 0.74rem; line-height: 1.45; color: var(--gray-500);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ms-card-arrow {
    align-self: center;
    font-size: 0.7rem;
    color: var(--ms-color);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.25s ease, transform 0.3s var(--ease-premium);
}
.ms-card:hover,
.ms-card:focus-visible {
    background: #F6F8FC;
    border-color: rgba(31, 39, 184, 0.07);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -16px rgba(21, 31, 85, 0.35);
}
.ms-card:hover .ms-card-icon { background: var(--ms-color); color: #ffffff; transform: rotate(-5deg) scale(1.05); }
.ms-card:hover .ms-card-arrow { opacity: 1; transform: translateX(0); }
.ms-card.is-current { background: var(--ms-tint); }

/* Staggered card entrance each time a panel becomes active */
.ms-panel.is-active .ms-card { animation: dropdownItemIn 0.45s var(--ease-premium) backwards; }
.ms-panel.is-active .ms-card:nth-child(2) { animation-delay: 0.04s; }
.ms-panel.is-active .ms-card:nth-child(3) { animation-delay: 0.08s; }
.ms-panel.is-active .ms-card:nth-child(4) { animation-delay: 0.12s; }
.ms-panel.is-active .ms-card:nth-child(5) { animation-delay: 0.16s; }
.ms-panel.is-active .ms-card:nth-child(6) { animation-delay: 0.2s; }

.ms-badge {
    display: inline-flex; align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.ms-badge-new { color: #ffffff; background: linear-gradient(135deg, var(--rc-violet-light), var(--rc-violet)); }
.ms-badge-popular { color: #ffffff; background: linear-gradient(135deg, var(--rc-amber), var(--rc-pink)); }

.ms-panel-foot { margin-top: auto; padding-top: 0.9rem; }
.ms-explore {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-size: 0.82rem; font-weight: 700;
    color: var(--ms-color, var(--rc-navy));
}
.ms-explore i { font-size: 0.72rem; transition: transform 0.25s var(--ease-premium); }
.ms-explore:hover { color: var(--ms-color, var(--rc-navy)); }
.ms-explore:hover i { transform: translateX(4px); }
.ms-more {
    padding: 0.12rem 0.5rem; border-radius: var(--radius-full);
    font-size: 0.68rem; color: var(--ms-color); background: var(--ms-tint);
}
.ms-empty { font-size: 0.85rem; color: var(--gray-500); margin: 0; }

/* -------------------------------------------------------
   CTA
------------------------------------------------------- */
.navbar-right { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

.btn-navbar-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    overflow: hidden;
    isolation: isolate;
    background: var(--rc-gradient-brand);
    color: #ffffff !important;
    padding: 0.72rem 1.4rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: var(--radius-full);
    box-shadow: 0 8px 20px -6px rgba(31, 39, 184, 0.5);
    transition: transform 0.3s var(--ease-premium), box-shadow 0.3s ease;
}
/* Warm half of the logo fades in on hover */
.btn-navbar-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--rc-orange) 0%, var(--rc-pink) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.btn-navbar-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    pointer-events: none;
}
.btn-navbar-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -8px rgba(255, 61, 154, 0.55);
}
.btn-navbar-cta:hover::after { opacity: 1; }
.btn-navbar-cta:hover::before { animation: navShimmer 0.9s ease; }
.btn-navbar-cta i { transition: transform 0.25s var(--ease-premium); }
.btn-navbar-cta:hover i { transform: translateX(3px); }
@keyframes navShimmer { to { left: 130%; } }

/* -------------------------------------------------------
   SCROLL PROGRESS (docked to the bar's bottom edge)
------------------------------------------------------- */
.nav-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    pointer-events: none;
    overflow: visible;
}
.nav-progress-bar {
    position: absolute;
    inset: 0;
    display: block;
    background: var(--rc-gradient-spectrum);
    background-size: 100vw 100%;
    transform-origin: left center;
    transform: scaleX(0);
    will-change: transform;
}
/* Glowing leading edge — positioned by JS alongside the bar */
.nav-progress::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 154, 46, 0.35), 0 0 14px 3px rgba(255, 154, 46, 0.65);
    transform: translateX(var(--progress-x, 0px));
    opacity: var(--progress-tip, 0);
    transition: opacity 0.3s ease;
    will-change: transform;
}

/* -------------------------------------------------------
   MOBILE TOGGLE
------------------------------------------------------- */
.mobile-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(31, 39, 184, 0.06);
    border: 1px solid rgba(31, 39, 184, 0.1);
    cursor: pointer;
    transition: background 0.25s ease;
}
.mobile-toggle:hover { background: rgba(31, 39, 184, 0.1); }
.mobile-toggle .bar {
    position: absolute;
    left: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--rc-navy);
    transition: transform 0.35s var(--ease-premium), opacity 0.2s ease, width 0.35s var(--ease-premium);
}
.mobile-toggle .bar:nth-child(1) { top: 15px; width: 20px; }
.mobile-toggle .bar:nth-child(2) { top: 21px; width: 14px; background: var(--rc-azure); }
.mobile-toggle .bar:nth-child(3) { top: 27px; width: 20px; background: var(--rc-orange); }

/* -------------------------------------------------------
   DRAWER PARTS (hidden on desktop)
------------------------------------------------------- */
.drawer-header,
.drawer-footer { display: none; }

/* -------------------------------------------------------
   LAPTOP (1025px - 1199px)
------------------------------------------------------- */
@media (max-width: 1199px) {
    .nav-link { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
    .btn-navbar-cta { padding: 0.65rem 1.1rem; }
    .brand-logo-img { height: 40px; }
}

/* -------------------------------------------------------
   TABLET & MOBILE (≤1024px): off-canvas drawer
------------------------------------------------------- */
@media (max-width: 1024px) {
    :root { --nav-height: 64px; }

    .navbar,
    .navbar.scrolled { padding: 0.6rem 0; }
    .brand-logo-img,
    .navbar.scrolled .brand-logo-img { height: 36px; }

    .mobile-toggle { display: block; }
    .navbar-right > .btn-navbar-cta { display: none; }
    .nav-indicator { display: none; }

    .navbar-nav-container {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(400px, 100%);
        z-index: 1060;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        background: #ffffff;
        border: none;
        border-radius: 0;
        box-shadow: -24px 0 60px -20px rgba(21, 31, 85, 0.35);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.45s var(--ease-premium), visibility 0s linear 0.45s;
        overscroll-behavior: contain;
    }
    .navbar-nav-container.mobile-open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.45s var(--ease-premium), visibility 0s;
    }

    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        padding: 0.9rem 1.25rem;
        border-bottom: 1px solid rgba(31, 39, 184, 0.08);
        position: relative;
    }
    .drawer-header::after {
        content: '';
        position: absolute;
        left: 0; right: 0; bottom: -1px;
        height: 2px;
        background: var(--rc-gradient-spectrum);
        opacity: 0.85;
    }
    .drawer-brand img { height: 34px; width: auto; }
    .drawer-close {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
        color: var(--rc-navy);
        background: rgba(31, 39, 184, 0.06);
        transition: background 0.25s ease, transform 0.3s var(--ease-premium);
    }
    .drawer-close:hover { background: rgba(31, 39, 184, 0.12); transform: rotate(90deg); }

    .navbar-nav {
        flex: 1;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        padding: 1rem 1rem 1.5rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Staggered entrance of drawer items */
    .navbar-nav > .nav-item {
        opacity: 0;
        transform: translateX(18px);
        transition: opacity 0.35s ease, transform 0.45s var(--ease-premium);
    }
    .mobile-open .navbar-nav > .nav-item { opacity: 1; transform: none; }
    .mobile-open .navbar-nav > .nav-item:nth-child(1) { transition-delay: 0.08s; }
    .mobile-open .navbar-nav > .nav-item:nth-child(2) { transition-delay: 0.12s; }
    .mobile-open .navbar-nav > .nav-item:nth-child(3) { transition-delay: 0.16s; }
    .mobile-open .navbar-nav > .nav-item:nth-child(4) { transition-delay: 0.2s; }
    .mobile-open .navbar-nav > .nav-item:nth-child(5) { transition-delay: 0.24s; }
    .mobile-open .navbar-nav > .nav-item:nth-child(6) { transition-delay: 0.28s; }

    .nav-link {
        gap: 0.85rem;
        width: 100%;
        min-height: 52px;
        padding: 0.7rem 0.85rem;
        border-radius: 14px;
        font-size: 1rem;
        color: #1F2744;
    }
    .nav-link:hover { background: #F4F6FB; }
    .nav-link-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        border-radius: 10px;
        font-size: 0.9rem;
        color: var(--rc-blue);
        background: rgba(45, 91, 255, 0.08);
    }
    .nav-link.active {
        background: linear-gradient(90deg, rgba(76, 198, 255, 0.1), rgba(31, 39, 184, 0.06));
        color: var(--rc-navy);
    }
    .nav-link.active::after,
    .has-dropdown .nav-link.active::after {
        left: 0;
        top: 50%;
        bottom: auto;
        width: 4px;
        height: 24px;
        transform: translateY(-50%);
        background: linear-gradient(180deg, var(--rc-azure), var(--rc-violet-light), var(--rc-orange));
    }
    .nav-link.active .nav-link-icon { background: var(--rc-gradient-brand); color: #ffffff; }

    .dropdown-arrow {
        margin-left: auto;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        background: rgba(31, 39, 184, 0.05);
    }
    .has-dropdown:hover .dropdown-arrow,
    .has-dropdown:focus-within .dropdown-arrow { transform: none; }
    .has-dropdown.dropdown-open .dropdown-arrow { transform: rotate(180deg); }
    .navbar-nav-container .has-dropdown { position: relative; }
    .mega-dropdown::before { display: none; }

    /* Services accordion — grid-rows trick animates to the content's real height */
    .mega-dropdown,
    .has-dropdown:hover .mega-dropdown,
    .has-dropdown:focus-within .mega-dropdown {
        position: static;
        display: grid;
        grid-template-rows: 0fr;
        width: auto;
        max-width: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        transition: grid-template-rows 0.4s var(--ease-premium);
    }
    .has-dropdown.dropdown-open .mega-dropdown { grid-template-rows: 1fr; }
    .mega-dropdown-inner { min-height: 0; overflow: hidden; border-radius: 0; }

    .ms-layout { display: none; }
    .mega-services { width: auto; }

    /* An open section sits in one soft, tinted card — same family as the desktop panels */
    .ms-mobile,
    .mega-about-inner {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin: 0.45rem 0 0.6rem;
        padding: 0.55rem;
        border-radius: 20px;
        background: #F5F7FC;
        border: 1px solid rgba(31, 39, 184, 0.06);
    }

    /* Shared hero card (About feature panel + Services header) */
    .mega-about-feature,
    .mm-hero {
        position: relative;
        isolation: isolate;
        overflow: hidden;
        display: flex;
        flex: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1rem 1.05rem;
        border-radius: 15px;
        border: 1px solid rgba(31, 39, 184, 0.06);
        border-right: 1px solid rgba(31, 39, 184, 0.06);
        background: linear-gradient(180deg, #FAFBFE 0%, #EEF2FA 100%);
    }
    .mega-about-feature .maf-top,
    .mm-hero .maf-top { margin-bottom: 0.75rem; }
    .maf-emblem { width: 38px; height: 38px; border-radius: 11px; }
    .maf-emblem img { width: 24px; }
    .maf-title,
    .mm-hero-title { margin: 0; font-size: 1.08rem; line-height: 1.3; color: var(--gray-900); }
    .maf-desc,
    .maf-cta,
    .mega-about-feature .maf-mosaic { display: none; }
    .maf-stats { margin: 0.85rem 0 0; gap: 0.45rem; }
    .maf-stat { padding: 0.65rem 0.7rem 0.6rem; }
    .maf-stat-value { font-size: 1.25rem; }
    .mm-hero-meta { margin: 0.25rem 0 0; font-size: 0.76rem; color: var(--gray-500); }

    /* About links as white cards */
    .mega-about-grid { grid-template-columns: 1fr; gap: 0.45rem; padding: 0; }
    .mega-about-card {
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 0.8rem;
        border-radius: 14px;
        background: #ffffff;
        border: 1px solid rgba(31, 39, 184, 0.07);
    }
    .mega-about-card:hover,
    .mega-about-card:focus-visible { transform: none; box-shadow: none; background: #ffffff; }
    .mega-about-card.is-current { background: var(--card-tint); border-color: transparent; }
    .mega-about-card-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 0.9rem; }
    .mega-about-card:hover .mega-about-card-icon { transform: none; background: var(--card-tint); color: var(--card-color); }
    .mega-about-card.is-current .mega-about-card-icon { background: var(--card-color); color: #ffffff; }
    .mega-about-card-title { font-size: 0.92rem; margin-bottom: 0.1rem; }
    .mega-about-card-desc { font-size: 0.76rem; margin-bottom: 0; }
    .mega-about-card-more { display: none; }
    .mega-about-card,
    .has-dropdown:hover .mega-about-card { animation: none; }

    /* Services: all-services link, category cards, service rows */
    .mobile-all-services {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.8rem 0.95rem;
        border-radius: 14px;
        font-size: 0.86rem;
        font-weight: 700;
        color: var(--rc-navy);
        background: #ffffff;
        border: 1px dashed rgba(31, 39, 184, 0.22);
    }
    .mobile-all-services span { display: inline-flex; align-items: center; gap: 0.5rem; }

    .mega-dropdown-grid { display: flex; flex-direction: column; gap: 0.45rem; padding: 0; }
    .mega-dropdown-category,
    .has-dropdown:hover .mega-dropdown-category { animation: none; }
    .mega-dropdown-category {
        padding: 0;
        border-radius: 14px;
        background: #ffffff;
        border: 1px solid rgba(31, 39, 184, 0.07);
        transition: box-shadow 0.3s ease, border-color 0.3s ease;
    }
    .mega-dropdown-category:hover { background: #ffffff; }
    .mega-dropdown-category.is-open { border-color: transparent; box-shadow: 0 12px 26px -18px rgba(21, 31, 85, 0.4); }
    .mega-dropdown-grid.has-focus .mega-dropdown-category:not(:hover) { opacity: 1; }

    .category-title-wrap { gap: 0.7rem; margin: 0; padding: 0.6rem 0.55rem 0.6rem 0.75rem; min-height: 58px; }
    .category-icon-badge { width: 36px; height: 36px; border-radius: 10px; font-size: 0.9rem; transition: background 0.3s ease, color 0.3s ease; }
    .mega-dropdown-category:hover .category-icon-badge { transform: none; background: var(--cat-tint); color: var(--cat-color); }
    .mega-dropdown-category.is-open .category-icon-badge { background: var(--cat-color); color: #ffffff; }
    .category-title-text { flex: 1; min-width: 0; }
    .category-title-wrap h6 { font-size: 0.9rem; font-weight: 700; line-height: 1.3; }
    .category-count { display: block; margin-top: 0.1rem; font-size: 0.72rem; color: var(--gray-500); }

    .category-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border-radius: 11px;
        font-size: 0.78rem;
        color: var(--cat-color);
        background: var(--cat-tint);
        transition: background 0.25s ease, color 0.25s ease;
    }
    .category-toggle i { transition: transform 0.35s var(--ease-premium); }
    .mega-dropdown-category.is-open .category-toggle { background: var(--cat-color); color: #ffffff; }
    .mega-dropdown-category.is-open .category-toggle i { transform: rotate(45deg); }

    /* Height animates to the real content size (no max-height guesswork = smoother) */
    .mega-dropdown-links {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.4s var(--ease-premium);
    }
    .mega-dropdown-category.is-open .mega-dropdown-links { grid-template-rows: 1fr; }
    .mega-dropdown-links-inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 0.15rem; }
    .mega-dropdown-links-inner > :first-child { margin-top: 0.1rem; }
    .mega-dropdown-links-inner > :last-child { margin-bottom: 0.55rem; }

    .service-menu-link,
    .service-menu-link:hover {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        margin: 0 0.5rem;
        padding: 0.5rem 0.5rem;
        border-radius: 10px;
        font-size: 0.85rem;
        line-height: 1.35;
        color: var(--gray-700);
    }
    .service-menu-link:hover { background: #F6F8FC; color: var(--gray-900); }
    .service-menu-link i { opacity: 1; transform: none; margin-top: 0; color: inherit; font-size: inherit; }
    .service-menu-icon {
        flex-shrink: 0;
        width: 28px; height: 28px; border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        font-size: 0.72rem;
        color: var(--cat-color);
        background: var(--cat-tint);
    }
    .service-menu-label { flex: 1; min-width: 0; }
    .service-menu-link .ms-badge { align-self: center; }
    .service-menu-link.is-current { background: var(--cat-tint); color: var(--gray-900); font-weight: 600; }
    .service-menu-more,
    .service-menu-more:hover {
        justify-content: space-between;
        margin-top: 0.2rem;
        padding: 0.65rem 0.5rem 0.2rem;
        border-top: 1px dashed rgba(31, 39, 184, 0.12);
        border-radius: 0;
        background: transparent;
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--cat-color);
    }
    .service-menu-more i { font-size: 0.72rem; color: var(--cat-color); }

    .mm-expert { margin: 0.05rem 0 0; }

    /* Staggered entrance when a section / category opens */
    .dropdown-open .mega-about-feature,
    .dropdown-open .mm-hero,
    .dropdown-open .mega-about-card,
    .dropdown-open .mobile-all-services,
    .dropdown-open .mega-dropdown-category,
    .dropdown-open .mm-expert { animation: mmItemIn 0.45s var(--ease-premium) backwards; }
    .dropdown-open .mega-about-card:nth-child(1),
    .dropdown-open .mobile-all-services { animation-delay: 0.06s; }
    .dropdown-open .mega-about-card:nth-child(2),
    .dropdown-open .mega-dropdown-category:nth-child(1) { animation-delay: 0.1s; }
    .dropdown-open .mega-about-card:nth-child(3),
    .dropdown-open .mega-dropdown-category:nth-child(2) { animation-delay: 0.14s; }
    .dropdown-open .mega-about-card:nth-child(4),
    .dropdown-open .mega-dropdown-category:nth-child(3) { animation-delay: 0.18s; }
    .dropdown-open .mega-dropdown-category:nth-child(4) { animation-delay: 0.22s; }
    .dropdown-open .mm-expert { animation-delay: 0.24s; }
    .mega-dropdown-category.is-open .service-menu-link { animation: mmItemIn 0.4s var(--ease-premium) backwards; }
    .mega-dropdown-category.is-open .service-menu-link:nth-child(2) { animation-delay: 0.03s; }
    .mega-dropdown-category.is-open .service-menu-link:nth-child(3) { animation-delay: 0.06s; }
    .mega-dropdown-category.is-open .service-menu-link:nth-child(4) { animation-delay: 0.09s; }
    .mega-dropdown-category.is-open .service-menu-link:nth-child(5) { animation-delay: 0.12s; }
    .mega-dropdown-category.is-open .service-menu-link:nth-child(6) { animation-delay: 0.15s; }
    .mega-dropdown-category.is-open .service-menu-link:nth-child(n+7) { animation-delay: 0.18s; }
    @keyframes mmItemIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

    /* Touch polish: no grey tap flash, gentle press feedback, contained drawer scrolling */
    .navbar a,
    .navbar button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
    .nav-link,
    .mega-about-card,
    .service-menu-link,
    .mobile-all-services,
    .category-toggle,
    .ms-expert,
    .drawer-cta { transition-property: transform, background, color, box-shadow, border-color; }
    .nav-link:active,
    .mega-about-card:active,
    .service-menu-link:active,
    .mobile-all-services:active,
    .ms-expert:active,
    .drawer-cta:active { transform: scale(0.98); }
    .category-toggle:active { transform: scale(0.92); }
    .navbar-nav { overscroll-behavior: contain; scroll-behavior: smooth; }

    .drawer-footer {
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
        flex-shrink: 0;
        padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(31, 39, 184, 0.08);
        background: #F8F9FD;
    }
    .drawer-cta { width: 100%; padding: 0.9rem 1.2rem; font-size: 0.95rem; }
    .drawer-contact { display: flex; flex-direction: column; gap: 0.35rem; }
    .drawer-contact a {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        font-size: 0.85rem;
        color: var(--gray-600);
        padding: 0.3rem 0;
        overflow-wrap: anywhere;
    }
    .drawer-contact i { width: 16px; color: var(--rc-blue); }
    .drawer-contact a:hover { color: var(--rc-navy); }
}

@media (max-width: 480px) {
    .brand-logo-img,
    .navbar.scrolled .brand-logo-img { height: 32px; }
    .navbar .container { padding-left: 1rem; padding-right: 1rem; }
    .navbar-nav-container { width: 100%; }
}

/* Page scroll lock while the drawer is open */
html.nav-locked,
html.nav-locked body { overflow: hidden; }
/* Keep the open drawer uncluttered on tablets, where the page shows beside it */
html.nav-locked .cookie-notice,
html.nav-locked .back-to-top { opacity: 0; visibility: hidden; pointer-events: none; }

/* -------------------------------------------------------
   ACCESSIBILITY & REDUCED MOTION
------------------------------------------------------- */
.navbar a:focus-visible,
.navbar button:focus-visible {
    outline: 2px solid var(--rc-azure);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .navbar,
    .navbar::before,
    .nav-indicator,
    .nav-link,
    .brand-logo-img,
    .mega-dropdown,
    .mega-dropdown-category,
    .mega-dropdown-links,
    .mega-about-card,
    .mega-about-card-icon,
    .ms-tab-indicator,
    .ms-panel,
    .mm-hero,
    .mega-dropdown-category,
    .dropdown-open .mega-about-feature,
    .dropdown-open .mobile-all-services,
    .dropdown-open .mm-expert,
    .ms-card,
    .ms-card-icon,
    .maf-sheen,
    .maf-aurora,
    .maf-mosaic polygon,
    .maf-dot::after,
    .maf-cta,
    .maf-cta-arrow i,
    .navbar-nav > .nav-item,
    .navbar-nav-container,
    .btn-navbar-cta,
    .btn-navbar-cta::before,
    .mobile-toggle .bar,
    .service-menu-link,
    .service-menu-link i,
    .dropdown-arrow,
    .category-toggle,
    .category-toggle i {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   SITE SEARCH (navbar trigger + command-palette overlay)
   ========================================================================== */
.nav-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    height: 44px;
    padding: 0 0.6rem 0 0.95rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    background: rgba(31, 39, 184, 0.04);
    border: 1px solid rgba(31, 39, 184, 0.1);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav-search-btn i { font-size: 0.9rem; color: var(--rc-navy); }
.nav-search-btn:hover { color: var(--rc-navy); background: #ffffff; border-color: rgba(31, 39, 184, 0.22); box-shadow: 0 8px 18px -12px rgba(21, 31, 85, 0.45); }
.nav-search-text { min-width: 64px; text-align: left; }
.nav-search-kbd {
    padding: 0.18rem 0.45rem;
    border-radius: 7px;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gray-500);
    background: #ffffff;
    border: 1px solid rgba(31, 39, 184, 0.12);
    box-shadow: 0 1px 0 rgba(31, 39, 184, 0.12);
}
@media (max-width: 1279px) {
    .nav-search-btn { width: 44px; padding: 0; justify-content: center; }
    .nav-search-text, .nav-search-kbd { display: none; }
}

.site-search {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: min(12vh, 110px) 1rem 1rem;
}
.site-search[hidden] { display: none; }
.ss-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 36, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.ss-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(720px, 100%);
    max-height: min(640px, calc(100vh - 2rem));
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 50px 100px -30px rgba(6, 10, 36, 0.65), 0 0 0 1px rgba(31, 39, 184, 0.08);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-14px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.35s var(--ease-premium);
}
.ss-panel::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: var(--rc-gradient-spectrum);
    z-index: 2;
}
.site-search.is-open .ss-backdrop { opacity: 1; }
.site-search.is-open .ss-panel { opacity: 1; transform: none; }

.ss-form {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1.1rem 1rem 1.35rem;
    border-bottom: 1px solid rgba(31, 39, 184, 0.08);
}
.ss-icon { font-size: 1.1rem; color: var(--rc-navy); }
.ss-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gray-900);
    -webkit-appearance: none;
    appearance: none;
}
.ss-input::placeholder { color: var(--gray-400); font-weight: 500; }
/* The panel itself is the focus context; the global focus ring would clash here */
.ss-input:focus,
.ss-input:focus-visible,
.sp-form input:focus,
.sp-form input:focus-visible { outline: none; box-shadow: none; }
.sp-form:focus-within { border-color: rgba(76, 198, 255, 0.55); box-shadow: 0 0 0 4px rgba(76, 198, 255, 0.12), 0 18px 40px -26px rgba(21, 31, 85, 0.45); }
.ss-input::-webkit-search-cancel-button { display: none; }
.ss-spinner {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(76, 198, 255, 0.2);
    border-top-color: var(--rc-azure);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.site-search.is-loading .ss-spinner { opacity: 1; animation: ssSpin 0.7s linear infinite; }
@keyframes ssSpin { to { transform: rotate(360deg); } }
.ss-clear,
.ss-esc {
    display: none;
    align-items: center;
    justify-content: center;
    height: 30px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-500);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    cursor: pointer;
}
.ss-clear { width: 30px; }
.site-search.has-query .ss-clear { display: inline-flex; }
.ss-esc { display: inline-flex; padding: 0 0.6rem; }
.ss-esc-icon { display: none; }
.ss-clear:hover, .ss-esc:hover { color: var(--rc-navy); background: #ffffff; }

.ss-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0.75rem 0.75rem 0.9rem; }
.site-search.has-query .ss-default { display: none; }

.ss-section + .ss-section { margin-top: 1rem; }
.ss-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.6rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-500);
}
.ss-link-btn { font-size: 0.72rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--rc-blue); background: none; border: none; cursor: pointer; }
.ss-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0 0.5rem; }
.ss-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.ss-chip i { color: var(--rc-blue); font-size: 0.75rem; }
.ss-chip:hover { color: var(--rc-navy); background: #ffffff; border-color: rgba(31, 39, 184, 0.25); }
.ss-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding: 0 0.5rem; }
.ss-quick-item {
    --q-color: var(--rc-blue);
    --q-tint: rgba(45, 91, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem;
    border-radius: 14px;
    color: inherit;
    border: 1px solid rgba(31, 39, 184, 0.08);
    transition: transform 0.25s var(--ease-premium), box-shadow 0.25s ease, border-color 0.25s ease;
}
.ss-quick-item.accent-green  { --q-color: var(--rc-violet); --q-tint: rgba(168, 123, 255, 0.16); }
.ss-quick-item.accent-orange { --q-color: var(--rc-pink); --q-tint: rgba(255, 154, 46, 0.15); }
.ss-quick-item:hover { transform: translateY(-2px); border-color: transparent; box-shadow: 0 12px 24px -16px rgba(21, 31, 85, 0.45); }
.ss-quick-icon {
    flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--q-color); background: var(--q-tint);
}
.ss-quick-text { display: flex; flex-direction: column; min-width: 0; }
.ss-quick-text strong { font-size: 0.82rem; line-height: 1.3; color: var(--gray-900); }
.ss-quick-text span { font-size: 0.7rem; color: var(--gray-500); }

/* Results */
.ss-group + .ss-group { margin-top: 0.6rem; }
.ss-group-head { display: flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.6rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-500); }
.ss-group-head i { color: var(--rc-azure); }
.ss-group-count { margin-left: auto; font-weight: 600; letter-spacing: 0; text-transform: none; }
.ss-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.7rem;
    border-radius: 13px;
    color: inherit;
    scroll-margin: 0.5rem;
    transition: background 0.15s ease;
    animation: ssItemIn 0.3s var(--ease-premium) backwards;
}
.ss-item-icon {
    flex-shrink: 0;
    width: 38px; height: 38px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    color: var(--rc-blue);
    background: rgba(45, 91, 255, 0.09);
    transition: background 0.2s ease, color 0.2s ease;
}
.ss-group[data-key="insights"] .ss-item-icon,
.ss-group[data-key="industries"] .ss-item-icon { color: var(--rc-violet); background: rgba(168, 123, 255, 0.15); }
.ss-group[data-key="faqs"] .ss-item-icon,
.ss-group[data-key="pages"] .ss-item-icon { color: var(--rc-pink); background: rgba(255, 154, 46, 0.14); }
.ss-item-body { flex: 1; min-width: 0; }
.ss-item-title { display: block; font-weight: 700; font-size: 0.9rem; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-item-title .ms-badge { margin-left: 0.35rem; vertical-align: 1px; }
.ss-item-sub { display: block; font-size: 0.76rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-item mark { background: linear-gradient(transparent 55%, rgba(255, 179, 71, 0.55) 55%); color: inherit; padding: 0; border-radius: 2px; }
.ss-item-meta { flex-shrink: 0; font-size: 0.68rem; font-weight: 600; color: var(--gray-500); padding: 0.2rem 0.5rem; border-radius: var(--radius-full); background: var(--gray-50); border: 1px solid var(--gray-100); }
.ss-item-go { flex-shrink: 0; font-size: 0.75rem; color: var(--rc-navy); opacity: 0; transform: translateX(-4px); transition: opacity 0.15s ease, transform 0.2s ease; }
.ss-item:hover,
.ss-item.is-active { background: #F3F6FC; }
.ss-item.is-active { box-shadow: inset 3px 0 0 var(--rc-azure); }
.ss-item.is-active .ss-item-icon { color: #ffffff; background: var(--rc-gradient-brand); }
.ss-item.is-active .ss-item-go,
.ss-item:hover .ss-item-go { opacity: 1; transform: none; }
@keyframes ssItemIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ss-empty { padding: 2.25rem 1rem 2rem; text-align: center; }
.ss-empty-icon {
    width: 56px; height: 56px; margin: 0 auto 0.85rem; border-radius: 16px;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
    color: var(--rc-navy); background: rgba(31, 39, 184, 0.06);
}
.ss-empty h6 { margin: 0 0 0.3rem; font-size: 1rem; color: var(--gray-900); }
.ss-empty p { margin: 0 auto 1rem; max-width: 380px; font-size: 0.85rem; color: var(--gray-500); }

.ss-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.2rem;
    border-top: 1px solid rgba(31, 39, 184, 0.08);
    background: #F8F9FD;
}
.ss-hints { display: flex; gap: 1rem; font-size: 0.72rem; color: var(--gray-500); }
.ss-hints kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 0.3rem; margin-right: 0.2rem;
    border-radius: 5px; font-family: var(--font-sans); font-size: 0.66rem; font-weight: 700;
    color: var(--gray-600); background: #ffffff; border: 1px solid var(--gray-200); box-shadow: 0 1px 0 var(--gray-200);
}
.ss-see-all { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 700; color: var(--rc-navy); white-space: nowrap; }
.ss-see-all[hidden] { display: none; }
.ss-see-all i { font-size: 0.7rem; transition: transform 0.2s ease; }
.ss-see-all:hover i { transform: translateX(3px); }

html.search-locked,
html.search-locked body { overflow: hidden; }

/* Phones: full-screen sheet */
@media (max-width: 640px) {
    .site-search { padding: 0; }
    .ss-panel { width: 100%; max-height: none; height: 100%; border-radius: 0; transform: translateY(16px); }
    .ss-form { padding: calc(0.85rem + env(safe-area-inset-top)) 0.85rem 0.85rem 1.1rem; }
    .ss-input { font-size: 1.05rem; }
    .ss-esc { width: 38px; height: 38px; padding: 0; border-radius: 11px; }
    .ss-esc-text { display: none; }
    .ss-esc-icon { display: inline; font-size: 1rem; }
    .ss-quick { grid-template-columns: 1fr; }
    .ss-hints { display: none; }
    .ss-footer { justify-content: center; padding-bottom: calc(0.7rem + env(safe-area-inset-bottom)); }
    .ss-item-meta { display: none; }
}
@media (max-width: 1024px) {
    .navbar-right { gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ss-backdrop, .ss-panel, .ss-item { transition: none !important; animation: none !important; }
}

/* Search results page */
.sp-section { padding-top: 3rem; }
.sp-form {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.45rem 0.45rem 0.45rem 1.25rem; margin-bottom: 1.5rem;
    border-radius: var(--radius-full); background: #ffffff;
    border: 1px solid rgba(31, 39, 184, 0.12);
    box-shadow: 0 18px 40px -26px rgba(21, 31, 85, 0.45);
}
.sp-form > i { color: var(--rc-navy); }
.sp-form input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 1.02rem; font-weight: 600; color: var(--gray-900); }
.sp-form button {
    display: inline-flex; align-items: center; gap: 0.5rem; height: 46px; padding: 0 1.3rem; border: none; border-radius: var(--radius-full);
    font-weight: 700; color: #ffffff; background: var(--rc-gradient-brand); cursor: pointer;
}
.sp-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.sp-filter {
    display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.85rem; border-radius: var(--radius-full);
    font-size: 0.82rem; font-weight: 600; color: var(--gray-700); background: var(--gray-50); border: 1px solid var(--gray-200);
}
.sp-filter i { color: var(--rc-blue); }
.sp-filter span { font-size: 0.72rem; padding: 0 0.4rem; border-radius: 10px; color: var(--rc-navy); background: rgba(31, 39, 184, 0.08); }
.sp-filter:hover { color: var(--rc-navy); border-color: rgba(31, 39, 184, 0.25); background: #ffffff; }
.sp-group { scroll-margin-top: calc(var(--nav-height) + 20px); }
.sp-group + .sp-group { margin-top: 2rem; }
.sp-group-title { display: flex; align-items: center; gap: 0.55rem; font-size: 1.05rem; margin-bottom: 0.75rem; color: var(--gray-900); }
.sp-group-title i { color: var(--rc-azure); }
.sp-group-title span { font-size: 0.75rem; font-weight: 600; color: var(--gray-500); }
.sp-list { display: flex; flex-direction: column; gap: 0.5rem; }
.sp-item {
    display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem; border-radius: 16px; color: inherit;
    background: #ffffff; border: 1px solid rgba(31, 39, 184, 0.08);
    transition: transform 0.25s var(--ease-premium), box-shadow 0.25s ease, border-color 0.25s ease;
}
.sp-item:hover { transform: translateY(-2px); border-color: transparent; box-shadow: 0 16px 32px -20px rgba(21, 31, 85, 0.45); }
.sp-item-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--rc-blue); background: rgba(45, 91, 255, 0.09); }
.sp-insights .sp-item-icon, .sp-industries .sp-item-icon { color: var(--rc-violet); background: rgba(168, 123, 255, 0.15); }
.sp-faqs .sp-item-icon, .sp-pages .sp-item-icon { color: var(--rc-pink); background: rgba(255, 154, 46, 0.14); }
.sp-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-item-title { font-weight: 700; color: var(--gray-900); }
.sp-item-sub { font-size: 0.84rem; color: var(--gray-500); }
.sp-item-meta { flex-shrink: 0; font-size: 0.72rem; font-weight: 600; color: var(--gray-500); padding: 0.2rem 0.55rem; border-radius: var(--radius-full); background: var(--gray-50); border: 1px solid var(--gray-100); }
.sp-item-go { color: var(--rc-navy); font-size: 0.8rem; opacity: 0.4; transition: opacity 0.2s ease, transform 0.2s ease; }
.sp-item:hover .sp-item-go { opacity: 1; transform: translateX(3px); }
.sp-empty { text-align: center; padding: 2.5rem 1rem; }
.sp-empty h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.sp-empty p { color: var(--gray-500); max-width: 460px; margin: 0 auto 1.25rem; }
.sp-empty kbd { padding: 0.1rem 0.4rem; border-radius: 5px; border: 1px solid var(--gray-200); background: var(--gray-50); font-size: 0.8rem; }
.sp-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
@media (max-width: 575px) {
    .sp-form button { width: 46px; padding: 0; justify-content: center; font-size: 0; }
    .sp-form button i { font-size: 0.9rem; }
    .sp-item-meta { display: none; }
}
.sp-form .sp-spinner { flex-shrink: 0; }
.sp-form.is-loading .sp-spinner { opacity: 1; animation: ssSpin 0.7s linear infinite; }
.sp-item { animation: ssItemIn 0.35s var(--ease-premium) backwards; }
.sp-item mark { background: linear-gradient(transparent 55%, rgba(255, 179, 71, 0.55) 55%); color: inherit; padding: 0; }

/* -------------------------------------------------------
   RACHYET BRAND OVERRIDES
------------------------------------------------------- */
/* Wordmark is wider than tall (≈5.3:1), so it sits a little shorter than a stacked logo */
.brand-logo-img { height: 34px; }
.navbar.scrolled .brand-logo-img { height: 30px; }
@media (max-width: 1280px) { .brand-logo-img { height: 32px; } }
@media (max-width: 1024px) {
    .brand-logo-img,
    .navbar.scrolled .brand-logo-img { height: 28px; }
    .drawer-brand img { height: 28px; }
}

/* The ribbon "R" replaces the old tile mosaic in the mega-menu feature panels */
.maf-ribbon { width: 112px; top: 18px; right: -14px; opacity: 0.16; transform: rotate(-8deg); }
.maf-ribbon path { transform-box: fill-box; transform-origin: center; }
.has-dropdown:hover .maf-ribbon path { animation: mafRibbon 0.7s var(--ease-premium) backwards; }
.has-dropdown:hover .maf-ribbon path:nth-child(2) { animation-delay: 0.08s; }
@keyframes mafRibbon { from { opacity: 0; transform: translateY(10px) scale(0.92); } to { opacity: 1; transform: none; } }
.maf-emblem img { width: 24px; }


/* Stacked rail links (View all services + Industries) */
.ms-all-link + .ms-all-link { margin-top: 0.45rem; }

/* ==========================================================================
   PREMIUM MOTION LAYER (desktop, fine pointer)
   3D unfold on open, a notch that tracks the trigger, a rotating gradient
   rim, cursor-lit cards, staggered reveals and rolling link labels.
   main.js feeds it: --caret-x, --mx/--my, --rx/--ry and .nav-dd-open.
   ========================================================================== */

@property --nav-rim-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* Rolling labels: the label slides up and an identical copy rolls in */
.nav-label { display: inline-flex; overflow: hidden; line-height: 1.3; }
.nav-label > span { position: relative; display: block; }
.nav-label > span::after {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 100%;
}

/* Page dims behind an open mega menu */
.nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 1040;
    pointer-events: none;
    background: radial-gradient(120% 70% at 50% 0%, rgba(11, 20, 56, 0.28), rgba(11, 20, 56, 0.42));
    -webkit-backdrop-filter: blur(3px) saturate(120%);
            backdrop-filter: blur(3px) saturate(120%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

@keyframes navRiseIn {
    from { opacity: 0; transform: translateY(14px); filter: blur(5px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes navRimSpin { to { --nav-rim-angle: 360deg; } }
@keyframes navIconPop {
    0%   { transform: scale(1) rotate(0); }
    40%  { transform: scale(1.22) rotate(-10deg); }
    70%  { transform: scale(0.94) rotate(4deg); }
    100% { transform: scale(1) rotate(0); }
}
@keyframes navRibbonFloat {
    from { transform: rotate(8deg) translate(0, 0); }
    to   { transform: rotate(2deg) translate(-10px, 8px); }
}
@keyframes navUnderlineIn { from { width: 0; opacity: 0; } to { width: 22px; opacity: 1; } }
@keyframes navCtaFlow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes navShowcaseMark {
    from { transform: rotate(-12deg) translateY(6px) scale(0.9); opacity: 0; }
    to   { transform: rotate(-12deg) translateY(0) scale(1); opacity: 0.12; }
}

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {

    html.nav-dd-open .nav-scrim {
        opacity: 1;
        visibility: visible;
        transition: opacity 0.4s ease, visibility 0s;
    }

    /* ---- Top-level links ---- */
    .nav-label > span { transition: transform 0.5s var(--ease-premium); }
    .nav-link:hover .nav-label > span,
    .nav-link:focus-visible .nav-label > span { transform: translateY(-100%); }
    .nav-link.active::after { animation: navUnderlineIn 0.6s var(--ease-premium) 0.2s backwards; }
    .nav-indicator {
        background: linear-gradient(180deg, #ffffff 0%, #F7F9FF 100%);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.9) inset,
            0 0 0 1px rgba(31, 39, 184, 0.06),
            0 6px 18px -6px rgba(31, 39, 184, 0.22);
    }
    .has-dropdown:hover > .nav-link .dropdown-arrow,
    .has-dropdown:focus-within > .nav-link .dropdown-arrow { color: var(--rc-violet); }

    /* ---- Book a call: slow-flowing gradient + magnetic pull (translate set by JS) ---- */
    .btn-navbar-cta {
        background: linear-gradient(110deg, var(--rc-navy) 0%, var(--rc-blue) 35%, var(--rc-violet) 65%, var(--rc-blue) 100%);
        background-size: 220% 100%;
        animation: navCtaFlow 6s ease-in-out infinite alternate;
        transition: transform 0.3s var(--ease-premium), box-shadow 0.3s ease, translate 0.35s var(--ease-premium);
    }
    .nav-search-btn { transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease; }
    .nav-search-btn:hover { box-shadow: 0 0 0 4px rgba(76, 198, 255, 0.14), 0 8px 20px -10px rgba(31, 39, 184, 0.35); }

    /* ---- Panel: 3D unfold with focus-pull blur ---- */
    .mega-dropdown {
        transform-origin: var(--caret-x, 50%) 0;
        transform: translateX(-50%) perspective(1400px) rotateX(-14deg) translateY(12px) scale(0.965);
        filter: blur(6px);
        box-shadow:
            0 50px 100px -30px rgba(11, 20, 56, 0.5),
            0 24px 40px -24px rgba(31, 39, 184, 0.35),
            0 0 0 1px rgba(31, 39, 184, 0.07);
        transition:
            opacity 0.25s ease 0.08s,
            transform 0.35s var(--ease-premium) 0.08s,
            filter 0.3s ease 0.08s,
            visibility 0s linear 0.35s;
    }
    .has-dropdown:hover .mega-dropdown,
    .has-dropdown:focus-within .mega-dropdown {
        transform: translateX(-50%) perspective(1400px) rotateX(0deg) translateY(0) scale(1);
        filter: blur(0);
        transition:
            opacity 0.35s var(--ease-premium),
            transform 0.6s var(--ease-premium),
            filter 0.45s var(--ease-premium),
            visibility 0s;
    }

    /* Notch pointing at whichever link opened the panel */
    .mega-dropdown::after {
        content: '';
        position: absolute;
        top: -6px;
        left: var(--caret-x, 50%);
        width: 14px;
        height: 14px;
        margin-left: -7px;
        border-radius: 3px 0 0 0;
        background: var(--caret-bg, #ffffff);
        box-shadow: -1px -1px 0 rgba(31, 39, 184, 0.08);
        transform: rotate(45deg);
        transition: left 0.4s var(--ease-premium);
        z-index: 2;
    }

    /* Slowly rotating spectrum rim */
    .mega-dropdown-inner { position: relative; }
    .mega-dropdown-inner::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 6;
        padding: 1px;
        border-radius: inherit;
        pointer-events: none;
        background: conic-gradient(from var(--nav-rim-angle),
            rgba(76, 198, 255, 0) 0deg,
            rgba(76, 198, 255, 0.9) 50deg,
            rgba(123, 60, 245, 0.85) 110deg,
            rgba(255, 61, 154, 0.7) 160deg,
            rgba(255, 154, 46, 0) 220deg,
            rgba(255, 154, 46, 0) 360deg);
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
                mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
        opacity: 0;
        transition: opacity 0.6s ease;
    }
    .has-dropdown:hover .mega-dropdown-inner::after,
    .has-dropdown:focus-within .mega-dropdown-inner::after {
        opacity: 0.75;
        animation: navRimSpin 7s linear infinite;
    }

    /* ---- Feature panel (About / Why us) + services rail: staggered reveal ---- */
    .has-dropdown:hover .mega-about-feature > .maf-top,
    .has-dropdown:hover .mega-about-feature > .maf-title,
    .has-dropdown:hover .mega-about-feature > .maf-desc,
    .has-dropdown:hover .mega-about-feature > .maf-stats,
    .has-dropdown:hover .mega-about-feature > .maf-cta,
    .has-dropdown:hover .ms-rail-head,
    .has-dropdown:hover .ms-tab,
    .has-dropdown:hover .ms-all-link,
    .has-dropdown:hover .ms-expert {
        animation: navRiseIn 0.7s var(--ease-premium) backwards;
    }
    .has-dropdown:hover .mega-about-feature > .maf-top   { animation-delay: 0.08s; }
    .has-dropdown:hover .mega-about-feature > .maf-title { animation-delay: 0.14s; }
    .has-dropdown:hover .mega-about-feature > .maf-desc  { animation-delay: 0.2s; }
    .has-dropdown:hover .mega-about-feature > .maf-stats { animation-delay: 0.26s; }
    .has-dropdown:hover .mega-about-feature > .maf-cta   { animation-delay: 0.3s; }
    .has-dropdown:hover .ms-rail-head { animation-delay: 0.06s; }
    .has-dropdown:hover .ms-tab:nth-of-type(1) { animation-delay: 0.12s; }
    .has-dropdown:hover .ms-tab:nth-of-type(2) { animation-delay: 0.17s; }
    .has-dropdown:hover .ms-tab:nth-of-type(3) { animation-delay: 0.22s; }
    .has-dropdown:hover .ms-tab:nth-of-type(4) { animation-delay: 0.27s; }
    .has-dropdown:hover .ms-all-link { animation-delay: 0.28s; }
    .has-dropdown:hover .ms-all-link + .ms-all-link { animation-delay: 0.32s; }
    .has-dropdown:hover .ms-expert { animation-delay: 0.36s; }

    .has-dropdown:hover .maf-ribbon { animation: navRibbonFloat 7s ease-in-out infinite alternate; }

    /* ---- Cards: cursor spotlight, light-tracing border, gentle 3D tilt ---- */
    .mega-about-card,
    .ms-card,
    .ms-showcase {
        --mx: 50%;
        --my: 50%;
        isolation: isolate;
    }
    .mega-about-card::before,
    .ms-card::before,
    .mega-about-card::after,
    .ms-card::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.35s ease;
    }
    .mega-about-card::before,
    .ms-card::before {
        z-index: -1;
        background: radial-gradient(260px circle at var(--mx) var(--my),
            color-mix(in srgb, var(--card-color, var(--ms-color)) 13%, transparent), transparent 70%);
    }
    .mega-about-card::after,
    .ms-card::after {
        padding: 1px;
        background: radial-gradient(180px circle at var(--mx) var(--my),
            color-mix(in srgb, var(--card-color, var(--ms-color)) 75%, transparent), transparent 70%);
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
                mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    }
    .mega-about-card:hover::before,
    .mega-about-card:hover::after,
    .ms-card:hover::before,
    .ms-card:hover::after { opacity: 1; }

    .mega-about-card:hover,
    .mega-about-card:focus-visible,
    .ms-card:hover,
    .ms-card:focus-visible {
        background: #ffffff;
        border-color: transparent;
        box-shadow:
            0 18px 36px -20px color-mix(in srgb, var(--card-color, var(--ms-color)) 55%, transparent),
            0 2px 6px -2px rgba(21, 31, 85, 0.08);
    }
    .mega-about-card {
        transition: background 0.3s ease, transform 0.45s var(--ease-premium), box-shadow 0.4s ease;
        will-change: transform;
    }
    .mega-about-card:hover {
        transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px);
    }

    .mega-about-card:hover .mega-about-card-icon,
    .ms-card:hover .ms-card-icon {
        background: linear-gradient(135deg,
            var(--card-color, var(--ms-color)) 0%,
            color-mix(in srgb, var(--card-color, var(--ms-color)) 60%, #ffffff) 100%);
        color: #ffffff;
        transform: none;
        box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--card-color, var(--ms-color)) 80%, transparent);
    }
    .mega-about-card:hover .mega-about-card-icon i,
    .ms-card:hover .ms-card-icon i { animation: navIconPop 0.6s var(--ease-premium); }
    .mega-about-card-title,
    .ms-card-title { transition: color 0.3s ease; }
    .mega-about-card:hover .mega-about-card-title,
    .ms-card:hover .ms-card-title { color: var(--card-color, var(--ms-color)); }

    /* Card entrance: blur-rise with a wider stagger */
    .has-dropdown:hover .mega-about-card,
    .has-dropdown:focus-within .mega-about-card { animation: navRiseIn 0.65s var(--ease-premium) backwards; }
    .has-dropdown:hover .mega-about-card:nth-child(1) { animation-delay: 0.12s; }
    .has-dropdown:hover .mega-about-card:nth-child(2) { animation-delay: 0.18s; }
    .has-dropdown:hover .mega-about-card:nth-child(3) { animation-delay: 0.24s; }
    .has-dropdown:hover .mega-about-card:nth-child(4) { animation-delay: 0.3s; }

    /* ---- Services: panels cross-fade with focus-pull, contents re-stagger ---- */
    .ms-panel { filter: blur(6px); transition: opacity 0.25s ease, transform 0.35s var(--ease-premium), filter 0.3s ease, visibility 0s linear 0.35s; }
    .ms-panel.is-active {
        filter: blur(0);
        transition: opacity 0.4s ease 0.05s, transform 0.55s var(--ease-premium) 0.05s, filter 0.45s var(--ease-premium) 0.05s, visibility 0s;
    }
    .ms-panel.is-active .ms-panel-eyebrow,
    .ms-panel.is-active .ms-panel-head h5,
    .ms-panel.is-active .ms-panel-head p,
    .ms-panel.is-active .ms-showcase { animation: navRiseIn 0.6s var(--ease-premium) backwards; }
    .ms-panel.is-active .ms-panel-head h5 { animation-delay: 0.05s; }
    .ms-panel.is-active .ms-panel-head p  { animation-delay: 0.1s; }
    .ms-panel.is-active .ms-card { animation: navRiseIn 0.6s var(--ease-premium) backwards; }
    .ms-panel.is-active .ms-card:nth-child(1) { animation-delay: 0.12s; }
    .ms-panel.is-active .ms-card:nth-child(2) { animation-delay: 0.17s; }
    .ms-panel.is-active .ms-card:nth-child(3) { animation-delay: 0.22s; }
    .ms-panel.is-active .ms-card:nth-child(4) { animation-delay: 0.27s; }
    .ms-panel.is-active .ms-card:nth-child(5) { animation-delay: 0.32s; }
    .ms-panel.is-active .ms-card:nth-child(6) { animation-delay: 0.37s; }
    .ms-panel.is-active .ms-showcase { animation-delay: 0.3s; }

    .ms-card { padding: 0.95rem 1rem; transition: background 0.3s ease, transform 0.45s var(--ease-premium), box-shadow 0.4s ease; }
    .ms-card:hover { transform: translateY(-3px); }

    .ms-tab-indicator::before {
        box-shadow: 0 0 12px var(--ms-accent, var(--rc-blue));
        transition: background 0.3s ease, box-shadow 0.3s ease;
    }
    .ms-tab.is-active .ms-tab-icon {
        background: linear-gradient(135deg, var(--tab-color), color-mix(in srgb, var(--tab-color) 60%, #ffffff));
        box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--tab-color) 80%, transparent);
    }
    .ms-tab.is-active .ms-tab-icon i { animation: navIconPop 0.6s var(--ease-premium); }

    .ms-all-link { transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.35s var(--ease-premium); }
    .ms-all-link:hover { transform: translateX(3px); box-shadow: 0 10px 22px -14px rgba(21, 31, 85, 0.4); }

    /* Services panel footer: a lit showcase banner for the active category */
    .ms-panel-foot { padding-top: 1.1rem; }
    .ms-showcase {
        position: relative;
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1.15rem 1.25rem;
        border-radius: 18px;
        overflow: hidden;
        color: #ffffff;
        background:
            radial-gradient(140% 160% at 100% 0%, color-mix(in srgb, var(--ms-color) 55%, transparent) 0%, transparent 55%),
            linear-gradient(135deg, var(--rc-ink) 0%, var(--rc-navy-deep) 55%, color-mix(in srgb, var(--ms-color) 45%, var(--rc-navy-deep)) 100%);
        box-shadow: 0 22px 40px -24px color-mix(in srgb, var(--ms-color) 80%, #000);
        transition: transform 0.45s var(--ease-premium), box-shadow 0.4s ease;
    }
    .ms-showcase-glow {
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background: radial-gradient(240px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.16), transparent 70%);
        opacity: 0;
        transition: opacity 0.35s ease;
    }
    .ms-showcase:hover .ms-showcase-glow { opacity: 1; }
    .ms-showcase-mark {
        position: absolute;
        right: 3.6rem;
        top: 50%;
        margin-top: -2.6rem;
        font-size: 5.2rem;
        line-height: 1;
        color: #ffffff;
        opacity: 0.12;
        transform: rotate(-12deg);
        pointer-events: none;
    }
    .ms-panel.is-active .ms-showcase-mark { animation: navShowcaseMark 0.9s var(--ease-premium) 0.35s backwards; }
    .ms-showcase-icon {
        position: relative;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        border-radius: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.05rem;
        color: #ffffff;
        background: rgba(255, 255, 255, 0.12);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
    }
    .ms-showcase-text { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
    .ms-showcase-eyebrow {
        font-size: 0.66rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(226, 232, 255, 0.7);
    }
    .ms-showcase-text strong { font-family: var(--font-heading); font-size: 1rem; color: #ffffff; margin-top: 0.15rem; }
    .ms-showcase-arrow {
        position: relative;
        flex-shrink: 0;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        color: var(--rc-navy);
        background: #ffffff;
        overflow: hidden;
        transition: background 0.3s ease, color 0.3s ease;
    }
    .ms-showcase:hover { color: #ffffff; transform: translateY(-2px); }
    .ms-showcase:hover .ms-showcase-arrow { color: #ffffff; background: linear-gradient(135deg, var(--rc-orange), var(--rc-pink)); }
    .ms-showcase:hover .ms-showcase-arrow i { animation: mafArrow 0.5s var(--ease-premium); }

    /* Few services: show them as roomy tiles so the panel never looks empty */
    .ms-cards:not(:has(> :nth-child(5))) { gap: 0.75rem; }
    .ms-cards:not(:has(> :nth-child(5))) .ms-card {
        flex-direction: column;
        gap: 0.9rem;
        min-height: 168px;
        padding: 1.2rem 1.2rem 1.1rem;
        background: linear-gradient(180deg, #FAFBFF 0%, #F4F6FC 100%);
        border-color: rgba(31, 39, 184, 0.06);
    }
    .ms-cards:not(:has(> :nth-child(5))) .ms-card:hover { background: #ffffff; }
    .ms-cards:not(:has(> :nth-child(5))) .ms-card-icon { width: 44px; height: 44px; border-radius: 13px; font-size: 1.05rem; }
    .ms-cards:not(:has(> :nth-child(5))) .ms-card-title { font-size: 0.95rem; }
    .ms-cards:not(:has(> :nth-child(5))) .ms-card-desc { font-size: 0.8rem; line-height: 1.55; -webkit-line-clamp: 3; margin-top: 0.3rem; }
    .ms-cards:not(:has(> :nth-child(5))) .ms-card-arrow {
        position: absolute;
        top: 1.3rem;
        right: 1.2rem;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: color-mix(in srgb, var(--ms-color) 10%, #ffffff);
    }
    /* A lone service spans the full row */
    .ms-cards:has(> :only-child) .ms-card { grid-column: 1 / -1; }

    /* Magnetic buttons (JS sets `translate`, which stacks with hover transforms) */
    .maf-cta { transition: transform 0.3s var(--ease-premium), box-shadow 0.3s ease, translate 0.35s var(--ease-premium); }
}

/* Showcase banner is desktop-only markup; keep it tidy if a narrow desktop window renders it */
@media (max-width: 1024px) {
    .ms-showcase-mark,
    .ms-showcase-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .nav-label > span,
    .nav-scrim,
    .mega-dropdown,
    .mega-dropdown::after,
    .ms-panel,
    .ms-showcase,
    .btn-navbar-cta { transition: none !important; }
    .mega-dropdown,
    .ms-panel { filter: none !important; }
    .nav-link:hover .nav-label > span { transform: none !important; }
    .mega-dropdown-inner::after,
    .maf-ribbon,
    .btn-navbar-cta,
    .nav-link.active::after,
    .mega-about-card,
    .mega-about-card-icon i,
    .ms-card,
    .ms-card-icon i,
    .ms-tab,
    .ms-tab-icon i,
    .ms-rail-head,
    .ms-all-link,
    .ms-expert,
    .ms-showcase,
    .ms-showcase-mark,
    .ms-panel-head *,
    .mega-about-feature > * { animation: none !important; }
    .mega-about-card:hover { transform: translateY(-2px) !important; }
    .btn-navbar-cta, .maf-cta { translate: none !important; }
}

/* Why us side panel: proof points */
.maf-proof { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.maf-proof li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8rem; font-weight: 600; color: var(--gray-700); }
.maf-proof i {
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    font-size: 0.55rem; color: #ffffff;
    background: linear-gradient(135deg, var(--rc-blue), var(--rc-violet));
    box-shadow: 0 4px 10px -4px rgba(123, 60, 245, 0.7);
}
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
    .has-dropdown:hover .maf-proof li { animation: navRiseIn 0.6s var(--ease-premium) backwards; }
    .has-dropdown:hover .maf-proof li:nth-child(1) { animation-delay: 0.24s; }
    .has-dropdown:hover .maf-proof li:nth-child(2) { animation-delay: 0.29s; }
    .has-dropdown:hover .maf-proof li:nth-child(3) { animation-delay: 0.34s; }
}
@media (max-width: 1024px) { .maf-proof { display: none; } }
@media (prefers-reduced-motion: reduce) { .maf-proof li { animation: none !important; } }
