/* ============================================
   Atlas Detectives - Main CSS
   Premium Investigation Agency
   ============================================ */

/* CSS Variables */
:root {
    /* Colors - Warm luxury light palette */
    --color-primary: #1a1f2e;
    --color-primary-light: #232940;
    --color-primary-dark: #121621;
    
    --color-accent: #b5903a;
    --color-accent-light: #c9a54e;
    --color-accent-dark: #9a7a2e;
    --color-accent-glow: rgba(181, 144, 58, 0.12);
    
    --color-black: #1a1a1a;
    --color-dark: #1a1f2e;
    --color-darker: #121621;
    --color-surface-dark: #1a1f2e;
    
    --color-bg: #f8f6f2;
    --color-bg-alt: #f0ede7;
    --color-surface: #ffffff;
    --color-white: #ffffff;
    --color-cream: #f5f2eb;
    --color-beige: #eae6dc;
    --color-warm-gray: #e2ded5;
    
    --color-gray-light: #f4f3ef;
    --color-gray: #3d4356;
    --color-muted: #3d4356;
    
    --color-text: #2a2d35;
    --color-text-light: #3d4356;
    --color-text-on-dark: rgba(255, 255, 255, 0.72);
    
    --color-border: rgba(0, 0, 0, 0.08);
    --color-border-dark: rgba(0, 0, 0, 0.12);
    --color-border-light: rgba(255, 255, 255, 0.1);
    --color-border-accent: rgba(181, 144, 58, 0.2);
    
    /* Typography - Distinctive modern sans */
    --font-heading: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
    --font-script: 'Playfair Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
    
    /* Font Sizes - Solox-inspired bold scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.75rem;
    --text-5xl: 3.5rem;
    --text-6xl: 5rem;
    --text-hero: clamp(3.5rem, 10vw, 9rem);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    --space-3xl: 7rem;
    --space-4xl: 9rem;
    --space-5xl: 12rem;
    
    /* Layout */
    --max-width: 1320px;
    --max-width-narrow: 720px;
    --header-height: 80px;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
    --radius-full: 9999px;
    --border-radius: var(--radius-sm);
    --border-radius-lg: var(--radius-lg);
    --border-radius-xl: var(--radius-xl);
    
    /* Transitions - Refined easing */
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Shadows - Layered for depth */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 0 1px var(--color-border-accent);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background: var(--color-accent);
    color: var(--color-primary);
}

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

a {
    color: var(--color-text);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    letter-spacing: -0.025em;
}

h1 { 
    font-size: var(--text-hero);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

h2 { 
    font-size: var(--text-5xl);
    font-weight: 700;
}

h3 { 
    font-size: var(--text-4xl);
    font-weight: 700;
}

h4 { 
    font-size: var(--text-3xl);
    font-weight: 700;
}

h5 { 
    font-size: var(--text-2xl); 
    font-weight: 700;
}

h6 { 
    font-size: var(--text-xl); 
    font-weight: 700;
}

p {
    margin-bottom: var(--space-md);
    max-width: 62ch;
    font-weight: 400;
    color: var(--color-text-light);
    line-height: 1.75;
}

.lead {
    font-size: var(--text-xl);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
}


/* Text Utilities */
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-muted); }
.text-white { color: var(--color-white); }
.text-black { color: var(--color-black); }

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

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Eyebrow / Label Text - Clean uppercase sans */
.eyebrow,
[class*="-eyebrow"] {
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    display: inline-block;
    margin-bottom: var(--space-md);
}

@keyframes eyebrow-write {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}

[class*="-eyebrow"].in-view,
.eyebrow.in-view {
    animation: eyebrow-write 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

[class*="-eyebrow"],
.eyebrow {
    clip-path: inset(0 100% 0 0);
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 4rem);
}

.container-narrow {
    max-width: var(--max-width-narrow);
}

.container-full {
    max-width: 100%;
    padding: 0;
}

.section {
    padding: var(--space-3xl) 0;
    position: relative;
}

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

/* Section Variants - Light theme */
.section-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
}

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

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

.section-surface {
    background-color: var(--color-bg);
}

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

.section-primary h1,
.section-primary h2,
.section-primary h3,
.section-primary h4,
.section-primary h5,
.section-primary h6 {
    color: var(--color-text);
}

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

.section-primary .eyebrow {
    color: var(--color-accent-dark);
}

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

.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4 {
    color: var(--color-text);
}

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

.section-light .eyebrow {
    color: var(--color-accent-dark);
}

.section-cream {
    background-color: var(--color-cream);
    color: var(--color-text);
}

/* Dividers */
.divider {
    height: 1px;
    background: var(--color-border);
    width: 100%;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Spacing Utilities */
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

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

/* Responsive */
@media (max-width: 1200px) {
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

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

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5,
    .grid-6 { grid-template-columns: 1fr; }
    
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .section-lg {
        padding: var(--space-3xl) 0;
    }
    
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

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

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