/* ============================================
   ENCODIUS - Base Styles
   Variables, Reset, Typography, Utilities
   ============================================ */

/* CSS Variables */
:root {
    /* Colors */
    --color-bg-primary: #0a0f1c;
    --color-bg-secondary: #111827;
    --color-bg-tertiary: #1a2234;
    --color-bg-card: rgba(26, 34, 52, 0.6);
    --color-bg-card-hover: rgba(26, 34, 52, 0.9);

    --color-accent-primary: #00d4ff;
    --color-accent-secondary: #8b5cf6;
    --color-accent-tertiary: #06b6d4;

    --color-text-primary: #ffffff;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;

    --color-border: rgba(148, 163, 184, 0.1);
    --color-border-hover: rgba(0, 212, 255, 0.3);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    --gradient-card: linear-gradient(180deg, rgba(26, 34, 52, 0.8) 0%, rgba(26, 34, 52, 0.4) 100%);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Light Theme - 3 color palette: Dark blue #1e3a5f, Light blue #3b82f6, White #ffffff */
[data-theme="light"] {
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #1e3a5f;
    --color-bg-tertiary: #1e3a5f;
    --color-bg-card: #ffffff;
    --color-bg-card-hover: #ffffff;

    --color-accent-primary: #3b82f6;
    --color-accent-secondary: #3b82f6;
    --color-accent-tertiary: #3b82f6;

    --color-text-primary: #1e3a5f;
    --color-text-secondary: #1e3a5f;
    --color-text-muted: #3b82f6;

    --color-border: rgba(30, 58, 95, 0.15);
    --color-border-hover: rgba(59, 130, 246, 0.5);

    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1e3a5f 100%);
    --gradient-card: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, color 0.4s ease;
}

main {
    overflow: hidden;
}

/* Theme transition for all elements */
*, *::before, *::after {
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

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

/* Skip Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: var(--color-bg-primary);
    font-weight: 600;
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top var(--transition-base);
}

.skip-link:focus {
    top: 16px;
}

/* Focus States (Accessibility) */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
}

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

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Common */
.section-tag {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-primary);
    margin-bottom: 16px;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 80px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 24px;
}

.section-title span {
    display: block;
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}
