/* Smart ERP - Enterprise Visual Identity, Light/Dark Modes, Dark Hero Banner & Scroll/Hover Card Animations */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=Noto+Sans+Tamil:wght@400;500;600;700;800&display=swap');

:root {
    --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    --font-tamil: 'Noto Sans Tamil', 'Plus Jakarta Sans', 'Inter', sans-serif;
    --primary-emerald: #059669;
    --primary-emerald-bright: #10B981;
    --accent-teal: #0D9488;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: #FFFFFF;
    color: #1E293B;
    overflow-x: clip;
    max-width: 100vw;
    width: 100%;
    min-height: 100vh;
}

html.dark body {
    background-color: #0B0F17;
    color: #E2E8F0;
}

html.lang-ta body,
body.lang-ta {
    font-family: var(--font-tamil);
}

/* Typography Hierarchy Matching mmi.co.in */
h1 {
    font-size: clamp(2rem, 4.2vw + 0.35rem, 3.25rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.025em;
}

h2 {
    font-size: clamp(1.5rem, 2.6vw + 0.35rem, 2.25rem);
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.15rem, 2vw + 0.2rem, 1.5rem);
    font-weight: 700;
    line-height: 1.35;
}

h4 {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
}

p {
    font-size: clamp(0.95rem, 1.15vw + 0.2rem, 1.08rem);
    line-height: 1.7;
}

/* Ensure card paragraphs & specs stay comfortably readable across all devices */
.spotlight-card p,
.notched-folder-card p,
.bento-morph-card p,
.scroll-stacked-card p,
.perspective-corridor p,
.accordion-scroll-card .faq-body {
    font-size: 0.98rem !important;
    line-height: 1.68 !important;
}

/* Larger crisp single-line menu links & submenus */
.nav-link-item {
    font-size: 0.96rem;
    font-weight: 600;
    white-space: nowrap;
}

html.lang-ta .nav-link-item {
    font-size: 0.93rem;
    padding-left: 0.44rem !important;
    padding-right: 0.44rem !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
html.dark ::-webkit-scrollbar-track {
    background: #0B0F17;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
html.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}
::-webkit-scrollbar-thumb:hover {
    background: #10B981;
}

/* Sticky Glass Header (Solid crisp paint with GPU layer — never blanks over canvas) */
.glass-header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #E2E8F0;
    transform: translateZ(0);
}

html.dark .glass-header {
    background: rgba(11, 15, 23, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Always-Dark Executive Hero Banner (even in Light Mode) */
.hero-banner-dark {
    background-color: #0B111E;
    background-image:
        radial-gradient(at 15% 15%, rgba(16, 185, 129, 0.18) 0px, transparent 50%),
        radial-gradient(at 85% 20%, rgba(20, 184, 166, 0.14) 0px, transparent 50%),
        radial-gradient(at 50% 90%, rgba(6, 78, 59, 0.22) 0px, transparent 60%);
    color: #F8FAFC;
}

.hero-banner-dark .grid-pattern {
    background-size: 36px 36px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
}

/* Shiny Text (Dark Hero Banner & Page Headers — Safe for Tamil glyphs) */
.shiny-text-hero {
    background: linear-gradient(
        120deg,
        #FFFFFF 0%,
        #34D399 45%,
        #14B8A6 65%,
        #FFFFFF 100%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shineSweep 5s linear infinite;
}

html.lang-ta .shiny-text-hero {
    background: none;
    color: #FFFFFF;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    animation: none;
}

.shiny-text {
    background: linear-gradient(
        120deg,
        #0F172A 0%,
        #059669 38%,
        #0D9488 58%,
        #0F172A 100%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shineSweep 5s linear infinite;
}

html.dark .shiny-text {
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.8) 0%,
        #FFFFFF 38%,
        #34D399 58%,
        rgba(255, 255, 255, 0.8) 100%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

@keyframes shineSweep {
    to {
        background-position: 200% center;
    }
}

/* ================================================================
   CARD HOVER & SURFACE ANIMATIONS (All 8 Requested Effects)
================================================================ */

/* 1 & 2. Glassmorphic Border Glow + Spotlight Cursor-Tracking Sheen */
.spotlight-card,
.glass-border-glow {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.3s ease;
}

.spotlight-card::before,
.glass-border-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: radial-gradient(
        580px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(16, 185, 129, 0.65),
        rgba(20, 184, 166, 0.25) 28%,
        transparent 55%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.spotlight-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        480px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(16, 185, 129, 0.09),
        transparent 45%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.spotlight-card:hover::before,
.spotlight-card:hover::after,
.glass-border-glow:hover::before {
    opacity: 1;
}

/* 3. Subtle 3D Tilt */
.tilted-card {
    transform-style: preserve-3d;
    transition: transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* 4. Soft Elevation & Shadow Bloom */
.elevation-bloom {
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}
.elevation-bloom:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px -12px rgba(16, 185, 129, 0.22), 0 10px 20px -10px rgba(15, 23, 42, 0.12);
}

/* 5. Ken Burns Image Zoom */
.ken-burns-wrap {
    overflow: hidden;
}
.ken-burns-img {
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.ken-burns-wrap:hover .ken-burns-img {
    transform: scale(1.09);
}

/* 6. Magnetic Card & Button Pull */
.magnet-btn,
.magnet-card {
    position: relative;
    transition: transform 0.2s ease-out;
    will-change: transform;
}

/* 7. Mask / Clip-Path Reveal */
.mask-reveal-card {
    clip-path: inset(0 0 0 0 round 1.25rem);
    transition: clip-path 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s ease;
}
.mask-reveal-card:hover {
    clip-path: inset(4px 4px 4px 4px round 1.5rem);
}

/* 8. Bento Grid Morph */
.bento-morph-card {
    transition: border-radius 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s ease, box-shadow 0.35s ease, border-color 0.3s ease;
    border-radius: 1.5rem;
}
.bento-morph-card:hover {
    border-radius: 2.25rem 0.75rem 2.25rem 0.75rem;
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 40px -15px rgba(16, 185, 129, 0.24);
}

/* ================================================================
   SCROLL-DRIVEN CARD ANIMATIONS (All 8 Requested Effects)
================================================================ */

/* 1. Stacked Card Reveal (Sticky Stack on Laptop/Desktop, natural flow on Mobile) */
.scroll-stacked-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
@media (min-width: 1024px) {
    .scroll-stacked-card {
        position: sticky;
        top: calc(92px + var(--stack-index, 0) * 20px);
    }
}

/* 2. Parallax Depth Cards */
.parallax-card {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* 3. Horizontal Scroll Track */
.horizontal-scroll-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    scrollbar-width: thin;
}
.horizontal-scroll-track > * {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* 4. Staggered Fade & Rise (Always visible fallback — smooth lift when observed) */
.stagger-rise {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
    transition-delay: var(--stagger-delay, 0ms);
}
.stagger-rise.is-visible {
    animation: risePop 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--stagger-delay, 0ms);
}
@keyframes risePop {
    from { transform: translateY(18px); }
    to { transform: translateY(0); }
}

/* 5. Sticky Split-Screen */
@media (min-width: 1024px) {
    .sticky-split-panel {
        position: sticky;
        top: 104px;
    }
}

/* 6. Scroll-Triggered Curtain Reveal (Never hides images!) */
.curtain-reveal {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 1.25rem);
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.curtain-reveal.is-visible {
    animation: curtainUncover 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes curtainUncover {
    from { clip-path: inset(0 18% 0 0 round 1.25rem); transform: scale(0.98); }
    to { clip-path: inset(0 0 0 0 round 1.25rem); transform: scale(1); }
}

/* 7. 3D Perspective Card Corridor */
.perspective-corridor {
    opacity: 1;
    transform: perspective(1100px) rotateY(0deg) translateZ(0px);
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.perspective-corridor.is-visible {
    animation: corridorSettle 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes corridorSettle {
    from { transform: perspective(1100px) rotateY(8deg) translateY(14px); }
    to { transform: perspective(1100px) rotateY(0deg) translateY(0); }
}

/* 8. Accordion Scroll Expand */
.accordion-scroll-card {
    opacity: 1;
    transform: scale(1);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.accordion-scroll-card.is-visible {
    animation: accordionPop 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes accordionPop {
    from { transform: scale(0.975); }
    to { transform: scale(1); }
}

/* Notched Folder-Tab Card (overflow: visible so top badge is NEVER clipped!) */
.notched-folder-card {
    position: relative;
    overflow: visible !important;
    background: #131823;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.5rem;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.35s ease;
}
.notched-folder-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.65);
    box-shadow: 0 24px 48px -12px rgba(16, 185, 129, 0.25);
}
.notched-folder-card .card-glow-layer {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.notched-folder-card .card-glow-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        480px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(16, 185, 129, 0.14),
        transparent 45%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
}
.notched-folder-card:hover .card-glow-layer::after {
    opacity: 1;
}

/* Logo Loop Infinite Marquee */
@keyframes logoLoopScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.logo-loop-track {
    display: flex;
    width: max-content;
    animation: logoLoopScroll 26s linear infinite;
}
.logo-loop-track:hover {
    animation-play-state: paused;
}

/* Star Border Orbit Glow */
.star-border-card {
    position: relative;
    overflow: hidden;
}
.star-border-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: conic-gradient(from 0deg, transparent 70%, #10b981 85%, #34d399 95%, transparent 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}
.star-border-card:hover::after {
    opacity: 0.25;
}

/* Click Spark Particle */
.click-spark-particle {
    position: fixed;
    pointer-events: none;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #10B981;
    z-index: 10000;
}

/* Sub-page Light Mesh Banner */
.hero-mesh-bg {
    background-color: #FFFFFF;
    background-image:
        radial-gradient(at 12% 15%, rgba(16, 185, 129, 0.09) 0px, transparent 48%),
        radial-gradient(at 88% 20%, rgba(20, 184, 166, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 95%, rgba(241, 245, 249, 0.9) 0px, transparent 60%);
}
html.dark .hero-mesh-bg {
    background-color: #080D1A;
    background-image:
        radial-gradient(at 15% 15%, rgba(16, 185, 129, 0.16) 0px, transparent 50%),
        radial-gradient(at 85% 20%, rgba(20, 184, 166, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 85%, rgba(6, 78, 59, 0.22) 0px, transparent 60%);
}

.grid-pattern {
    background-size: 36px 36px;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}
html.dark .grid-pattern {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-9px); }
}
@keyframes floatReverse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(9px); }
}
.animate-float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}
.animate-float-reverse {
    animation: floatReverse 7s ease-in-out infinite;
}

/* Mega Menu & Dropdown Positioning */
.has-mega-menu {
    position: relative;
}
.mega-menu-container {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}
.has-mega-menu:hover > .mega-menu-container,
.has-mega-menu:focus-within > .mega-menu-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
