/* 
 * work4flow - Design System & Global Styles
 * Modern Minimalist: Fluid typography, dark sections, abstract shapes.
 */

/* =========================================
   1. CSS Reset & Base Setup
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* =========================================
   2. Design Tokens (CSS Variables)
   ========================================= */
:root {
    /* Colors */
    --color-primary: #0f172a;
    --color-primary-light: #1e293b;
    --color-accent: #679aca;
    --color-accent-dark: #0054a6;
    --color-accent-light: #79b6e4;
    --color-accent-glow: rgba(103, 154, 202, 0.15);
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-dark: #0f172a;
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-text-on-dark: #cbd5e1;
    --color-text-on-dark-bright: #f1f5f9;
    --color-error: #ef4444;
    --color-success: #22c55e;
    --color-border: #e2e8f0;
    --color-border-light: rgba(255, 255, 255, 0.08);

    /* Typography */
    --text-hero: clamp(2.5rem, 6vw, 4.5rem);
    --text-h1: clamp(2rem, 4.5vw, 3.25rem);
    --text-h2: clamp(1.5rem, 3.5vw, 2.5rem);
    --text-h3: clamp(1.125rem, 2vw, 1.5rem);
    --text-body: 1.125rem;
    --text-small: 0.875rem;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 5rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px var(--color-accent-glow);
}

/* =========================================
   3. Typography
   ========================================= */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-primary);
    letter-spacing: -0.025em;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: 1.25rem; }

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

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

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

/* =========================================
   4. Layout Utilities
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-padding {
    padding: var(--spacing-lg) 0;
    position: relative;
}

/* Dark section variant */
.section-dark {
    background-color: var(--color-bg-dark);
    color: var(--color-text-on-dark);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: var(--color-text-on-dark-bright);
}

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

/* =========================================
   5. Utility Classes
   ========================================= */
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-light); }
.text-center { text-align: center; }
.bg-alt { background-color: var(--color-bg-alt); }

/* =========================================
   6. Fade-in Animations (Scroll Reveal)
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* =========================================
   7. Abstract Background Shapes
   ========================================= */
.shape-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.shape-blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-accent-glow), transparent 70%);
    top: -150px;
    right: -100px;
}

.shape-blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 141, 255, 0.08), transparent 70%);
    bottom: -100px;
    left: -100px;
}

/* Subtle grid pattern overlay */
.shape-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.section-dark .shape-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* =========================================
   8. SVG Icon Base Styles
   ========================================= */
.icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.icon-lg {
    width: 32px;
    height: 32px;
}

.icon-xl {
    width: 40px;
    height: 40px;
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--color-accent-light);
    color: var(--color-accent-dark);
    margin-bottom: var(--spacing-sm);
}

.section-dark .icon-badge {
    background: rgba(0, 141, 255, 0.15);
    color: var(--color-accent);
}
