/* ═══════════════════════════════════════
   SimpleLexi — Main Stylesheet
   CSS Variables, Reset, Typography, Base
   ═══════════════════════════════════════ */

/* ─── Font Face ─── */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ─── CSS Custom Properties ─── */
:root {
    /* Brand Colors */
    --sl-primary: #FFFFFF;
    --sl-secondary: #4D9DE8;
    --sl-secondary-dark: #3A7FC4;
    --sl-secondary-light: #7EC8E3;
    --sl-tertiary: #EAF0F6;
    --sl-dark: #1A1A2E;
    --sl-dark-mid: #16213E;
    --sl-dark-blue: #0F3460;

    /* Text Colors */
    --sl-text: #1A1A2E;
    --sl-text-secondary: #4A5568;
    --sl-text-muted: #6B7280;
    --sl-text-light: #9CA3AF;
    --sl-text-on-dark: #E2E8F0;
    --sl-text-on-dark-muted: rgba(255, 255, 255, 0.6);

    /* Link Colors */
    --sl-link: #2B7AC7;
    --sl-link-hover: #4D9DE8;

    /* Backgrounds */
    --sl-bg-white: #FFFFFF;
    --sl-bg-off-white: #F8FAFC;
    --sl-bg-light: #EAF0F6;
    --sl-bg-dark: #1A1A2E;

    /* Gradients */
    --sl-gradient-hero: linear-gradient(135deg, #1E2A4A 0%, #1A3258 50%, #1A4B7A 100%);
    --sl-gradient-blue: linear-gradient(135deg, #4D9DE8, #7EC8E3);
    --sl-gradient-blue-dark: linear-gradient(135deg, #0F3460, #4D9DE8);
    --sl-gradient-subtle: linear-gradient(180deg, #EAF0F6 0%, #FFFFFF 100%);
    --sl-gradient-card: linear-gradient(135deg, rgba(77, 157, 232, 0.05), rgba(126, 200, 227, 0.08));

    /* Glass Effects */
    --sl-glass-bg: rgba(255, 255, 255, 0.08);
    --sl-glass-bg-light: rgba(255, 255, 255, 0.65);
    --sl-glass-border: rgba(255, 255, 255, 0.12);
    --sl-glass-border-light: rgba(77, 157, 232, 0.15);
    --sl-glass-blur: blur(20px);

    /* Shadows */
    --sl-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --sl-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --sl-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    --sl-shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
    --sl-shadow-blue: 0 8px 24px rgba(77, 157, 232, 0.25);
    --sl-shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.1), 0 6px 12px rgba(0, 0, 0, 0.05);

    /* Typography */
    --sl-font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --sl-font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

    /* Font Sizes — Fluid */
    --sl-text-xs: clamp(0.7rem, 1.2vw, 0.75rem);
    --sl-text-sm: clamp(0.8rem, 1.4vw, 0.875rem);
    --sl-text-base: clamp(0.9rem, 1.6vw, 1rem);
    --sl-text-lg: clamp(1rem, 1.8vw, 1.125rem);
    --sl-text-xl: clamp(1.1rem, 2vw, 1.25rem);
    --sl-text-2xl: clamp(1.3rem, 2.5vw, 1.5rem);
    --sl-text-3xl: clamp(1.6rem, 3vw, 1.875rem);
    --sl-text-4xl: clamp(1.8rem, 3.5vw, 2.25rem);
    --sl-text-5xl: clamp(2.2rem, 4.5vw, 3rem);
    --sl-text-6xl: clamp(2.5rem, 5.5vw, 3.75rem);

    /* Spacing */
    --sl-space-xs: 0.25rem;
    --sl-space-sm: 0.5rem;
    --sl-space-md: 1rem;
    --sl-space-lg: 1.5rem;
    --sl-space-xl: 2rem;
    --sl-space-2xl: 3rem;
    --sl-space-3xl: 4rem;
    --sl-space-4xl: 6rem;
    --sl-space-section: clamp(2rem, 4vw, 3.5rem);

    /* Border Radius */
    --sl-radius-sm: 6px;
    --sl-radius-md: 10px;
    --sl-radius-lg: 16px;
    --sl-radius-xl: 24px;
    --sl-radius-full: 9999px;

    /* Transitions */
    --sl-transition-fast: 150ms ease;
    --sl-transition-base: 250ms ease;
    --sl-transition-slow: 400ms ease;
    --sl-transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-Index Scale */
    --sl-z-base: 1;
    --sl-z-dropdown: 100;
    --sl-z-sticky: 200;
    --sl-z-overlay: 300;
    --sl-z-modal: 400;
    --sl-z-toast: 500;

    /* Layout */
    --sl-max-width: 1400px;
    --sl-max-width-narrow: 800px;
    --sl-max-width-wide: 1400px;
}


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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--sl-font-body);
    font-size: var(--sl-text-base);
    line-height: 1.7;
    color: var(--sl-text);
    background: var(--sl-bg-white);
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

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

a:hover {
    color: var(--sl-link-hover);
}

ul,
ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--sl-font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--sl-text);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--sl-text-6xl); font-weight: 800; }
h2 { font-size: var(--sl-text-5xl); }
h3 { font-size: var(--sl-text-4xl); }
h4 { font-size: var(--sl-text-3xl); }
h5 { font-size: var(--sl-text-2xl); }
h6 { font-size: var(--sl-text-xl); }

p {
    margin-bottom: var(--sl-space-md);
}

p:last-child {
    margin-bottom: 0;
}

strong, b {
    font-weight: 600;
}

::selection {
    background: rgba(77, 157, 232, 0.2);
    color: var(--sl-dark);
}


/* ─── Layout Utilities ─── */
.sl-container {
    width: 100%;
    max-width: var(--sl-max-width);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.sl-container--narrow {
    max-width: var(--sl-max-width-narrow);
}

.sl-container--wide {
    max-width: var(--sl-max-width-wide);
}

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

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

.sl-section--light {
    background: var(--sl-gradient-subtle);
}

.sl-section--glass {
    background: var(--sl-bg-off-white);
}


/* ─── Screen Reader Only ─── */
.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;
}


/* ─── Skip Link ─── */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: var(--sl-space-md);
    z-index: var(--sl-z-toast);
    padding: var(--sl-space-sm) var(--sl-space-md);
    background: var(--sl-secondary);
    color: var(--sl-primary);
    font-weight: 600;
    border-radius: var(--sl-radius-sm);
    transition: top var(--sl-transition-fast);
}

.skip-to-content:focus {
    top: var(--sl-space-md);
    color: var(--sl-primary);
}


/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
