/*
Theme Name: HYPD Studio
Theme URI: https://hypd.studio
Author: Thilina Sandaruwan
Description: A dark, motion-design focused portfolio theme.
Version: 1.0
*/

/* --- CORE VARIABLES --- */
:root {
    --bg-deep: #030005;
    --bg-white: #ffffff;
    --accent-purple: #6a00ff;
    --bright-purple: #b066ff;
    --text-dark: #1a1a1a;
    --text-white: #ffffff;
    
    --font-display: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-tech: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-deep);
    color: var(--text-white);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: default;
}

/* --- MOUSE GLOW --- */
.mouse-glow {
    position: fixed; top: 0; left: 0;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(106, 0, 255, 0.15) 0%, rgba(5, 5, 5, 0) 70%);
    border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%);
    z-index: 0; transition: width 0.2s, height 0.2s; mix-blend-mode: screen;
}

/* --- MOVING GRID --- */
.hero-grid {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 90px 90px; 
    mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
    z-index: -1;
    animation: gridMove 8s linear infinite; 
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(-90px); }
}

/* --- NAVIGATION --- */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 5%; 
    position: fixed; width: 100%; top: 0; z-index: 1000;
    background: rgba(3, 0, 5, 0.85); backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-img { height: 80px; width: auto; display: block; }

/* Nav UL styles removed from here since we removed the menu items, 
   but keeping base styles in case you add a menu later */
nav ul { display: flex; gap: 40px; list-style: none; }

nav a {
    color: white; text-decoration: none; text-transform: uppercase;
    font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; letter-spacing: 1px; opacity: 0.6; 
    transition: all 0.3s ease; position: relative; padding-bottom: 5px;
}
nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 2px;
    background: #5a00ff; transition: width 0.3s ease;
}
nav a:hover, nav a.active { opacity: 1; color: white; }
nav a.active::after { width: 100%; }

.cta-btn {
    background: linear-gradient(90deg, #5e00e8, #913bff);
    padding: 12px 35px; border-radius: 8px; color: white; text-decoration: none;
    font-weight: 700; font-size: 0.85rem; text-transform: uppercase; 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}
.cta-btn:hover { transform: scale(1.05); box-shadow: 0 0 40px rgba(106,0,255,0.4); }

/* --- HERO SECTION --- */
.hero {
    position: relative; 
    min-height: 110vh; 
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; overflow: hidden; padding-bottom: 100px;
}

/* HERO CARD */
.hero-card {
    position: relative; z-index: 2; 
    width: 52vw; 
    aspect-ratio: 16/9; 
    background: #000; border-radius: 24px; 
    margin-top: 12vh;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255,255,255,0.1);
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    will-change: transform;
}

.hero-video-embed {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; border: none; transform: scale(1.35); 
}

.hero-info-grid {
    display: grid; grid-template-columns: 1.5fr 1fr 0.5fr; 
    width: 90%; max-width: 1400px; margin-top: 80px; z-index: 2; 
    align-items: flex-start;
}
.hero-tagline h2 { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.1; color: white; letter-spacing: -0.02em; }
.hero-desc { font-size: 0.95rem; color: #888; line-height: 1.5; max-width: 300px; font-family: var(--font-body); }
.hero-date { text-align: right; font-family: var(--font-tech); font-size: 0.8rem; color: #666; }

/* --- WHITE CONTAINER --- */
.white-container {
    background-color: var(--bg-white); color: var(--text-dark);
    border-radius: 60px 60px 0 0; position: relative; z-index: 10;
    padding: 80px 5% 120px 5%; margin-top: -80px;
}

/* MARQUEE */
.marquee-container {
    background: #000; border-radius: 20px; color: white; margin-bottom: 100px;
    display: flex; align-items: center; overflow: hidden; height: 120px; position: relative;
}
.marquee-static-left {
    width: 35%; padding: 0 40px; z-index: 2; background: #000; height: 100%;
    display: flex; align-items: center; box-shadow: 10px 0 20px rgba(0,0,0,0.5);
}
.marquee-label { color: #fff; font-family: var(--font-body); font-size: 1rem; font-weight: 500; line-height: 1.4; max-width: 300px; }
.marquee-scroll-right {
    width: 65%; overflow: hidden; white-space: nowrap; position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.ticker-move { display: inline-block; animation: ticker 25s linear infinite; }
.ticker-item { display: inline-block; padding: 0 40px; color: #888; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; text-transform: uppercase; transition: color 0.3s; }
.ticker-item:hover { color: white; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- SERVICES --- */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-bottom: 120px; align-items: flex-end; }
.section-tag { color: var(--accent-purple); font-family: var(--font-body); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 25px; display: block; }
.section-title { font-family: var(--font-display); font-size: clamp(3rem, 5vw, 4.5rem); line-height: 1.0; letter-spacing: -0.03em; margin-bottom: 0; color: #000; }
.section-desc { color: #444; line-height: 1.6; font-size: 1.15rem; font-weight: 400; max-width: 500px; margin-bottom: 10px; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 60px; padding-bottom: 100px; }

.icon-box { height: 80px; display: flex; align-items: center; margin-bottom: 30px; }
.service-icon-img { width: 50px; height: auto; object-fit: contain; }

/* --- PORTFOLIO --- */
.works-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px; 
    margin-top: 80px;
}

@media (min-width: 1200px) {
    .works-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

.work-item {
    aspect-ratio: 9/16; position: relative; border-radius: 20px;
    overflow: hidden; background: #eee; cursor: pointer;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.8s ease;
}
.work-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(0.2, 1, 0.3, 1); position: relative; z-index: 1; }
.work-video-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2; opacity: 0; transition: opacity 0.3s ease; background: #000; pointer-events: none;
}
.work-item:hover .work-video-container { opacity: 1; }
.work-video-embed { width: 100%; height: 100%; border: none; transform: scale(1.4); pointer-events: none; }
.work-item:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.work-item:hover img { transform: scale(1.05); }
.work-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); opacity: 0.8; z-index: 3; pointer-events: none; }
.work-info { position: absolute; bottom: 30px; left: 30px; color: white; z-index: 4; pointer-events: none; }
.work-cat { font-family: var(--font-tech); color: var(--bright-purple); font-size: 0.7rem; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 1px; }
.work-info h3 { font-family: var(--font-display); font-size: 1.4rem; text-transform: uppercase; }

/* --- DARK SECTION --- */
.dark-container {
    background-color: var(--bg-deep); color: white;
    border-radius: 60px 60px 0 0; margin-top: -60px; position: relative; z-index: 15;
    padding: 120px 5%;
}

.studio-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; margin-bottom: 200px; }
.studio-img { height: 600px; border-radius: 24px; overflow: hidden; position: relative; background: url('https://images.unsplash.com/photo-1542744173-8e7e53415bb0?q=80&w=2670&auto=format&fit=crop') center/cover; filter: grayscale(100%) contrast(110%); }
.big-number { font-family: var(--font-display); font-size: 5rem; color: var(--accent-purple); line-height: 1; display: block; margin-bottom: 5px; }

.pipeline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 200px; }
.step-card { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.08); padding: 50px 30px; border-radius: 24px; transition: 0.5s ease; }
.step-card:hover { border-color: var(--accent-purple); background: rgba(106, 0, 255, 0.03); transform: translateY(-10px); }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 200px; }
.price-card { border: 1px solid rgba(255,255,255,0.1); padding: 60px 30px; text-align: center; border-radius: 24px; transition: 0.5s ease; background: rgba(255,255,255,0.01); }
.price-card:hover { border-color: var(--accent-purple); transform: translateY(-15px); }
.price-card h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 25px; letter-spacing: 1px;}
.price { font-size: 3rem; font-weight: 700; margin-bottom: 15px; font-family: var(--font-display); }
.price-sub { font-size: 0.9rem; color: #888; margin-bottom: 40px; line-height: 1.5; }

/* --- FAQ STYLES --- */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-bottom: 150px; align-items: start; }
.faq-item { padding: 30px 0; border-bottom: 1px solid #222; cursor: pointer; transition: 0.3s; overflow: hidden; }
.faq-header { display: flex; justify-content: space-between; align-items: center; }
.faq-header span { font-size: 1.2rem; transition: color 0.3s; }
.faq-header i { transition: transform 0.3s; }

.faq-answer { 
    max-height: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
    color: #888; line-height: 1.6; margin-top: 0; font-size: 0.95rem;
}

.faq-item:hover .faq-header span { color: var(--bright-purple); }
.faq-item:hover { border-color: #444; }

.faq-item.active .faq-answer { max-height: 200px; margin-top: 20px; }
.faq-item.active .faq-header i { transform: rotate(45deg); color: var(--accent-purple); }
.faq-item.active .faq-header span { color: var(--accent-purple); }

/* --- FOOTER --- */
footer { border-top: 1px solid #111; padding-top: 100px; text-align: center; padding-bottom: 50px;}
.footer-pre { color: #888; margin-bottom: 20px; font-family: var(--font-body); font-weight: 600; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; }
.footer-cta-title { font-family: var(--font-display); font-size: 9vw; line-height: 0.9; text-transform: uppercase; margin-bottom: 60px; color: white; }
.footer-links { display: flex; justify-content: center; gap: 60px; margin-top: 80px; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; flex-wrap: wrap; }
.footer-links a { color: #666; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: white; }

.footer-legal {
    margin-top: 40px; display: flex; justify-content: center; gap: 30px; 
    font-size: 0.75rem; color: #444; font-family: var(--font-body); text-transform: uppercase;
}
.footer-legal a { color: #444; text-decoration: none; transition: 0.2s; }
.footer-legal a:hover { color: #888; }

.footer-bottom { margin-top: 40px; color: #333; font-size: 0.8rem; font-family: var(--font-tech); }

.reveal { opacity: 0; transform: translateY(80px); transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1400px) {
    .hero { min-height: 115vh; }
    .hero-card { width: 60vw; margin-top: 15vh; }
}

@media (max-width: 900px) {
    .logo-img { height: 50px; }
    nav ul { display: none; }
    .hero-card { width: 94%; aspect-ratio: 16/9; margin-top: 20vh; }
    .hero-info-grid { grid-template-columns: 1fr; gap: 40px; text-align: left; }
    .intro-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero-tagline h2 { font-size: 2rem; }
    .studio-layout, .faq-grid { grid-template-columns: 1fr; }
    .marquee-container { flex-direction: column; height: auto; border-radius: 16px; padding: 30px; }
    .marquee-static-left { width: 100%; border-right: none; border-bottom: 1px solid #333; padding: 0 0 20px 0; margin-bottom: 20px; box-shadow: none; }
    .marquee-scroll-right { width: 100%; }
}

/* --- NAVIGATION STYLES --- */
nav ul { display: flex; gap: 40px; list-style: none; }

nav a {
    color: white; 
    text-decoration: none; 
    text-transform: uppercase;
    font-family: var(--font-body); 
    font-size: 0.8rem; 
    font-weight: 600; 
    letter-spacing: 1px; 
    opacity: 0.6; 
    transition: all 0.3s ease; 
    position: relative; 
    padding-bottom: 5px;
}

/* The Purple Underline Animation */
nav a::after {
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 0%; /* Hidden by default */
    height: 2px;
    background: #5a00ff; /* Purple color */
    transition: width 0.3s ease;
}

/* Hover state OR Active state (applied by JS) */
nav a:hover, nav a.active { opacity: 1; color: white; }
nav a.active::after { width: 100%; } /* Full width when active */


/* --- RESPONSIVE / MOBILE VIEW --- */
@media (max-width: 900px) {
    /* Existing styles... */
    .logo-img { height: 50px; }
    
    /* HIDE THE TEXT LINKS ON MOBILE */
    nav ul { display: none; }
    
    /* The 'Start Project' button remains visible because it is 
       outside the <nav><ul> structure */
       
    /* ...rest of your mobile styles */
}