/* ==================================
   CSS VARIABLES (THEMING)
================================== */
:root {
    /* Light Mode Variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    
    /* Global Variables */
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;
}

[data-theme="dark"] {
    /* Dark Mode Variables */
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* ==================================
   RESET & BASE STYLES
================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: none;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding { padding: 6rem 0; }
.bg-alt { background-color: var(--bg-secondary); }

/* ==================================
   TYPOGRAPHY
================================== */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
.text-gradient {
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.section-header h2 span { color: var(--accent-color); }
.section-header p { color: var(--text-secondary); font-size: 1.1rem; }

/* ==================================
   CUSTOM CURSOR & LOADER
================================== */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}
.cursor-dot {
    width: 8px; height: 8px;
    background-color: var(--accent-color);
}
.cursor-outline {
    width: 40px; height: 40px;
    border: 2px solid var(--accent-color);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

#loader {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}
.spinner {
    width: 50px; height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================================
   BUTTONS
================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    z-index: 1;
}
.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.w-100 { width: 100%; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 2rem; }

/* ==================================
   GLASSMORPHISM UTILITY
================================== */
.glassmorphism {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
}

/* ==================================
   HEADER & NAVIGATION
================================== */
header {
    position: fixed;
    top: 0; width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
}
header.scrolled {
    padding: 1rem 0;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.logo span { color: var(--accent-color); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 1.5rem; }
#theme-toggle {
    background: none; border: none;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}
#theme-toggle:hover { color: var(--accent-color); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span {
    width: 25px; height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ==================================
   HERO SECTION
================================== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}
.animated-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    overflow: hidden;
}
.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}
.shape-1 { width: 400px; height: 400px; background: var(--accent-color); top: -100px; right: -100px; }
.shape-2 { width: 300px; height: 300px; background: #8b5cf6; bottom: -50px; left: -100px; animation-delay: -5s; }
.shape-3 { width: 250px; height: 250px; background: #3b82f6; top: 40%; left: 30%; animation-delay: -10s; opacity: 0.3; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}
.tagline {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.main-headline { font-size: 4.5rem; margin-bottom: 1.5rem; letter-spacing: -1.5px; }
.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto; margin-right: auto;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; }

/* ==================================
   ABOUT SECTION
================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-text h3 { font-size: 2rem; margin-bottom: 1.5rem; }
.about-text p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1.1rem; }
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.stat-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--accent-color); }
.stat-card h4 { display: inline-block; font-size: 2.5rem; color: var(--accent-color); }
.stat-card span { font-size: 2.5rem; color: var(--accent-color); font-weight: 700; }
.stat-card p { color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; margin-top: 0.5rem; }

/* ==================================
   SERVICES SECTION
================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.service-card {
    padding: 2.5rem;
    transition: var(--transition);
}
.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}
.service-icon {
    width: 60px; height: 60px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.service-card:hover .service-icon {
    background: var(--accent-color); color: #fff;
}
.service-card h3 { margin-bottom: 1rem; font-size: 1.4rem; }
.service-card p { color: var(--text-secondary); }

/* ==================================
   PORTFOLIO (VIDEO ROW) SECTION
================================== */
.video-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.video-placeholder {
    aspect-ratio: 9 / 16;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
}
.portfolio-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    pointer-events: none;
}
.video-placeholder:hover {
    border-color: var(--accent-color);
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-5px);
}
.video-placeholder i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    opacity: 0.8;
    transition: var(--transition);
}
.video-placeholder:hover i {
    opacity: 1;
    transform: scale(1.1);
}
.video-placeholder span {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ==================================
   THUMBNAILS PORTFOLIO SECTION
================================== */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 Grid setup */
    gap: 2rem;
}
.thumb-placeholder {
    aspect-ratio: 16 / 9;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}
.thumb-placeholder:hover {
    border-color: var(--accent-color);
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-5px);
}
.thumb-placeholder i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    opacity: 0.8;
    transition: var(--transition);
    z-index: 1;
}
.thumb-placeholder:hover i {
    opacity: 1;
    transform: scale(1.1);
}
.thumb-placeholder span {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 1;
}
.actual-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    border-radius: inherit;
}

/* ==================================
   REVIEWS SECTION
================================== */
.testimonial-slider { overflow: hidden; position: relative; padding-bottom: 3rem; }
.testimonial-track { display: flex; transition: transform 0.5s ease; gap: 2rem; }
.testimonial-card { min-width: calc(100% / 3 - 1.35rem); padding: 2rem; }
.stars { color: #f59e0b; margin-bottom: 1rem; }
.review-text { font-style: italic; color: var(--text-secondary); margin-bottom: 1.5rem; }
.client-info { display: flex; align-items: center; gap: 1rem; }
.client-name { font-size: 1rem; }
.client-niche { font-size: 0.8rem; color: var(--text-secondary); }
.slider-controls {
    display: flex; justify-content: center; gap: 1rem;
    margin-top: 2rem;
}
.slider-controls button {
    width: 40px; height: 40px;
    border-radius: 50%; border: 1px solid var(--border-color);
    background: transparent; color: var(--text-primary);
    cursor: pointer; transition: var(--transition);
}
.slider-controls button:hover { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }

/* ==================================
   CONTACT SECTION
================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}
.info-item { display: flex; align-items: flex-start; gap: 1.5rem; padding: 1.5rem; margin-bottom: 1.5rem; }
.info-item i { font-size: 1.5rem; color: var(--accent-color); margin-top: 0.2rem; }
.info-item h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.info-item p, .info-item a { color: var(--text-secondary); transition: var(--transition); }
.info-item a:hover { color: var(--accent-color); }

.contact-form { padding: 2.5rem; }
.form-row { display: flex; gap: 1.5rem; }
.w-50 { width: 50%; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem; }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==================================
   FOOTER
================================== */
footer { background: var(--bg-secondary); padding-top: 4rem; border-top: 1px solid var(--border-color); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--text-secondary); margin: 1rem 0; font-size: 0.95rem; }
.social-links { display: flex; gap: 1rem; }
.social-links a {
    width: 35px; height: 35px;
    border-radius: 50%; background: var(--border-color);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.social-links a:hover { background: var(--accent-color); color: #fff; transform: translateY(-3px); }
.footer-links h3, .footer-contact h3 { margin-bottom: 1.5rem; font-size: 1.1rem; }
.footer-links ul li { margin-bottom: 0.8rem; }
.footer-links ul li a { color: var(--text-secondary); transition: var(--transition); }
.footer-links ul li a:hover { color: var(--accent-color); padding-left: 5px; }
.footer-contact p { color: var(--text-secondary); margin-bottom: 0.8rem; }
.footer-bottom { text-align: center; padding: 1.5rem 0; border-top: 1px solid var(--border-color); color: var(--text-secondary); font-size: 0.9rem; }

/* ==================================
   BACK TO TOP
================================== */
#back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 45px; height: 45px;
    background: var(--accent-color); color: #fff;
    border: none; border-radius: 50%; cursor: pointer;
    z-index: 999; opacity: 0; visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
#back-to-top.show { opacity: 1; visibility: visible; }
#back-to-top:hover { transform: translateY(-5px); background: var(--accent-hover); }

/* ==================================
   ANIMATIONS
================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ==================================
   MEDIA QUERIES
================================== */
@media (max-width: 1024px) {
    .main-headline { font-size: 3.5rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .video-row { grid-template-columns: repeat(2, 1fr); }
    /* Thumbnail grid already 2 columns, no change needed for tablet */
    .testimonial-card { min-width: calc(100% / 2 - 1rem); }
}

@media (max-width: 768px) {
    .cursor-dot, .cursor-outline { display: none; }
    body { cursor: auto; }
    
    .hamburger { display: flex; }
    .nav-links {
        position: fixed; top: 70px; left: -100%;
        width: 100%; height: calc(100vh - 70px);
        background: var(--bg-primary); flex-direction: column;
        align-items: center; justify-content: center; gap: 2rem;
        transition: 0.4s ease-in-out;
    }
    .nav-links.active { left: 0; }
    
    .main-headline { font-size: 2.5rem; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .services-grid, .video-row, .thumbnail-grid { grid-template-columns: 1fr; }
    .testimonial-card { min-width: 100%; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
    .form-row { flex-direction: column; gap: 0; }
    .w-50 { width: 100%; }
}