/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
    /* Brand Colors */
    --primary: #0f172a;       /* Deep Navy */
    --accent: #2563eb;        /* Royal Blue */
    --accent-light: #eff6ff;  /* Light Blue Background */
    
    /* Backgrounds & Borders */
    --bg-body: #ffffff;
    --bg-light: #f8fafc;      /* Subtle Gray */
    --border: #e2e8f0;
    
    /* Text */
    --text-main: #334155;
    --text-muted: #64748b;
    
    /* Layout */
    --radius: 8px;
    --container: 1200px;
    --header-height: 80px;    /* Defined variable for consistency */
}

html { scroll-behavior: smooth; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--header-height); /* Prevent content from hiding behind fixed header */
}

/* Prevent scrolling when mobile menu is open (Used by JS) */
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; height: auto; }
a { text-decoration: none; color: inherit; transition: 0.2s ease; }
ul { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.bg-light { background: var(--bg-light); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.center { text-align: center; }

/* Typography */
h1, h2, h3, h4 { color: var(--primary); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }
p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1rem; }
.muted { color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }

.btn-outline { border: 1px solid var(--border); color: var(--text-main); background: white; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; } /* Small button for header */

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.header-wrap {
    display: flex; justify-content: space-between; align-items: center;
    height: 100%;
}

.brand-logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -0.03em; }

.desktop-nav { display: flex; gap: 2.5rem; }
.desktop-nav a { font-size: 0.95rem; font-weight: 600; color: var(--text-main); transition: color 0.2s; }
.desktop-nav a:hover { color: var(--accent); }

.header-right { display: flex; align-items: center; gap: 1rem; }

/* Mobile Menu */
.mobile-toggle {
    display: none; flex-direction: column; justify-content: space-between;
    width: 30px; height: 20px; background: none; border: none; cursor: pointer; z-index: 1001;
}
.mobile-toggle .bar { width: 100%; height: 2px; background-color: var(--primary); transition: 0.3s; }

.mobile-menu {
    position: fixed; top: var(--header-height); left: 0; width: 100%;
    background: white; padding: 2rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.mobile-menu.active { transform: translateY(0); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 1.5rem; text-align: center; }
.mobile-menu a { font-size: 1.1rem; font-weight: 600; color: var(--primary); }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero { padding: 100px 0 100px; max-width: 800px; margin: 0 auto; text-align: center; }

/* =========================================
   4. SERVICES
   ========================================= */
.services-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 1.5rem; margin-top: 3rem;
}
.service-card {
    background: white; padding: 2rem; border: 1px solid var(--border);
    border-radius: var(--radius); transition: all 0.3s ease;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.service-icon {
    width: 48px; height: 48px; background: var(--accent-light); color: var(--accent);
    border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
}

/* =========================================
   5. PORTFOLIO
   ========================================= */
.portfolio-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3rem; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.project-card { display: block; position: relative; }
.project-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; border: 1px solid var(--border); }
.project-thumb img { width: 100%; height: 240px; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .project-thumb img { transform: scale(1.05); }
.project-meta { font-size: 0.8rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.project-title { font-size: 1.25rem; margin: 0.25rem 0 0.5rem; color: var(--primary); }

/* =========================================
   6. BLOG
   ========================================= */
.blog-wrapper { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; }
.feat-blog img { width: 100%; height: 350px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.5rem; }
.feat-blog h3 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.side-blog { display: flex; gap: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; }
.side-blog:last-child { border: none; }
.side-blog h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.side-date { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }

/* =========================================
   7. CTA SECTION
   ========================================= */
.cta-section { background-color: var(--accent); color: white; }
.cta-section h2 { color: white; }
.cta-section p { color: rgba(255, 255, 255, 0.9); max-width: 600px; margin: 0 auto 2rem; }
.btn-white { background-color: white; color: var(--accent); font-weight: 700; }
.btn-white:hover { background-color: var(--primary); color: white; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

/* =========================================
   8. FOOTER
   ========================================= */
.site-footer { background-color: var(--primary); color: white; padding: 80px 0 30px; margin-top: auto; font-size: 0.95rem; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-logo { color: white; font-size: 1.5rem; margin-bottom: 1rem; }
.footer-desc { color: #94a3b8; margin-bottom: 1.5rem; max-width: 300px; font-size: 0.95rem; }
.footer-col h4 { color: white; font-size: 1rem; margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a, .contact-info li { color: #94a3b8; transition: 0.2s; }
.footer-links a:hover { color: white; padding-left: 5px; }
.social-links { display: flex; gap: 1rem; }
.social-links a { color: #94a3b8; transition: 0.2s; }
.social-links a:hover { color: white; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; color: #64748b; font-size: 0.85rem; }

/* =========================================
   9. RESPONSIVE / MEDIA QUERIES
   ========================================= */

/* Tablet & Smaller (900px) */
@media (max-width: 900px) {
    .blog-wrapper { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* Mobile Header & Layout (768px) */
@media (max-width: 768px) {
    /* Hide Desktop Nav, Show Mobile Toggle */
    .desktop-nav, .nav-cta { display: none; }
    .mobile-toggle { display: flex; }

    /* Layout Adjustments */
    .hero { padding: 60px 0 60px; }
    .portfolio-header { display: block; text-align: center; }
    .portfolio-header .btn { display: none; }
    .services-grid { grid-template-columns: 1fr; }
}

/* Small Mobile (600px) */
@media (max-width: 600px) {
    .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}