/**
 * SUPRACULTURAL - Dynamic Sacred Geometry CSS
 * Optimized for Cargo/Persona.co platform
 * Pure CSS animations - no JavaScript dependencies
 */

/**
 * Enhanced Resets with 3D support
 */
* {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

::-moz-selection {
    background-color: rgba(255, 215, 0, 0.8);
    color: #fff;
}

::selection {
    background-color: rgba(255, 215, 0, 0.8);
    color: #fff;
}

:focus {
    outline: 0;
}

/**
 * Global with cosmic background
 */
body,
html {
    min-height: 100vh;
    margin: 0px;
    padding: 0px;
    overflow-x: hidden;
    perspective: 2000px;
    perspective-origin: center center;
}

html {
    position: relative;
}

body {
    background: radial-gradient(ellipse at center, #0a0a23 0%, #000000 100%);
    color: #ffffff;
    position: relative;
}

/**
 * Sacred Geometry Background - Pure CSS
 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(255, 105, 180, 0.06) 0%, transparent 50%);
    animation: cosmicDrift 30s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background-image: 
        radial-gradient(circle at 40% 80%, rgba(0, 255, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(255, 215, 0, 0.08) 0%, transparent 30%);
    animation: cosmicDrift 45s ease-in-out infinite reverse;
}

/**
 * Backdrop compatibility for Cargo
 */
#backdrop {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    max-width: 100%;
    z-index: 1;
    background: rgba(0, 0, 0, 0.3);
}

/**
 * Enhanced Container with glassmorphism
 */
main {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    clear: both;
    overflow: visible;
    position: relative;
    max-width: 90%;
    width: 90%;
    margin: 5vh auto !important;
    z-index: 10;
    border-radius: 20px !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-align-items: center;
    align-items: center;
    
    min-height: 80vh;
    animation: gentleFloat 12s ease-in-out infinite;
    transform-style: preserve-3d;
}

main::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(255, 215, 0, 0.3), 
        rgba(138, 43, 226, 0.3), 
        rgba(255, 105, 180, 0.3), 
        rgba(0, 255, 255, 0.3));
    border-radius: 22px;
    z-index: -1;
    animation: borderFlow 8s ease-in-out infinite;
}

main > div {
    -moz-flex: 1 0 auto;
    -webkit-flex: 1 0 auto;
    flex: 1 0 auto;
    width: 100%;
    padding: 4rem;
    text-align: center;
    position: relative;
    z-index: 5;
}

/**
 * Enhanced Typography - Cargo Compatible
 */
[data-predefined-style="true"] main,
main {
    font-size: 1.2rem !important;
    font-weight: 300 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: "Helvetica Neue", Arial, sans-serif !important;
    line-height: 1.6 !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2) !important;
}

[data-predefined-style="true"] h1,
h1 {
    font-family: "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 100 !important;
    font-size: 6rem !important;
    line-height: 0.8 !important;
    color: #ffffff !important;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.6),
        0 0 80px rgba(255, 215, 0, 0.3) !important;
    margin: 0 0 3rem 0 !important;
    animation: textGlow 8s ease-in-out infinite !important;
    letter-spacing: 0.15em !important;
    text-align: center !important;
}

[data-predefined-style="true"] h2,
h2 {
    font-family: "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 300 !important;
    font-size: 1.8rem !important;
    line-height: 1.3 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 2rem 0 1rem 0 !important;
    text-shadow: 0 0 15px rgba(138, 43, 226, 0.4) !important;
}

[data-predefined-style="true"] small,
small {
    font-size: 1.1rem !important;
    color: rgba(255, 215, 0, 0.9) !important;
    font-weight: 300 !important;
    letter-spacing: 0.05em !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4) !important;
    animation: gentleGlow 6s ease-in-out infinite !important;
}

/**
 * Enhanced Links and Interactive Elements
 */
[data-predefined-style="true"] main a,
[data-predefined-style="true"] a,
main a,
a {
    color: rgba(255, 215, 0, 0.9) !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3) !important;
    padding-bottom: 0.1em !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

[data-predefined-style="true"] main a:hover,
[data-predefined-style="true"] a:hover,
main a:hover,
a:hover {
    color: #ffffff !important;
    border-bottom-color: rgba(255, 215, 0, 0.8) !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6) !important;
    transform: translateY(-1px) !important;
}

/**
 * Special styling for common Cargo elements
 */
.content_padded {
    padding: 4rem !important;
}

.content_width {
    width: 100% !important;
}

/* Enhanced text containers */
p {
    margin: 1.5rem 0 !important;
    line-height: 1.7 !important;
    animation: textFloat 10s ease-in-out infinite !important;
}

/* Service list styling */
div:contains("Services") {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 2rem !important;
    margin: 2rem 0 !important;
    backdrop-filter: blur(10px) !important;
}

/* Session info styling */
div:contains("SESSION") {
    font-family: 'Courier New', monospace !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 2rem !important;
    margin-top: 4rem !important;
    animation: terminalBlink 3s ease-in-out infinite !important;
}

/**
 * Image enhancements
 */
img {
    border: 0.2rem solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    animation: imageFloat 8s ease-in-out infinite !important;
}

img:hover {
    border-color: rgba(255, 215, 0, 0.6) !important;
    transform: scale(1.02) translateY(-3px) !important;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2) !important;
}

/**
 * Subpage overlay compatibility
 */
.subpage_overlay {
    background-color: rgba(7, 97, 68, 0.78) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

body.homepage .subpage_overlay {
    display: none !important;
}

/**
 * Sacred Geometry Animations
 */
@keyframes cosmicDrift {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
    }
    25% { 
        transform: translate(30px, -20px) scale(1.05);
    }
    50% { 
        transform: translate(-20px, 30px) scale(0.95);
    }
    75% { 
        transform: translate(25px, 15px) scale(1.02);
    }
}

@keyframes gentleFloat {
    0%, 100% { 
        transform: translateY(0px) rotateX(0deg);
    }
    50% { 
        transform: translateY(-10px) rotateX(1deg);
    }
}

@keyframes borderFlow {
    0%, 100% { 
        background: linear-gradient(45deg, 
            rgba(255, 215, 0, 0.3), 
            rgba(138, 43, 226, 0.3), 
            rgba(255, 105, 180, 0.3), 
            rgba(0, 255, 255, 0.3));
    }
    50% { 
        background: linear-gradient(225deg, 
            rgba(0, 255, 255, 0.3), 
            rgba(255, 105, 180, 0.3), 
            rgba(138, 43, 226, 0.3), 
            rgba(255, 215, 0, 0.3));
    }
}

@keyframes textGlow {
    0%, 100% { 
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.6),
            0 0 80px rgba(255, 215, 0, 0.3) !important;
    }
    50% { 
        text-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 60px rgba(255, 215, 0, 0.8),
            0 0 120px rgba(255, 215, 0, 0.5) !important;
    }
}

@keyframes gentleGlow {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.4) !important;
        opacity: 0.9;
    }
    50% { 
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.6) !important;
        opacity: 1;
    }
}

@keyframes textFloat {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(-2px);
    }
}

@keyframes imageFloat {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(-5px);
    }
}

@keyframes terminalBlink {
    0%, 100% { 
        opacity: 0.6;
    }
    50% { 
        opacity: 1;
    }
}

/**
 * Mobile Responsiveness for Cargo
 */
@media (max-width: 768px) {
    [data-predefined-style="true"] h1,
    h1 {
        font-size: 3rem !important;
    }
    
    [data-predefined-style="true"] h2,
    h2 {
        font-size: 1.4rem !important;
    }
    
    [data-predefined-style="true"] main,
    main {
        font-size: 1rem !important;
        width: 95% !important;
        margin: 2vh auto !important;
        min-height: 90vh !important;
    }
    
    main > div,
    .content_padded {
        padding: 2rem !important;
    }
}

/**
 * Cargo platform specific overrides
 */
[data-css-presets="true"] main {
    background-color: rgba(255, 255, 255, 0.05) !important;
    text-align: center !important;
    min-height: 80vh !important;
    -webkit-align-items: center !important;
    align-items: center !important;
    left: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    right: 0 !important;
}

[data-css-presets="true"] #backdrop {
    width: 100% !important;
    background: rgba(0, 0, 0, 0.2) !important;
}

[data-css-presets="true"].mobile #plugin,
[data-css-presets="true"].mobile #backdrop,
.mobile #backdrop,
.mobile #plugin {
    position: relative !important;
    height: 50vh !important;
    min-width: 100% !important;
    width: 100% !important;
    top: 0 !important;
    bottom: auto !important;
    left: 0 !important;
}

.mobile main,
[data-css-presets="true"].mobile main {
    position: relative !important;
    min-height: 10px !important;
    max-width: 100% !important;
    width: 100% !important;
}