/* 
  Merkli - Digital Agency CSS Stylesheet 
  Based on Modern Creative Agency Design Analysis
*/

/* 1. CSS Variables Definition */
:root {
    /* Colors */
    --primary-color: #E1D4FF;        /* Light Purple */
    --primary-hover: #D4C3FF;
    --secondary-color: #FDF2A7;      /* Light Yellow (Accent) */
    --accent-color: #000000;         /* Dark/Black */
    --text-heading: #000000;
    --text-body: #555555;
    --text-muted: #888888;
    --bg-white: #FFFFFF;
    --bg-light: #F8F8F8;
    --bg-dark: #000000;
    --border-color: #EEEEEE;

    /* Typography */
    --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Radius */
    --radius-pill: 9999px;
    --radius-lg: 24px;
    --radius-md: 12px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-main);
    color: var(--text-body);
    background-color: var(--bg-white);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-md);
}

section {
    padding: var(--space-lg) 0;
    position: relative;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-normal);
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-dark {
    background-color: var(--bg-dark);
    color: var(--bg-white);
}

.btn-dark:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--bg-white);
}

/* 3. Component Styles */

/* Header & Nav */
.header {
    width: 100%;
    padding: 1.5rem 0;
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover {
    color: var(--primary-hover);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: 80vh;
    padding: var(--space-lg) 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 2rem;
}

.hero-title span.italic {
    font-style: italic;
    font-weight: 400;
}

.hero-description {
    font-size: 1.25rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
    color: var(--text-body);
}

.hero-image img {
    border-radius: var(--radius-lg);
    width: 100%;
    height: 600px;
    object-fit: cover;
}

/* Logos Section */
.logos-bar {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.logo-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    filter: grayscale(1);
    opacity: 0.5;
}

/* Service/Portfolio Cards */
.card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
}

.card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.portfolio-item {
    margin-bottom: 4rem;
}

.portfolio-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.tag {
    background-color: var(--secondary-color);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    color: var(--text-heading);
    text-transform: uppercase;
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: #FFFFFF;
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 5rem;
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
    display: block;
}

.footer-heading {
    color: #FFFFFF;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #999;
}

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

.newsletter-box {
    margin-top: 1.5rem;
    display: flex;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.newsletter-box input {
    background: transparent;
    border: none;
    color: white;
    flex: 1;
    padding: 0.5rem 0;
}

.newsletter-box input:focus {
    outline: none;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

/* 4. Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 4rem; }
.bg-light { background-color: var(--bg-light); }
.bg-primary { background-color: var(--primary-color); }
.flex-group { display: flex; gap: 1rem; align-items: center; }

/* 5. Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* 6. Responsive Media Queries */

/* Tablet */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-grid {
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    section {
        padding: var(--space-md) 0;
    }

    .nav-menu {
        display: none; /* Hide desktop menu */
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image img {
        height: 400px;
    }

    .hero-actions {
        justify-content: center;
    }

    .logo-track {
        flex-wrap: wrap;
        gap: 2rem;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .newsletter-box {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}