/* ====================================
   DATUMCON — CSS CUSTOM PROPERTIES
   An Interkey Division
   Design Direction: "Precision Optics"
   ==================================== */
:root {
    /* Brand Colors — Interkey structural blues + DatumCon gold accent */
    --primary-color: #123EDD;
    /* Interkey Royal Blue */
    --secondary-color: #1B2A4E;
    /* DatumCon Dark Navy */
    --accent-color: #FCB310;
    /* DatumCon Gold */
    --accent-secondary: #5CCFF7;
    /* Interkey Cyan — tech accents */

    /* Text */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --text-on-dark: #E5E7EB;
    --text-on-dark-muted: #94A3B8;

    /* Backgrounds */
    --background-primary: #FFFFFF;
    --background-secondary: #F8F9FB;
    --background-dark: #1B2A4E;
    --background-darker: #111B33;

    /* Borders & Shadows */
    --border-color: #E2E5EB;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-gold: 0 4px 20px rgba(252, 179, 16, 0.2);

    /* Corner Accent System — gold-themed */
    --accent-block-size: 10px;
    --accent-strip-width: 28px;
    --accent-bar-height: 22px;
    --accent-corner-width: 28px;
    --accent-corner-height: 32px;
    --accent-section-strip-width: 56px;
    --accent-section-bar-height: 44px;
    --accent-section-corner-width: 56px;
    --accent-section-corner-height: 64px;
    --accent-section-block-size: 20px;
    --accent-section-strip-bg: linear-gradient(to bottom, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    --accent-section-bar-bg: linear-gradient(90deg, rgba(252, 179, 16, 0.12), rgba(252, 179, 16, 0.06));

    /* Corner accent gradient colors — gold to amber */
    --accent-corner-gold-start: #FCB310;
    --accent-corner-gold-end: #E9A00E;
    --accent-corner-blue-start: #6C8AEC;
    --accent-corner-blue-end: #5A78DA;

    /* Interactive States */
    --primary-hover: #0E32B4;
    --primary-active: #0B2891;
    --accent-hover: #E9A00E;
    --accent-active: #D49200;
    --error-color: #EF4444;
    --success-color: #10B981;

    /* RGB channels for rgba() usage */
    --primary-rgb: 18, 62, 221;
    --accent-rgb: 252, 179, 16;
    --secondary-rgb: 27, 42, 78;

    /* Typography */
    --font-primary: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Outfit', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Type Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-md: 1.125rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-3xl: 2.5rem;
    --text-4xl: 3.5rem;

    /* Tracking */
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.06em;
    --tracking-wider: 0.12em;
    --tracking-mono: 0.04em;

    /* Leading */
    --leading-tight: 1.1;
    --leading-snug: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.65;

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

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
    --z-loading: 9999;
}

/* ====================================
   RESET AND BASE STYLES
   ==================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

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

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

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

/* ====================================
   CONTAINER
   ==================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* ====================================
   SECTION BASE
   ==================================== */
.section {
    padding: var(--spacing-4xl) 0;
}

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

.section-alt {
    background-color: var(--background-secondary);
    position: relative;
}

/* Dot-grid texture for alternate sections */
.section-alt::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(27, 42, 78, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* ====================================
   SECTION HEADERS — Gradient Text
   ==================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.section-title-light {
    background: linear-gradient(135deg, #FFFFFF, var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

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

/* ====================================
   LOADING SCREEN
   ==================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--background-darker));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    width: 120px;
    height: auto;
    margin-bottom: var(--spacing-lg);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(252, 179, 16, 0.3);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
