@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;700;800;900&display=swap');

:root {
    /* ADS Media Brand Colors */
    --brand-red: #DA251D;
    --brand-blue: #36519B;
    --brand-green: #6EB446;
    --dark-bg: #0b0f19;
    --card-bg: #1e293b;
    --text-light: #ffffff;
    --text-muted: #94a3b8;
}

html { scroll-behavior: smooth; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Montserrat', sans-serif; background-color: var(--dark-bg); color: var(--text-light); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

/* =========================================
   1. NAVIGATION
   ========================================= */
nav { display: flex; justify-content: space-between; padding: 15px 5%; background: rgba(11, 15, 25, 0.95); position: fixed; width: 100%; z-index: 1000; top: 0; align-items: center; border-bottom: 1px solid rgba(51, 65, 85, 0.5); backdrop-filter: blur(10px); }
.nav-links { display: flex; gap: 25px; font-weight: 500; align-items: center; }
.nav-links a:not(.btn):hover { color: var(--brand-blue); transition: color 0.3s ease; }
.btn-sm { padding: 8px 15px; font-size: 0.8rem; }

/* Buttons */
.btn { padding: 15px 40px; background: var(--brand-red); color: #fff; font-weight: 700; border-radius: 4px; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease; display: inline-block; cursor: pointer; border: none; }
.btn:hover { background: #fff; color: var(--brand-red); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(218, 37, 29, 0.25); }

/* =========================================
   2. HERO SECTION & BIG BANG ANIMATION
   ========================================= */
.hero {
    position: relative;
    overflow-x: hidden; 
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: center;
    padding: 160px 5% 50px; 
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 5; 
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    pointer-events: auto;
    width: 100%;
    max-width: 900px;
}

/* Typography Polish */
.kicker {
    display: inline-block;
    color: var(--brand-red);
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 5px; 
    text-shadow: none;
}

.hero h1 { 
    font-size: clamp(2.5rem, 8vw, 5.5rem); 
    font-weight: 900; 
    margin-bottom: 15px; 
    line-height: 1.15; 
    letter-spacing: -1px;
    color: var(--text-light); 
}

.hero p { 
    max-width: 800px;
    margin: 80px auto 40px; 
    font-size: clamp(0.95rem, 2vw, 1.2rem); 
    color: #cbd5e1; 
    font-weight: 500; 
    padding: 0 10px;
}

.hero-animation {
    position: absolute;
    top: 40%; 
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; 
}

/* Atom Nucleus */
.atom { position: absolute; width: 120px; height: 120px; opacity: 0.6; }
.ring { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; transform-style: preserve-3d; }

/* Colored Orbits with Neon Streaks */
.ring-1 { transform: rotateX(75deg) rotateY(0deg); border: 2px solid rgba(218, 37, 29, 0.6); box-shadow: 0 0 15px rgba(218, 37, 29, 0.3), inset 0 0 15px rgba(218, 37, 29, 0.3); }
.ring-2 { transform: rotateX(75deg) rotateY(60deg); border: 2px solid rgba(54, 81, 155, 0.6); box-shadow: 0 0 15px rgba(54, 81, 155, 0.3), inset 0 0 15px rgba(54, 81, 155, 0.3); }
.ring-3 { transform: rotateX(75deg) rotateY(120deg); border: 2px solid rgba(110, 180, 70, 0.6); box-shadow: 0 0 15px rgba(110, 180, 70, 0.3), inset 0 0 15px rgba(110, 180, 70, 0.3); }

/* Electrons */
.electron-orbit { position: absolute; width: 100%; height: 100%; animation: spin-electron linear infinite; }
.electron-dot { position: absolute; top: -5px; left: 50%; margin-left: -5px; width: 10px; height: 10px; border-radius: 50%; }
.e-red { animation-duration: 3s; }
.e-red .electron-dot { background: var(--brand-red); box-shadow: 0 0 15px var(--brand-red); }
.e-blue { animation-duration: 4.5s; animation-direction: reverse; }
.e-blue .electron-dot { background: var(--brand-blue); box-shadow: 0 0 15px var(--brand-blue); }
.e-green { animation-duration: 6s; }
.e-green .electron-dot { background: var(--brand-green); box-shadow: 0 0 15px var(--brand-green); }

@keyframes spin-electron { 100% { transform: rotateZ(360deg); } }

/* Orbiting Services */
.orbit-container { position: absolute; width: 100%; height: 100%; --orbit-radius: 130px; }
.service-item { position: absolute; top: 50%; left: 50%; font-weight: 700; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; animation: orbit-glow 40s linear infinite; animation-delay: calc(-4s * var(--i)); }

@keyframes orbit-glow {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateY(var(--orbit-radius)) rotate(0deg) scale(1.3); color: #ffffff; text-shadow: 0 0 5px #fff, 0 0 10px var(--brand-red), 0 0 20px var(--brand-blue); opacity: 1; z-index: 10; }
    25% { transform: translate(-50%, -50%) rotate(90deg) translateY(var(--orbit-radius)) rotate(-90deg) scale(0.85); color: rgba(255, 255, 255, 0.4); text-shadow: none; opacity: 0.4; z-index: 5; }
    50% { transform: translate(-50%, -50%) rotate(180deg) translateY(var(--orbit-radius)) rotate(-180deg) scale(0.7); color: rgba(255, 255, 255, 0.15); text-shadow: none; opacity: 0.15; z-index: 1; }
    75% { transform: translate(-50%, -50%) rotate(270deg) translateY(var(--orbit-radius)) rotate(-270deg) scale(0.85); color: rgba(255, 255, 255, 0.4); text-shadow: none; opacity: 0.4; z-index: 5; }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateY(var(--orbit-radius)) rotate(-360deg) scale(1.3); color: #ffffff; text-shadow: 0 0 5px #fff, 0 0 10px var(--brand-red), 0 0 20px var(--brand-blue); opacity: 1; z-index: 10; }
}

/* =========================================
   3. TRUST BAR TICKER
   ========================================= */
.trust-bar { background: var(--card-bg); padding: 25px 0; overflow: hidden; white-space: nowrap; border-top: 1px solid #334155; border-bottom: 1px solid #334155; }
.trust-track { display: inline-block; animation: scroll 30s linear infinite; }
.trust-track span { font-size: 1.2rem; font-weight: 700; color: #64748b; margin: 0 50px; text-transform: uppercase; letter-spacing: 2px; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* =========================================
   4. PORTFOLIO & FILTERS
   ========================================= */
.portfolio { padding: 100px 5%; text-align: center; }

/* The New Grand Portfolio Header */
.portfolio-header { max-width: 900px; margin: 0 auto 50px; text-align: center; }
.portfolio-header h2 { font-size: 2.5rem; margin-bottom: 20px; font-weight: 900; }
.portfolio-header p { font-size: 1.1rem; color: #cbd5e1; line-height: 1.8; }

.filters { margin-bottom: 50px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.filter-btn { padding: 8px 20px; background: transparent; color: #fff; border: 1px solid #334155; border-radius: 50px; cursor: pointer; font-family: inherit; font-weight: 500; transition: all 0.3s ease; font-size: 0.9rem; }
.filter-btn:hover, .filter-btn.active { background: var(--brand-blue); border-color: var(--brand-blue); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }

/* The Upgraded Logo-Optimized Cards */
.card { 
    position: relative; 
    height: 320px; 
    border-radius: 12px; 
    overflow: hidden; 
    cursor: pointer; 
    background: #ffffff; /* Clean white card base creates natural contrast for logos */
    border: 1px solid #334155; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.card.hidden { display: none; }

.card-bg { 
    position: absolute;
    /* This naturally pads the image/logo 40px away from the edge of the card */
    top: 40px; left: 40px; right: 40px; bottom: 40px; 
    background-size: contain; /* Prevents awkward cropping */
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    filter: grayscale(100%) opacity(0.8); /* Gives all clients a uniform corporate look initially */
    z-index: 1;
}

/* Hides the massive blocky H3 inside the card so the logo shines alone */
.card h3 { display: none; }

.card:hover .card-bg { 
    filter: grayscale(0%) opacity(1); /* Explodes into brand color on hover */
    transform: scale(1.08); 
}

/* Glassmorphic Dark Slide-up Overlay */
.card-content { 
    position: absolute; 
    bottom: 0; left: 0; width: 100%; 
    padding: 40px 30px 30px; 
    background: linear-gradient(to top, rgba(11,15,25,0.95) 0%, rgba(11,15,25,0.8) 60%, transparent 100%); 
    transition: all 0.4s ease; 
    text-align: left; 
    opacity: 0; /* Hidden initially */
    z-index: 5;
    transform: translateY(20px);
}
.card:hover .card-content { 
    opacity: 1; 
    transform: translateY(0); /* Slides up perfectly over the white card */
}

.client-name { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 5px; }
.client-service { font-size: 0.85rem; color: var(--brand-red); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* =========================================
   5. STORY SECTION
   ========================================= */
.story { padding: 100px 5%; background: #0f172a; display: flex; gap: 50px; align-items: center; flex-wrap: wrap; justify-content: center; border-top: 1px solid #1e293b; }
.story-content { flex: 1 1 400px; max-width: 600px; }
.story-content h2 { font-size: 2.5rem; margin-bottom: 20px; font-weight: 900; }
.story-content p { color: var(--text-muted); margin-bottom: 15px; font-size: 1.1rem; }
.stats { flex: 1 1 400px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.stat-box { background: var(--card-bg); padding: 30px 20px; border-radius: 8px; text-align: center; border: 1px solid #334155; transition: transform 0.3s ease; }
.stat-box:hover { border-color: var(--brand-blue); transform: translateY(-5px); }
.stat-box h4 { color: var(--brand-blue); font-size: 2.5rem; font-weight: 900; margin-bottom: 5px; line-height: 1; }
.stat-box p { color: #cbd5e1; font-weight: 500; font-size: 0.9rem; }

/* =========================================
   6. CONTACT SECTION
   ========================================= */
.contact { padding: 100px 5%; background: var(--card-bg); text-align: center; border-top: 1px solid #334155; }
.contact h2 { font-size: 2.5rem; margin-bottom: 50px; font-weight: 900; }
.contact-container { display: flex; gap: 50px; max-width: 1000px; margin: 0 auto; text-align: left; flex-wrap: wrap; }
.contact-info { flex: 1 1 300px; }
.contact-info h3 { font-size: 1.5rem; color: var(--brand-red); margin-bottom: 20px; font-weight: 800; }
.contact-info p { margin-bottom: 15px; color: #cbd5e1; font-size: 1.1rem; }
.contact-form { flex: 2 1 400px; display: flex; flex-direction: column; gap: 20px; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 15px; border-radius: 4px; border: 1px solid #334155; background: #0f172a; color: #fff; font-family: inherit; font-size: 1rem; transition: border-color 0.3s ease; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 2px rgba(54, 81, 155, 0.2); }

/* =========================================
   7. FOOTER
   ========================================= */
footer { background: #05080f; padding: 60px 5% 30px; text-align: center; border-top: 1px solid #1e293b; }
.footer-logo { margin-bottom: 20px; }
/* Forced CSS class handles scaling perfectly across all screen sizes */
.agency-logo-svg { width: 140px; height: auto; }
.footer-content .copyright { color: var(--text-muted); font-size: 0.9rem; font-weight: 400; margin-bottom: 5px; }
.footer-content .web-address { color: #64748b; font-size: 0.9rem; font-weight: 400; }

/* =========================================
   8. VIDEO MODAL (Fixed for Pop-up)
   ========================================= */
.video-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(11, 15, 25, 0.95); z-index: 9999; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.video-modal.active { display: flex; }
.video-container { position: relative; width: 90%; max-width: 1000px; aspect-ratio: 16/9; background: #000; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,0.8); }
.video-container iframe { width: 100%; height: 100%; border: none; border-radius: 10px; }
.close-modal { position: absolute; top: -50px; right: 0; color: #ffffff; font-size: 3rem; cursor: pointer; transition: 0.3s ease; line-height: 1; }
.close-modal:hover { color: var(--brand-red); transform: scale(1.1); }

/* =========================================
   9. COOKIE CONSENT BANNER
   ========================================= */
.cookie-consent { position: fixed; bottom: -150px; left: 0; width: 100%; background: rgba(11, 15, 25, 0.95); border-top: 1px solid var(--brand-blue); z-index: 9990; padding: 20px 5%; transition: bottom 0.5s ease-in-out; backdrop-filter: blur(10px); display: flex; justify-content: center; }
.cookie-consent.show { bottom: 0; }
.cookie-content { max-width: 1000px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cookie-content p { font-size: 0.9rem; color: #cbd5e1; margin: 0; flex: 1 1 300px; }
.cookie-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-buttons .btn { padding: 10px 25px; font-size: 0.9rem; margin: 0; }

/* =========================================
   10. MEDIA QUERIES (Responsiveness)
   ========================================= */

/* Mobile Breakpoint */
@media (max-width: 768px) {
    /* Compress the mobile navigation so it isn't so tall */
    nav { flex-direction: column; padding: 10px 5%; gap: 10px; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 12px; font-size: 0.85rem; }
    .btn-sm { padding: 6px 12px; font-size: 0.75rem; }
    
    /* Push the hero content safely below the stacked mobile menu */
    .hero { 
        padding-top: 240px; /* Massive top padding to clear the menu */
        padding-bottom: 30px;
    }
    
    /* Re-center the atom animation on mobile so it stays behind the text */
    .hero-animation { top: 48%; }
    
    /* Shrink the text slightly so it doesn't overlap the orbit */
    .hero h1 { font-size: 2.3rem; margin-bottom: 10px; }
    .kicker { font-size: 0.85rem; }
    .hero p { margin: 40px auto 20px; font-size: 0.95rem; }
    
    .contact-container { flex-direction: column; }
    .story { padding: 60px 5%; }
}

/* Tablet & Desktop Breakpoint */
@media (min-width: 768px) {
    .hero {
        padding-top: 150px; 
        justify-content: center; 
    }
    
    .hero-animation { top: 45%; }
    .hero p { margin: 30px auto 40px; }
    
    /* Expand the Atom and Orbit */
    .atom { width: 250px; height: 250px; opacity: 0.8; }
    .electron-dot { width: 14px; height: 14px; top: -7px; margin-left: -7px; }
    .orbit-container { --orbit-radius: 280px; } 
    .service-item { font-size: 0.9rem; letter-spacing: 2px; }
    
    /* Make the desktop glow massive */
    @keyframes orbit-glow {
        0% { transform: translate(-50%, -50%) rotate(0deg) translateY(var(--orbit-radius)) rotate(0deg) scale(1.5); color: #ffffff; text-shadow: 0 0 10px #fff, 0 0 20px var(--brand-red), 0 0 40px var(--brand-blue); opacity: 1; z-index: 10; }
        25% { transform: translate(-50%, -50%) rotate(90deg) translateY(var(--orbit-radius)) rotate(-90deg) scale(0.85); color: rgba(255, 255, 255, 0.4); text-shadow: none; opacity: 0.5; z-index: 5; }
        50% { transform: translate(-50%, -50%) rotate(180deg) translateY(var(--orbit-radius)) rotate(-180deg) scale(0.7); color: rgba(255, 255, 255, 0.2); text-shadow: none; opacity: 0.2; z-index: 1; }
        75% { transform: translate(-50%, -50%) rotate(270deg) translateY(var(--orbit-radius)) rotate(-270deg) scale(0.85); color: rgba(255, 255, 255, 0.4); text-shadow: none; opacity: 0.5; z-index: 5; }
        100% { transform: translate(-50%, -50%) rotate(360deg) translateY(var(--orbit-radius)) rotate(-360deg) scale(1.5); color: #ffffff; text-shadow: 0 0 10px #fff, 0 0 20px var(--brand-red), 0 0 40px var(--brand-blue); opacity: 1; z-index: 10; }
    }
}

/* Large Desktop Breakpoint */
@media (min-width: 1200px) {
    .orbit-container { --orbit-radius: 350px; }
    .service-item { font-size: 1rem; }
}

/* =========================================
   11. SUCCESS TOAST NOTIFICATION
   ========================================= */
.success-toast {
    position: fixed;
    bottom: -150px; /* Hidden off-screen by default */
    right: 20px;
    background: rgba(110, 180, 70, 0.95); /* Brand Green */
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 10000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: bottom 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.success-toast.show {
    bottom: 30px; /* Slides up into view */
}

.toast-content { display: flex; align-items: center; gap: 15px; }

.toast-icon {
    font-size: 1.2rem;
    font-weight: 900;
    background: #ffffff;
    color: var(--brand-green);
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}

.toast-text h4 { margin: 0 0 3px; font-size: 1rem; font-weight: 800; }
.toast-text p { margin: 0; font-size: 0.85rem; opacity: 0.95; }

.close-toast { font-size: 1.5rem; cursor: pointer; transition: color 0.3s ease; }
.close-toast:hover { color: #0b0f19; }

/* Mobile positioning for Toast */
@media (max-width: 768px) {
    .success-toast { right: 5%; left: 5%; width: 90%; justify-content: space-between; }
}