/* =============================================================
   Somyix – custom effects & enhancements
   Layered on top of the AppLab theme. Self-contained, no CDN.
   All motion respects prefers-reduced-motion.
   ============================================================= */

:root {
    --nx-primary: #2c7be5;
    --nx-accent: #f5803e;
    --nx-grad: linear-gradient(135deg, #2c7be5 0%, #7d5fff 50%, #f5803e 100%);
}

html {
    scroll-behavior: smooth;
}

/* Fixed navbar offset so anchor targets aren't hidden under it */
section[id], article {
    scroll-margin-top: 90px;
}

/* ---------- Gradient text accent ---------- */
.text-gradient {
    background: var(--nx-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---------- Animated hero background blobs ---------- */
.hero-blobs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.hero-blobs span {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .35;
    animation: nx-float 14s ease-in-out infinite;
}
.hero-blobs span:nth-child(1) { width: 340px; height: 340px; background: #2c7be5; top: -60px; left: -40px; }
.hero-blobs span:nth-child(2) { width: 300px; height: 300px; background: #f5803e; bottom: -80px; right: 6%; animation-delay: -4s; }
.hero-blobs span:nth-child(3) { width: 240px; height: 240px; background: #7d5fff; top: 30%; right: 30%; animation-delay: -8s; }

@keyframes nx-float {
    0%,100% { transform: translate(0, 0) scale(1); }
    33%     { transform: translate(30px, -25px) scale(1.08); }
    66%     { transform: translate(-20px, 20px) scale(.95); }
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.22,.61,.36,1),
                transform .7s cubic-bezier(.22,.61,.36,1);
    will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="zoom"]  { transform: scale(.92); }
[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}
/* Stagger children of a group */
[data-reveal-group] > * {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .6s ease, transform .6s ease;
}
[data-reveal-group].is-visible > * {
    opacity: 1;
    transform: none;
}
[data-reveal-group].is-visible > *:nth-child(1) { transition-delay: .00s; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: .08s; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: .16s; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: .24s; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: .32s; }
[data-reveal-group].is-visible > *:nth-child(6) { transition-delay: .40s; }

/* ---------- Card / element hover lift ---------- */
.hover-lift {
    transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease;
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 1.5rem 3rem rgba(22, 34, 51, .12) !important;
}

/* ---------- Service cards ---------- */
.service-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
}
.service-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--nx-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
    width: 84px; height: 84px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 20px;
    transition: transform .4s ease;
}
.service-card:hover .service-icon { transform: rotate(-6deg) scale(1.06); }

/* ---------- Product cards (home "Our products") ---------- */
.product-grid { --gap: 1.5rem; }
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.85rem 1.65rem;
    background: #fff;
    border: 1px solid #eceff7;
    border-radius: 1.25rem;
    overflow: hidden;
    text-decoration: none;
    isolation: isolate;
    transition: transform .4s cubic-bezier(.22,.61,.36,1),
                box-shadow .4s ease, border-color .4s ease;
}
/* Top gradient accent that sweeps in on hover */
.product-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pc, #2c7be5), transparent 85%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s cubic-bezier(.22,.61,.36,1);
}
/* Soft colored glow blooming from the top-right corner */
.product-card::after {
    content: "";
    position: absolute;
    top: -55px;
    right: -55px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--pc, #2c7be5) 0%, transparent 68%);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .5s ease, transform .5s ease;
    z-index: -1;
    pointer-events: none;
}
.product-card:hover,
.product-card:focus-visible {
    transform: translateY(-10px);
    border-color: color-mix(in srgb, var(--pc, #2c7be5) 45%, #eceff7);
    box-shadow: 0 1.5rem 3rem rgba(22, 34, 51, .14);
    outline: none;
}
.product-card:hover::before,
.product-card:focus-visible::before { transform: scaleX(1); }
.product-card:hover::after,
.product-card:focus-visible::after { opacity: .16; transform: scale(1); }

.product-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.15rem;
    transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.product-card:hover .product-card__icon,
.product-card:focus-visible .product-card__icon { transform: rotate(-6deg) scale(1.08); }

.product-card__name { color: #232e4a; margin-bottom: .15rem; }
.product-card__tagline {
    color: var(--pc, #2c7be5);
    font-weight: 600;
    font-size: .82rem;
    text-transform: capitalize;
    margin-bottom: .7rem;
}
.product-card__text {
    color: #5b6b83;
    font-size: .92rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card__more {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: auto;
    font-weight: 600;
    font-size: .9rem;
    color: var(--pc, #2c7be5);
    transition: gap .3s ease;
}
.product-card__more svg { transition: transform .3s ease; }
.product-card:hover .product-card__more,
.product-card:focus-visible .product-card__more { gap: .65rem; }
.product-card:hover .product-card__more svg,
.product-card:focus-visible .product-card__more svg { transform: translateX(4px); }

/* Gradient "view all" card that closes the grid */
.product-card--cta {
    background: var(--nx-grad);
    background-size: 180% 180%;
    border: none;
    color: #fff;
    justify-content: center;
    text-align: center;
    transition: transform .4s cubic-bezier(.22,.61,.36,1),
                box-shadow .4s ease, background-position .6s ease;
}
.product-card--cta::before,
.product-card--cta::after { display: none; }
.product-card--cta:hover,
.product-card--cta:focus-visible {
    transform: translateY(-10px);
    background-position: 100% 0;
    box-shadow: 0 1.5rem 3rem rgba(44, 123, 229, .35);
}
.product-card--cta .product-card__more { color: #fff; margin-top: 1.1rem; justify-content: center; }

/* ---------- Tech stack chips ---------- */
.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1.15rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(22,34,51,.08);
    box-shadow: 0 .5rem 1.25rem rgba(22,34,51,.05);
    font-weight: 600;
    color: #344050;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.tech-chip:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(22,34,51,.12);
    border-color: rgba(44,123,229,.35);
}
.tech-chip i, .tech-chip svg { font-size: 1.5rem; width: 1.5rem; height: 1.5rem; }

/* Marquee row for tech logos */
.tech-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tech-marquee__track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: nx-marquee 32s linear infinite;
}
.tech-marquee:hover .tech-marquee__track { animation-play-state: paused; }
@keyframes nx-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Marquee slider for client logos */
.client-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.client-marquee__track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: nx-marquee 30s linear infinite;
}
.client-marquee:hover .client-marquee__track { animation-play-state: paused; }
.client-marquee__item {
    flex: 0 0 auto;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
}
.client-marquee__item img {
    max-height: 54px;
    width: auto;
    opacity: .7;
    filter: grayscale(100%);
    transition: opacity .3s ease, filter .3s ease;
}
/* Compact badge/emblem logos read smaller at the same height as wide
   wordmarks — give them extra height so their visual weight matches. */
.client-marquee__item img[src*="aess"],
.client-marquee__item img[src*="rammurti"],
.client-marquee__item img[src*="milkmade"],
.client-marquee__item img[src*="sakhi"],
.client-marquee__item img[src*="ssb-college"] {
    max-height: 84px;
}
.client-marquee__item img:hover {
    opacity: 1;
    filter: none;
}

/* ---------- Blog article body ---------- */
.blog-body p { margin-bottom: 1.15rem; }
.blog-body ul { padding-left: 1.25rem; margin-bottom: 1.35rem; }
.blog-body li { margin-bottom: .5rem; }
.blog-body h2, .blog-body h3 { color: #242F51; }
.blog-body a { color: #2500F9; text-decoration: underline; }

/* ---------- Legal / privacy content ---------- */
.privacy-content p,
.privacy-content li { color: #616368; line-height: 1.75; }
.privacy-content ul { padding-left: 1.25rem; margin-bottom: 1.25rem; }
.privacy-content li { margin-bottom: .5rem; }
.privacy-content h2 { color: #242F51; }
.privacy-content a { color: #2500F9; text-decoration: underline; }

/* ---------- Client logo grid (testimonials section) ---------- */
.client-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}
.client-grid__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .85rem .85rem .7rem;
    background: #fff;
    border: 1px solid #eceff7;
    border-radius: 14px;
    box-shadow: 0 .5rem 1.25rem rgba(31, 21, 52, .06);
    transition: transform .25s ease, box-shadow .25s ease;
}
.client-grid__item:hover {
    transform: translateY(-3px);
    box-shadow: 0 .75rem 1.75rem rgba(31, 21, 52, .1);
}
.client-grid__logo {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
}
.client-grid__logo img {
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.client-grid__rating {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    line-height: 1;
}
.client-grid__rating svg { display: block; }
@media (max-width: 575.98px) {
    .client-grid { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
    .client-grid__item { padding: .6rem .55rem .5rem; border-radius: 11px; }
    .client-grid__logo { min-height: 34px; }
    .client-grid__logo img { max-height: 38px; }
}

/* ---------- Testimonial client logo ---------- */
.testimonial-logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 72px;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid #eceff7;
    border-radius: 14px;
    box-shadow: 0 .5rem 1.25rem rgba(31, 21, 52, .06);
}
.testimonial-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ---------- Process timeline ---------- */
.process-timeline { position: relative; }
@media (min-width: 992px) {
    /* connecting line running behind the numbered badges */
    .process-timeline::before {
        content: "";
        position: absolute;
        left: 12.5%;
        right: 12.5%;
        top: 90px;
        height: 3px;
        background: var(--nx-grad);
        opacity: .3;
        border-radius: 3px;
        z-index: 0;
    }
}
.process-step {
    position: relative;
    z-index: 1;
    background: #fff;
    border: 1px solid #eceff7;
    border-radius: 1rem;
    padding: 2.25rem 1.5rem 1.75rem;
    text-align: center;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.process-step:hover {
    transform: translateY(-8px);
    box-shadow: 0 1.25rem 2.5rem rgba(44, 123, 229, .16);
    border-color: rgba(44, 123, 229, .35);
}
.process-step .process-no {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--nx-grad);
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 .6rem 1.25rem rgba(125, 95, 255, .4);
    transition: transform .35s ease;
}
.process-step:hover .process-no { transform: scale(1.08) rotate(-4deg); }
.process-step .process-no__icon {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: var(--nx-primary);
    -webkit-text-fill-color: var(--nx-primary);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .12);
}
.process-tag {
    display: inline-flex;
    align-items: center;
    font-size: .78rem;
    font-weight: 600;
    color: var(--nx-primary);
    background: rgba(44, 123, 229, .09);
    padding: .4rem .85rem;
    border-radius: 2rem;
}

/* ---------- Gradient CTA button shine ---------- */
.btn-gradient {
    background: var(--nx-grad);
    background-size: 200% 200%;
    border: none;
    color: #fff !important;
    transition: background-position .5s ease, transform .3s ease, box-shadow .3s ease;
}
.btn-gradient:hover {
    background-position: 100% 0;
    transform: translateY(-3px);
    box-shadow: 0 .75rem 1.5rem rgba(44,123,229,.35);
    color: #fff !important;
}

/* ---------- Navbar subtle blur when scrolled (complements theme.js) ---------- */
.navbar.navbar-scrolled {
    backdrop-filter: saturate(180%) blur(8px);
    box-shadow: 0 .5rem 1.5rem rgba(22,34,51,.08);
}

/* ---------- Link underline sweep ---------- */
.link-sweep {
    position: relative;
    text-decoration: none;
}
.link-sweep::after {
    content: "";
    position: absolute;
    left: 0; bottom: -3px;
    width: 100%; height: 2px;
    background: var(--nx-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .35s ease;
}
.link-sweep:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    [data-reveal],
    [data-reveal-group] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
    .hero-blobs span,
    .tech-marquee__track,
    .client-marquee__track { animation: none !important; }
    .hover-lift:hover { transform: none; }
}
