/* ============================================
   UNCO Media Creative — Premium UI / UX
   Dark Mode + Orange Accents + Advanced Glassmorphism
   ============================================ */

:root {
    --bg-primary: #030303;
    --bg-secondary: #080808;
    
    /* Vibrant Orbs */
    --accent: #f97316;
    --accent-glow: rgba(249, 115, 22, 0.5);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;
    
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 40px;
    --radius-full: 9999px;

    /* Premium Glass Tokens */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --glass-border-light: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --glass-blur: blur(30px);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
}

a {
    text-decoration: none;
    color: inherit;
}

img, video {
    max-width: 100%;
    display: block;
    width: 100%;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ---------- Preloader ---------- */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.loader-content .logo-icon {
    font-size: 2.5rem;
    color: var(--accent);
    animation: pulse 1s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
/* Logo image in preloader */
.loader-logo {
    width: 160px;
    max-width: 60vw;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    animation: pulse 1.2s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 24px rgba(249, 115, 22, 0.5));
}
.loader-text {
    font-family: var(--font-secondary);
    font-weight: 700;
    letter-spacing: 8px;
    font-size: 1.5rem;
    background: linear-gradient(90deg, #fff, #a3a3a3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.progress-bar {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    border-radius: 2px;
}
.progress {
    position: absolute;
    left: 0; top: 0; height: 100%; width: 0;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: loadProgress 2.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes loadProgress {
    0% { width: 0; }
    40% { width: 50%; }
    100% { width: 100%; }
}
@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; text-shadow: 0 0 20px rgba(249,115,22,0); }
    100% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 30px var(--accent-glow); }
}

/* ---------- Advanced Glassmorphism Orbs ---------- */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    -webkit-filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    mix-blend-mode: screen;
}
.orb-1 {
    width: 700px; height: 700px;
    background: rgba(249, 115, 22, 0.25); 
    top: -200px; left: -100px;
    animation: float1 25s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.orb-2 {
    width: 600px; height: 600px;
    background: rgba(139, 92, 246, 0.15); /* Purple hint for depth */
    bottom: -150px; right: -100px;
    animation: float2 30s infinite alternate-reverse cubic-bezier(0.4, 0, 0.2, 1);
}
.orb-3 {
    width: 500px; height: 500px;
    background: rgba(234, 88, 12, 0.15);
    top: 30%; left: 50%;
    animation: float3 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.orb-4 {
    width: 400px; height: 400px;
    background: rgba(37, 99, 235, 0.12); /* Blue hint */
    top: 60%; left: -100px;
    animation: float2 22s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes float1 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(100px, 150px) scale(1.2) rotate(45deg); }
}
@keyframes float2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, -150px) scale(1.1); }
}
@keyframes float3 {
    0% { transform: translate(0, 0) scale(0.9); }
    100% { transform: translate(150px, -50px) scale(1.3); }
}

/* ---------- UI Motion Design (Premium Scroll Reveal) ---------- */
.reveal, .reveal-item {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-100px) skewX(2deg);
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(100px) skewX(-2deg);
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.active, .reveal-item.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.reveal-left.active, .reveal-right.active {
    opacity: 1;
    transform: translateX(0) skewX(0);
}

/* ---------- Premium Glass Cards ---------- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-top: 1px solid var(--glass-border-light);
    border-left: 1px solid var(--glass-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    z-index: 1;
    pointer-events: none;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    padding: 32px 0;
    background: transparent;
    transition: padding 0.5s cubic-bezier(0.19, 1, 0.22, 1), background 0.5s;
}

.navbar.scrolled {
    padding: 16px 0;
    background: rgba(3, 3, 3, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1440px; margin: 0 auto; padding: 0 40px;
    display: flex; justify-content: space-between; align-items: center;
}

.nav-logo {
    display: flex; align-items: center; gap: 12px;
}
.logo-icon { color: var(--accent); }
.logo-text { font-family: var(--font-secondary); font-weight: 700; letter-spacing: 4px; }
/* Logo image in navbar */
.nav-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: brightness(1);
}
.nav-logo:hover .nav-logo-img {
    opacity: 0.85;
    transform: scale(1.05);
}

.nav-cta {
    font-size: 0.9rem; font-weight: 600;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-full);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
    position: relative;
    overflow: hidden;
}
.nav-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.nav-cta:hover { 
    transform: translateY(-4px) scale(1.05); 
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.4);
}
.nav-cta:hover::after {
    transform: translateX(100%);
}

/* ---------- Hero Split ---------- */
.split-hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: transparent;
}

.top-row {
    color: var(--text-primary);
    padding-top: 60px;
}

.bottom-row {
    background-color: var(--accent);
    color: var(--bg-primary);
    position: relative;
}
.bottom-row::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
}

.hero-title-part1, .hero-title-part2 {
    font-family: var(--font-secondary);
    font-size: clamp(4rem, 16vw, 15rem);
    line-height: 0.85;
    letter-spacing: -4px;
    white-space: nowrap;
    text-transform: uppercase;
}

.hero-title-part1 {
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255,255,255,0.8);
    position: relative;
    top: 5%;
    text-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.hero-title-part2 {
    font-weight: 700;
    color: var(--bg-primary);
    mix-blend-mode: color-burn; /* cool overlay effect on orange */
}

/* ---------- About Section ---------- */
.about-section {
    padding: 150px 0 100px;
    text-align: center;
    position: relative;
}

.about-glass {
    padding: 100px 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #fff, #a3a3a3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-text {
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 2;
    position: relative;
    z-index: 2;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---------- Marquee Section ---------- */
.marquee-section {
    padding: 40px 0;
    background-color: var(--accent);
    color: var(--bg-primary);
    overflow: hidden;
    display: flex;
    white-space: nowrap;
    position: relative;
    box-shadow: 0 0 60px rgba(249, 115, 22, 0.2);
}
.marquee-section::before, .marquee-section::after {
    content: '';
    position: absolute;
    top: 0; width: 200px; height: 100%;
    z-index: 2;
}
.marquee-section::before {
    left: 0;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
}
.marquee-section::after {
    right: 0;
    background: linear-gradient(270deg, var(--accent) 0%, transparent 100%);
}

.marquee-track {
    display: flex;
    width: fit-content;
    animation: marquee 25s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
}

.marquee-content span:not(.dot) {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.marquee-content .dot {
    font-size: 1.5rem;
    color: var(--bg-primary);
    opacity: 0.5;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---------- Portfolio Common ---------- */
.portfolio-main {
    padding: 80px 0;
}

.portfolio-category {
    padding: 80px 0;
}

.category-title {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-dot {
    width: 12px; height: 12px;
    background-color: var(--accent);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 15px var(--accent);
}

/* 3D Tilt Media Items */
.media-item {
    position: relative;
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    overflow: hidden;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

/* For JS Vanilla Tilt */
.media-item .tilt-inner {
    width: 100%; height: 100%;
    transform: translateZ(30px);
    transition: transform 0.3s ease-out;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.media-item video {
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.media-item:hover video, .media-item:hover img {
    transform: scale(1.1);
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 32px;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.media-overlay.video-overlay {
    align-items: flex-start;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-overlay h4 {
    font-size: 1.4rem;
    font-family: var(--font-secondary);
    font-weight: 600;
    transform: translateY(30px) translateZ(50px);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    color: #fff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.media-item:hover .media-overlay h4 {
    transform: translateY(0) translateZ(50px);
}

/* ---------- Grid Layouts ---------- */
.video-grid.horizontal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.video-grid.horizontal .media-item { aspect-ratio: 16 / 9; }

/* --- Social Media Video: 2-Row Infinite Marquee (GPU Smooth) --- */
.social-marquee-wrapper {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 10px 0 20px;
    /* Promote to own compositing layer */
    transform: translateZ(0);
    /* Fade out edges */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.social-marquee-row {
    display: flex;
    gap: 20px;
    width: max-content;
    /* Key for GPU compositing */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.social-marquee-row.row-left {
    animation: socialScrollLeft var(--marquee-speed-left, 50s) linear infinite;
}

.social-marquee-row.row-right {
    animation: socialScrollRight var(--marquee-speed-right, 55s) linear infinite;
}

.social-marquee-wrapper:hover .social-marquee-row {
    animation-play-state: paused;
}

/* Use translate3d — forces GPU, eliminates subpixel jitter */
@keyframes socialScrollLeft {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes socialScrollRight {
    0%   { transform: translate3d(-50%, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.social-marquee-row .media-item {
    flex-shrink: 0;
    /* Default size, overridden by modifier classes */
    width: clamp(200px, 22vw, 300px);
    aspect-ratio: 9 / 16;
    /* Prevent layout shifts during animation */
    contain: layout style;
    /* Smooth video/image rendering */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Modifier classes for different category sizes and aspect ratios */
.marquee-video .media-item, .marquee-process .media-item {
    width: clamp(200px, 22vw, 300px);
    aspect-ratio: 9 / 16;
}

.marquee-image .media-item {
    width: clamp(200px, 25vw, 320px);
    aspect-ratio: 4 / 5;
}

.marquee-photo .media-item {
    width: clamp(280px, 35vw, 450px);
    aspect-ratio: 4 / 3;
}

/* Disable hover scale inside marquee items to avoid jank */
.social-marquee-row .media-item:hover video,
.social-marquee-row .media-item:hover img {
    transform: none;
}

/* Keep old class for possible fallback */
.video-grid.vertical { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.video-grid.vertical .media-item { aspect-ratio: 9 / 16; }


.image-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.image-grid .media-item { aspect-ratio: 4 / 5; }

.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.photo-grid .media-item { aspect-ratio: 4 / 3; }

.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.process-grid .media-item { aspect-ratio: 9 / 16; }

/* ---------- Contact Section (Glassmorphism) ---------- */
.contact-section {
    padding: 150px 0;
    position: relative;
}

.contact-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 100px 40px;
}

.contact-title {
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
    word-break: break-word;
}

.accent-text {
    color: var(--accent);
    text-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
}

.contact-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 60px;
}

.contact-link {
    font-size: clamp(1.1rem, 5vw, 3rem);
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    display: inline-block;
    align-self: center;
    word-break: break-all;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 100%; height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.contact-link:hover {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}
.contact-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.contact-address {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* ---------- WhatsApp Floating Button ---------- */
.wa-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 65px;
    height: 65px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wa-float::before {
    content: '';
    position: absolute; inset: -5px;
    border-radius: 50%;
    border: 1px solid #25D366;
    animation: rippleWA 2s infinite ease-out;
}
@keyframes rippleWA {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}
.wa-float:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 20px 50px rgba(37, 211, 102, 0.6);
}

/* ---------- Footer Minimal ---------- */
.minimal-footer {
    padding: 60px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.footer-socials {
    display: flex;
    gap: 30px;
}

.footer-socials a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}
.footer-socials a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .video-grid.vertical, .image-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-container, .container { padding: 0 20px; }
    
    .hero-title-part1, .hero-title-part2 { font-size: 18vw; }
    
    .about-glass, .contact-content {
        padding: 40px 20px;
        border-radius: 20px;
    }
    
    .contact-section {
        padding: 80px 0;
    }
    
    .contact-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    .video-grid.horizontal, .video-grid.vertical, .image-grid, .photo-grid, .process-grid { 
        grid-template-columns: 1fr; 
    }
    
    .footer-bottom { flex-direction: column; gap: 24px; text-align: center; }
    
    .media-overlay { opacity: 1; background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 80%); }
    .media-overlay.video-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, transparent 80%); }
    .media-overlay h4 { transform: translateY(0); }
    
    /* Disable 3D transforms on mobile to prevent native video controls detachment glitch */
    .media-item { transform-style: flat; transform: none !important; }
    .media-item .tilt-inner { transform: none !important; }
    
    .wa-float { display: none !important; }
}
