/* Virtual Foundry - Custom Styles */

/* Font family */
.font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hero gradient overlay */
.gradient-hero {
    background-image: 
        linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%),
        url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2944&auto=format&fit=crop");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

/* Mobile menu animations */
.mobile-menu-transition {
    transition: max-height 0.3s ease-out;
}

/* Calculator input styles */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Custom focus styles */
*:focus {
    outline: none;
}

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

/* Button hover effects */
button, a {
    transition: all 0.2s ease;
}

/* Card hover effects */
.hover\:shadow-2xl:hover {
    transform: translateY(-4px);
}

/* Responsive typography */
@media (max-width: 640px) {
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
}

/* Loading animation for calculator */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

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

/* Print styles */
@media print {
    header, footer, #calculator {
        display: none;
    }
    
    .no-print {
        display: none;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Custom utility classes */
.text-balance {
    text-wrap: balance;
}

/* Success Modal Styles */
#successModal {
    backdrop-filter: blur(8px);
}

#successModalContent {
    animation-fill-mode: both;
}

/* Modal animation classes */
.scale-95 {
    transform: scale(0.95);
}

.scale-100 {
    transform: scale(1);
}

/* Enhanced modal entrance animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-enter {
    animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure modal content is centered properly */
#successModal .flex {
    min-height: 100vh;
}

/* Make sure modal is above everything */
#successModal {
    z-index: 9999;
}

/* Focus styles for modal */
#successModal button:focus {
    outline: 2px solid #0c7ff2;
    outline-offset: 2px;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    /* Ensure body is scrollable on mobile */
    body {
        overflow-x: hidden; /* Prevent horizontal scroll */
        overflow-y: auto; /* Allow vertical scroll */
        padding-bottom: 20px; /* Add bottom padding to prevent content cutoff */
    }
    
    /* Header improvements */
    header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hero section mobile improvements */
    .gradient-hero .container {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .gradient-hero h1 {
        font-size: 2.25rem !important; /* 36px */
        line-height: 1.2 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .gradient-hero p {
        font-size: 1.125rem !important; /* 18px */
        line-height: 1.6 !important;
        margin-bottom: 2rem !important;
    }
    
    /* Button improvements for mobile */
    .gradient-hero .flex {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: stretch !important;
    }
    
    .gradient-hero a {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        min-height: 48px !important; /* Better touch target */
    }
    
    /* Section spacing improvements */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    section.py-16 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    /* Add extra bottom padding to last sections */
    section:last-of-type {
        padding-bottom: 5rem !important;
    }
    
    /* Typography improvements */
    h2.text-3xl {
        font-size: 1.875rem !important; /* 30px */
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    h2.text-4xl {
        font-size: 2rem !important; /* 32px */
        line-height: 1.25 !important;
    }
    
    /* Card improvements */
    .bg-white.rounded-xl {
        padding: 1.5rem !important;
        margin-bottom: 1rem;
    }
    
    .bg-white.rounded-xl h3 {
        font-size: 1.125rem !important; /* 18px */
        margin-bottom: 0.75rem !important;
    }
    
    .bg-white.rounded-xl p {
        font-size: 0.9375rem !important; /* 15px */
        line-height: 1.6 !important;
    }
    
    /* Calculator mobile improvements */
    #calculator .max-w-4xl {
        padding: 1.5rem !important;
    }
    
    #calculator .grid {
        gap: 1.5rem !important;
    }
    
    #calculator input,
    #calculator select,
    #calculator button {
        min-height: 48px !important; /* Better touch targets */
        font-size: 1rem !important;
    }
    
    #calculator .space-y-6 > * + * {
        margin-top: 1.25rem !important;
    }
    
    /* Results display improvements */
    #calculator .bg-white.rounded-xl {
        padding: 1.25rem !important;
    }
    
    #calculator .text-3xl {
        font-size: 2rem !important;
    }
    
    #calculator .text-4xl {
        font-size: 2.25rem !important;
    }
    
    /* Team section improvements */
    #team .flex.flex-col {
        padding: 1.5rem !important;
    }
    
    #team .h-32.w-32 {
        height: 6rem !important;
        width: 6rem !important;
        margin-bottom: 1rem !important;
    }
    
    #team .text-4xl {
        font-size: 2rem !important;
    }
    
    /* Impact section improvements */
    #impact .grid {
        gap: 2rem !important;
    }
    
    #impact .text-5xl {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* CTA section improvements */
    section.bg-blue-600 h2,
    .bg-blue-600 h2 {
        font-size: 1.875rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1.5rem !important;
    }
    
    section.bg-blue-600 .flex,
    .bg-blue-600 .flex {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: stretch !important;
    }
    
    section.bg-blue-600 a,
    .bg-blue-600 a {
        width: 100% !important;
        justify-content: center !important;
        min-height: 48px !important;
    }
    
    /* Footer improvements */
    footer .grid {
        gap: 2rem !important;
    }
    
    footer .text-sm {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }
    
    /* Ensure footer has proper bottom spacing */
    footer {
        padding-bottom: 2rem !important;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
    /* Further reduce spacing and font sizes */
    .gradient-hero h1 {
        font-size: 1.875rem !important; /* 30px */
    }
    
    .gradient-hero p {
        font-size: 1rem !important; /* 16px */
    }
    
    h2.text-3xl,
    h2.text-4xl {
        font-size: 1.5rem !important; /* 24px */
    }
    
    /* Reduce card padding further */
    .bg-white.rounded-xl {
        padding: 1rem !important;
    }
    
    /* Calculator adjustments */
    #calculator .max-w-4xl {
        padding: 1rem !important;
    }
    
    /* Impact metrics */
    #impact .text-5xl {
        font-size: 2rem !important;
    }
    
    /* Team section */
    #team .h-32.w-32 {
        height: 4rem !important;
        width: 4rem !important;
    }
    
    #team .text-4xl {
        font-size: 1.5rem !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    button,
    a,
    input,
    select {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Remove hover effects on touch devices */
    .hover\:shadow-2xl:hover {
        transform: none;
    }
    
    button:hover,
    a:hover {
        background-color: #0c7ff2;
    }
    
    /* Override for white buttons */
    .bg-white:hover {
        background-color: #f9fafb;
    }
    
    /* Better spacing for touch */
    nav a {
        padding: 0.75rem 0 !important;
    }
    
    /* Mobile menu improvements */
    #mobileMenu a {
        padding: 1rem 0 !important;
        font-size: 1rem !important;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .gradient-hero {
        min-height: 70vh !important;
    }
    
    .gradient-hero .container {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gradient-hero {
        background-image: 
            linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%),
            url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2944&auto=format&fit=crop&dpr=2");
    }
} 