/* ============================================
   Logos Data Solutions - Landing Page Styles
   Mobile-First, iPhone Safari Optimized
   ============================================ */

/* ===== CSS Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Professional Blue/Gray */
    --primary: #1e3a8a;      /* Deep blue */
    --primary-light: #3b82f6; /* Bright blue */
    --secondary: #1f2937;    /* Dark gray */
    --accent: #0ea5e9;       /* Sky blue */
    --text-dark: #111827;    /* Almost black */
    --text-light: #6b7280;   /* Medium gray */
    --bg-light: #f9fafb;     /* Off-white */
    --bg-white: #ffffff;
    --border: #e5e7eb;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Safe areas for iPhone notch */
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

/* ===== Global Styles ===== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    /* Prevent zoom on input focus in iOS Safari */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    /* Improve font rendering on iOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Layout Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--bg-white);
    padding: var(--spacing-lg) 0;
    text-align: center;
    /* Handle iPhone notch */
    padding-top: calc(var(--spacing-lg) + var(--safe-area-top));
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-xs);
}

.tagline {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* ===== Main Content ===== */
.main {
    min-height: 60vh;
}

section {
    padding: var(--spacing-xl) 0;
}

section:nth-child(even) {
    background: var(--bg-light);
}

h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: var(--spacing-sm);
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

p {
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

/* ===== Hero Section ===== */
.hero {
    background: var(--bg-white);
    text-align: center;
}

.hero-text {
    font-size: 1.125rem;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-dark);
}

/* ===== Services Grid ===== */
.service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.service-card {
    background: var(--bg-white);
    padding: var(--spacing-md);
    border-radius: 12px;
    border: 1px solid var(--border);
    /* Smooth tap highlight for mobile */
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:active {
    transform: scale(0.98);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1;
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin: 0;
}

/* ===== Tech Stack ===== */
.tech-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.tech-category {
    background: var(--bg-white);
    padding: var(--spacing-md);
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}

.tech-category ul {
    list-style: none;
    padding: 0;
}

.tech-category li {
    padding: var(--spacing-xs) 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.25rem;
}

.tech-category li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* ===== About Section ===== */
.about p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dark);
}

/* ===== Contact Section ===== */
.contact {
    background: var(--bg-white);
    text-align: center;
}

.contact-intro {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-lg);
}

.contact-button {
    display: inline-block;
    background: var(--primary);
    color: var(--bg-white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease, transform 0.1s ease;
    /* Better tap target for mobile */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.contact-button:hover {
    background: var(--primary-light);
}

.contact-button:active {
    transform: scale(0.97);
}

/* ===== Footer ===== */
.footer {
    background: var(--secondary);
    color: var(--bg-light);
    padding: var(--spacing-lg) 0;
    text-align: center;
    /* Handle iPhone home indicator */
    padding-bottom: calc(var(--spacing-lg) + var(--safe-area-bottom));
}

.footer p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

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

/* Tablet and up (768px+) */
@media (min-width: 768px) {
    .logo {
        font-size: 2.25rem;
    }
    
    .tagline {
        font-size: 1.125rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
    
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .tech-categories {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    section {
        padding: 4rem 0;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .service-card:hover {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }
}

/* ============================================
   IPHONE SAFARI SPECIFIC OPTIMIZATIONS
   ============================================ */

/* Prevent horizontal scrolling */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Improve touch scrolling */
.service-card,
.tech-category {
    -webkit-overflow-scrolling: touch;
}

/* Fix active state on iOS */
a, button, .service-card {
    cursor: pointer;
}

/* Prevent text selection on tap */
.service-card,
.contact-button {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Ensure proper viewport on iOS */
@supports (-webkit-touch-callout: none) {
    /* iOS-specific styles */
    body {
        min-height: -webkit-fill-available;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus states for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Ensure sufficient contrast */
@media (prefers-contrast: high) {
    :root {
        --text-light: #4b5563;
    }
}

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

/* Print styles */
@media print {
    .header,
    .footer {
        background: none;
        color: var(--text-dark);
    }
    
    .service-card {
        break-inside: avoid;
    }
}
