/**
 * Horizon Heights - Advanced UI Enhancements v2 Styles
 * Styles for: Floating Dock, Scroll-Snap, Video Modal, Gradient Text, Cursor Particles
 */

/* ============================================
   FEATURE 1: Floating Navigation Dock (macOS-style)
   ============================================ */

.hh-floating-dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hh-floating-dock.hh-dock-hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(100px);
    pointer-events: none;
}

.hh-dock-container {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(6, 9, 27, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(4, 7, 21, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.hh-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--hh-text, #F5F8FF);
    border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease;
    cursor: pointer;
    position: relative;
    min-width: 60px;
}

.hh-dock-item:hover {
    background: rgba(255, 123, 46, 0.15);
}

.hh-dock-icon {
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.hh-dock-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.9;
    white-space: nowrap;
}

.hh-dock-highlight {
    background: linear-gradient(135deg, rgba(255, 123, 46, 0.3), rgba(255, 178, 92, 0.2));
}

.hh-dock-highlight .hh-dock-label {
    color: #FFB25C;
}

/* Hide dock on mobile */
@media (max-width: 768px) {
    .hh-floating-dock {
        bottom: 10px;
    }

    .hh-dock-container {
        gap: 4px;
        padding: 8px 12px;
    }

    .hh-dock-item {
        padding: 6px 8px;
        min-width: 50px;
    }

    .hh-dock-icon {
        font-size: 20px;
    }

    .hh-dock-label {
        font-size: 9px;
    }
}

/* ============================================
   FEATURE 2: Smooth Scroll-Snap Sections
   ============================================ */

/* Applied via JavaScript */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   FEATURE 3: Video Modal with Smooth Expansion
   ============================================ */

.hh-video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.hh-video-modal.hh-video-modal-active {
    opacity: 1;
    visibility: visible;
}

.hh-video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 21, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hh-video-modal-content {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 1200px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease 0.1s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}

.hh-video-modal.hh-video-modal-active .hh-video-modal-content {
    opacity: 1;
    transform: scale(1);
}

.hh-video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 123, 46, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hh-video-modal-close:hover {
    background: rgba(255, 123, 46, 0.4);
    transform: rotate(90deg);
}

.hh-video-modal-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hh-video-modal-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

/* Video thumbnail wrapper (clickable) */
.hh-video-wrapper.hh-video-thumbnail-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    cursor: pointer;
}

.hh-video-wrapper.hh-video-thumbnail-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hh-video-wrapper.hh-video-thumbnail-wrapper::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 123, 46, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(255, 123, 46, 0.5);
    z-index: 2;
}

.hh-video-wrapper.hh-video-thumbnail-wrapper:hover::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .hh-video-modal-content {
        width: 95%;
    }

    .hh-video-modal-close {
        top: -40px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
}

/* ============================================
   FEATURE 4: Gradient Animated Text
   ============================================ */

/* Styles injected via JavaScript for hero title */

/* ============================================
   FEATURE 5: Cursor Particle Trails
   ============================================ */

.hh-particle-canvas {
    mix-blend-mode: screen;
    opacity: 0.7;
}

/* Hide on mobile */
@media (max-width: 768px) {
    .hh-particle-canvas {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY: Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .hh-floating-dock,
    .hh-dock-item,
    .hh-video-modal,
    .hh-video-modal-content,
    .hh-video-modal-close {
        transition: none !important;
        animation: none !important;
    }

    .hh-particle-canvas {
        display: none !important;
    }
}

/* ============================================
   UTILITY: Prevent scroll when modal is open
   ============================================ */

body.hh-modal-open {
    overflow: hidden;
}
