/* 
 * MERLAI UNIFIED THEME SYSTEM
 * Professional styling that matches homepage EXACTLY
 * Fixes logo sizing and layout issues properly
 * NO global font-size scaling - uses consistent responsive design
 */

:root {
    /* Apple-inspired color system - IDENTICAL to homepage */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-50: #f9f9f9;
    --color-gray-100: #f3f3f3;
    --color-gray-200: #e8e8ed;
    --color-gray-300: #d2d2d7;
    --color-gray-400: #aaaa9e;
    --color-gray-500: #86868b;
    --color-gray-600: #6e6e73;
    --color-gray-700: #424245;
    --color-gray-800: #1d1d1f;
    --color-gray-900: #000000;
    
    /* Apple blue accents */
    --color-blue: #0051d0;
    --color-blue-light: #1e40af;
    --color-blue-dark: #003a9b;
    
    /* Gradients - IDENTICAL to homepage */
    --gradient-hero: linear-gradient(135deg, #000000 0%, #1d1d1f 100%);
    --gradient-blue: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-dark) 100%);
    
    /* Typography - IDENTICAL to homepage */
    --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    
    /* Spacing - IDENTICAL to homepage */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 60px;
    --space-3xl: 80px;
    --space-4xl: 120px;
    
    /* Shadows - IDENTICAL to homepage */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset - IDENTICAL to homepage */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body - NO global font-size scaling */
body {
    font-family: var(--font-system);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--color-white);
    color: var(--color-gray-800);
    /* NO margin-top for nav - handled by navigation positioning */
}

/* Navigation - IDENTICAL to homepage structure */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 56px;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    height: 56px;
}

/* Logo - EXACT homepage styling with 36px images */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-white);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.logo-logo-wrapper {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 36px;
    overflow: hidden;
}

.logo-image {
    height: 36px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

/* Logo variants - IDENTICAL to homepage behavior */
.logo-image-dark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.logo-image-light {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 0;
}

.logo--on-white .logo-image-dark {
    opacity: 0;
}

.logo--on-white .logo-image-light {
    opacity: 1;
}

/* Navigation links */
.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-white);
}

/* Mobile menu button */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-sm);
}

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

/* Typography - Responsive but NO global scaling */
.text-display {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.9;
}

.text-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.text-headline {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.text-body-lg {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 400;
    line-height: 1.4;
}

.text-body {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-4xl) 0;
}

/* Body spacing for fixed nav */
body {
    padding-top: 56px;
}

/* Buttons - IDENTICAL to homepage */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border: none;
    border-radius: 24px;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    font-family: var(--font-system);
}

.btn-primary {
    background: var(--gradient-blue);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-large {
    padding: 14px 28px;
    font-size: 0.95rem;
    border-radius: 26px;
}

/* Hero Section - IDENTICAL to homepage */
.hero {
    min-height: 80vh;
    background: var(--gradient-hero);
    color: var(--color-white);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-lg);
}

.hero h1 {
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--color-white) 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--color-white);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    background: var(--color-white);
    padding: var(--space-4xl) 0;
}

.features-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    background: var(--color-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-blue);
}

/* Industry badges */
.industry-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e5e7eb;
    margin-bottom: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Footer - matching homepage */
footer {
    background: var(--color-gray-900);
    color: var(--color-white);
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
}

.footer-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
}

/* Navigation scroll behavior - IDENTICAL to homepage */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

.navbar-scrolled .logo {
    color: var(--color-black) !important;
}

.navbar-scrolled .nav-links a {
    color: rgba(0, 0, 0, 0.8) !important;
}

/* Override any legacy custom button classes */
.btn-mining,
.btn-healthcare,
.btn-government,
.cta-button {
    /* Inherit standard button styling */
    background: var(--gradient-blue) !important;
    color: var(--color-white) !important;
    border: none !important;
    padding: 14px 28px !important;
    border-radius: 26px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-mining:hover,
.btn-healthcare:hover,
.btn-government:hover,
.cta-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-md) !important;
}

/* Ensure smooth scrolling */
html {
    scroll-behavior: smooth;
}