/* ============================================
   JMS RESEARCH CENTER - DESIGN SYSTEM
   Premium UI inspired by Canva, Apple, EdTech
   ============================================ */

/* === CSS Custom Properties === */
:root {
    /* Primary Colors */
    --jms-primary: #6C63FF;
    --jms-primary-dark: #5A52E0;
    --jms-primary-light: #8B85FF;
    --jms-primary-bg: #EEF2FF;

    /* Secondary Colors */
    --jms-secondary: #3B82F6;
    --jms-secondary-dark: #2563EB;
    --jms-secondary-light: #60A5FA;

    /* Accent / CTA */
    --jms-accent: #F97316;
    --jms-accent-dark: #EA580C;
    --jms-accent-light: #FB923C;

    /* Success / Green */
    --jms-success: #10B981;
    --jms-success-bg: #ECFDF5;

    /* Warning */
    --jms-warning: #F59E0B;
    --jms-warning-bg: #FEF3C7;

    /* Danger */
    --jms-danger: #EF4444;
    --jms-danger-bg: #FEF2F2;

    /* Neutrals */
    --jms-gray-50: #F9FAFB;
    --jms-gray-100: #F3F4F6;
    --jms-gray-200: #E5E7EB;
    --jms-gray-300: #D1D5DB;
    --jms-gray-400: #9CA3AF;
    --jms-gray-500: #6B7280;
    --jms-gray-600: #4B5563;
    --jms-gray-700: #374151;
    --jms-gray-800: #1F2937;
    --jms-gray-900: #111827;

    /* Gradients */
    --jms-gradient-primary: linear-gradient(135deg, #6C63FF 0%, #3B82F6 100%);
    --jms-gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --jms-gradient-cta: linear-gradient(135deg, #F97316 0%, #F59E0B 100%);
    --jms-gradient-dark: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    --jms-gradient-subtle: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);

    /* Typography */
    --jms-font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --jms-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes (modular scale) */
    --jms-text-xs: 0.75rem;
    --jms-text-sm: 0.875rem;
    --jms-text-base: 1rem;
    --jms-text-lg: 1.125rem;
    --jms-text-xl: 1.25rem;
    --jms-text-2xl: 1.5rem;
    --jms-text-3xl: 1.875rem;
    --jms-text-4xl: 2.25rem;
    --jms-text-5xl: 3rem;
    --jms-text-6xl: 3.75rem;

    /* Spacing (8px grid) */
    --jms-space-1: 0.25rem;   /* 4px */
    --jms-space-2: 0.5rem;    /* 8px */
    --jms-space-3: 0.75rem;   /* 12px */
    --jms-space-4: 1rem;      /* 16px */
    --jms-space-5: 1.25rem;   /* 20px */
    --jms-space-6: 1.5rem;    /* 24px */
    --jms-space-8: 2rem;      /* 32px */
    --jms-space-10: 2.5rem;   /* 40px */
    --jms-space-12: 3rem;     /* 48px */
    --jms-space-16: 4rem;     /* 64px */
    --jms-space-20: 5rem;     /* 80px */
    --jms-space-24: 6rem;     /* 96px */

    /* Border Radius */
    --jms-radius-sm: 8px;
    --jms-radius-md: 12px;
    --jms-radius-lg: 16px;
    --jms-radius-xl: 20px;
    --jms-radius-2xl: 24px;
    --jms-radius-full: 9999px;

    /* Shadows */
    --jms-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --jms-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --jms-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --jms-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --jms-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --jms-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
    --jms-shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
    --jms-shadow-glow: 0 0 20px rgba(108, 99, 255, 0.3);

    /* Transitions */
    --jms-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --jms-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --jms-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --jms-transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index scale */
    --jms-z-dropdown: 100;
    --jms-z-sticky: 200;
    --jms-z-fixed: 300;
    --jms-z-overlay: 400;
    --jms-z-modal: 500;
    --jms-z-toast: 600;

    /* Container */
    --jms-container-max: 1280px;
    --jms-container-narrow: 768px;
    --jms-container-padding: 1.5rem;

    /* Header */
    --jms-header-height: 72px;
}

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.jms-body {
    font-family: var(--jms-font-body);
    font-size: var(--jms-text-base);
    line-height: 1.6;
    color: var(--jms-gray-800);
    background: var(--jms-gray-50);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--jms-primary);
    text-decoration: none;
    transition: color var(--jms-transition-fast);
}

a:hover {
    color: var(--jms-primary-dark);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--jms-font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--jms-gray-900);
}

h1 { font-size: var(--jms-text-5xl); }
h2 { font-size: var(--jms-text-4xl); }
h3 { font-size: var(--jms-text-2xl); }
h4 { font-size: var(--jms-text-xl); }
h5 { font-size: var(--jms-text-lg); }

p {
    color: var(--jms-gray-600);
    line-height: 1.7;
}

/* === Layout === */
.jms-container {
    max-width: var(--jms-container-max);
    margin: 0 auto;
    padding: 0 var(--jms-container-padding);
}

.jms-container--narrow {
    max-width: var(--jms-container-narrow);
}

.jms-skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--jms-primary);
    color: #fff;
    padding: var(--jms-space-2) var(--jms-space-4);
    z-index: var(--jms-z-toast);
    border-radius: 0 0 var(--jms-radius-sm) 0;
}

.jms-skip-link:focus {
    top: 0;
    color: #fff;
}

/* === Section === */
.jms-section {
    padding: var(--jms-space-20) 0;
    position: relative;
}

.jms-section--gray {
    background: var(--jms-gray-50);
}

.jms-section__header {
    text-align: center;
    margin-bottom: var(--jms-space-12);
}

.jms-section__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--jms-space-2);
    background: var(--jms-primary-bg);
    color: var(--jms-primary);
    font-size: var(--jms-text-sm);
    font-weight: 600;
    padding: var(--jms-space-2) var(--jms-space-4);
    border-radius: var(--jms-radius-full);
    margin-bottom: var(--jms-space-4);
}

.jms-section__title {
    font-size: var(--jms-text-4xl);
    font-weight: 800;
    margin-bottom: var(--jms-space-4);
    background: var(--jms-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.jms-section__subtitle {
    font-size: var(--jms-text-lg);
    color: var(--jms-gray-500);
    max-width: 600px;
    margin: 0 auto;
}

.jms-section__cta {
    text-align: center;
    margin-top: var(--jms-space-12);
}
