/* --- DESIGN SYSTEM & SETUP --- */
:root {
    /* New Vibrant Color Palette */
    --bg-dark: #10102a;
    --accent-pink: #ff007f;
    --accent-cyan: #00ffff;
    --accent-coral: #ff7f50;
    --text-light: #e0e0e0;
    --text-muted: #88889a;
    --glass-bg: rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --spacing-unit: 8px;

    /* Transitions & Animations */
    --transition-fast: 300ms ease;
    --transition-med: 500ms ease;
}

/* --- RESET & BASE STYLES --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 100%; }
body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1.125rem; /* 18px */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-cyan); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--text-light); }

/* Accessibility */
.skip-link { position: absolute; top: -100px; left: 0; background: var(--accent-coral); color: var(--bg-dark); padding: 1rem; z-index: 10000; transition: top 0.3s; }
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--accent-coral); outline-offset: 4px; border-radius: 4px; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* --- LAYOUT & TYPOGRAPHY --- */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 calc(var(--spacing-unit) * 4); }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); text-shadow: 0 0 20px rgba(255, 0, 127, 0.5); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--spacing-unit); }
p.muted { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: calc(var(--spacing-unit) * 8); }

/* --- BUTTONS --- */
.btn { display: inline-block; padding: 14px 32px; border-radius: 50px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border: 2px solid transparent; cursor: pointer; transition: all var(--transition-fast); background-size: 200% auto; }
.btn-primary { background-image: linear-gradient(to right, var(--accent-pink) 0%, var(--accent-coral) 50%, var(--accent-pink) 100%); color: var(--text-light); }
.btn-primary:hover { background-position: right center; transform: translateY(-4px); box-shadow: 0 10px 20px rgba(255, 0, 127, 0.3); }
.btn-secondary { border-color: var(--text-muted); color: var(--text-light); }
.btn-secondary:hover { background-color: var(--glass-bg); border-color: var(--accent-cyan); }

/* --- PRELOADER --- */
#preloader { position: fixed; inset: 0; background: var(--bg-dark); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.5s ease-out; }
#preloader.hidden { opacity: 0; pointer-events: none; }
.preloader-orb { width: 60px; height: 60px; border-radius: 50%; background: var(--accent-pink); box-shadow: 0 0 30px var(--accent-pink); animation: pulse 1.5s infinite ease-in-out; }
#preloader p { margin-top: 24px; opacity: 0; animation: fadeIn 0.5s 350ms forwards; }
@keyframes pulse { 50% { transform: scale(0.8); box-shadow: 0 0 50px var(--accent-cyan); background: var(--accent-cyan); } }
@keyframes fadeIn { to { opacity: 1; } }

/* --- HEADER --- */
#main-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; transition: all var(--transition-med); padding: 24px 0; }
#main-header.scrolled { background-color: rgba(16, 16, 42, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 16px 0; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
#main-header nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-heading); font-weight: 900; font-size: 1.75rem; color: var(--text-light); }
.nav-links { list-style: none; display: flex; gap: 40px; }
.nav-links a { color: var(--text-muted); font-weight: 600; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background: var(--accent-cyan); transition: width var(--transition-fast); }
.nav-links a:hover { color: var(--text-light); }
.nav-links a:hover::after { width: 100%; }
#hamburger-btn { display: none; background: none; border: none; z-index: 1001; }
#hamburger-btn span { display: block; width: 25px; height: 2px; background: var(--text-light); margin: 5px 0; transition: all 0.3s ease; }

/* --- HERO SECTION --- */
.hero-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; padding: 100px 0; }
.hero-content { position: relative; z-index: 2; }
.hero-content h1 { max-width: 900px; margin: 0 auto 24px; }
.hero-content p { max-width: 600px; margin: 0 auto 40px; font-size: 1.25rem; color: var(--text-muted); }
.hero-cta { display: flex; gap: 16px; justify-content: center; }
.hero-visual { position: absolute; inset: 0; z-index: 1; }
#hero-canvas { display: block; width: 100%; height: 100%; }

/* --- SERVICES SECTION --- */
section { padding: 120px 0; }
.services-section { 
    background:
        linear-gradient(180deg, rgba(16,16,42,0) 0%, #10102a 100%),
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: auto, 1.5rem 1.5rem;
}
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.service-card { position: relative; background: var(--glass-bg); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 40px; transition: transform var(--transition-med), box-shadow var(--transition-med); }
.service-card::before { content: ''; position: absolute; inset: 0; border-radius: 16px; padding: 1px; opacity: 0; transition: opacity var(--transition-med); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.service-card:hover { transform: translateY(-10px); border-color: transparent; box-shadow: 0 25px 50px rgba(0,0,0,0.4); }
.service-card:hover::before { opacity: 1; }
.services-grid .service-card:nth-of-type(1)::before { background: linear-gradient(120deg, var(--accent-cyan), #3b8dff); }
.services-grid .service-card:nth-of-type(2)::before { background: linear-gradient(120deg, var(--accent-pink), #e056f7); }
.services-grid .service-card:nth-of-type(3)::before { background: linear-gradient(120deg, var(--accent-coral), #ffb75e); }
.service-icon { margin-bottom: 24px; transition: transform var(--transition-fast); }
.service-icon svg { width: 40px; height: 40px; }
.service-card:hover .service-icon { transform: scale(1.1); }
.services-grid .service-card:nth-of-type(1) .service-icon, .services-grid .service-card:nth-of-type(1) h3 { color: var(--accent-cyan); }
.services-grid .service-card:nth-of-type(2) .service-icon, .services-grid .service-card:nth-of-type(2) h3 { color: var(--accent-pink); }
.services-grid .service-card:nth-of-type(3) .service-icon, .services-grid .service-card:nth-of-type(3) h3 { color: var(--accent-coral); }
.service-card h3 { margin-bottom: 16px; font-size: 1.75rem; }

/* --- WORK SECTION --- */
.case-studies-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.case-study-card { background: var(--glass-bg); border-radius: 12px; overflow: hidden; transition: transform var(--transition-fast); }
.case-study-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.case-study-image-wrapper { overflow: hidden; border-radius: 12px 12px 0 0; }
.case-study-card img { transition: transform 0.4s ease; }
.case-study-card:hover img { transform: scale(1.05); }
.case-study-card h4 { margin: 20px 24px 8px; font-size: 1.25rem; }
.case-study-card p { margin: 0 24px 24px; color: var(--text-muted); }

/* --- CONTACT SECTION --- */
.contact-section { background: linear-gradient(0deg, rgba(16,16,42,0) 0%, #10102a 100%); }
#contact-form { max-width: 600px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; }
.form-group { position: relative; width: 100%; }
.form-group input, .form-group textarea { width: 100%; background: transparent; border: 1px solid var(--text-muted); border-radius: 8px; padding: 16px; color: var(--text-light); font-size: 1rem; font-family: var(--font-body); }
.form-group textarea { min-height: 150px; resize: vertical; }
.form-group label { position: absolute; left: 16px; top: 16px; color: var(--text-muted); pointer-events: none; transition: all var(--transition-fast); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-cyan); }
.form-group input:focus + label, .form-group input:valid + label,
.form-group textarea:focus + label, .form-group textarea:valid + label { top: -10px; left: 12px; font-size: 0.8rem; background: var(--bg-dark); padding: 0 4px; color: var(--accent-cyan); }
#contact-form button { margin: 16px auto 0; }

/* --- FOOTER --- */
#main-footer { padding: 40px 0; background-color: var(--bg-dark); border-top: 1px solid rgba(255,255,255,0.1); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-contact { display: flex; gap: 16px; flex-wrap: wrap; }

/* --- FADE-IN ANIMATION --- */
.hidden { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.show { opacity: 1; transform: translateY(0); }

/* --- MODAL (POP-UP) STYLES --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); z-index: 1001; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity var(--transition-fast); }
.modal-overlay:not([hidden]) { opacity: 1; pointer-events: all; }
.modal-content { background: var(--bg-dark); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 40px; text-align: center; max-width: 400px; width: 90%; box-shadow: 0 10px 30px rgba(0,0,0,0.5); transform: scale(0.95); transition: transform var(--transition-fast); }
.modal-overlay:not([hidden]) .modal-content { transform: scale(1); }
#modal-message { margin-bottom: 24px; font-size: 1.1rem; }
#modal-close-btn { margin-top: 16px; }


/* --- RESPONSIVE STYLES --- */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: 1fr; }
    .case-studies-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    body { font-size: 1rem; }
    .nav-links { position: fixed; inset: 0; background: var(--bg-dark); flex-direction: column; justify-content: center; align-items: center; transform: translateX(100%); transition: transform 0.4s ease-in-out; }
    .nav-links.active { transform: translateX(0); }
    .nav-contact-btn { display: none; }
    #hamburger-btn { display: block; }
    #hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    #hamburger-btn.active span:nth-child(2) { opacity: 0; }
    #hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .case-studies-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; text-align: center; }
}

