/* Critical CSS for above-the-fold content - Hocomb Real Estate Platform */

/* Reset and base styles */
*,
::before,
::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif
}

body {
    margin: 0;
    line-height: inherit
}

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

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal
}

/* Critical navigation styles */
.fixed {
    position: fixed
}

.top-0 {
    top: 0
}

.left-0 {
    left: 0
}

.right-0 {
    right: 0
}

.z-50 {
    z-index: 50
}

.bg-white {
    background-color: #fff
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05)
}

/* Hero section critical styles */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops))
}

.from-gray-50 {
    --tw-gradient-from: #f9fafb;
    --tw-gradient-to: rgb(249 250 251 / 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)
}

.to-gray-100 {
    --tw-gradient-to: #f3f4f6
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem
}

.text-5xl {
    font-size: 3rem;
    line-height: 1
}

.font-bold {
    font-weight: 700
}

.text-gray-900 {
    color: #111827
}

.text-gray-600 {
    color: #4b5563
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem
}

.max-w-7xl {
    max-width: 80rem
}

.mx-auto {
    margin-left: auto;
    margin-right: auto
}

/* Button critical styles */
.bg-primary-600 {
    background-color: #2563eb
}

.text-white {
    color: #fff
}

.rounded-lg {
    border-radius: 0.5rem
}

.font-semibold {
    font-weight: 600
}

/* Grid critical styles */
.grid {
    display: grid
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr))
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.gap-4 {
    gap: 1rem
}

.gap-8 {
    gap: 2rem
}

/* 3D Hex Grid Container Styles */
#hex-grid-container {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

#hex-grid-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border-radius: 1rem;
}

#hex-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    border-radius: 1rem;
    transition: opacity 0.5s ease;
}

/* Hex label tooltips */
.hex-label {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    z-index: 1000;
    pointer-events: none;
}

/* Mobile optimizations for hex grid */
@media (max-width: 768px) {
    #hex-grid-container {
        height: 280px;
        margin: 0 auto;
    }

    .hex-label {
        font-size: 10px !important;
        padding: 2px 4px !important;
        min-width: 60px !important;
    }

    .hex-icon {
        font-size: 12px !important;
    }

    .hex-title {
        font-size: 8px !important;
    }

    .hex-desc {
        font-size: 6px !important;
    }
}

/* Performance optimizations */
#hex-grid-container * {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Smooth transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Critical color variables */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
}