/* EdSet - Base Styles & CSS Variables */
/* Optimized for performance and accessibility */

/* Decorative Background Elements */
/* Green Background Shape */
.green-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(135deg, #d4ed8e 0%, #a8db7e 20%, #8bc968 50%, #7ec85f 80%, #6bb550 100%);
    clip-path: path('M 0 0 L 1500 0 L 1500 100 Q 1400 80, 1300 100 Q 1200 120, 1100 100 Q 1000 80, 900 110 Q 800 140, 700 110 Q 600 80, 500 120 Q 400 160, 300 130 Q 200 100, 100 140 L 0 180 Z M 0 180 L 0 400 Q 300 380, 600 420 Q 900 460, 1200 410 Q 1350 385, 1500 400 L 1500 0');
    z-index: 0;
    pointer-events: none;
}

/* Decorative Circle - Left */
.circle-left {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(94, 160, 70, 0.8) 0%, rgba(94, 160, 70, 0.6) 50%, rgba(94, 160, 70, 0.3) 100%);
    border-radius: 50%;
    left: 30px;
    top: 120px;
    z-index: 1;
    pointer-events: none;
}

/* Decorative Circle - Right Top */
.circle-right-top {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(80, 140, 60, 0.5) 0%, rgba(80, 140, 60, 0.3) 60%, transparent 100%);
    border-radius: 50%;
    right: 100px;
    top: 80px;
    z-index: 1;
    pointer-events: none;
}

/* Decorative Circle - Right Bottom */
.circle-right-bottom {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(60, 120, 50, 0.4) 0%, rgba(60, 120, 50, 0.2) 50%, transparent 100%);
    border-radius: 50%;
    right: -50px;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

/* Decorative Container */
.decorative-container {
    position: relative;
    min-height: 400px;
    overflow: hidden;
    pointer-events: none;
}

/* White Wave Overlay */
.wave-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: white;
    clip-path: ellipse(80% 100% at 50% 100%);
    z-index: 2;
    pointer-events: none;
}

/* CSS Custom Properties for theming and consistency */
:root {
    /* Color Palette */
    --primary-color: #ea4c89;
    --primary-hover: #d63a7a;
    --secondary-color: #3b82f6;
    --secondary-hover: #2563eb;
    --accent-color: #4db749;
    --accent-hover: #3a9b36;
    
    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-inverse: #ffffff;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-dark: #111927;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* Border Colors */
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --border-focus: #3b82f6;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-xs: 0.25rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;
    --space-4xl: 4rem;
    
    /* Typography */
    --font-family-primary: 'Afacad Flux', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
    
    /* Breakpoints (for CSS-in-JS) */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: #ffffff;
        --border-color: #000000;
        --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    }
}

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

/* Dark Mode Support */
[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-dark: #030712;
    --border-color: #374151;
    --border-hover: #4b5563;
}

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

html {
    font-size: 16px;
    line-height: var(--line-height-normal);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-padding-top: 80px; /* Account for sticky header */
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
    padding-top: 0;
}

/* Focus Management */
:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--text-inverse);
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: var(--z-tooltip);
    font-weight: var(--font-weight-medium);
    transition: top var(--transition-fast);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
}

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

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

a:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* Lists */
ul, ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
}

li {
    margin-bottom: var(--space-sm);
}

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-lg);
}

th, td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: var(--font-weight-semibold);
    background-color: var(--bg-tertiary);
}

/* Form Elements */
input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

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

/* Utility Classes */
.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;
}

.no-scroll {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

.smooth-scroll {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a, a:visited {
        text-decoration: underline;
    }
    
    .no-print {
        display: none !important;
    }
}
