/**
 * Greybox Geospatial - Main Stylesheet
 * Author: Greybox Geospatial
 * Description: Comprehensive styles for the Greybox Geospatial website
 * Version: 1.0
 */

/* ============================================
   CSS VARIABLES / CUSTOM PROPERTIES
   ============================================ */
:root {
    /* Brand Colors */
    --color-primary: #2E2E2E;
    --color-dark: #1C1F26;
    --color-medium: #474F59;
    --color-light: #7B838C;
    --color-accent: #2C3340;
    
    /* Neutral Colors */
    --color-white: #FFFFFF;
    --color-gray-100: #F7FAFC;
    --color-gray-200: #EDF2F7;
    --color-gray-300: #E2E8F0;
    --color-gray-400: #CBD5E0;
    --color-gray-500: #A0AEC0;
    --color-gray-600: #718096;
    --color-gray-700: #4A5568;
    --color-gray-800: #2D3748;
    --color-gray-900: #1A202C;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-service: 0 15px 30px rgba(44, 51, 64, 0.15);
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Z-Index Scale */
    --z-dropdown: 50;
    --z-sticky: 50;
    --z-cursor: 9999;
}


/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-primary);
    line-height: 1.6;
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* ============================================
   CUSTOM CURSOR (DESKTOP ONLY)
   ============================================ */
@media (min-width: 768px) {
    html, * {
        cursor: none !important;
    }
}

.target-cursor-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: var(--z-cursor);
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
}

.target-cursor-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    background-color: var(--color-white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform var(--transition-fast);
}

.target-cursor-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-white);
    transform: translate(-50%, -50%);
    transition: all var(--transition-base);
}

.corner-tl {
    border-right: none;
    border-bottom: none;
    left: 50%;
    top: 50%;
    transform: translate(-150%, -150%);
}

.corner-tr {
    border-left: none;
    border-bottom: none;
    left: 50%;
    top: 50%;
    transform: translate(50%, -150%);
}

.corner-br {
    border-left: none;
    border-top: none;
    left: 50%;
    top: 50%;
    transform: translate(50%, 50%);
}

.corner-bl {
    border-right: none;
    border-top: none;
    left: 50%;
    top: 50%;
    transform: translate(-150%, 50%);
}


/* ============================================
   NAVIGATION
   ============================================ */
nav {
    background-color: var(--color-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    height: 2.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--color-primary);
    padding: 0.5rem 1rem;
    transition: var(--transition-base);
}

.nav-link:hover {
    color: var(--color-accent);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    background-color: var(--color-white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    width: 12rem;
    z-index: var(--z-dropdown);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-primary);
    transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--color-gray-100);
}

/* Mobile Menu */
.mobile-menu-button {
    display: none;
}

.mobile-menu {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    width: 12rem;
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
}

@media (max-width: 767px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-button {
        display: block;
    }
}


/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    text-align: center;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-dark);
}

.btn-outline {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
}


/* ============================================
   SECTIONS & CONTAINERS
   ============================================ */
.section {
    padding: 5rem 1.5rem;
}

.section-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.section-light {
    background-color: var(--color-gray-100);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 960px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--color-medium);
}


/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 10;
    max-width: 960px;
    padding: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-white);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
}


/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-slow);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--color-gray-600);
    margin-bottom: 1rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-accent);
    font-weight: 500;
}

.card-link:hover {
    gap: 0.75rem;
}


/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-service);
}

.service-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    transition: var(--transition-base);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.service-description {
    color: var(--color-gray-600);
}


/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1023px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-white);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    font-family: var(--font-body);
    transition: var(--transition-base);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(44, 51, 64, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}


/* ============================================
   FOOTER
   ============================================ */
footer {
    padding: 3rem 1.5rem;
    background-size: cover;
    background-position: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer .grid > div {
    align-self: start;
}

.footer-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.footer-links {
    list-style: none;
}

.footer-link {
    display: block;
    padding: 0.25rem 0;
    color: var(--color-primary);
    transition: var(--transition-base);
}

.footer-link:hover {
    color: var(--color-white);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social-icon {
    transition: var(--transition-base);
}

.footer-social-icon:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid var(--color-medium);
    padding-top: 2rem;
    text-align: center;
    color: var(--color-light);
}

@media (max-width: 1023px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   UTILITIES
   ============================================ */

/* Hover Effects */
.hover-grow {
    transition: transform var(--transition-base);
}

.hover-grow:hover {
    transform: scale(1.05);
}

.hover-lift {
    transition: transform var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-white {
    color: var(--color-white);
}

.text-primary {
    color: var(--color-primary);
}

.text-accent {
    color: var(--color-accent);
}

.text-medium {
    color: var(--color-medium);
}

.text-light {
    color: var(--color-light);
}

/* Display Utilities */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

/* Flexbox Utilities */
.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* Spacing Utilities */
.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

/* Background Utilities */
.bg-cover {
    background-size: cover;
}

.bg-center {
    background-position: center;
}

/* Border Radius */
.rounded {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: var(--radius-full);
}

/* Shadow Utilities */
.shadow {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}


/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.8s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.icon-pulse:hover {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */
@media (max-width: 767px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .section-title {
        font-size: 2rem;
    }
}


/* ============================================
   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-width: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

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


/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .no-print {
        display: none !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    @page {
        margin: 2cm;
    }
}
