/* ============================================
   CandWAG Art Group - Enhanced Styles
   Design Tokens + Accessibility + Typography
   ============================================ */

/* ============================================
   DESIGN TOKENS (CSS Variables)
   ============================================ */
:root {
    /* Brand Colors */
    --color-primary-teal: #14b8a6;
    --color-primary-teal-dark: #0d9488;
    --color-primary-teal-light: #5eead4;
    --color-accent-coral: #ff6b6b;
    --color-accent-coral-dark: #ff5252;
    --color-accent-pink: #ec4899;
    --color-accent-orange: #ff8c42;
    --color-bg-cream: #fef6e4;
    --color-ink: #2d3748;
    --color-ink-light: #4a5568;
    --color-white: #ffffff;
    
    /* Typography */
    --font-heading: 'Bebas Neue', 'Arial Black', sans-serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-card: 12px;
    --radius-pill: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-ink);
    background-color: var(--color-bg-cream);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

/* ============================================
   ACCESSIBILITY - FOCUS STATES
   ============================================ */

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary-teal);
    color: var(--color-white);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 100;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Global focus styles for accessibility */
*:focus {
    outline: 3px solid var(--color-primary-teal);
    outline-offset: 2px;
}

/* Better focus for buttons */
button:focus,
.btn:focus,
a:focus {
    outline: 3px solid var(--color-primary-teal);
    outline-offset: 2px;
}

/* Focus within for containers */
*:focus-within {
    outline: none;
}

/* Focus visible (keyboard only) */
*:focus:not(:focus-visible) {
    outline: none;
}

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

/* ============================================
   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-width: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ============================================
   CUSTOM ANIMATIONS
   ============================================ */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================
   BUTTON STYLES (Pill, Lift, Shadow)
   ============================================ */
button, .btn {
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-pill);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

button:active, .btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   CARD STYLES (Paper-like with border-radius)
   ============================================ */
.card {
    background: var(--color-white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

/* Hover lift effect */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Card hover effects */
.card-hover {
    transition: all var(--transition-base);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

/* ============================================
   MOBILE MENU ANIMATION
   ============================================ */
#mobile-menu {
    transition: all var(--transition-base);
}

#mobile-menu.show {
    display: block;
    animation: slideDown var(--transition-base);
}

/* ============================================
   FORM STYLES
   ============================================ */

/* Newsletter input focus with brand color */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
    border-color: var(--color-primary-teal);
}

input,
textarea,
select {
    font-family: var(--font-body);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* ============================================
   SOCIAL MEDIA ICONS
   ============================================ */
.social-icon {
    transition: all var(--transition-base);
}

.social-icon:hover {
    transform: scale(1.2) rotate(5deg);
    color: var(--color-primary-teal);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--color-primary-teal), var(--color-accent-coral));
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--color-primary-teal-dark), var(--color-accent-coral-dark));
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    header, 
    footer, 
    button, 
    #mobile-menu-btn,
    .no-print {
        display: none;
    }
    
    body {
        background: white;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Gradient backgrounds */
.gradient-teal-coral {
    background: linear-gradient(135deg, var(--color-primary-teal), var(--color-accent-coral));
}

.gradient-coral-orange {
    background: linear-gradient(135deg, var(--color-accent-coral), var(--color-accent-orange));
}

.gradient-pink-teal {
    background: linear-gradient(135deg, var(--color-accent-pink), var(--color-primary-teal));
}

/* Animation delays for staggered effects */
.animate-delay-100 {
    animation-delay: 100ms;
}

.animate-delay-200 {
    animation-delay: 200ms;
}

.animate-delay-300 {
    animation-delay: 300ms;
}

/* Reduced motion for accessibility */
@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;
    }
}

/* ============================================
   EXHIBITIONS PAGE - FILTER BUTTONS
   ============================================ */
.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    background: var(--color-white);
    color: var(--color-ink);
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all var(--transition-base);
}

.filter-btn:hover {
    background: var(--color-bg-cream);
    border-color: var(--color-primary-teal);
    color: var(--color-primary-teal);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--color-primary-teal);
    color: var(--color-white);
    border-color: var(--color-primary-teal);
    box-shadow: var(--shadow-md);
}

.filter-btn.active:hover {
    background: var(--color-primary-teal-dark);
    border-color: var(--color-primary-teal-dark);
}

/* Line clamp for truncating text */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
