/* 
   🎨 DIGIMORA 2026: ULTRA-MODERN SHOWROOM
   Philosophy: Zero Bloat / Absolute Precision / Clinics-Style UI
*/

:root {
    --p-color: #a855f7;
    --bg-dark: #05060a;
    --ease-ultra: cubic-bezier(0.16, 1, 0.3, 1);
}

.ultra-nav {
    display: flex; align-items: center; gap: 15px;
    background: rgba(10, 10, 15, 0.8); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-right: none;
    padding: 8px 24px; border-radius: 12px 0 0 12px;
    transform: translateX(20px) scaleX(0); opacity: 0; transform-origin: right;
    transition: 0.5s var(--ease-ultra); pointer-events: none;
}


.ultra-menu-wrapper.is-open .ultra-nav { transform: translateX(0) scaleX(1); opacity: 1; pointer-events: auto; }

.ultra-link {
    font-family: 'Space Mono', monospace; font-size: 0.75rem;
    color: rgba(255,255,255,0.5); text-transform: uppercase;
    letter-spacing: 0.15em; transition: 0.3s; text-decoration: none;
}

.ultra-link:hover, .ultra-link.active { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.5); }
.ultra-link.cta { color: var(--p-color); font-weight: 700; }

.ultra-toggle {
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px; width: 50px; height: 50px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: 0.4s var(--ease-ultra); position: relative; z-index: 10;
}

.ultra-toggle:hover { background: rgba(255, 255, 255, 0.15); transform: scale(1.05); }
.ultra-menu-wrapper.is-open .ultra-toggle { background: #fff; border-color: #fff; }

.u-icon {
    width: 24px;
    height: 18px; /* Adjusted height for 3 lines */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transform: rotate(0deg);
    transition: transform 0.4s var(--ease-out-expo);
}

.u-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.4s var(--ease-out-expo), opacity 0.2s ease;
    transform-origin: center;
}

.ultra-menu-wrapper.is-open .u-line {
    background-color: #000;
}

.ultra-menu-wrapper.is-open .u-icon {
    transform: rotate(180deg);
}

.ultra-menu-wrapper.is-open .u-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.ultra-menu-wrapper.is-open .u-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.ultra-menu-wrapper.is-open .u-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* --- 🎯 ULTRA HERO (V26) --- */
.portfolio-hero-ultra {
    padding: 160px 0 60px;
    text-align: center;
}

.hero-meta-tag {
    font-family: 'Space Mono', monospace; font-size: 0.65rem;
    color: var(--p-color); letter-spacing: 0.5em;
    margin-bottom: 20px; opacity: 0.8;
}

.hero-ultra-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 900; line-height: 1.0;
    color: #fff; text-transform: uppercase;
    margin-bottom: 50px;
}

.text-gradient {
    background: linear-gradient(180deg, #fff 40%, rgba(255,255,255,0.2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --- 📑 ULTRA TABS --- */
.tab-switcher-ultra {
    display: inline-flex; background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05); padding: 6px;
    border-radius: 100px; backdrop-filter: blur(10px);
}

.tab-btn-ultra {
    background: transparent; border: none;
    padding: 12px 32px; border-radius: 100px;
    color: rgba(255,255,255,0.4); font-family: 'Space Mono', monospace;
    font-size: 0.7rem; letter-spacing: 0.15em; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 10px;
    transition: 0.4s var(--ease-ultra);
}

.btn-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.3; }

.tab-btn-ultra.active {
    background: rgba(168, 85, 247, 0.1); color: var(--p-color);
    border: 1px solid rgba(168, 85, 247, 0.2);
}
.tab-btn-ultra.active .btn-dot { opacity: 1; box-shadow: 0 0 10px var(--p-color); }

/* --- 🖼️ GRIDS --- */
.gallery-section { padding: 40px 0 120px; }

.gallery-grid, .video-gallery-grid {
    display: grid; gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.video-gallery-grid { grid-template-columns: repeat(5, 1fr); }

.gallery-item, .video-item {
    position: relative; border-radius: 24px; overflow: hidden;
    background: #080a10; border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer; transition: 0.6s var(--ease-ultra); aspect-ratio: 4/3.2;
}

.video-item { aspect-ratio: 9/16; }

.gallery-item img, .video-item video {
    width: 100%; height: 100%; object-fit: cover; transition: 1.2s var(--ease-ultra);
}

.gallery-item:hover, .video-item:hover {
    transform: translateY(-10px); border-color: var(--p-color);
    box-shadow: 0 40px 80px -20px rgba(0,0,0,0.8);
}

.gallery-item:hover img, .video-item:hover video { transform: scale(1.08); }

.item-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 24px; opacity: 0; transition: 0.4s;
}

.gallery-item:hover .item-overlay, .video-item:hover .item-overlay { opacity: 1; }

.item-meta { font-family: 'Space Mono', monospace; font-size: 0.6rem; color: var(--p-color); letter-spacing: 0.1em; }

/* --- 🏛️ LIGHTBOX --- */
.royal-lightbox {
    position: fixed; inset: 0; z-index: 3000;
    display: none; align-items: center; justify-content: center;
}
.royal-lightbox.active { display: flex; }
.rl-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.97); backdrop-filter: blur(30px); }
.rl-shell { position: relative; z-index: 5; width: 92vw; max-width: 1200px; transition: 0.8s var(--ease-ultra); }
.rl-content { border-radius: 32px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,0.1); }
.rl-content img, .rl-content video { width: 100%; max-height: 85vh; display: block; }
.rl-close { position: absolute; top: 30px; right: 30px; width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,0.1); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; transition: 0.3s; }
.rl-close:hover { background: #fff; color: #000; transform: rotate(90deg); }

/* 📱 MOBILE */
@media (max-width: 1024px) { .video-gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
    .portfolio-hero-ultra { padding-top: 140px; }
    .hero-ultra-title { font-size: 2.2rem; }
    .video-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tab-btn-ultra { padding: 10px 20px; font-size: 0.6rem; }
}

/* System Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: 1s var(--ease-ultra); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.stagger-item { opacity: 0; transform: translateY(20px); transition: 0.8s var(--ease-ultra); }
.stagger-item.is-visible { opacity: 1; transform: translateY(0); }
