/* ============================================
   MEDIA SYSTEMS LTD - STYLESHEET
   Modern Advertising Agency Website
   ============================================ */

/* CSS Variables */
:root {
    --cursor-size: 20px;
    --color-cyan: #06b6d4;
    --color-blue: #2563eb;
    --color-amber: #f59e0b;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    cursor: none;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (hover: none), (pointer: coarse) {
    body {
        cursor: auto;
    }

    .custom-cursor {
        display: none !important;
    }
}

/* Custom Cursor */
.custom-cursor {
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 2px solid var(--color-cyan);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
}

.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(2.5);
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--color-cyan);
}

.custom-cursor.click {
    transform: translate(-50%, -50%) scale(0.8);
}

/* Grain Texture Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Scroll Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-cyan), var(--color-amber));
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
}

#navbar.scrolled {
    box-shadow: 0 28px 80px -40px rgba(15, 23, 42, 0.25);
}

#mobileMenu.open {
    transform: scaleY(1);
}

#mobileMenu.closed {
    transform: scaleY(0);
}

:focus-visible {
    outline: 2px dashed var(--color-cyan);
    outline-offset: 4px;
}

/* Navigation Link Underline Effect */
.nav-link {
    position: relative;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-cyan);
    transition: width 0.3s var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Text Reveal Animation */
.hero-text-reveal {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    display: block;
    overflow: hidden;
}

.hero-section {
    position: relative;
    background-image: linear-gradient(rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.55)), url("img/clock town.jfif");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.18), transparent 28%), radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.14), transparent 24%);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.36);
    pointer-events: none;
}

.hero-image-card {
    z-index: 12;
}

.hero-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.85) 100%);
    pointer-events: none;
}

@media (max-width: 1024px) {
    .hero-section {
        background-attachment: scroll;
        background-position: top center;
    }
}

/* Glass Morphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s var(--transition-smooth);
}

.dark .glass-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

/* Service Cards */
.service-card {
    transition: all 0.5s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 40%, rgba(6, 182, 212, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(6, 182, 212, 0.15);
}

/* Marquee Animation */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Floating Animation */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Team Cards */
.team-card {
    transition: all 0.5s var(--transition-smooth);
}

.team-card img {
    filter: grayscale(100%);
    transition: all 0.5s ease;
}

.team-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.team-card .group:hover .border-cyan-500 {
    border-color: var(--color-cyan);
}

/* Client Logos */
.client-logo {
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.4s var(--transition-smooth);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.client-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.08) translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Particle Canvas */
#particleCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Form Inputs */
input, textarea, select {
    transition: all 0.3s var(--transition-smooth);
}

input:focus, textarea:focus, select:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.15);
}

/* Button Hover Effects */
a[class*="bg-gradient"], button[class*="bg-gradient"] {
    position: relative;
    overflow: hidden;
}

a[class*="bg-gradient"]::before, button[class*="bg-gradient"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

a[class*="bg-gradient"]:hover::before, button[class*="bg-gradient"]:hover::before {
    left: 100%;
}

/* Dark Mode Transitions */
.dark {
    color-scheme: dark;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-cyan), var(--color-blue));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-blue), var(--color-cyan));
}

/* Selection Color */
::selection {
    background: rgba(6, 182, 212, 0.3);
    color: inherit;
}

/* Mobile Menu Animation */
#mobileMenu {
    transform-origin: top;
    transition: transform 0.3s var(--transition-smooth), opacity 0.3s ease;
}

#mobileMenu.open {
    transform: scaleY(1);
    opacity: 1;
}

#mobileMenu.closed {
    transform: scaleY(0);
    opacity: 0;
}

/* Responsive Typography Scale */
@media (max-width: 640px) {
    .text-8xl {
        font-size: 3.5rem;
    }
    
    .text-7xl {
        font-size: 2.75rem;
    }
    
    .text-6xl {
        font-size: 2.25rem;
    }
    
    .text-5xl {
        font-size: 1.875rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .marquee-content {
        animation: none;
    }
    
    .custom-cursor {
        display: none !important;
    }
    
    body {
        cursor: auto;
    }
}

/* Print Styles */
@media print {
    .custom-cursor,
    .grain-overlay,
    .progress-bar,
    nav,
    #scrollIndicator {
        display: none !important;
    }
    
    body {
        cursor: auto;
        background: white !important;
        color: black !important;
    }
    
    section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}