/* Color Palette as CSS variables */
:root {
    --header-bg-light: rgba(255, 255, 255, 0.72);
    --header-bg-dark: rgba(12, 12, 12, 0.75);
    --header-logo-light: #111111;
    --header-logo-dark: #fff8f3;
    
    --nav-link-light: rgba(93, 92, 91, 0.7);
    --nav-link-dark: rgba(247, 236, 225, 0.6);
    --nav-link-hover-light: #111111;
    --nav-link-hover-dark: #ffffff;
    
    --footer-bg-light: #f7ece1;
    --footer-bg-dark: #1a1a1a;
    --footer-link-color: #5d5c5b;

    --c-surface: #fff8f3;
    --c-on-surface: #1f1b14;
    --c-surface-container-lowest: #ffffff;
    --c-surface-container-low: #fcf2e7;
    --c-surface-container: #f7ece1;
    --c-surface-container-high: #f1e7db;
    --c-surface-container-highest: #ebe1d6;
    --c-surface-variant: #ebe1d6;
    --c-on-surface-variant: #4e453e;
    --c-primary: #5d5c5b;
    --c-on-primary: #ffffff;
    --c-secondary: #725a44;
    --c-on-secondary: #ffffff;
    --c-secondary-container: #fedcc1;
    --c-on-secondary-container: #78604a;
    --c-outline: #80756c;
    --c-outline-variant: #d2c4ba;
}

.dark {
    /* Navbar specific */
    --header-bg-dark: rgba(9, 9, 9, 0.85); /* Dark sleek glass */
    --header-logo-dark: #FFFFFF;
    --nav-link-dark: #9F9282; /* Warm beige-grey */
    --nav-link-hover-dark: #FFFFFF;
    
    /* Footer */
    --footer-bg-dark: #060606;
    --footer-link-color: #767065 !important;

    /* Base Surfaces */
    --c-surface: #060606; /* Pitch black / obsidian */
    --c-on-surface: #FAFAFA; /* Pure crisp white */
    
    /* Containers */
    --c-surface-container-lowest: #000000;
    --c-surface-container-low: #0A0A0A;
    --c-surface-container: #0E0E0E; /* subtle elevation */
    --c-surface-container-high: #121212; /* Cards */
    --c-surface-container-highest: #1A1A1A; /* Hovered cards */
    
    --c-surface-variant: #121212;
    --c-on-surface-variant: #9F9282; /* Muted warm text matching nav links */
    
    /* Primary (Button background) - Match the "Start Project" pill */
    --c-primary: #C5AF91; 
    --c-on-primary: #0F0D0B;
    
    /* Secondary (Accents/Highlights like "FEATURED WORK") */
    --c-secondary: #C1925D; 
    --c-on-secondary: #0A0A0A;
    
    --c-secondary-container: #1C1814; 
    --c-on-secondary-container: #E8DCCB;
    
    /* Outlines */
    --c-outline: #262626;
    --c-outline-variant: #1A1A1A;
}

.dark .service-card {
    background-color: var(--c-surface-container-high);
    box-shadow: inset 0 0 0 1px var(--c-outline-variant);
}

.dark .service-card:hover {
    background-color: var(--c-surface-container-highest);
    box-shadow: inset 0 0 0 1px var(--c-outline), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.dark .grain-overlay {
    display: none;
}

/* Base Styles moved from HTML */
.grain-overlay {
    display: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--c-surface); 
}
::-webkit-scrollbar-thumb {
    background: var(--c-secondary); 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--c-primary); 
}

/* Custom Text Selection */
::selection {
    background-color: var(--c-secondary);
    color: var(--c-on-secondary);
}
::-moz-selection {
    background-color: var(--c-secondary);
    color: var(--c-on-secondary);
}

/* Ensure no extra space below footer */
html, body {
    margin: 0;
    padding: 0;
}
#main-wrapper {
    overflow: clip;
}
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded' !important;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.glass-nav {
    background: rgba(255, 248, 243, 0.8);
    backdrop-filter: blur(32px);
}
.reveal-up {
    opacity: 0;
    transform: translateY(20px);
    animation: reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes reveal {
    to { opacity: 1; transform: translateY(0); }
}

/* Animations */
@keyframes spin-circular {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.delay-100 {
    animation-delay: 0.1s !important;
}

.delay-300 {
    animation-delay: 0.3s !important;
}

/* Reusable Components & Classes */
.site-header {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
}
.site-header.scrolled {
    width: max-content !important;
    max-width: 95% !important;
}
.site-header.scrolled #nav-glass-bg {
    -webkit-mask-image: none !important;
    mask-image: none !important;
}
.site-header.scrolled #main-nav {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    gap: 1.5rem;
}
.site-header.scrolled #nav-left,
.site-header.scrolled #nav-right {
    flex: 0 0 auto !important;
}
.site-header.scrolled #magic-indicator {
    opacity: 0 !important;
    pointer-events: none;
}

/* Hide Center Nav & Disable Mask on scroll */
.site-header.scrolled #nav-center {
    width: 0 !important;
    flex: 0 0 0 !important;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    padding: 0;
    margin: 0;
}
.site-header.scrolled .search-container {
    width: 0 !important;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

/* Hide Menu Toggle on scroll */
.site-header.scrolled #menu-toggle {
    width: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
    pointer-events: none;
}

.dark #nav-glass-bg {
    background-color: rgba(255, 255, 255, 0.09) !important; /* Elegant light-tinted dark glass */
    border: 1px solid rgba(255, 255, 255, 0.15) !important; /* Crisper border for better definition */
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* ======= MAGIC NAVIGATION ======= */
.magic-indicator {
    position: absolute;
    top: -20px;
    left: 0;
    width: 60px; /* Base width */
    height: 40px;
    display: flex;
    justify-content: center;
    transition: left 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
    pointer-events: none;
}
.active-icon-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--c-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(0) scale(1);
}

.magic-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    height: 40px;
    border-radius: 20px;
    color: var(--c-secondary);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    position: relative;
    z-index: 10;
    transition: color 0.3s ease;
}
.dark .magic-nav-link {
    color: var(--nav-link-dark);
}
.magic-nav-link:hover {
    color: var(--nav-link-hover-light);
}
.dark .magic-nav-link:hover {
    color: var(--nav-link-hover-dark);
}
.magic-nav-link.active {
    color: var(--nav-link-hover-light) !important;
}
.dark .magic-nav-link.active {
    color: var(--nav-link-hover-dark) !important;
}

.site-header.scrolled #magic-indicator,
.site-header.scrolled #colored-notch-svg {
    opacity: 0;
    pointer-events: none;
}

.magic-nav-link::before {
    content: attr(data-icon);
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--c-secondary);
    color: #ffffff !important;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    position: absolute;
    opacity: 0;
    transform: translateY(10px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(193, 146, 93, 0.4);
}

.magic-text {
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(0) scale(1);
    opacity: 1;
}

.magic-nav-link:hover .magic-text,
.magic-nav-link.active .magic-text,
.magic-nav-link.bubble-active .magic-text {
    opacity: 0;
    transform: translateY(-10px) scale(0.8);
    pointer-events: none;
}

.magic-nav-link:hover::before,
.magic-nav-link.active::before,
.magic-nav-link.bubble-active::before {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.mobile-magic-link.bubble-active .mobile-icon {
    transform: scale(0.4);
    opacity: 0;
}

/* ======= EXPANDABLE SEARCH ======= */
.search-container {
    background: rgba(128, 128, 128, 0.1);
    border-radius: 9999px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 44px; 
    height: 44px;
    overflow: hidden;
    position: relative;
    border: 1px solid transparent;
}
.search-container.active {
    width: 220px;
    background: var(--c-surface-container-high);
    border-color: var(--c-outline-variant);
}
.search-input {
    background: transparent;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    height: 100%;
    width: 100%;
    padding-left: 20px;
    padding-right: 48px;
    color: var(--c-on-surface);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.search-container.active .search-input {
    opacity: 1;
    pointer-events: auto;
}
.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--c-on-surface);
    transition: color 0.3s;
}
.search-container.active .search-btn {
    color: var(--c-secondary);
}

.site-footer {
    background-color: var(--footer-bg-light);
}
.dark .site-footer {
    background-color: var(--footer-bg-dark);
}

.logo-text {
    color: var(--header-logo-light);
}
.dark .logo-text {
    color: var(--header-logo-dark);
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-header.scrolled .logo-img {
    height: 32px;
}
.dark .logo-img {
    /* If the logo doesn't show in dark mode, we invert it */
    filter: brightness(0) invert(1);
}


/* Old nav-link classes kept for reference */
.nav-link {
    color: var(--nav-link-light);
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--nav-link-hover-light);
}
.dark .nav-link {
    color: var(--nav-link-dark);
}
.dark .nav-link:hover {
    color: var(--nav-link-hover-dark);
}

/* ======= MENU TOGGLE BUTTON ======= */
.nav-menu-toggle {
    width: 34px; height: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--c-surface-container-high);
    border: 1px solid var(--c-outline-variant);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    padding: 0;
}
.nav-menu-toggle:hover {
    background: var(--c-surface-container-highest);
    transform: scale(1.05);
}
.dark .nav-menu-toggle {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}
.dark .nav-menu-toggle:hover {
    background: rgba(255,255,255,0.08);
}

.menu-bar {
    display: block;
    width: 16px; height: 2px;
    background: var(--c-on-surface);
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.68,-0.55,0.265,1.55);
}
.nav-menu-toggle.active .bar-1 {
    transform: translateY(7px) rotate(45deg);
}
.nav-menu-toggle.active .bar-2 {
    opacity: 0;
    transform: scaleX(0);
}
.nav-menu-toggle.active .bar-3 {
    transform: translateY(-7px) rotate(-45deg);
}

/* ======= DROPDOWN PANEL ======= */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 16px);
    left: 18px;
    width: 260px;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    transform-origin: top left;
    transform: translateY(-12px) scale(0.95);
    filter: blur(8px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-dropdown.open {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
}

.nav-dropdown-inner {
    background: var(--c-surface-container-lowest);
    border: 1px solid var(--c-outline-variant);
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 24px 48px -12px rgba(0,0,0,0.18), 0 8px 16px rgba(0,0,0,0.06);
    backdrop-filter: blur(20px);
}
.dark .nav-dropdown-inner {
    background: rgba(18, 18, 18, 0.95);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 16px 48px -12px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.03);
}

/* Menu Items */
.nav-menu-item {
    border-radius: 10px;
    overflow: hidden;
}
.nav-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-on-surface);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
}
.nav-menu-link:hover {
    background: var(--c-surface-container-high);
}
.dark .nav-menu-link:hover {
    background: rgba(255,255,255,0.05);
}

/* Chevron rotation */
.nav-chevron {
    margin-left: auto;
    opacity: 0.3;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.nav-menu-item.expanded .nav-chevron {
    transform: rotate(180deg);
    opacity: 0.7;
}

/* Sub-menus */
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s;
    padding: 0 0 0 38px;
}
.nav-menu-item.expanded .nav-submenu {
    max-height: 300px;
    padding: 4px 0 12px 38px;
}

.nav-sub-link {
    display: block;
    padding: 7px 12px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--c-on-surface-variant);
    text-decoration: none;
    transition: all 0.2s, transform 0.2s, opacity 0.2s;
    transform: translateY(-6px);
    opacity: 0;
}
.nav-menu-item.expanded .nav-sub-link {
    transition: all 0.2s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
    transform: translateY(0);
    opacity: 1;
}

/* Stagger transition delay for sub links on enter */
.nav-menu-item.expanded .nav-sub-link:nth-child(1) { transition-delay: 0s, 0.05s, 0.05s; }
.nav-menu-item.expanded .nav-sub-link:nth-child(2) { transition-delay: 0s, 0.1s, 0.1s; }
.nav-menu-item.expanded .nav-sub-link:nth-child(3) { transition-delay: 0s, 0.15s, 0.15s; }
.nav-menu-item.expanded .nav-sub-link:nth-child(4) { transition-delay: 0s, 0.2s, 0.2s; }

.nav-sub-link:hover {
    background: var(--c-surface-container-high);
    color: var(--c-on-surface);
    transform: translateX(4px);
}
.dark .nav-sub-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

/* ======= MOBILE SIDEBAR ======= */
.mobile-sidebar {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
}
.mobile-sidebar.open {
    pointer-events: auto;
}
.mobile-sidebar.open #mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}
.mobile-sidebar-inner {
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-sidebar.open .mobile-sidebar-inner {
    transform: translateX(0);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    opacity: 0;
}
.mobile-side-item.expanded .mobile-submenu {
    max-height: 400px;
    opacity: 1;
}
.mobile-side-item.expanded .mobile-chevron {
    transform: rotate(180deg);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.footer-subtitle {
    color: var(--footer-link-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.dark .footer-subtitle {
    color: #f7ece1;
}

.footer-link {
    color: var(--footer-link-color);
    opacity: 0.6;
    transition: opacity 0.3s;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem; 
    letter-spacing: 0.1em; 
    text-transform: uppercase;
}
.footer-link:hover {
    opacity: 1;
}

.service-card {
    padding: 3rem; 
    background-color: var(--c-surface); 
    border-radius: 0.5rem; 
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.5s;
}
.service-card:hover {
    background-color: var(--c-surface-container-lowest); 
    transform: translateY(-1rem); 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1); 
}

/* Animated Theme Toggle */
.theme-toggle-btn {
    width: 48px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--c-surface-container-high);
    border: 1px solid var(--c-outline-variant);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-toggle-btn:hover {
    transform: scale(1.05);
    background: var(--c-surface-container-highest);
}
.theme-toggle-btn .icon-container {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.theme-toggle-btn .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: var(--c-secondary);
}
.theme-toggle-btn .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
    color: var(--c-on-surface);
}

.dark .theme-toggle-btn .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}
.dark .theme-toggle-btn .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ============================================
   HERO SECTION — Premium Software House Style  
   ============================================ */

/* --- Animated Gradient Mesh Background --- */
.hero-bg-mesh {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.mesh-gradient {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    animation: meshFloat 15s ease-in-out infinite;
}
.mesh-1 {
    width: 600px; height: 600px;
    background: var(--c-secondary);
    top: -15%; right: -5%;
    animation-delay: 0s;
}
.mesh-2 {
    width: 500px; height: 500px;
    background: #725a44;
    bottom: -10%; left: 10%;
    animation-delay: -5s;
}
.mesh-3 {
    width: 400px; height: 400px;
    background: var(--c-primary);
    top: 30%; right: 25%;
    animation-delay: -10s;
}
.dark .mesh-gradient { opacity: 0.08; }

@keyframes meshFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* --- Subtle Grid Pattern --- */
.hero-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: 
        linear-gradient(var(--c-outline-variant) 1px, transparent 1px),
        linear-gradient(90deg, var(--c-outline-variant) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.06;
}
.dark .hero-grid-overlay { opacity: 0.04; }

/* --- Hero Text Column --- */
.hero-text-col {
    position: relative;
    z-index: 5;
}

/* Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--c-surface-container-high);
    border: 1px solid var(--c-outline-variant);
    margin-bottom: 2rem;
    opacity: 0;
    animation: heroFadeUp 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.dark .hero-badge {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}
.hero-badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--c-secondary);
    animation: pulse 2s ease-in-out infinite;
}

/* Title */
.hero-title {
    color: var(--c-on-surface);
    opacity: 0;
    animation: heroFadeUp 0.9s 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-title-accent {
    color: var(--c-secondary);
    font-style: italic;
    position: relative;
}
.hero-title-accent::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 0;
    width: 100%; height: 6px;
    background: var(--c-secondary);
    opacity: 0.15;
    border-radius: 3px;
}

/* Subtitle */
.hero-subtitle {
    opacity: 0;
    animation: heroFadeUp 0.9s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* CTA */
.hero-cta {
    opacity: 0;
    animation: heroFadeUp 0.9s 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--c-primary);
    color: var(--c-on-primary);
    padding: 14px 32px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 4px 24px -4px rgba(0,0,0,0.15);
    text-decoration: none;
}
.hero-btn-primary:hover {
    box-shadow: 0 8px 32px -4px rgba(0,0,0,0.25);
}
.hero-btn-secondary {
    display: inline-flex; align-items: center;
    color: var(--c-on-surface);
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--c-outline-variant);
    transition: all 0.3s;
    text-decoration: none;
}
.hero-btn-secondary:hover {
    background: var(--c-surface-container-high);
    border-color: var(--c-outline);
}
.dark .hero-btn-secondary {
    border-color: rgba(255,255,255,0.1);
}
.dark .hero-btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.2);
}

/* Trust */
.hero-trust {
    display: flex; align-items: center; gap: 12px;
    margin-top: 2.5rem;
    opacity: 0;
    animation: heroFadeUp 0.9s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-trust-avatars {
    display: flex;
}
.hero-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff;
    margin-left: -8px;
    border: 2px solid var(--c-surface);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.hero-avatar:first-child { margin-left: 0; }

/* --- Visual Column --- */
.hero-visual-col {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
}
.hero-visual-wrapper {
    position: relative;
    width: 100%;
    max-width: 460px;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    transform-style: preserve-3d;
}

/* --- Glassmorphic Cards --- */
.hero-card {
    background: var(--c-surface-container-high);
    border: 1px solid var(--c-outline-variant);
    border-radius: 14px;
    box-shadow: 0 8px 32px -8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    font-family: 'Inter', sans-serif;
    color: var(--c-on-surface);
}
.dark .hero-card {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 8px 40px -8px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
}

/* Main code card */
.hero-card-main {
    opacity: 0;
    animation: heroCardPop 0.8s 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-outline-variant);
}
.dark .hero-card-header {
    border-color: rgba(255,255,255,0.06);
}
.hero-card-body {
    padding: 16px 18px;
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.85;
}
.hero-code-line {
    white-space: nowrap;
    min-height: 1.85em;
}

/* Syntax Colors - Light */
.code-kw { color: #8b5cf6; font-weight: 600; }
.code-fn { color: #d97706; }
.code-str { color: #059669; }

/* Syntax Colors - Dark */
.dark .code-kw { color: #c084fc; font-weight: 600; }
.dark .code-fn { color: #fbbf24; }
.dark .code-str { color: #34d399; }

/* Blinking cursor */
.hero-code-cursor {
    width: 8px; height: 16px;
    background: var(--c-secondary);
    display: inline-block;
    animation: blink 1s step-end infinite;
    border-radius: 1px;
    margin-top: 4px;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* Floating cards */
.hero-card-float {
    position: absolute;
    padding: 12px 16px;
    min-width: 160px;
}
.hero-float-1 {
    top: -20px; right: -30px;
    opacity: 0;
    animation: heroFloatIn 0.8s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-float-2 {
    bottom: 40px; right: -40px;
    opacity: 0;
    animation: heroFloatIn 0.8s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-float-3 {
    bottom: -15px; left: -20px;
    min-width: 200px;
    opacity: 0;
    animation: heroFloatIn 0.8s 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Floating hover animation */
.hero-float-1 { animation: heroFloatIn 0.8s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards, floatY 6s 2s ease-in-out infinite; }
.hero-float-2 { animation: heroFloatIn 0.8s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards, floatY 5s 2.5s ease-in-out infinite; }
.hero-float-3 { animation: heroFloatIn 0.8s 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards, floatY 7s 3s ease-in-out infinite; }

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* --- Tech Marquee --- */
.hero-marquee-wrap {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 5;
    border-top: 1px solid var(--c-outline-variant);
    overflow: hidden;
    padding: 14px 0;
}
.dark .hero-marquee-wrap {
    border-color: rgba(255,255,255,0.06);
}
.hero-marquee {
    width: 100%;
    overflow: hidden;
}
.hero-marquee-track {
    display: flex;
    gap: 24px;
    animation: marqueeScroll 30s linear infinite;
    white-space: nowrap;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--c-on-surface-variant);
    opacity: 0.5;
}
.hero-marquee-track span {
    flex-shrink: 0;
}
@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --- Hero Animations --- */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes heroCardPop {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes heroFloatIn {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-visual-col { display: none; }
    .hero-float-1, .hero-float-2, .hero-float-3, .hero-float-4 { display: none; }
}

/* --- Hero Glow Backdrop --- */
.hero-glow {
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--c-secondary) 0%, transparent 70%);
    opacity: 0.1;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(60px);
    pointer-events: none;
    animation: glowPulse 6s ease-in-out infinite;
}
.dark .hero-glow { opacity: 0.06; }

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.15; }
}
.dark @keyframes glowPulse {
    50% { opacity: 0.08; }
}

/* --- Live Dot --- */
.hero-live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #28c840;
    box-shadow: 0 0 6px #28c840;
    animation: pulse 2s ease-in-out infinite;
}

/* --- SVG Chart Theming --- */
.chart-stop-1 { stop-color: var(--c-secondary); stop-opacity: 0.3; }
.chart-stop-2 { stop-color: var(--c-secondary); stop-opacity: 0.02; }
.hero-chart-line { stroke: var(--c-secondary); }
.hero-chart-dot { fill: var(--c-secondary); }
.hero-chart-pulse {
    fill: var(--c-secondary);
    opacity: 0.3;
    animation: chartPulse 2s ease-in-out infinite;
}
.hero-chart-area {
    opacity: 0;
    animation: chartReveal 1.5s 0.8s ease-out forwards;
}
.hero-chart-line {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: chartDraw 2s 0.6s ease-out forwards;
}

@keyframes chartPulse {
    0%, 100% { r: 4; opacity: 0.3; }
    50% { r: 10; opacity: 0; }
}
@keyframes chartReveal {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes chartDraw {
    to { stroke-dashoffset: 0; }
}

/* --- Mini Bar Chart --- */
.hero-mini-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
}
.hero-mini-bars > div {
    width: 4px;
    border-radius: 2px;
    background: var(--c-secondary);
    opacity: 0.6;
    animation: barGrow 0.6s ease-out forwards;
    transform-origin: bottom;
}
@keyframes barGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

/* --- Deploy Icon --- */
.hero-deploy-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--c-secondary), #8a6e4a);
    color: #fff;
    flex-shrink: 0;
}

/* --- 4th Float Card Position --- */
.hero-float-4 {
    top: 50%; left: -30px;
    padding: 8px 14px;
    min-width: auto;
    opacity: 0;
    animation: heroFloatIn 0.8s 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards, floatY 8s 3.5s ease-in-out infinite;
}

/* --- Browser URL Bar --- */
.hero-browser-url {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--c-surface-container);
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid var(--c-outline-variant);
}
.dark .hero-browser-url {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
}

/* --- Code Editor Behind Layer --- */
.hero-card-behind {
    position: absolute;
    top: 30px; right: -18px;
    width: 92%;
    z-index: 1;
    background: var(--c-surface-container-high);
    border: 1px solid var(--c-outline-variant);
    border-radius: 14px;
    box-shadow: 0 8px 32px -8px rgba(0,0,0,0.08);
    opacity: 0;
    animation: heroCardPop 0.8s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.dark .hero-card-behind {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.06);
    box-shadow: 0 8px 40px -8px rgba(0,0,0,0.3);
}

/* --- App Preview Layout --- */
.hero-app-preview {
    display: flex;
    min-height: 220px;
}
.hero-app-sidebar {
    width: 44px;
    border-right: 1px solid var(--c-outline-variant);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    gap: 6px;
    flex-shrink: 0;
}
.dark .hero-app-sidebar { border-color: rgba(255,255,255,0.06); }

.hero-sidebar-logo {
    width: 26px; height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--c-secondary), #8a6e4a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 8px;
}
.hero-sidebar-icon {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-on-surface-variant);
    opacity: 0.35;
    transition: all 0.2s;
}
.hero-sidebar-icon.active {
    background: var(--c-surface-container-highest);
    opacity: 0.9;
    color: var(--c-secondary);
}
.dark .hero-sidebar-icon.active {
    background: rgba(255,255,255,0.06);
}

.hero-app-content {
    flex: 1;
    padding: 10px 14px;
    min-width: 0;
}
.hero-app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.hero-app-greeting {
    font-size: 11px;
    color: var(--c-on-surface);
    opacity: 0.7;
}
.hero-app-search {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--c-surface-container);
    border: 1px solid var(--c-outline-variant);
}
.dark .hero-app-search {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.06);
}

.hero-app-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}
.hero-app-mini-card {
    padding: 8px;
    border-radius: 8px;
    background: var(--c-surface-container);
    border: 1px solid var(--c-outline-variant);
}
.dark .hero-app-mini-card {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}

.hero-app-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hero-app-line {
    height: 6px;
    border-radius: 3px;
    background: var(--c-outline-variant);
    opacity: 0.25;
}
.dark .hero-app-line {
    background: rgba(255,255,255,0.06);
}

/* --- Capability Tags --- */
.hero-cap-tag {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    background: var(--c-surface-container-high);
    border: 1px solid var(--c-outline-variant);
    color: var(--c-on-surface-variant);
}
.dark .hero-cap-tag {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}

/* --- Stack Tags --- */
.hero-stack-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    background: var(--c-surface-container);
    border: 1px solid var(--c-outline-variant);
    color: var(--c-on-surface-variant);
    letter-spacing: 0.02em;
}
.dark .hero-stack-tag {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
}

/* =========================================
   NEW CONTINUOUS 3D CAROUSEL HERO SECTION
========================================= */
.carousel-container {
    perspective: 1200px;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Javascript handles continuous physics spin now */
.carousel-spinner {
    position: relative;
    width: 240px;
    height: 320px;
    transform-style: preserve-3d;
}

.carousel-card {
    position: absolute;
    width: 240px;
    height: 320px;
    left: 0;
    top: 0;
    border-radius: 32px;
    transform-style: preserve-3d;
    /* Prevent the back of the cards from looking weird if they flip, though we want them visible as they rotate away */
    backface-visibility: visible;
}

/* 
  5 Cards Math: 360 / 5 = 72 degrees each.
  TranslateZ pushes them outwards into a cylinder shape.
*/
.carousel-card.card-item-1 { transform: rotateY(0deg) translateZ(280px); }
.carousel-card.card-item-2 { transform: rotateY(72deg) translateZ(280px); }
.carousel-card.card-item-3 { transform: rotateY(144deg) translateZ(280px); }
.carousel-card.card-item-4 { transform: rotateY(216deg) translateZ(280px); }
.carousel-card.card-item-5 { transform: rotateY(288deg) translateZ(280px); }

@media (min-width: 768px) {
    .carousel-spinner { width: 260px; height: 360px; }
    .carousel-card { width: 260px; height: 360px; }
    .carousel-card.card-item-1 { transform: rotateY(0deg) translateZ(320px); }
    .carousel-card.card-item-2 { transform: rotateY(72deg) translateZ(320px); }
    .carousel-card.card-item-3 { transform: rotateY(144deg) translateZ(320px); }
    .carousel-card.card-item-4 { transform: rotateY(216deg) translateZ(320px); }
    .carousel-card.card-item-5 { transform: rotateY(288deg) translateZ(320px); }
}

.card-inner {
    position: absolute;
    inset: 0;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    border: 1px solid var(--c-outline-variant);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
    overflow: hidden;
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(0) scale(1);
}
.carousel-card:hover .card-inner {
    border-color: var(--c-secondary);
    box-shadow: 0 0 40px rgba(193, 146, 93, 0.3), inset 0 1px 0 rgba(255,255,255,0.4);
    transform: translateY(-15px) scale(1.02);
}

.dark .card-inner {
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(0,0,0,0.2));
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
}
.dark .carousel-card:hover .card-inner {
    border-color: var(--c-secondary);
    box-shadow: 0 0 50px rgba(193, 146, 93, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-15px) scale(1.02);
    background: linear-gradient(135deg, rgba(255,255,255,0.09), rgba(0,0,0,0.1));
}

.card-icon-bg {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--c-outline-variant) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}
.dark .card-icon-bg {
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
}

.card-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--c-on-surface);
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.card-text {
    font-size: 0.85rem;
    color: var(--c-on-surface-variant);
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

.card-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    mix-blend-mode: overlay;
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .hero-visual-col { display: flex !important; }
}

@media (max-width: 576px) {
    /* Need tighter radius on mobile to avoid horizontal scrolling */
    .carousel-spinner { width: 200px; height: 280px; }
    .carousel-card { width: 200px; height: 280px; }
    .carousel-card.card-item-1 { transform: rotateY(0deg) translateZ(220px); }
    .carousel-card.card-item-2 { transform: rotateY(72deg) translateZ(220px); }
    .carousel-card.card-item-3 { transform: rotateY(144deg) translateZ(220px); }
    .carousel-card.card-item-4 { transform: rotateY(216deg) translateZ(220px); }
    .carousel-card.card-item-5 { transform: rotateY(288deg) translateZ(220px); }
}

/* =========================================
   MAGIC BUTTONS (Interactive Pill CTA)
========================================= */
.magic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--c-surface-container-highest);
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.12) 0%, transparent 100%);
    color: var(--c-on-surface);
    border-radius: 999px;
    padding: 4px 4px 4px 16px;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 150px;
    border: 1px solid rgba(0,0,0,0.1);
    border-top: 1px solid rgba(255,255,255,0.4);
    border-bottom: 3px solid rgba(0,0,0,0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 1;
}

.magic-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--c-secondary);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: inherit;
}

.dark .magic-btn {
    background-color: #1a1a1a;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.05);
    border-top: 1px solid rgba(255,255,255,0.15);
    border-bottom: 3px solid rgba(0,0,0,0.8);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* 3D Click / Active State */
.magic-btn:active {
    transform: translateY(3px) !important; /* Forces it down */
    border-bottom-width: 1px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Secondary / Outline variant */
.magic-btn.magic-secondary {
    background-color: transparent;
    border: 1px solid var(--c-outline-variant);
    padding: 5px 5px 5px 19px; /* Adjust for border */
    box-shadow: none;
}
.dark .magic-btn.magic-secondary {
    border-color: rgba(255,255,255,0.15);
}

/* On hover, background sweeps to Theme Base/Secondary color */
.magic-btn:hover {
    color: var(--c-on-primary);
    border-bottom-color: rgba(0,0,0,0.4);
    box-shadow: 0 6px 20px rgba(193, 146, 93, 0.4); /* Glow matching accent */
}
.magic-btn:hover::before {
    transform: scaleX(1);
}
.magic-btn.magic-secondary:hover {
    border-color: var(--c-secondary);
}

/* Text Container */
.magic-btn-content {
    position: relative;
    height: 1.25rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.magic-txt-default {
    position: relative;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    white-space: nowrap;
}
.magic-txt-hover {
    position: absolute;
    left: 0;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    white-space: nowrap;
}

.magic-txt-default {
    transform: translateX(0);
    opacity: 1;
}

.magic-txt-hover {
    transform: translateX(-150%); /* Start below */
    opacity: 0;
}

/* Text slides */
.magic-btn:hover .magic-txt-default {
    transform: translateX(150%);
    opacity: 0;
}
.magic-btn:hover .magic-txt-hover {
    transform: translateX(0);
    opacity: 1;
}

/* =========================================
   FRAMER-LIKE LUXURY SYSTEM
========================================= */
.lux-main {
    position: relative;
}

.lux-section {
    position: relative;
    isolation: isolate;
}

/* Floating luxury highlights similar to high-end Framer templates */
.lux-hero::after,
.lux-portfolio::after,
.lux-services::after {
    content: "";
    position: absolute;
    width: min(44vw, 560px);
    height: min(44vw, 560px);
    border-radius: 999px;
    pointer-events: none;
    filter: blur(70px);
    z-index: 0;
}

.lux-hero::after {
    right: -8%;
    top: -14%;
    background: radial-gradient(circle, rgba(193, 146, 93, 0.24) 0%, rgba(193, 146, 93, 0) 68%);
}

.lux-portfolio::after {
    left: -10%;
    top: 12%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 72%);
}

.lux-services::after {
    right: -12%;
    bottom: -8%;
    background: radial-gradient(circle, rgba(193, 146, 93, 0.2) 0%, rgba(193, 146, 93, 0) 70%);
}

.dark .lux-portfolio::after {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 72%);
}

/* Higher-end heading feel */
.lux-main h1,
.lux-main h2 {
    letter-spacing: -0.03em;
}

.lux-main h1 span,
.lux-main h2 span {
    filter: saturate(1.08) contrast(1.06);
}

/* Keep gradient gold text always visible */
.text-transparent.bg-clip-text {
    display: inline-block;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

/* Framer-like panel framing for sections */
.lux-process .max-w-7xl,
.lux-testimonials .max-w-\[1300px\],
.lux-cta .max-w-4xl {
    position: relative;
}

.lux-cta .max-w-4xl::before {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 30px;
    border: 1px solid rgba(193, 146, 93, 0.18);
    box-shadow: 0 18px 65px -38px rgba(193, 146, 93, 0.32);
    pointer-events: none;
    z-index: -1;
}

/* Premium polish for sticky project containers */
.premium-project-card {
    overflow: hidden;
}

.premium-project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.04) 100%);
}

.premium-project-card:hover::before {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.06) 100%);
}

/* Buttons feel more “product luxury” */
.magic-btn {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}



/* Premium heading scroll reveal */
.heading-lux-reveal {
    opacity: 0;
    transform: translate3d(0, 38px, 0) scale(0.985);
    filter: blur(6px);
    will-change: transform, opacity, filter;
    transition:
        opacity 820ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.heading-lux-reveal.heading-inview {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
}

/* Premium grain texture balance */
.grain-overlay {
    display: block;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.06;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.22) 0.5px, transparent 0.8px),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.18) 0.5px, transparent 0.8px);
    background-size: 3px 3px, 4px 4px;
    mix-blend-mode: soft-light;
}

.dark .grain-overlay {
    display: block;
    opacity: 0.08;
    mix-blend-mode: overlay;
}

/* Cursor v2 aesthetic */
#cursor-dot {
    mix-blend-mode: normal;
    box-shadow: 0 0 18px rgba(193, 146, 93, 0.55), 0 0 38px rgba(193, 146, 93, 0.28);
}
#cursor-ring {
    box-shadow: 0 0 24px rgba(193, 146, 93, 0.22);
}
#cursor-aura {
    filter: blur(1px);
}

/* Icon Container Region */
.magic-btn-icon {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

/* Icon Container fills to dark circle */
.magic-btn:hover .magic-btn-icon {
    background-color: var(--c-surface-container-highest);
}
.dark .magic-btn:hover .magic-btn-icon {
    background-color: #000000;
}

/* The Blinking Dot */
.magic-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--c-secondary); 
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: aggressiveBlink 1.2s ease-in-out infinite;
    position: absolute;
}
.magic-btn.magic-secondary .magic-dot {
    background-color: var(--c-primary);
}
.dark .magic-btn.magic-secondary .magic-dot {
    background-color: var(--c-secondary);
}

@keyframes aggressiveBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.1; transform: scale(0.6); }
}

/* Dot shrinks away */
.magic-btn:hover .magic-dot {
    opacity: 0;
    transform: scale(0);
    animation: none;
}

/* The Arrow */
.magic-arrow {
    position: absolute;
    color: var(--c-on-surface);
    font-size: 20px !important;
    font-variation-settings: 'wght' 300, 'opsz' 24;
    opacity: 0;
    transform: translateX(-15px) scale(0.8);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, color 0.4s;
}
.dark .magic-arrow {
    color: #ffffff;
}

/* Arrow shoots in */
.magic-btn:hover .magic-arrow {
    opacity: 1;
    transform: translateX(0) scale(1);
    color: #ffffff; /* Use white to guarantee visibility against the dark circle background */
}

/* =========================================
   HERO TEXT ANIMATIONS & GRADIENT FLOW
========================================= */
.bg-300\% {
    background-size: 300% 300%;
}

.animate-gradient-flow {
    animation: gradientFlow 6s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-text-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: smoothReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
}

@keyframes smoothReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================
   MEGA DROPDOWN NAVIGATION (BENTO STYLE)
========================================= */
.mega-menu-container {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    padding-top: 16px; /* Offset for hover bridge */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
    pointer-events: none;
}

.group\/nav:hover .mega-menu-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    z-index: 100;
    pointer-events: auto;
}

.mega-menu-glass {
    background: rgba(12, 12, 14, 0.85); /* Deep dark glass */
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08); /* faint rim */
    box-shadow: 0 40px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
    border-radius: 32px;
    width: 680px; /* Large width for Bento */
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Left links, right featured */
    gap: 24px;
    padding: 28px;
}

.mega-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.mega-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border-radius: 16px;
    transition: background 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.mega-item:hover {
    background: rgba(255,255,255,0.06); 
}

.mega-item:hover .mega-icon-box {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.15);
}

.mega-featured-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    height: 190px;
}

.mega-stack-box {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.02);
}

.mega-stack-pill {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 11px;
    color: #cbd5e1;
    transition: background 0.3s;
    background: rgba(255,255,255,0.02);
}
.mega-stack-pill:hover {
    background: rgba(255,255,255,0.1);
}

/* =========================================
   SCREENSHOT TESTIMONIALS LAYOUT GEOMETRY
========================================= */

.testi-container-bg { background-color: var(--c-surface-container-low); }

/* Text Block Cutout over Image */
.testi-text-block {
    background-color: var(--c-surface-container-low);
    border-bottom-right-radius: 32px;
}
.testi-text-block::before {
    content: "";
    position: absolute;
    bottom: -24px;
    left: 0;
    width: 24px;
    height: 24px;
    background: transparent;
    border-top-left-radius: 24px;
    box-shadow: -8px -8px 0 8px var(--c-surface-container-low);
    pointer-events: none;
}
.testi-text-block::after {
    content: "";
    position: absolute;
    right: -24px;
    top: 0;
    width: 24px;
    height: 24px;
    background: transparent;
    border-top-left-radius: 24px;
    box-shadow: -8px -8px 0 8px var(--c-surface-container-low);
    pointer-events: none;
}

/* Card Arrow Cutout inside Right Stack */
.testi-card-cutout {
    position: absolute;
    bottom: -1px; /* -1px to prevent subpixel rendering gaps */
    right: -1px;
    width: 70px;
    height: 70px;
    background-color: var(--c-surface-container-low);
    border-top-left-radius: 32px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.testi-card-cutout::before {
    content: "";
    position: absolute;
    top: -24px;
    right: 0;
    width: 24px;
    height: 24px;
    background: transparent;
    border-bottom-right-radius: 24px;
    box-shadow: 8px 8px 0 8px var(--c-surface-container-low);
    pointer-events: none;
}
.testi-card-cutout::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -24px;
    width: 24px;
    height: 24px;
    background: transparent;
    border-bottom-right-radius: 24px;
    box-shadow: 8px 8px 0 8px var(--c-surface-container-low);
    pointer-events: none;
}



/* =========================================
   BUILT DIFFERENT / DNA GRID
========================================= */
.dna-grid-card {
    position: relative;
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(0,0,0,0.02));
    border: 1px solid var(--c-outline-variant);
    border-radius: 24px;
    padding: 32px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    transform: translateY(0);
}
.dark .dna-grid-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(0,0,0,0.15));
    border-color: rgba(255,255,255,0.08);
}
.dna-grid-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--c-secondary);
    box-shadow: 0 15px 40px -10px rgba(193, 146, 93, 0.3), inset 0 0 20px rgba(193, 146, 93, 0.05);
}

.dna-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(193, 146, 93, 0.1);
    color: var(--c-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.4s ease;
}
.dna-grid-card:hover .dna-card-icon {
    background: var(--c-secondary);
    color: #fff;
    box-shadow: 0 0 20px var(--c-secondary);
}

.dna-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(193, 146, 93, 0.15) 0%, transparent 50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}
.dna-grid-card:hover .dna-card-glow {
    opacity: 1;
}

/* =========================================
   PREMIUM 4K VISUAL PASS (SAFE LAYER)
========================================= */
:root {
    --premium-shadow-soft: 0 18px 50px -22px rgba(0, 0, 0, 0.22);
    --premium-shadow-strong: 0 30px 90px -30px rgba(0, 0, 0, 0.45);
    --premium-ring: rgba(193, 146, 93, 0.28);
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle cinematic depth behind all sections */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}
body::before {
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(193, 146, 93, 0.13), transparent 62%),
        radial-gradient(700px 420px at -10% 40%, rgba(93, 92, 91, 0.11), transparent 65%);
}
body::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.06));
}

.dark body::before {
    background:
        radial-gradient(900px 500px at 90% -8%, rgba(193, 146, 93, 0.14), transparent 62%),
        radial-gradient(700px 420px at -12% 42%, rgba(255, 255, 255, 0.06), transparent 65%);
}

/* Premium type rhythm */
h1, h2, h3 {
    letter-spacing: -0.02em;
}
p {
    line-height: 1.75;
}

/* Hero polish */
#hero {
    isolation: isolate;
}
#hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(1200px 600px at 50% 8%, rgba(193, 146, 93, 0.12), transparent 58%);
    z-index: 0;
}

/* Premium project cards */
.premium-project-card {
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: var(--premium-shadow-strong);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}
.premium-project-card:hover {
    transform: translateY(-6px);
    border-color: var(--premium-ring);
    box-shadow: 0 34px 95px -34px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(193, 146, 93, 0.22);
}
.premium-project-card .premium-glass-card {
    border: 1px solid rgba(193, 146, 93, 0.22);
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.42));
    box-shadow: 0 22px 70px -24px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Service / DNA cards sharper premium feel */
.service-card,
.dna-grid-card {
    box-shadow: var(--premium-shadow-soft);
}
.service-card:hover,
.dna-grid-card:hover {
    box-shadow: var(--premium-shadow-strong);
}

/* Smooth premium transitions globally on core interactive elements */
a, button, .service-card, .magic-btn, .magic-nav-link, .mobile-magic-link {
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Force bottom space to be completely removed */
html, body {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
footer {
    margin-bottom: 0 !important;
}

/* FAQ Section */
.faq-item { transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.icon-plus { display: inline-block !important; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.5s ease !important; }
.faq-item.active { border-bottom-color: rgba(193, 146, 93, 0.4) !important; }
.faq-item.active .faq-content { max-height: 400px; }
.faq-item.active .icon-plus { transform: rotate(135deg) !important; color: #C1925D !important; }
.faq-item.active .w-8 { border-color: rgba(193, 146, 93, 0.4) !important; }
.faq-item.active .font-mono { opacity: 1 !important; }
.faq-item button span.font-headline { font-size: 1.1rem !important; font-weight: 500 !important; }
@media (max-width: 768px) {
    .faq-item button span.font-headline { font-size: 0.95rem !important; }
}
.faq-item .faq-content div { font-size: 0.92rem !important; line-height: 1.7 !important; }
\n
/* Premium Icon Animations */
@keyframes icon-spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes icon-pulse-star {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}
@keyframes icon-rotate-flip {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes icon-shake-soft {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px) rotate(-5deg); }
    75% { transform: translateX(2px) rotate(5deg); }
}

/* Desktop Magic Nav Animations */
.magic-nav-link:hover::before, .magic-nav-link.active::before {
    animation: icon-rotate-flip 0.8s ease-in-out forwards;
}

/* Mobile Nav Animations */
.mobile-magic-link:hover .mobile-icon, .mobile-magic-link.bubble-active .mobile-icon {
    animation: icon-rotate-flip 0.8s ease-in-out forwards;
}

/* Global Icon Hover Animations */
.material-symbols-rounded, .material-symbols-outlined {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
a:hover .material-symbols-rounded,
button:hover .material-symbols-rounded,
.group:hover .material-symbols-rounded,
.service-card:hover .material-symbols-rounded,
.dna-grid-card:hover .material-symbols-rounded,
.mega-item:hover .material-symbols-rounded {
    transform: rotate(360deg);
}
