:root {
 --black: #050505;
--blue: #2563EB;
--orange: #F97316;
--white: #FFFFFF;
--grey: #888888;
--agency-blue: #077dc2;
--agency-orange: #ff7a00;
--agency-bg: #f8fafc;
--agency-text: #003073;
--glass-card: rgba(255, 255, 255, 0.98);
 }

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--black); color: var(--white); font-family: 'Space Grotesk', sans-serif; overflow-x: hidden; scroll-behavior: smooth; }

/* --- NAVIGATION --- */
nav {
display: flex; justify-content: space-between; align-items: center;
padding: 30px 8%; position: fixed; width: 100%; z-index: 1000;
transition: 0.5s; background: transparent;
}
nav.scrolled { background: rgba(5,5,5,0.95); padding: 15px 8%; backdrop-filter: blur(10px); border-bottom: 1px solid #222; }
.logo { font-family: 'Syne'; font-size: 1.6rem; font-weight: 800; text-decoration: none; color: white; }
.logo span { color: var(--orange); }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; }
.nav-links a { text-decoration: none; color: white; font-weight: 700; font-size: 0.9rem; text-transform: uppercase; transition: 0.3s; }
.nav-links a:hover { color: var(--orange); }

/* --- HERO --- */
.hero { height: 100vh; width: 100%; position: relative; display: flex; align-items: center; padding: 0 8%; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 120%; background: linear-gradient(to right, rgba(5, 5, 5, 0.9), rgba(5, 5, 5, 0.3)), url('https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&q=80&w=1920'); background-size: cover; background-position: center; z-index: -1; }
.hero-content h1 { font-family: 'Syne'; font-size: clamp(3rem, 8vw, 7rem); line-height: 0.85; text-transform: uppercase; }
.outline { -webkit-text-stroke: 1.5px var(--white); color: transparent; }

/* --- SERVICES (UPDATED TO 6) --- */
.services-section { padding: 100px 8%; background: var(--black); color: var(--agency-text); }
.service-card { padding: 30px; border-radius: 20px; background: #0c0c0c; transition: 0.3s; height: 100%; border: 1px solid #e2e8f0; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.service-icon { font-size: 2rem; color: var(--orange); margin-bottom: 20px; }
.service-card h3 { font-family: 'Syne'; font-size: 1.3rem; margin-bottom: 10px; }
.service-card p { font-size: 0.9rem; color: #e7e8e8; }

/* --- PORTFOLIO --- */
.portfolio-section { padding: 100px 0; background: #080808; overflow: hidden; }
.gallery-track { display: flex; gap: 30px; animation: scroll 35s linear infinite; width: max-content; }
.gallery-item { width: 400px; height: 300px; border-radius: 20px; overflow: hidden; border: 5px solid var(--white); flex-shrink: 0; }
.gallery-item:nth-child(even) { border-color: var(--blue); transform: rotate(3deg); border-radius: 50px 5px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- FOOTER (UPDATED BASED ON IMAGE) --- */
footer { padding: 60px 8% 30px; background: #1a1a1a; color: var(--white); font-family: 'Space Grotesk', sans-serif; border-top: 1px solid #333; }
footer h5 { font-family: 'Syne'; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 25px; }
footer a { text-decoration: none; color: #ccc; transition: 0.3s; }
footer a:hover { color: var(--orange); }
.footer-list { list-style: none; padding: 0; line-height: 2.2; }
.contact-info li { margin-bottom: 15px; color: #ccc; }
.contact-info i { width: 25px; color: var(--white); }
.newsletter-input { background: #333 !important; border: none !important; color: white !important; border-radius: 5px; }
.newsletter-btn { background: var(--blue) !important; color: white !important; border: none; }
.social-icons a { font-size: 1.3rem; margin-right: 15px; }
/* Gallery Preview Overlay */
#galleryModal {
z-index: 10001; /* Higher than the project portal */
background: rgba(0, 0, 0, 0.9);
}

#galleryModal .glass-card {
max-width: 1000px;
background: white;
padding: 40px;
border-radius: 25px;
max-height: 90vh;
overflow-y: auto;
}

#galleryImages img {
width: 100%;
height: auto;
display: block;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
margin-bottom: 40px;
border: 1px solid #eee;
}
/* Ensure the track allows for overlays */
.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 15px; /* Matches your portal style */
    text-decoration: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* The Glass Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7); /* Dark tint */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px); /* Glass effect */
}

.gallery-overlay span {
    color: var(--orange); /* Use your radiant orange */
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.gallery-overlay p {
    color: #fff;
    font-size: 0.8rem;
    margin-top: 5px;
    opacity: 0.8;
}

/* Hover Effects */
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}
.bento-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
    padding: 0 8%;
    max-width: 1600px;
    margin: 0 auto;
}

.bento-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    background: #1a1a1c;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Bento Grid Sizing */
.bento-card.large { grid-column: span 2; grid-row: span 2; }
.bento-card.tall { grid-column: span 1; grid-row: span 2; }
.bento-card.wide { grid-column: span 2; grid-row: span 1; }
.bento-card.standard { grid-column: span 1; grid-row: span 1; }

.bento-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    opacity: 0.6;
}

.bento-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 30px;
    z-index: 2;
    width: 100%;
}

.bento-tag {
    background: var(--orange); /* Your accent color */
    color: #fff;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

.bento-card h3 {
    color: #fff;
    font-family: 'Syne';
    font-size: 1.5rem;
    margin: 0;
}

.bento-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Hover Effects */
.bento-card:hover {
    border-color: var(--orange);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.bento-card:hover .bento-bg {
    transform: scale(1.08);
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .bento-portfolio-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
    }
    .bento-card.large, .bento-card.tall, .bento-card.wide {
        grid-column: span 1;
        grid-row: span 1;
    }
}
.bento-card .bento-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: top center; /* Focuses on the top header of the sites */
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0.7;
}

/* Adds a dark gradient overlay so text pops */
.bento-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    z-index: 1;
}

.bento-content {
    z-index: 2; /* Keeps text above the gradient */
}

.bento-card:hover .bento-bg {
    transform: scale(1.05);
    opacity: 1; /* Brightens the image on hover */
}
/* --- PORTAL SPECIFIC STYLES --- */
.popup-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.85); /* Darker overlay */
    backdrop-filter: blur(12px); 
    display: none; 
    justify-content: center; 
    align-items: center; 
    z-index: 9999; 
    opacity: 0; 
    transition: opacity 0.4s ease; 
}

.popup-overlay.active { display: flex; opacity: 1; }

.glass-card { 
    background: #0f0f0f; /* Solid dark background */
    border: 1px solid #222; /* Subtle border for definition */
    border-radius: 35px; 
    width: 95%; 
    max-width: 900px; 
    padding: 40px; 
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8); 
    transform: scale(0.85); 
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); 
    max-height: 90vh; 
    overflow-y: auto; 
    position: relative; 
    color: #ffffff; /* White text for dark mode */
}

.popup-overlay.active .glass-card { transform: scale(1); }

.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn 0.4s ease; }
.close-icon { position: absolute; top: 20px; right: 25px; font-size: 30px; color: #4b5563; cursor: pointer; }

.form-control-portal { 
    background: #1a1a1a !important; /* Darker input background */
    border: 1px solid #333 !important; 
    padding: 12px 18px; 
    border-radius: 12px; 
    margin-bottom: 5px; 
    width: 100%; 
    color: #ffffff !important; 
}

.is-invalid { border-color: #dc3545 !important; background-color: #1a0a0a !important; }
.error-text { color: #dc3545; font-size: 0.75rem; font-weight: 600; margin-bottom: 10px; display: none; }

.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; margin-top: 20px; }
.layout-card { background: #1a1a1a; border: 2px solid #222; border-radius: 15px; overflow: hidden; cursor: pointer; transition: 0.3s; position: relative; }
.layout-card img { width: 100%; height: 100px; object-fit: cover; border-bottom: 1px solid #222; }
.layout-card.selected { border-color: var(--agency-blue); background: #262626; }
.layout-name { padding: 10px; font-size: 0.75rem; font-weight: 700; text-align: center; color: #ffffff; }

.selected-badge { position: absolute; top: 5px; right: 5px; background: var(--agency-blue); color: #000; font-size: 8px; padding: 2px 8px; border-radius: 10px; display: none; }
.layout-card.selected .selected-badge { display: block; }

.btn-step-action { background: var(--agency-blue) !important; color: black !important; padding: 14px; border-radius: 12px; font-weight: 700; border: none; width: 100%; }
.btn-secondary-portal { background: #262626 !important; border: none; color: #ffffff !important; border-radius: 12px; font-weight: 600; padding: 10px 20px; }

.btn-group.custom-toggle { background: #1a1a1a; padding: 4px; border-radius: 12px; display: inline-flex; border: 1px solid #333; }
.btn-group.custom-toggle .btn { border: none !important; border-radius: 10px !important; padding: 5px 15px; font-size: 0.8rem; font-weight: 600; color: #9ca3af; }
.btn-check:checked + .btn { background-color: var(--agency-blue) !important; color: black !important; }

.page-box { background: #1a1a1a; border: 1px solid #333; border-radius: 15px; padding: 15px; margin-bottom: 15px; }
.preview-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.preview-item { position: relative; width: 60px; height: 60px; border-radius: 8px; overflow: hidden; border: 1px solid #333; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.remove-btn { position: absolute; top: 0; right: 0; background: #ef4444; color: white; border: none; font-size: 10px; width: 18px; height: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; border-bottom-left-radius: 8px; }

.font-preview-card { border: 2px solid #333; border-radius: 12px; padding: 15px; cursor: pointer; transition: 0.3s; margin-bottom: 10px; color: #ffffff; background: #1a1a1a; }
.font-preview-card.selected { border-color: var(--agency-blue); background: #262626; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
/* ============================================================
   MOBILE RESPONSIVENESS (Fixes Portal, Nav, and Hero)
   ============================================================ */

@media screen and (max-width: 768px) {
    /* 1. Navigation: Stack or hide links if they overlap */
    nav {
        padding: 15px 5%;
    }
    .nav-links {
        display: none; /* Usually, you'd implement a hamburger menu here */
    }

    /* 2. Hero: Adjust text size so it doesn't overflow */
    .hero-content h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
        line-height: 1.1;
    }
    .hero {
        padding: 0 5%;
        text-align: center;
    }

    /* 3. Project Portal (Glass Card) Fixes */
    .glass-card {
        width: 95% !important;
        padding: 25px 20px !important;
        border-radius: 20px !important;
        max-height: 85vh;
    }

    /* 4. Layout Grid: Switch from multi-column to 1 column */
    .layout-grid {
        grid-template-columns: 1fr !important; /* Stack cards vertically */
        gap: 20px;
    }

    .layout-card img {
        height: 150px; /* Make images slightly larger on mobile for visibility */
    }

    /* 5. Services: Ensure cards stack correctly */
    .services-section {
        padding: 60px 5%;
    }
    
    /* 6. Portfolio Track: Slow down animation for mobile or stack it */
    .gallery-track {
        animation: scroll 20s linear infinite;
    }
    .gallery-item {
        width: 280px; /* Smaller cards for smaller screens */
        height: 200px;
    }

    /* 7. Buttons: Full width for easy thumb-tapping */
    .btn-step-action {
        padding: 16px !important;
        font-size: 1rem;
    }
    
    .btn-group.custom-toggle {
        display: flex;
        width: 100%;
    }
    .btn-group.custom-toggle .btn {
        flex: 1;
    }
}

/* Fix for very small screens (iPhone SE, etc.) */
@media screen and (max-width: 400px) {
    .glass-card {
        padding: 15px !important;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
}