/*
Theme Name: PārthaOS App Theme (Advanced Systems Edition v5.0)
Theme URI: https://prdigitalsolutions.org
Author: Prem Jagtap - Systems Architect
Description: Ultimate Conversion Architecture featuring Claymorphism (Soft 3D Extrusion) and Glassmorphism 2.0 (Deep Frosted Blurs). Engineered for zero-friction conversion and predictable revenue.
Version: 5.0.0
Text Domain: parthaos
*/

/* ==========================================================================
   1. GLOBAL VARIABLES & BRAND SYSTEM (Clay & Glass Logic)
   ========================================================================== */
:root {
    /* Base App Canvas */
    --bg-body: #f4f6f9; 
    --bg-overlay: rgba(255, 255, 255, 0.6);
    
    /* Claymorphism UI Palette */
    --clay-base: #f0f3f8;
    --clay-highlight: rgba(255, 255, 255, 0.9);
    --clay-shadow: rgba(166, 180, 200, 0.4);
    --clay-inset-shadow: rgba(166, 180, 200, 0.5);
    
    /* Typography */
    --text-main: #2a2e43; 
    --text-muted: #6b7280;
    --text-light: #ffffff;
    
    /* Brand Accents */
    --brand-primary: #ff5200; 
    --brand-gradient: linear-gradient(135deg, #ff5200, #ff7a00);
    --brand-purple: #6e3ab7; 
    --brand-blue: #0050ff; 
    --border-light: rgba(255,255,255,0.6);
    
    /* Fonts */
    --font-head: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Architecture Dimensions */
    --top-header-height: 60px;
    --app-switcher-height: 55px;
    --bottom-nav-height: 75px;
    --total-top-offset: calc(var(--top-header-height) + var(--app-switcher-height));
    
    /* Z-Index Hierarchy */
    --z-base: 1;
    --z-nav: 100;
    --z-drawer: 500;
    --z-pip: 900;
    --z-header: 1000;
    --z-splash: 9999;
}

/* ==========================================================================
   2. GLOBAL CANVAS & KINETICS
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; scroll-behavior: smooth; }

body {
    background: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--total-top-offset);
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 30px);
    overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 800; line-height: 1.2; color: var(--text-main); letter-spacing: -0.5px; }

p, li, .article-content, .entry-content p { color: var(--text-main) !important; font-weight: 500; }

.text-orange { color: var(--brand-primary); }
.text-purple { color: var(--brand-purple); }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ==========================================================================
   3. MOBILE UX: PULSING ARROWS & STAGE ANCHORS
   ========================================================================== */
.founder-stage-wrapper::after, .founder-about-wrapper::after {
    content: ''; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
    width: 140px; height: 15px; background: radial-gradient(ellipse at center, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0) 70%);
    z-index: 1; border-radius: 50%;
}

@keyframes arrowPulse {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(5px); opacity: 1; }
}

.swipe-hint {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.7rem; font-weight: 800; color: var(--brand-primary);
    text-transform: uppercase; letter-spacing: 1px;
}
.swipe-hint .dashicons { font-size: 14px; width: 14px; height: 14px; animation: arrowPulse 1.5s infinite; }
@media (min-width: 768px) { .swipe-hint { display: none; } }

/* ==========================================================================
   4. GLASSMORPHISM 2.0 (HEADERS & DOCKS)
   ========================================================================== */
.app-header-global {
    position: fixed; top: 0; left: 0; width: 100%; z-index: var(--z-header);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.6);
}

.top-bar-main { height: var(--top-header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,0.4); }
.brand-logo img { height: 32px; filter: invert(1) contrast(1.2); }

/* Clay Avatar Trigger */
.profile-trigger { 
    width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; overflow: hidden; cursor: pointer; 
    box-shadow: 2px 2px 6px var(--clay-shadow), -2px -2px 6px var(--clay-highlight);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s; 
}
.profile-trigger:active { 
    transform: scale(0.9); 
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.1); 
}

.app-switcher-nav { height: var(--app-switcher-height); display: flex; align-items: center; overflow-x: auto; gap: 30px; padding: 0 20px; background: transparent; }
.switcher-item { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 14px; font-weight: 700; white-space: nowrap; position: relative; height: 100%; transition: color 0.2s; }
.switcher-item.active { color: var(--brand-purple); }
.switcher-item.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background-color: var(--brand-purple); border-radius: 3px 3px 0 0; }
.switcher-icon .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* Sticky Bottom Nav (Glass 2.0) */
.bottom-app-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255,255,255,0.8); 
    box-shadow: 0 -5px 30px rgba(0,0,0,0.03);
    display: flex; justify-content: space-around; align-items: center;
    padding-bottom: env(safe-area-inset-bottom); z-index: var(--z-nav);
}

.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; flex: 1; transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.nav-item:active { transform: scale(0.9); }
.nav-item.active { color: var(--brand-primary); }
.nav-item .dashicons { font-size: 24px; margin-bottom: 4px; height: 24px; }

/* Elevated Center Action Button (Clay Extrusion) */
@keyframes centerPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 82, 0, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 82, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 82, 0, 0); }
}
.center-action { position: relative; top: -20px; }
.center-action .action-btn {
    background: var(--brand-gradient); width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 4px solid #fff; margin-bottom: 6px; color: white;
    box-shadow: 4px 4px 10px rgba(255, 82, 0, 0.3), -2px -2px 6px rgba(255, 255, 255, 0.9);
    animation: centerPulse 2.5s infinite;
}
.center-action .action-btn .dashicons { font-size: 30px; width: 30px; height: 30px; margin: 0; }
.center-action .nav-label { margin-top: 42px; position: absolute; color: var(--text-main); }

/* ==========================================================================
   5. CLAYMORPHISM UI CARDS (GLOBAL)
   ========================================================================== */
.swipe-grid-container { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 20px; padding: 20px; scroll-padding-left: 20px; }

.swipe-card {
    background: var(--clay-base) !important; 
    border: none !important;
    border-radius: 24px !important; 
    padding: 24px;
    flex: 0 0 80%; max-width: 300px; scroll-snap-align: start; display: flex; flex-direction: column;
    /* Soft 3D Extrusion */
    box-shadow: 10px 10px 20px var(--clay-shadow), -10px -10px 20px var(--clay-highlight), inset 2px 2px 5px rgba(255, 255, 255, 1) !important;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
}

.swipe-card:active { 
    transform: scale(0.97); 
    /* Neumorphic press effect */
    box-shadow: inset 6px 6px 12px var(--clay-inset-shadow), inset -6px -6px 12px var(--clay-highlight) !important; 
}

/* ==========================================================================
   6. MODALS & PIP VIDEO (GLASS + CLAY)
   ========================================================================== */
.pip-widget {
    position: fixed; bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 20px); right: 20px;
    width: 120px; border-radius: 20px; overflow: hidden; 
    box-shadow: 15px 15px 30px rgba(0,0,0,0.15), inset 0 0 0 2px rgba(255,255,255,0.2);
    border: none; z-index: var(--z-pip);
    transform: translateY(150%); opacity: 0; transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s, width 0.3s ease;
    cursor: pointer; background: #000;
}
.pip-widget.visible { transform: translateY(0); opacity: 1; }
.pip-widget.expanded { width: 200px; box-shadow: 0 0 0 3px var(--brand-purple), 15px 15px 30px rgba(0,0,0,0.2); }
.pip-widget video { width: 100%; display: block; object-fit: cover; border-radius: 18px; }

#pip-close { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; backdrop-filter: blur(8px); }
.pip-label { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: var(--brand-gradient); color: #fff; font-size: 10px; font-weight: 800; padding: 4px 12px; border-radius: 12px; white-space: nowrap; text-transform: uppercase; pointer-events: none; transition: opacity 0.2s; }
.pip-widget.expanded .pip-label { opacity: 0; }

/* Slide-up Profile Drawer (Glass 2.0 Overlay) */
.drawer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 15, 25, 0.4); backdrop-filter: blur(8px); z-index: calc(var(--z-drawer) - 1); opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
.drawer-overlay.active { opacity: 1; visibility: visible; }

.bottom-sheet-drawer {
    position: fixed; bottom: 0; left: 0; width: 100%; background: var(--clay-base); border-radius: 30px 30px 0 0;
    padding: 30px 20px calc(20px + env(safe-area-inset-bottom)); z-index: var(--z-drawer);
    transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1); 
    box-shadow: 0 -15px 40px rgba(0,0,0,0.1), inset 0 2px 0 rgba(255,255,255,0.8);
}
.bottom-sheet-drawer.active { transform: translateY(0); }
.drawer-handle { width: 40px; height: 5px; background: #c8ced8; border-radius: 3px; margin: 0 auto 20px; box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1); }

/* ==========================================================================
   7. DESKTOP OPTIMIZATIONS (SCALABLE APP GRIDS)
   ========================================================================== */
@media (min-width: 768px) {
    #app-main-content { max-width: 1200px; margin: 0 auto; padding-top: 40px; }
    
    .swipe-grid-container { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; gap: 30px; }
    .swipe-card { max-width: 100%; }
    
    /* Desktop Hover Physics */
    .swipe-card:hover { transform: translateY(-8px); box-shadow: 15px 15px 30px rgba(166, 180, 200, 0.5), -15px -15px 30px rgba(255, 255, 255, 1) !important; }

    /* Floating macOS-Style Dock (Glass 2.0) */
    .bottom-app-nav {
        max-width: 550px; left: 50%; transform: translateX(-50%); bottom: 30px; height: 75px;
        border-radius: 40px; border: 1px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 25px 50px rgba(0,0,0,0.08), inset 0 2px 10px rgba(255,255,255,0.5); padding-bottom: 0;
    }
    .center-action { top: -25px; }
    
    .bottom-sheet-drawer { max-width: 400px; left: 50%; transform: translate(-50%, 100%); border-radius: 30px; bottom: 20px; }
    .bottom-sheet-drawer.active { transform: translate(-50%, 0); }
}

/* ==========================================================================
   8. SPLASH SCREEN (Solid Brand Color)
   ========================================================================== */
#partha-splash { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: var(--brand-blue); display: flex; align-items: center; justify-content: center; z-index: var(--z-splash); transition: opacity 0.5s, visibility 0.5s; }
.splash-logo img { width: 160px; }
.splash-hidden { opacity: 0; visibility: hidden; pointer-events: none; }