/**
 * Naren Vish - Custom Styles
 * Premium Executive Theme
 */

/* ========================================
   BASE STYLES
   ======================================== */

/* Hero Grid Pattern - Enhanced */
.hero-grid-pattern {
    opacity: 0.06;
    z-index: 5;
    pointer-events: none;
}

/* Mobile Strategy Pillar Animations */
.pillar-content-mobile {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease-in-out,
                padding 0.3s ease-in-out;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 640px) {
    /* Ensure text doesn't overflow */
    h1, h2, h3 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Better button spacing on mobile */
    .flex.flex-col.sm\:flex-row {
        gap: 0.75rem;
    }
    
    /* Improve modal on mobile */
    #email-modal .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    /* Better card padding on mobile */
    .bg-card\/80,
    .bg-card\/50 {
        padding: 1.5rem !important;
    }
    
    /* Better icon sizes on mobile */
    [data-lucide] {
        min-width: 1rem;
        min-height: 1rem;
    }
    
    /* Prevent horizontal scroll on mobile */
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Ensure all sections don't overflow */
    section, main, div {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

.pillar-card-mobile {
    transition: border-color 0.3s ease, 
                background-color 0.3s ease,
                transform 0.2s ease;
}

.pillar-toggle:active {
    transform: scale(0.98);
}

.pillar-icon-container {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Buildings Background Pattern - City Skyline */
.buildings-background {
    background: #0a0f1c;
    position: relative;
    overflow: hidden;
}

.buildings-background::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80%;
    background-image: 
        /* Building 1 - Left (tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 65%, transparent 65%),
        /* Building 2 (medium) */
        linear-gradient(to top, #1e293b 0%, #1e293b 50%, transparent 50%),
        /* Building 3 (tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 70%, transparent 70%),
        /* Building 4 - Center (very tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 80%, transparent 80%),
        /* Building 5 (medium-tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 60%, transparent 60%),
        /* Building 6 (tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 72%, transparent 72%),
        /* Building 7 (medium) */
        linear-gradient(to top, #1e293b 0%, #1e293b 55%, transparent 55%),
        /* Building 8 (tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 68%, transparent 68%),
        /* Building 9 - Right (medium-tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 63%, transparent 63%);
    background-size: 
        11% 100%,
        9% 100%,
        8% 100%,
        14% 100%,
        10% 100%,
        9% 100%,
        8% 100%,
        10% 100%,
        11% 100%;
    background-position: 
        0% bottom,
        11% bottom,
        20% bottom,
        28% bottom,
        42% bottom,
        52% bottom,
        61% bottom,
        69% bottom,
        79% bottom;
    background-repeat: no-repeat;
    opacity: 0.9;
    z-index: 1;
}

.buildings-background::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80%;
    background-image: 
        /* Window lights pattern - subtle */
        radial-gradient(circle at 5% 30%, rgba(217, 160, 50, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 15% 50%, rgba(217, 160, 50, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 25% 40%, rgba(217, 160, 50, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 35% 60%, rgba(217, 160, 50, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 45% 35%, rgba(217, 160, 50, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 55% 55%, rgba(217, 160, 50, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 65% 45%, rgba(217, 160, 50, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 75% 65%, rgba(217, 160, 50, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 85% 50%, rgba(217, 160, 50, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 95% 40%, rgba(217, 160, 50, 0.12) 0%, transparent 50%);
    background-size: 8% 15%, 7% 12%, 6% 10%, 9% 14%, 8% 11%, 7% 13%, 6% 9%, 8% 12%, 7% 10%, 6% 11%;
    background-position: 
        5% 30%, 15% 50%, 25% 40%, 35% 60%, 45% 35%,
        55% 55%, 65% 45%, 75% 65%, 85% 50%, 95% 40%;
    background-repeat: no-repeat;
    opacity: 0.6;
    z-index: 2;
    pointer-events: none;
}

/* Buildings Background - Full Height Coverage for Hero Section */
.buildings-background-full {
    background: #0a0f1c;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.buildings-background-full::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    height: 100%;
    background-image: 
        /* Building 1 - Left (tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 65%, transparent 65%),
        /* Building 2 (medium) */
        linear-gradient(to top, #1e293b 0%, #1e293b 50%, transparent 50%),
        /* Building 3 (tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 70%, transparent 70%),
        /* Building 4 - Center (very tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 80%, transparent 80%),
        /* Building 5 (medium-tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 60%, transparent 60%),
        /* Building 6 (tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 72%, transparent 72%),
        /* Building 7 (medium) */
        linear-gradient(to top, #1e293b 0%, #1e293b 55%, transparent 55%),
        /* Building 8 (tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 68%, transparent 68%),
        /* Building 9 - Right (medium-tall) */
        linear-gradient(to top, #1e293b 0%, #1e293b 63%, transparent 63%);
    background-size: 
        11% 100%,
        9% 100%,
        8% 100%,
        14% 100%,
        10% 100%,
        9% 100%,
        8% 100%,
        10% 100%,
        11% 100%;
    background-position: 
        0% bottom,
        11% bottom,
        20% bottom,
        28% bottom,
        42% bottom,
        52% bottom,
        61% bottom,
        69% bottom,
        79% bottom;
    background-repeat: no-repeat;
    opacity: 0.9;
    z-index: 1;
}

.buildings-background::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80%;
    background-image: 
        /* Window lights pattern - subtle */
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 10px,
            rgba(217, 160, 50, 0.25) 10px,
            rgba(217, 160, 50, 0.25) 12px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 18px,
            rgba(217, 160, 50, 0.2) 18px,
            rgba(217, 160, 50, 0.2) 20px
        );
    background-size: 100% 100%, 100% 100%;
    background-position: 0% bottom, 0% bottom;
    background-repeat: no-repeat;
    opacity: 0.8;
    z-index: 2;
    pointer-events: none;
}

.buildings-background-full::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    height: 100%;
    background-image: 
        /* Window lights pattern - subtle */
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 10px,
            rgba(217, 160, 50, 0.25) 10px,
            rgba(217, 160, 50, 0.25) 12px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 18px,
            rgba(217, 160, 50, 0.2) 18px,
            rgba(217, 160, 50, 0.2) 20px
        );
    background-size: 100% 100%, 100% 100%;
    background-position: 0% bottom, 0% bottom;
    background-repeat: no-repeat;
    opacity: 0.8;
    z-index: 2;
    pointer-events: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    background-color: #0a0f1c;
    color: #fafafa;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transform: scale(0.7);
    transform-origin: top center;
    width: 143vw; /* Compensate for 70% scale (100/0.7 = 142.857%) */
    min-height: 143vh;
}

/* Disable scaling on mobile to prevent horizontal scroll */
@media (max-width: 1024px) {
    body {
        transform: none;
        width: 100%;
        min-height: 100vh;
        overflow-x: hidden;
    }
    
    html {
        overflow-x: hidden;
    }
}

/* ========================================
   TYPOGRAPHY - PREMIUM
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.font-display {
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

.font-elegant {
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.font-serif {
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    font-weight: 400;
}

.font-heading {
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ========================================
   TEXT GRADIENTS
   ======================================== */

.text-gradient {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

.text-gradient-cyan {
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 50%, #14b8a6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========================================
   GLASS MORPHISM
   ======================================== */

.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========================================
   GLOW EFFECTS
   ======================================== */

.shadow-glow {
    box-shadow: 0 0 30px rgba(217, 160, 50, 0.25);
}

.shadow-glow-lg {
    box-shadow: 0 0 50px rgba(217, 160, 50, 0.35);
}

.shadow-glow-cyan {
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.25);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradient-xy {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-20px) translateX(10px); }
    66% { transform: translateY(-10px) translateX(-10px); }
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

@keyframes slide-in-up {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate-gradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-gradient-xy {
    animation: gradient-xy 3s ease infinite;
    background-size: 200% auto;
    will-change: background-position;
}

.animate-float {
    animation: float 5s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

.animate-slide-up {
    animation: slide-up 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fade-in 1s ease-out forwards;
}

.animate-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
    will-change: transform;
}

.animate-pulse-ring {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    will-change: transform, opacity;
}

.animate-slide-in-up {
    animation: slide-in-up 0.8s ease-out forwards;
    will-change: opacity, transform;
}

.animate-fade-in-scale {
    animation: fade-in-scale 0.6s ease-out forwards;
    will-change: opacity, transform;
}

/* Scroll reveal animation - Optimized */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px) translateZ(0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0) translateZ(0);
    will-change: auto;
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0f1c;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d9a032;
}

/* ========================================
   SELECTION
   ======================================== */

::selection {
    background: rgba(217, 160, 50, 0.3);
    color: white;
}

/* ========================================
   FOCUS STYLES
   ======================================== */

*:focus-visible {
    outline: 2px solid #d9a032;
    outline-offset: 2px;
}

/* ========================================
   BUTTON INTERACTIONS
   ======================================== */

button, a {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:active, a:active {
    transform: scale(0.98);
}

/* ========================================
   IMAGE HOVER EFFECTS
   ======================================== */

.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.img-zoom:hover img {
    transform: scale(1.05) translateZ(0);
}

/* ========================================
   CARD HOVER EFFECTS
   ======================================== */

.card-hover {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.card-hover:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    will-change: auto;
}

/* ========================================
   GRADIENT BORDER
   ======================================== */

.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(217, 160, 50, 0.5), rgba(34, 211, 238, 0.5));
    -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;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-balance {
    text-wrap: balance;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 640px) {
    .text-gradient {
        font-size: inherit;
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   MODAL STYLES
   ======================================== */

.modal-backdrop {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    will-change: backdrop-filter;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
    contain: layout style paint;
}

/* ========================================
   RESPONSIVE MODAL
   ======================================== */

@media (max-width: 640px) {
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        max-width: calc(100% - 2rem);
    }
    
    #video-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
