/*
Theme Name: NexGen Digital
Theme URI: https://nexgen-digital.com
Author: NexGen Studio
Author URI: https://nexgen-digital.com
Description: A modern, high-contrast digital marketing agency WordPress theme with stunning scroll animations, featuring services showcase, portfolio gallery, and contact forms. Built with GSAP animations and responsive design.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexgen-digital
Tags: agency, marketing, portfolio, business, responsive, animations, modern, dark-mode, scroll-effects
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
*/

/* ============================================
   TABLE OF CONTENTS
   ============================================
   1. CSS Variables & Base
   2. Typography
   3. Layout & Grid
   4. Components
   5. Sections
   6. Forms
   7. Utilities
   8. Responsive
   ============================================ */

/* ============================================
   1. CSS VARIABLES & BASE
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    /* Colors */
    --bg-primary: #F4F2EE;
    --bg-dark: #0B0B0D;
    --accent: #2F6BFF;
    --accent-hover: #1a5aee;
    --text-primary: #111114;
    --text-secondary: #6B6B6E;
    --text-light: #F4F2EE;
    --text-muted: rgba(244, 242, 238, 0.7);
    --border-light: rgba(17, 17, 20, 0.18);
    --border-dark: rgba(255, 255, 255, 0.14);
    
    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    
    /* Spacing */
    --section-padding: 8vh;
    --container-padding: 6vw;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   2. TYPOGRAPHY
   ============================================ */
.headline-xl {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -0.035em;
    text-transform: uppercase;
    font-size: clamp(40px, 7vw, 120px);
}

.headline-lg {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.03em;
    font-size: clamp(32px, 5vw, 72px);
}

.micro-label {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ============================================
   3. LAYOUT & GRID
   ============================================ */
.section-pinned {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.06;
    mix-blend-mode: multiply;
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ============================================
   4. COMPONENTS
   ============================================ */

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--accent);
    color: #fff;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: transparent;
    color: var(--text-primary);
    padding: 14px 28px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background-color: rgba(17, 17, 20, 0.05);
}

/* Link Arrow */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    transition: gap var(--transition-normal);
}

.link-arrow:hover {
    gap: 12px;
}

.link-arrow svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   5. NAVIGATION
   ============================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color var(--transition-normal), backdrop-filter var(--transition-normal);
}

.site-nav.scrolled {
    background-color: rgba(244, 242, 238, 0.9);
    backdrop-filter: blur(10px);
}

.site-nav.dark.scrolled {
    background-color: rgba(11, 11, 13, 0.9);
}

.site-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-decoration: none;
}

.site-nav.dark .site-logo {
    color: var(--text-light);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.site-nav.dark .nav-menu a {
    color: var(--text-light);
}

.nav-menu a:hover {
    color: var(--accent);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background-color: var(--bg-primary);
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

/* ============================================
   6. SECTIONS
   ============================================ */

/* Hero Section */
.hero-section {
    background-color: var(--bg-primary);
}

.hero-left-panel {
    position: absolute;
    left: 0;
    top: 0;
    width: 34vw;
    height: 100%;
    background-color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    border-right: 1px solid rgba(244, 242, 238, 0.18);
}

.hero-left-panel .micro-label {
    color: rgba(244, 242, 238, 0.7);
}

.hero-image {
    width: 100%;
    height: 34vh;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1) brightness(0.95);
}

.hero-right-canvas {
    position: absolute;
    left: 34vw;
    top: 0;
    width: 66vw;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 48px;
}

.hero-headline-group {
    margin-bottom: 48px;
}

.hero-headline-word {
    display: block;
}

.hero-bottom {
    max-width: 480px;
}

.hero-bottom p {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Section 2: Campaigns */
.campaigns-section {
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
}

.s2-watermark {
    position: absolute;
    left: -6vw;
    top: 18vh;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20vw;
    color: rgba(17, 17, 20, 0.04);
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}

.campaigns-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    padding: 0 var(--container-padding);
    width: 100%;
}

.campaigns-body {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Section 3: Services */
.services-section {
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
}

.grid-line {
    position: absolute;
    background-color: rgba(17, 17, 20, 0.08);
}

.grid-line.vertical {
    width: 1px;
    height: 100%;
    top: 0;
}

.grid-line.horizontal {
    height: 1px;
    width: 100%;
    left: 0;
}

.services-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    padding: 0 var(--container-padding);
    width: 100%;
}

.device-mockup {
    perspective: 1000px;
}

.device-screen {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
    transform: rotateY(8deg) rotateX(2deg);
}

.device-screen img {
    width: 100%;
    height: auto;
    display: block;
}

.services-list {
    list-style: none;
}

.services-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-weight: 500;
}

.service-bullet {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    flex-shrink: 0;
}

/* Section 4: Photo Wall */
.photo-wall-section {
    background-color: var(--bg-primary);
}

.photo-tile {
    position: absolute;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.photo-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1) brightness(0.95);
}

.photo-tile-top-left { left: 6vw; top: 10vh; width: 22vw; height: 30vh; }
.photo-tile-top-center { left: 32vw; top: 10vh; width: 20vw; height: 30vh; }
.photo-tile-top-right { left: 70vw; top: 10vh; width: 24vw; height: 30vh; }
.photo-tile-bottom-left { left: 6vw; top: 58vh; width: 22vw; height: 32vh; }
.photo-tile-bottom-center { left: 32vw; top: 58vh; width: 34vw; height: 32vh; }
.photo-tile-bottom-right { left: 70vw; top: 58vh; width: 24vw; height: 32vh; }

.photo-wall-headline {
    position: absolute;
    left: 6vw;
    top: 46vh;
    z-index: 10;
}

/* Section 5: Dark Contact */
.dark-contact-section {
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
}

.transition-mask {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50vw;
    height: 50vw;
    background-color: var(--bg-dark);
    border-radius: 50%;
    pointer-events: none;
}

.dark-contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    padding: 0 var(--container-padding);
    width: 100%;
}

.collage-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.collage-item {
    height: 20vh;
    overflow: hidden;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1) brightness(0.95);
}

.dark-contact-text h2 {
    color: var(--text-light);
    margin-bottom: 24px;
}

.dark-contact-text p {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 16px;
}

.dark-contact-text a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 24px;
}

.dark-contact-text a:hover {
    text-decoration: underline;
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-dark);
    padding: 80px 0 120px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.contact-info h3 {
    color: var(--text-light);
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.contact-details {
    list-style: none;
    margin-bottom: 32px;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.contact-details a,
.contact-details span {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-details a:hover {
    color: var(--accent);
}

.contact-details svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.social-links svg {
    width: 16px;
    height: 16px;
}

/* Contact Form */
.contact-form-wrapper {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-light);
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.site-footer {
    background-color: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 48px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .site-logo {
    color: var(--text-light);
    margin-bottom: 8px;
    display: inline-block;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-light);
}

.footer-social {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.5);
    transition: color var(--transition-fast);
}

.footer-social a:hover {
    color: var(--text-light);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

/* ============================================
   7. UTILITIES
   ============================================ */
.text-light { color: var(--text-light); }
.text-muted { color: var(--text-muted); }
.bg-dark { background-color: var(--bg-dark); }
.bg-primary { background-color: var(--bg-primary); }

/* ============================================
   8. RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --container-padding: 24px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-left-panel {
        width: 100%;
        height: 40vh;
        position: relative;
        flex-direction: row;
        align-items: flex-start;
    }
    
    .hero-image {
        display: none;
    }
    
    .hero-right-canvas {
        position: relative;
        left: 0;
        width: 100%;
        height: auto;
        padding: 48px var(--container-padding);
    }
    
    .hero-section {
        height: auto;
        min-height: 100vh;
    }
    
    .campaigns-content,
    .services-content,
    .dark-contact-content,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .photo-tile {
        position: relative;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: 200px !important;
        margin-bottom: 16px;
    }
    
    .photo-wall-headline {
        position: relative;
        left: auto;
        top: auto;
        padding: 48px var(--container-padding);
    }
    
    .photo-wall-section {
        height: auto;
        padding: 48px 0;
    }
    
    .photo-wall-section .section-pinned {
        position: relative;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .headline-xl {
        font-size: clamp(32px, 12vw, 60px);
    }
    
    .headline-lg {
        font-size: clamp(28px, 8vw, 48px);
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .contact-form-wrapper {
        padding: 24px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
