/* ArtSoul V4 - Unified Design System */
/* Production-level spacing, typography, and layout system */

:root {
    /* Spacing Scale - Consistent across entire site */
    --space-xs: 0.25rem;    /* 4px */
    --space-sm: 0.5rem;     /* 8px */
    --space-md: 1rem;       /* 16px */
    --space-lg: 1.5rem;     /* 24px */
    --space-xl: 2rem;       /* 32px */
    --space-2xl: 3rem;      /* 48px */
    --space-3xl: 4rem;      /* 64px */

    /* Typography Scale - Premium, not oversized */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */

    /* Line Heights - Tighter, cleaner */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* Content Width - Prevent oversized blocks */
    --content-max: 1200px;
    --content-narrow: 800px;
    --content-wide: 1400px;

    /* Card Sizing - Consistent across site */
    --card-padding: var(--space-lg);
    --card-gap: var(--space-lg);
    --card-radius: 0.75rem;

    /* Section Spacing - Reduce excessive vertical space */
    --section-padding-y: var(--space-3xl);
    --section-gap: var(--space-2xl);
}

/* Typography System */
.heading-1 {
    font-size: var(--text-4xl);
    line-height: var(--leading-tight);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.heading-2 {
    font-size: var(--text-3xl);
    line-height: var(--leading-tight);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.heading-3 {
    font-size: var(--text-2xl);
    line-height: var(--leading-snug);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.heading-4 {
    font-size: var(--text-xl);
    line-height: var(--leading-snug);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.body-text {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-md);
}

.body-text-sm {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-sm);
}

/* Content Width Constraints */
.content-container {
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.content-narrow {
    max-width: var(--content-narrow);
    margin-left: auto;
    margin-right: auto;
}

/* Section Spacing */
.section {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
}

.section-compact {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
}

/* Card System */
.card-system {
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    margin-bottom: var(--card-gap);
}

/* Unified Collapsible System */
.collapsible-section {
    cursor: pointer;
    margin-bottom: var(--space-lg);
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    padding: var(--space-md);
    border-radius: var(--card-radius);
    transition: all 0.2s ease;
}

.collapsible-header:hover {
    opacity: 0.8;
}

.collapsible-icon {
    font-size: var(--text-2xl);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: var(--space-md);
}

/* CLOSED = ▼, OPEN = ▲ (no rotation) */
.collapsible-section.closed .collapsible-icon::before {
    content: '▼';
}

.collapsible-section.open .collapsible-icon::before {
    content: '▲';
}

.collapsible-content {
    max-height: 5000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    opacity: 1;
    padding: 0 var(--space-md);
}

.collapsible-section.closed .collapsible-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Footer System - Symmetric and Clean */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    padding: var(--space-2xl) 0;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-column h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    line-height: var(--leading-tight);
}

.footer-column p,
.footer-column a {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    opacity: 0.9;
}

/* Dropdown Overlay System - Production Level */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 10001;
    display: none;
}

.dropdown-overlay.active {
    display: block;
}

.dropdown-menu {
    position: fixed;
    top: 80px;
    right: 20px;
    min-width: 220px;
    border-radius: var(--card-radius);
    padding: var(--space-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    display: none;
    transform-origin: top right;
    animation: dropdownFadeIn 0.2s ease-out;
}

.dropdown-menu.active {
    display: block;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    :root {
        --text-4xl: 1.875rem;   /* 30px on mobile */
        --text-3xl: 1.5rem;     /* 24px on mobile */
        --section-padding-y: var(--space-2xl);
    }

    .dropdown-menu {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* Theme-specific enhancements */
.classic .collapsible-header:hover {
    background: rgba(169, 221, 211, 0.05);
}

.future .collapsible-header:hover {
    background: rgba(0, 245, 255, 0.05);
}

.classic .dropdown-menu {
    background: #1a1a1a;
    border: 1px solid #a9ddd3;
}

.future .dropdown-menu {
    background: rgba(0, 20, 40, 0.95);
    border: 1px solid rgba(0, 245, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.2), 0 10px 40px rgba(0, 0, 0, 0.3);
}
