/* ═══════════════════════════════════════════════════════════════════════════
   ETHRAEON UNIVERSAL DESIGN SYSTEM (EUDS) — PREMIUM AESTHETIC
   ═══════════════════════════════════════════════════════════════════════════
   
   Constitutional AI Orchestration Platform
   © 2025 S. Jason Prohaska (ingombrante©) — All Rights Reserved
   
   OPTION B: ETHRAEON Premium
   - Dark mode cathedral aesthetic
   - Glass morphism with depth layers
   - Micro-animations and cinematic transitions
   - Constitutional color language
   - Museum-quality visual refinement
   
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   1. BODY & BACKGROUND — CATHEDRAL DEPTH
   ───────────────────────────────────────────────────────────────────────────── */
body.eh-premium {
    background: radial-gradient(
        ellipse 120% 100% at 50% -20%,
        #1a1a2e 0%,
        #12121c 35%,
        #0a0a0f 60%,
        #040406 100%
    );
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Subtle grain texture overlay */
body.eh-premium::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.018;
    pointer-events: none;
    z-index: 0;
}

/* Subtle radial glow at top */
body.eh-premium::after {
    content: '';
    position: fixed;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 212, 255, 0.03) 0%,
        transparent 60%
    );
    pointer-events: none;
    z-index: 0;
}


/* ─────────────────────────────────────────────────────────────────────────────
   2. GLASS MORPHISM COMPONENTS
   ───────────────────────────────────────────────────────────────────────────── */

/* Standard glass panel */
.eh-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

/* Elevated glass with glow */
.eh-glass-elevated {
    background: linear-gradient(
        145deg,
        rgba(26, 26, 46, 0.8) 0%,
        rgba(45, 45, 68, 0.5) 100%
    );
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 
        var(--shadow-lg),
        var(--shadow-inset),
        0 0 40px rgba(0, 212, 255, 0.05);
}

/* Sacred glass (gold accent) */
.eh-glass-sacred {
    background: linear-gradient(
        135deg,
        rgba(26, 26, 46, 0.85) 0%,
        rgba(45, 45, 68, 0.6) 100%
    );
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    border: 1px solid var(--glass-border-gold);
    border-radius: var(--radius-lg);
    box-shadow: 
        var(--shadow-lg),
        var(--shadow-gold-glow),
        var(--shadow-inset);
}

/* Frosted glass overlay */
.eh-glass-frosted {
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
}


/* ─────────────────────────────────────────────────────────────────────────────
   3. DETAIL PAGE LAYOUT
   ───────────────────────────────────────────────────────────────────────────── */

.eh-detail-body {
    background: radial-gradient(
        ellipse 120% 100% at 50% 0%,
        #181824 0%,
        #0d0d14 40%,
        #040406 100%
    );
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
}

.eh-detail-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 0;
}

.eh-detail-header {
    position: relative;
    z-index: 1;
    padding: var(--space-12) var(--space-6) var(--space-6);
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .eh-detail-header {
        padding: var(--space-16) var(--space-8) var(--space-8);
    }
}

.eh-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    margin-bottom: var(--space-6);
}

.eh-back-link:hover {
    color: var(--euds-electric);
}

.eh-back-link::before {
    content: '←';
    transition: transform var(--transition-fast);
}

.eh-back-link:hover::before {
    transform: translateX(-4px);
}

.eh-detail-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.eh-detail-header > p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 640px;
    line-height: var(--leading-relaxed);
}

.eh-detail-main {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto var(--space-16);
    padding: 0 var(--space-6) var(--space-8);
    display: grid;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .eh-detail-main {
        padding: 0 var(--space-8) var(--space-12);
        gap: var(--space-8);
    }
}


/* ─────────────────────────────────────────────────────────────────────────────
   4. DETAIL PANELS
   ───────────────────────────────────────────────────────────────────────────── */

.eh-detail-panel {
    background: linear-gradient(
        145deg,
        rgba(14, 14, 20, 0.9) 0%,
        rgba(10, 10, 15, 0.95) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-7);
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .eh-detail-panel {
        padding: var(--space-8);
    }
}

.eh-detail-panel h2 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.eh-detail-panel h2::before {
    content: '';
    width: 4px;
    height: 1.2em;
    background: linear-gradient(to bottom, var(--euds-electric), var(--euds-cyan));
    border-radius: 2px;
}

.eh-detail-panel p {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.eh-detail-panel p:last-child {
    margin-bottom: 0;
}

.eh-detail-panel ul,
.eh-detail-panel ol {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    padding-left: var(--space-5);
}

.eh-detail-panel li {
    margin-bottom: var(--space-2);
    line-height: var(--leading-relaxed);
}

.eh-detail-panel ul li::marker {
    color: var(--euds-electric);
}

.eh-detail-panel ol li::marker {
    color: var(--euds-gold);
    font-weight: 500;
}

.eh-note {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    font-style: italic;
}


/* ─────────────────────────────────────────────────────────────────────────────
   5. DEMO SURFACE (Interactive Area)
   ───────────────────────────────────────────────────────────────────────────── */

.eh-demo-surface {
    background: linear-gradient(
        145deg,
        rgba(8, 8, 12, 0.95) 0%,
        rgba(5, 5, 8, 0.98) 100%
    );
    border: 1px dashed rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eh-demo-placeholder {
    text-align: center;
    color: var(--text-tertiary);
}

.eh-demo-placeholder p {
    margin: var(--space-2) 0;
}

.eh-demo-placeholder .eh-note {
    color: var(--text-muted);
}

/* Gated demo surface */
.eh-demo-placeholder.gated {
    padding: var(--space-8);
    background: rgba(255, 215, 0, 0.02);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: var(--radius-lg);
}

.eh-demo-placeholder.gated::before {
    content: '🔐';
    display: block;
    font-size: 2rem;
    margin-bottom: var(--space-4);
}


/* ─────────────────────────────────────────────────────────────────────────────
   6. BUTTONS
   ───────────────────────────────────────────────────────────────────────────── */

.eh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: 
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.eh-btn:focus-visible {
    outline: 2px solid var(--euds-electric);
    outline-offset: 2px;
}

/* Primary button */
.eh-btn-primary {
    background: linear-gradient(135deg, var(--euds-electric), var(--euds-cyan));
    color: var(--euds-midnight);
}

.eh-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.eh-btn-primary:active {
    transform: translateY(0);
}

/* Secondary button */
.eh-btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.eh-btn-secondary:hover {
    border-color: var(--euds-electric);
    background: rgba(0, 212, 255, 0.05);
}

/* Ghost button */
.eh-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.eh-btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Gold button */
.eh-btn-gold {
    background: linear-gradient(135deg, var(--euds-gold), var(--euds-warm-gold));
    color: var(--euds-midnight);
}

.eh-btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}


/* ─────────────────────────────────────────────────────────────────────────────
   7. ANIMATIONS
   ───────────────────────────────────────────────────────────────────────────── */

/* Fade in */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Fade in + slide up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in + slide down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale in */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Shimmer */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Glow pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.4);
    }
}

/* Float */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Utility classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shimmer {
    animation: shimmer 3s ease-in-out infinite;
}

.animate-glow {
    animation: glowPulse 3s ease-in-out infinite;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Stagger delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }


/* ─────────────────────────────────────────────────────────────────────────────
   8. STATUS INDICATORS
   ───────────────────────────────────────────────────────────────────────────── */

.eh-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
}

.eh-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s ease-in-out infinite;
}

.eh-status-live {
    background: rgba(0, 255, 136, 0.1);
    color: var(--euds-success);
}

.eh-status-gated {
    background: rgba(255, 215, 0, 0.1);
    color: var(--euds-gold);
}

.eh-status-beta {
    background: rgba(0, 212, 255, 0.1);
    color: var(--euds-electric);
}

.eh-status-offline {
    background: rgba(255, 68, 102, 0.1);
    color: var(--euds-error);
}

.eh-status-offline::before {
    animation: none;
    opacity: 0.5;
}


/* ─────────────────────────────────────────────────────────────────────────────
   9. ICONS
   ───────────────────────────────────────────────────────────────────────────── */

.eh-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.eh-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.eh-icon-sm { width: 16px; height: 16px; }
.eh-icon-md { width: 24px; height: 24px; }
.eh-icon-lg { width: 32px; height: 32px; }
.eh-icon-xl { width: 48px; height: 48px; }

.eh-icon-electric svg { stroke: var(--euds-electric); }
.eh-icon-gold svg { stroke: var(--euds-gold); }
.eh-icon-success svg { stroke: var(--euds-success); }


/* ─────────────────────────────────────────────────────────────────────────────
   10. DIVIDERS & SEPARATORS
   ───────────────────────────────────────────────────────────────────────────── */

.eh-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.08) 80%,
        transparent
    );
    margin: var(--space-8) 0;
}

.eh-divider-glow {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 212, 255, 0.3) 50%,
        transparent
    );
    margin: var(--space-8) 0;
}


/* ─────────────────────────────────────────────────────────────────────────────
   11. FOOTER STYLES
   ───────────────────────────────────────────────────────────────────────────── */

.eh-detail-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-8) var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: var(--space-8);
}

.eh-detail-footer p {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.eh-detail-footer a {
    color: var(--euds-electric);
    transition: color var(--transition-fast);
}

.eh-detail-footer a:hover {
    color: var(--euds-cyan);
}


/* ─────────────────────────────────────────────────────────────────────────────
   12. RESPONSIVE UTILITIES
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 639px) {
    .sm-hidden { display: none !important; }
}

@media (min-width: 640px) {
    .sm-visible { display: block; }
    .sm-flex { display: flex; }
}

@media (min-width: 768px) {
    .md-visible { display: block; }
    .md-flex { display: flex; }
}

@media (min-width: 1024px) {
    .lg-visible { display: block; }
    .lg-flex { display: flex; }
}


/* ─────────────────────────────────────────────────────────────────────────────
   13. SCROLLBAR STYLING
   ───────────────────────────────────────────────────────────────────────────── */

/* WebKit scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 10, 15, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) rgba(10, 10, 15, 0.5);
}


/* ─────────────────────────────────────────────────────────────────────────────
   14. SELECTION STYLING
   ───────────────────────────────────────────────────────────────────────────── */

::selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}
