/* ============================================
   VinciBridge — Base Design System
   Variables, Reset, Typography, Buttons, Utilities
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Colors */
    --color-primary: #1a56db;
    --color-primary-dark: #1342b0;
    --color-accent: #059669;
    --color-accent-dark: #047857;
    --color-accent-darker: #036549;
    --color-accent-light: #d1fae5;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-dark: #0f172a;
    --color-bg-dark-alt: #1e293b;
    --color-text: #1e293b;
    --color-text-muted: #475569;
    --color-text-light: #94a3b8;
    --color-border: #e2e8f0;
    --color-error: #dc2626;
    --color-white: #ffffff;

    /* Typography */
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: 1.875rem;
    --fs-4xl: 2.25rem;
    --fs-5xl: 3rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Layout */
    --max-width: 1400px;
    --nav-height: 72px;
    --subnav-height: 52px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --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 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);

    /* Transitions */
    --transition: 200ms ease;
    --transition-slow: 400ms ease;
}

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

[hidden] { display: none !important; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: inherit;
    font-size: var(--fs-base);
    font-weight: 600;
    line-height: 1.2;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
}

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

.btn--primary {
    background-color: var(--color-accent-dark);
    color: var(--color-white);
    border-color: var(--color-accent-dark);
}
.btn--primary:hover {
    background-color: var(--color-accent-darker);
    border-color: var(--color-accent-darker);
}

.btn--outline {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,0.4);
}
.btn--outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--color-white);
}

.btn--white {
    background-color: var(--color-white);
    color: var(--color-accent-dark);
    border-color: var(--color-white);
}
.btn--white:hover {
    background-color: var(--color-accent-light);
    border-color: var(--color-accent-light);
}

/* ---------- Section Titles ---------- */
.section-title {
    font-size: var(--fs-3xl);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title--wide {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Accessibility ---------- */
:focus-visible {
    outline: 2px solid var(--color-accent-dark);
    outline-offset: 2px;
}

/* Skip-link target should not show a giant outline */
[tabindex="-1"]:focus {
    outline: none;
}

/* Skip to content (WCAG 2.4.1) */
.skip-link {
    position: absolute;
    top: -60px;
    left: var(--space-md);
    z-index: 200;
    background: var(--color-bg-dark);
    color: var(--color-white);
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 0;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
