/* ==================== ELENCUS — Design System ==================== */

/* ==================== Custom Properties ==================== */
:root {
    /* Primary — Steel Blue (institutional, calm, trustworthy) */
    --primary: #3D5A80;
    --primary-dark: #2C4A6E;
    --primary-light: #EDF1F7;
    --primary-alpha-5: rgba(61, 90, 128, 0.05);
    --primary-alpha-8: rgba(61, 90, 128, 0.08);
    --primary-alpha-12: rgba(61, 90, 128, 0.12);

    /* Accent — Teal (used sparingly) */
    --accent: #2A7F7A;
    --accent-light: #E6F4F3;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f8f9fb;
    --gray-100: #f0f2f7;
    --gray-200: #e2e6ed;
    --gray-300: #cfd4de;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic */
    --bg-body: var(--gray-50);
    --bg-section: var(--white);
    --bg-section-alt: var(--gray-100);
    --bg-qa: #e8edf5;  /* Q&A section — slightly deeper blue-gray vs --bg-section-alt */
    --bg-card: var(--white);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-400);
    --border: var(--gray-200);
    --border-light: var(--gray-200);
    --border-hover: var(--gray-300);

    /* RGB channels for rgba() usage */
    --primary-rgb: 61, 90, 128;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.07);
    --shadow-lg: 0 8px 32px rgba(15, 23, 42, 0.09);
    --shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.12);

    /* Typography */
    --font-primary: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

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

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.25s;
    --duration-slow: 0.4s;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* Z-index */
    --z-header: 100;
    --z-overlay: 200;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--bg-body);
    line-height: 1.75;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.12;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(3rem, 6.5vw, 4.75rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

p {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-secondary);
    font-weight: 400;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--duration-fast) ease;
}

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

/* ==================== Layout ==================== */
.container {
    max-width: 70rem;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

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

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    margin-bottom: var(--space-md);
}

/* Decorative bar under section titles */
.section-title::after {
    content: '';
    display: block;
    width: 2.25rem;
    height: 0.1875rem;
    background: var(--primary);
    margin: var(--space-md) auto 0;
    border-radius: 0.125rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.7;
}

/* ==================== Cards ==================== */
.glass-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-xl);
    position: relative;
    transition:
        box-shadow var(--duration-normal) var(--ease-out),
        border-color var(--duration-normal) var(--ease-out),
        transform var(--duration-normal) var(--ease-out);
}

/* Left accent bar on cards */
.glass-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0.1875rem;
    background: var(--primary);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.glass-card:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
    transform: translateY(-2px);
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha-12);
}

/* ==================== Buttons ==================== */
.glass-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.875rem 2rem;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.005em;
    color: var(--white);
    background: var(--primary);
    border: 0.125rem solid var(--primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    white-space: nowrap;
}

.glass-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.glass-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-alpha-12);
}

/* Primary — explicit (identical to base .glass-btn for clarity) */
.glass-btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

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

.glass-btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--border);
}

.glass-btn-secondary:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
    box-shadow: none;
}

.glass-btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* ==================== Accent ==================== */
.accent-text {
    color: var(--primary);
    font-weight: inherit;
}

/* ==================== Utilities ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Focus visible for all interactive elements */
a:focus-visible {
    outline: 0.125rem solid var(--primary);
    outline-offset: 0.125rem;
    border-radius: 0.125rem;
}

select:focus-visible,
button:focus-visible {
    outline: 0.125rem solid var(--primary);
    outline-offset: 0.125rem;
}

/* Smooth scroll indicator — skip-link for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    :root {
        --space-xl: 2.5rem;
        --space-2xl: 4rem;
        --space-3xl: 6rem;
    }

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

    .glass-card {
        padding: var(--space-lg);
    }

    .container {
        padding: 0 var(--space-md);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 var(--space-sm);
    }
}
