.grid-pattern-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, white 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, white 20%, transparent 100%);
}

.grid-pattern-svg {
    width: 100%;
    height: 100%;
}

.grid-pattern-svg pattern path {
    stroke: rgba(26, 86, 232, 0.09);
}

.grid-pattern-svg .grid-squares rect {
    fill: rgba(26, 86, 232, 0.035);
    animation: gridPulse 5s ease-in-out infinite alternate;
}

.grid-pattern-svg .grid-squares rect:nth-child(2n) {
    animation-delay: 1.8s;
}

.grid-pattern-svg .grid-squares rect:nth-child(3n) {
    animation-delay: 3.5s;
}

.grid-pattern-svg .grid-squares rect:nth-child(4n) {
    animation-delay: 0.9s;
    animation-duration: 7s;
}

@keyframes gridPulse {
    0% {
        fill: rgba(26, 86, 232, 0.02);
    }

    100% {
        fill: rgba(26, 86, 232, 0.10);
    }
}

.svc-hero {
    background: linear-gradient(170deg, #F4F7FF 0%, #FFFFFF 55%, #F0F5FF 100%);
}

.svc-hero-content h1 em {
    font-style: italic;
    color: var(--accent);
    position: relative;
}

.tech-stack-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1.75rem 0 0;
}

.tech-pill {
    padding: 0.45rem 1.1rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-3);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    user-select: none;
}

.tech-pill:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
    background: #EEF3FF;
    box-shadow: 0 8px 18px rgba(26, 86, 232, 0.1);
}

.svc-hero-visual-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--r);
    padding: 0.75rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: 0 10px 30px rgba(26, 86, 232, 0.08);
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: auto;
    min-width: 170px;
}

.floating-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(26, 86, 232, 0.15);
}

.floating-card svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent);
    fill: none;
    flex-shrink: 0;
}

.floating-card-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.floating-card-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-4);
    font-weight: 600;
}

.floating-card-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
    margin-top: 0.1rem;
}

.floating-card.card-1 {
    bottom: 8%;
    left: -5%;
    animation: floatUp 5s ease-in-out infinite alternate;
}

.floating-card.card-2 {
    top: 12%;
    right: -3%;
    animation: floatDown 5s ease-in-out infinite alternate;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(-1deg);
    }

    100% {
        transform: translateY(-10px) rotate(1deg);
    }
}

@keyframes floatDown {
    0% {
        transform: translateY(0) rotate(1deg);
    }

    100% {
        transform: translateY(10px) rotate(-1deg);
    }
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    max-width: 1160px;
    margin: 4rem auto 0;
}

.approach-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg);
    padding: 2.2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.approach-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    border-radius: 4px 0 0 4px;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.approach-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(26, 86, 232, 0.08);
    border-color: var(--accent-light);
}

.approach-card:hover::before {
    transform: scaleY(1);
}

.approach-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r);
    background: #EEF3FF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.approach-card-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.approach-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.65rem;
}

.approach-card p {
    font-size: 0.95rem;
    color: var(--ink-4);
    line-height: 1.7;
}

.approach-card .card-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    background: var(--accent-light);
    color: var(--accent);
}

.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 1160px;
    margin: 4rem auto 0;
    align-items: start;
}

.masonry-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gallery-img-wrap {
    position: relative;
    width: 100%;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--cream);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    cursor: pointer;
}

.gallery-img-wrap.in-view {
    opacity: 1;
    transform: translateY(0);
}

.gallery-img-wrap:hover {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
    opacity: 0;
}

.gallery-img-wrap img.loaded {
    opacity: 1;
}

.gallery-img-wrap:hover img {
    transform: scale(1.06);
}

.gallery-img-wrap.portrait {
    padding-bottom: 133%;
}

.gallery-img-wrap.landscape {
    padding-bottom: 62%;
}

.gallery-img-wrap.square {
    padding-bottom: 100%;
}

.gallery-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.gallery-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
    padding: 1.5rem 1rem 0.85rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-img-wrap:hover .gallery-img-overlay {
    opacity: 1;
}

.gallery-img-overlay span {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.masonry-col:nth-child(2) .gallery-img-wrap {
    transition-delay: 0.12s;
}

.masonry-col:nth-child(3) .gallery-img-wrap {
    transition-delay: 0.24s;
}

@media (max-width:1024px) {
    .approach-grid {
        grid-template-columns: 1fr 1fr;
    }

    .masonry-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .masonry-col:nth-child(3) {
        display: none;
    }
}

@media (max-width:640px) {
    .approach-grid {
        grid-template-columns: 1fr;
    }

    .masonry-gallery {
        grid-template-columns: 1fr;
    }

    .masonry-col:nth-child(2),
    .masonry-col:nth-child(3) {
        display: none;
    }

    .tech-pill {
        font-size: 0.8rem;
        padding: 0.38rem 0.9rem;
    }
}