/* SEMCO Cosmetics - White Luxury Corporate Theme with 3D WebGL Spatial Centerpiece */

:root {
    --ink: #ffffff; /* Clean luxury white */
    --surface: rgba(255, 255, 255, 0.85);
    --panel: rgba(255, 255, 255, 0.92);
    --card: rgba(255, 255, 255, 0.90);
    --border: rgba(0, 155, 141, 0.16);
    --text: #0f172a; /* Slate 900 */
    --muted: #475569; /* Slate 600 */
    
    /* SEMCO Corporate Primary Accents */
    --p1: #009b8d;
    --p2: #02c39a;
    --p3: #1e3a5f;
    --p1-rgb: 0, 155, 141;
    --p2-rgb: 2, 195, 154;
    
    /* Category Stripes & Accents */
    --color-pbi: #f97316;
    --color-xl: #009b8d;
    --color-web: #02c39a;
    
    --radius: 20px;
    --grid-color: rgba(0, 155, 141, 0.04);
}

/* General Layout & Resets */
html {
    scroll-behavior: smooth;
    background-color: var(--ink);
}

body {
    /* Pristine luxury white with smooth emerald aura */
    background: radial-gradient(circle at 50% 0%, #e6faf4 0%, #f4fbf8 30%, #ffffff 70%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
}

/* Background Grid Overlay */
.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.15;
    mask-image: radial-gradient(circle at var(--global-mouse-x, 50%) var(--global-mouse-y, 50%), black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at var(--global-mouse-x, 50%) var(--global-mouse-y, 50%), black 20%, transparent 70%);
    transition: opacity 0.5s ease;
}

/* Scrollbar customizations */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 155, 141, 0.25);
    border-radius: 10px;
    transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--p1);
}

/* Floating Node items around Hero */
.parallax-badge {
    box-shadow: 0 10px 25px rgba(0, 70, 60, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.8);
    transition: transform 0.25s cubic-bezier(0.1, 0.8, 0.2, 1);
    will-change: transform;
}

/* Background Orbs slow organic floating animations (Subtle mint auras) */
.orb-1 { 
    transition: transform 0.3s ease-out;
}
.orb-2 { 
    transition: transform 0.3s ease-out;
}
.orb-3 { 
    transition: transform 0.3s ease-out;
}

/* Cursor trail particles */
.cursor-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.15s ease-out;
}

/* Card Glow Border animations */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* Staggered Passive Floating Animations */
@keyframes cardFloat-1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}
@keyframes cardFloat-2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-9px); }
}
@keyframes cardFloat-3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.card-wrapper.float-anim-1 {
    animation: cardFloat-1 6s ease-in-out infinite;
}
.card-wrapper.float-anim-2 {
    animation: cardFloat-2 6.8s ease-in-out infinite;
    animation-delay: 0.3s;
}
.card-wrapper.float-anim-3 {
    animation: cardFloat-3 6.4s ease-in-out infinite;
    animation-delay: 0.6s;
}
.card-wrapper:hover {
    animation-play-state: paused;
}

/* White Glassmorphic Report Cards */
.report-card {
    position: relative;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 60, 50, 0.05);
    transition: transform 0.15s cubic-bezier(0.1, 0.8, 0.2, 1), border-color 0.4s, box-shadow 0.4s;
    transform-style: preserve-3d;
    will-change: transform;
}

.report-card::before {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: calc(var(--radius) + 1.5px);
    background: conic-gradient(from var(--angle), transparent 25%, var(--border-glow-color, var(--p1)) 45%, var(--border-glow-color-2, var(--p2)) 65%, transparent 85%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.report-card:hover {
    border-color: rgba(2, 195, 154, 0.4);
    box-shadow: 0 20px 45px rgba(0, 155, 141, 0.14);
}

.report-card:hover::before {
    opacity: 1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    to {
        --angle: 360deg;
    }
}

/* Card Radial Shine Highlight Overlay */
.shine-overlay {
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: radial-gradient(240px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(0, 155, 141, 0.08), transparent 80%);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.report-card:hover .shine-overlay {
    opacity: 1;
}

/* Card Category Specific Styling */
.report-card.pbi {
    --border-glow-color: var(--color-pbi);
    --border-glow-color-2: #fbbf24;
}
.report-card.xl {
    --border-glow-color: var(--color-xl);
    --border-glow-color-2: #34d399;
}
.report-card.web {
    --border-glow-color: var(--color-web);
    --border-glow-color-2: #00e5ff;
}

.card-stripe {
    height: 3px;
    width: 100%;
    transition: height 0.3s ease;
}
.report-card:hover .card-stripe {
    height: 5px;
}
.card-stripe.pbi {
    background: linear-gradient(90deg, var(--color-pbi), #fbbf24);
}
.card-stripe.xl {
    background: linear-gradient(90deg, var(--color-xl), #34d399);
}
.card-stripe.web {
    background: linear-gradient(90deg, var(--color-web), #00e5ff);
}

/* Instagram Post Styling */
.ig-post-card {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}
.ig-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 155, 141, 0.12);
    border-color: rgba(0, 155, 141, 0.3);
}
.ig-media {
    user-select: none;
}
.ig-like-btn {
    cursor: pointer;
    line-height: 1;
}
.ig-save-btn {
    cursor: pointer;
    line-height: 1;
}

/* Modal states */
.modal-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}
.modal-overlay.active .stats-modal-content {
    transform: scale(1) !important;
}

/* Reveal item on scroll */
.reveal-item {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Filter buttons */
.filter-btn {
    color: var(--muted);
    transition: all 0.2s ease;
}
.filter-btn:hover {
    color: var(--text);
    background: rgba(0, 155, 141, 0.06);
}
.filter-btn.active {
    background: var(--p1);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 155, 141, 0.25);
}

/* Stats containers in directory */
.stat-box {
    background: var(--card);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 16px 24px;
    min-width: 120px;
    box-shadow: 0 6px 20px rgba(0, 60, 50, 0.04);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.stat-box:hover {
    transform: translateY(-2px);
    border-color: var(--p2);
    box-shadow: 0 10px 25px rgba(0, 155, 141, 0.1);
}

/* Modal row styling */
.stat-row {
    background: rgba(0, 155, 141, 0.03);
    border: 1px solid rgba(0, 155, 141, 0.1);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    transition: border-color 0.3s, background-color 0.3s;
}
.stat-row:hover {
    border-color: var(--p1);
    background: rgba(0, 155, 141, 0.06);
}

/* Button ripple expand animation */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(2, 195, 154, 0.25);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out forwards;
    pointer-events: none;
}
@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==============================================================
   3D SPATIAL WEBGL EXPERIENCE & AGENTIC STYLING (WHITE THEME)
   ============================================================== */

/* Fixed WebGL Canvas */
#webgl-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: auto;
}

/* Ensure DOM content sits cleanly above WebGL canvas */
.app-content-layer {
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.interactive-element,
a, button, input,
.report-card, .eco-card,
.parallax-badge, .mockup-container,
.brand-icon, .filter-btn, .modal-content,
.terminal-container, .dock-container, .hud-panel,
.dock-btn, .terminal-pill, .stat-box {
    pointer-events: auto;
}

/* Audio Synthesizer Equalizer animation */
.eq-bar {
    transition: height 0.2s ease;
}
.audio-active .eq-bar:nth-child(1) {
    animation: eqBounce 0.75s ease-in-out infinite alternate;
    background-color: var(--p1) !important;
}
.audio-active .eq-bar:nth-child(2) {
    animation: eqBounce 0.55s ease-in-out infinite alternate 0.15s;
    background-color: var(--p1) !important;
}
.audio-active .eq-bar:nth-child(3) {
    animation: eqBounce 0.85s ease-in-out infinite alternate 0.3s;
    background-color: var(--p1) !important;
}
@keyframes eqBounce {
    0% { height: 3px; }
    100% { height: 14px; }
}

/* 3D Floating Control Dock (Clean White Luxury) */
#spatial-control-dock {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}
#spatial-control-dock .glass-panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(0, 155, 141, 0.25);
    box-shadow: 0 16px 45px rgba(0, 60, 50, 0.14);
}
.dock-btn {
    border: 1px solid transparent;
    color: var(--text);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.dock-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 155, 141, 0.3);
    background: rgba(0, 155, 141, 0.06);
}
.dock-btn.active {
    background: rgba(0, 155, 141, 0.14) !important;
    border-color: rgba(0, 155, 141, 0.5) !important;
    color: var(--p1) !important;
    box-shadow: 0 0 16px rgba(0, 155, 141, 0.2);
}
.dock-theme-btn {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.dock-theme-btn:hover {
    transform: scale(1.15) translateY(-2px);
}
.dock-theme-btn.active {
    border-color: var(--p1) !important;
    box-shadow: 0 0 16px rgba(0, 155, 141, 0.4);
    transform: scale(1.2);
}

/* Agentic Prompt-to-3D Terminal (Contrasting Emerald Command Deck) */
.terminal-container {
    font-family: 'JetBrains Mono', monospace;
    background: radial-gradient(circle at 50% 0%, #0d2822 0%, #041410 90%);
    border: 1px solid rgba(0, 155, 141, 0.35);
    box-shadow: 0 25px 60px rgba(0, 50, 40, 0.15), 0 0 40px rgba(0, 155, 141, 0.1);
}
.terminal-stream::-webkit-scrollbar {
    width: 4px;
}
.terminal-stream::-webkit-scrollbar-thumb {
    background: rgba(2, 195, 154, 0.3);
    border-radius: 4px;
}
.terminal-pill {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.terminal-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(2, 195, 154, 0.2);
}

/* Telemetry HUD (White Frosted Tag) */
#spatial-telemetry-hud {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 155, 141, 0.2);
    box-shadow: 0 10px 30px rgba(0, 60, 50, 0.08);
    color: var(--text);
}

/* Magnetic Cursor */
#magnetic-cursor-dot {
    pointer-events: none;
    transition: transform 0.08s ease-out, opacity 0.2s;
    box-shadow: 0 0 12px var(--p1);
}
#magnetic-cursor-ring {
    pointer-events: none;
    box-shadow: 0 0 15px rgba(0, 155, 141, 0.25);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), width 0.2s, height 0.2s, border-color 0.2s;
}
.magnetic-hover #magnetic-cursor-ring {
    width: 48px;
    height: 48px;
    border-color: #009b8d !important;
    background-color: rgba(0, 155, 141, 0.08);
}

/* 3D Hotspot Tooltip */
#spatial-hotspot-tooltip {
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 155, 141, 0.3);
    box-shadow: 0 12px 30px rgba(0, 60, 50, 0.12);
    color: var(--text);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    #spatial-telemetry-hud {
        display: none !important;
    }
    #spatial-control-dock {
        bottom: 12px;
        right: 12px;
        max-width: calc(100vw - 24px);
    }
    .directive-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }
}
