/* ==========================================================================
   SmartHR — 3D Android App Showcase & Scroll-Reactive Engine Styles
   ========================================================================== */

:root {
    --hrms-primary: #1e40af;
    --hrms-primary-dark: #1e3a8a;
    --hrms-accent-blue: #3b82f6;
    --hrms-accent-green: #10b981;
    --hrms-accent-red: #ef4444;
    --hrms-phone-frame: #0b0f19;
    --hrms-phone-bezel: #1e293b;
    --hrms-gold: #f59e0b;
}

/* ==========================================================================
   1. HERO 3D ANDROID STAGE
   ========================================================================== */
.hero-3d-scene {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    perspective: 1400px;
    perspective-origin: 50% 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem 3rem;
}

/* Ambient glow backdrop behind phone */
.hero-3d-ambient-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.28) 0%, rgba(99, 102, 241, 0.18) 45%, transparent 70%);
    filter: blur(50px);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    animation: hrmsGlowPulse 6s ease-in-out infinite alternate;
}

@keyframes hrmsGlowPulse {
    0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hero-phone-stage {
    position: relative;
    transform-style: preserve-3d;
    z-index: 2;
    transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

/* 3D Android Phone Chassis */
.android-phone-3d {
    position: relative;
    width: 310px;
    height: 640px;
    background: #030712;
    border-radius: 46px;
    padding: 10px;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.15),
        0 1px 2px rgba(255, 255, 255, 0.25) inset,
        -10px 20px 40px -10px rgba(15, 23, 42, 0.45),
        0 40px 80px -15px rgba(30, 58, 138, 0.35);
    transform-style: preserve-3d;
    cursor: grab;
    user-select: none;
    transition: box-shadow 0.3s ease;
}

.android-phone-3d:active {
    cursor: grabbing;
}

/* Metallic Edge Trim & Glint */
.android-phone-3d::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 49px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(71, 85, 105, 0.2) 25%, rgba(15, 23, 42, 0.8) 50%, rgba(255, 255, 255, 0.35) 75%, rgba(30, 41, 59, 0.9) 100%);
    z-index: -1;
    pointer-events: none;
}

.phone-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: #090d16;
    border-radius: 38px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
}

/* Dynamic Glass Glare */
.phone-glare {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 35%, transparent 60%);
    pointer-events: none;
    z-index: 30;
    border-radius: 38px;
    transition: opacity 0.3s ease;
}

/* Top Notch / Punch-hole Camera & Speaker */
.phone-speaker {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    background: #1f2937;
    border-radius: 99px;
    z-index: 40;
}

.phone-camera {
    position: absolute;
    top: 13px;
    left: 50%;
    transform: translateX(-50%);
    width: 11px;
    height: 11px;
    background: #090d16;
    border-radius: 50%;
    z-index: 40;
    box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.8), 0 0 3px rgba(0, 0, 0, 0.9) inset;
}

.phone-camera::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 3px;
    height: 3px;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0.8;
}

/* Android Status Bar (Screenshots already feature native Android status bar) */
.phone-status-bar {
    display: none !important;
}

.status-left {
    letter-spacing: -0.2px;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
}

.status-icon svg {
    width: 12px;
    height: 12px;
}

/* Screen Viewport */
.phone-screen-viewport {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
    background: #090d16;
}

.phone-screen {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96) translateY(8px);
    transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.45s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.phone-screen::-webkit-scrollbar {
    display: none;
}

.phone-screen.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    z-index: 5;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    pointer-events: none;
}

/* Interactive Bottom Nav inside the Phone (Transparent click targets over native app bottom bar) */
.phone-bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 0 4px;
    z-index: 35;
}

.nav-tab {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.15s ease;
    flex: 1;
    opacity: 0;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.nav-tab.active {
    background: transparent;
}

.nav-tab svg, .nav-tab i, .nav-tab span {
    display: none;
}

/* Android Home Bar Indicator (Native in screenshot) */
.phone-home-indicator {
    display: none !important;
}

/* Realistic Ground Shadow */
.phone-shadow-3d {
    position: absolute;
    bottom: -32px;
    left: 5%;
    width: 90%;
    height: 36px;
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.1) 40%, transparent 75%);
    filter: blur(12px);
    border-radius: 50%;
    transform: rotateX(85deg) translateZ(-40px);
    pointer-events: none;
    z-index: -2;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ==========================================================================
   2. FLOATING 3D HOLOGRAPHIC BADGES (Pop out in Z-space)
   ========================================================================== */
.floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 0.7rem 1rem;
    box-shadow: 
        0 16px 36px -8px rgba(15, 23, 42, 0.16),
        0 0 0 1px rgba(226, 232, 240, 0.6);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10;
    pointer-events: auto;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
    white-space: nowrap;
    will-change: transform;
}

.floating-badge:hover {
    box-shadow: 0 22px 48px -6px rgba(30, 58, 138, 0.25);
    border-color: rgba(59, 130, 246, 0.4);
}

/* Badge 1: Kiosk Live Geo */
.badge-kiosk {
    top: 40px;
    right: -42px;
    transform: translateZ(65px);
    animation: floatBadgeA 5s ease-in-out infinite alternate;
}

/* Badge 2: Workforce Live */
.badge-workforce {
    bottom: 85px;
    left: -55px;
    transform: translateZ(80px);
    animation: floatBadgeB 6s ease-in-out infinite alternate;
}

/* Badge 3: Geo-Fence Locked Alert */
.badge-locked {
    top: 310px;
    right: -48px;
    transform: translateZ(55px);
    animation: floatBadgeC 5.5s ease-in-out infinite alternate;
}

@keyframes floatBadgeA {
    0% { transform: translateZ(65px) translateY(0px) rotateZ(-1deg); }
    100% { transform: translateZ(65px) translateY(-10px) rotateZ(1.5deg); }
}

@keyframes floatBadgeB {
    0% { transform: translateZ(80px) translateY(0px) rotateZ(1deg); }
    100% { transform: translateZ(80px) translateY(8px) rotateZ(-1.2deg); }
}

@keyframes floatBadgeC {
    0% { transform: translateZ(55px) translateY(0px) rotateZ(-0.5deg); }
    100% { transform: translateZ(55px) translateY(-7px) rotateZ(1deg); }
}

.badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.badge-icon.icon-blue {
    background: #eff6ff;
    color: #2563eb;
}

.badge-icon.icon-amber {
    background: #fef2f2;
    color: #dc2626;
}

.badge-icon svg {
    width: 18px;
    height: 18px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: hrmsPulseDot 1.8s infinite;
}

@keyframes hrmsPulseDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.badge-body {
    display: flex;
    flex-direction: column;
}

.badge-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-val {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.badge-metrics {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.metric-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e40af;
    line-height: 1;
}

.metric-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

/* ==========================================================================
   3. DEDICATED 3D ANDROID APP EXPERIENCE SECTION (SCROLL REACTIVE)
   ========================================================================== */
.android-experience-section {
    position: relative;
    padding: 7rem 1.5rem;
    background: radial-gradient(120% 100% at 50% 0%, #0f172a 0%, #030712 100%);
    color: #f8fafc;
    overflow: hidden;
}

/* Dynamic background grid and light beams */
.android-experience-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.07) 1px, transparent 1px);
    background-size: 48px 48px;
    z-index: 0;
    pointer-events: none;
}

.experience-glow-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, rgba(99, 102, 241, 0.12) 50%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.glow-orb-top {
    top: -150px;
    right: 10%;
}

.glow-orb-bottom {
    bottom: -150px;
    left: 10%;
}

.experience-container {
    position: relative;
    max-width: 1260px;
    margin: 0 auto;
    z-index: 10;
}

.experience-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 4.5rem;
}

.experience-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.25rem;
    background: rgba(30, 58, 138, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 99px;
    color: #93c5fd;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.experience-header h2 {
    font-size: clamp(2.3rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.experience-header h2 .highlight-gradient {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.experience-header p {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: #94a3b8;
    line-height: 1.6;
    margin: 0 auto;
}

/* 3D Viewport Split Layout — Side-by-Side */
.experience-layout {
    display: grid;
    grid-template-columns: 370px 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1220px;
    margin: 0 auto;
}

/* Sticky / Interactive 3D Phone Hub */
.experience-phone-col {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1500px;
    z-index: 5;
}

.experience-phone-wrapper {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

/* 3D Angle Preset Controls */
.angle-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(14px);
    padding: 0.35rem 0.45rem;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.angle-btn {
    background: none;
    border: none;
    padding: 0.4rem 0.85rem;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.angle-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.angle-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.45);
}

.drag-hint {
    margin-top: 0.6rem;
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Right Side: Compact Interactive Feature Cards (Short format side-by-side) */
.experience-cards-col {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.experience-feature-card {
    position: relative;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 1rem 1.4rem;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1.15rem;
    overflow: hidden;
}

.experience-feature-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #3b82f6, #60a5fa);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.experience-feature-card:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(4px);
}

.experience-feature-card.active {
    background: rgba(30, 58, 138, 0.32);
    border-color: rgba(59, 130, 246, 0.75);
    box-shadow: 0 10px 30px -6px rgba(37, 99, 235, 0.35);
    transform: translateX(6px);
}

.experience-feature-card.active::before {
    opacity: 1;
}

.card-num-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #93c5fd;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.experience-feature-card.active .card-num-badge {
    background: #2563eb;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: #60a5fa;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.card-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    line-height: 1.25;
}

.card-info p {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.35;
    margin: 0;
    white-space: normal;
}

.card-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #cbd5e1;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.experience-feature-card.active .card-stat-chip {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.45);
    color: #bfdbfe;
}

.card-stat-chip.chip-green {
    color: #34d399;
}

.card-stat-chip.chip-blue {
    color: #60a5fa;
}

.chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

/* ==========================================================================
   4. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column !important;
        text-align: center !important;
        gap: 2rem !important;
    }
    .hero-content {
        align-items: center !important;
        text-align: center !important;
    }
    .hero-content p {
        text-align: center !important;
    }
    .hero-actions {
        justify-content: center !important;
    }
    .hero-stats {
        justify-content: center !important;
    }
    .hero-visual {
        width: 100% !important;
        flex: unset !important;
    }
}

@media (max-width: 880px) {
    .experience-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .experience-phone-col {
        position: relative;
        top: 0;
        order: -1;
    }
}

@media (max-width: 768px) {
    .hero-3d-scene {
        padding: 1rem 0 2rem;
        max-width: 100%;
    }
    .android-phone-3d {
        width: 285px;
        height: 590px;
        border-radius: 40px;
    }
    .phone-frame {
        border-radius: 32px;
    }
    .floating-badge {
        display: none;
    }
    .angle-controls {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 16px;
    }
    .experience-feature-card {
        padding: 0.9rem 1.1rem;
    }
    .card-info h3 {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .hero-3d-scene {
        padding: 1rem 0 2rem;
        max-width: 100%;
    }
    .android-phone-3d {
        width: 285px;
        height: 590px;
        border-radius: 40px;
    }
    .phone-frame {
        border-radius: 32px;
    }
    .floating-badge {
        display: none; /* Hide floating badges on narrow mobile to keep screen uncluttered */
    }
    .angle-controls {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 16px;
    }
    .experience-feature-card {
        padding: 1.25rem 1.4rem;
    }
    .card-info h3 {
        font-size: 1.1rem;
    }
}
