/* =========================================
   MÄO AGENCY — Case Study Template
   Based on Brand Guidelines v1.0
   ========================================= */

:root {
    --bg: #1E1D1B;
    --bg-card: #2B2A28;
    --text-primary: #EAE5DE;
    --text-secondary: #6A6763;
    --accent: #8E8372;
    --white: #F9F8F6;
    --border: rgba(234, 229, 222, 0.08);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --max-width: 1000px;
    --ease-organic: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Film Grain */
body::after {
    content: '';
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9998; opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    mix-blend-mode: screen;
}

.contained { max-width: var(--max-width); margin: 0 auto; padding: 0 8%; }

/* Navigation */
.cs-navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 1.2rem 0;
    background: rgba(30, 29, 27, 0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.cs-nav-container {
    max-width: 1400px; margin: 0 auto; padding: 0 5%;
    display: flex; align-items: center; justify-content: space-between;
}
.cs-logo {
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
    letter-spacing: 3px; text-transform: uppercase; color: var(--text-primary);
    text-decoration: none; transition: opacity 0.3s;
}
.cs-logo:hover { opacity: 0.7; }
.cs-nav-links { display: flex; align-items: center; gap: 2.5rem; }
.cs-nav-link {
    font-family: var(--font-body); font-size: 0.8rem; font-weight: 400;
    color: var(--text-secondary); text-decoration: none;
    transition: color 0.3s;
}
.cs-nav-link:hover { color: var(--text-primary); }
.cs-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.75rem; font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
    padding: 0.7rem 1.8rem; border: 1px solid var(--border);
    color: var(--text-primary); text-decoration: none; border-radius: 100px;
    transition: all 0.3s;
}
.btn-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}
.cs-btn-primary .btn-dot { background: var(--text-secondary); }
.cs-btn-primary:hover { background: var(--text-primary); color: var(--bg); }
.cs-btn-primary:hover .btn-dot { background: var(--bg); }
.cs-back-link {
    font-size: 0.75rem; color: var(--text-secondary);
    text-decoration: none; display: flex; align-items: center; gap: 6px;
    transition: color 0.3s;
}
.cs-back-link:hover { color: var(--accent); }
.cs-mobile-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.cs-mobile-btn span { display: block; width: 20px; height: 1.5px; background: var(--text-primary); margin: 5px 0; }

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400; line-height: 1.2; letter-spacing: -0.5px;
}
.text-label {
    text-transform: uppercase; letter-spacing: 4px; font-size: 0.75rem;
    color: var(--accent); margin-bottom: 1.5rem; display: block;
    font-weight: 500; font-family: var(--font-body);
}
.text-title-large {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 1rem; font-weight: 400;
}
.text-title-medium {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 400; margin-bottom: 1.5rem;
}
.copy-large {
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    color: var(--text-secondary); max-width: 600px;
}
.copy-regular {
    font-size: 0.95rem; color: var(--text-secondary);
    max-width: 600px; line-height: 1.8;
}

/* Hero */
.cs-hero {
    padding: 140px 0 80px 0;
    border-bottom: 1px solid var(--border);
}
.hero-meta {
    display: flex; gap: 2rem; margin-top: 2rem;
    font-size: 0.8rem; color: var(--text-secondary);
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }

/* Tags */
.tag-row {
    display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem;
}
.tag {
    display: inline-block; padding: 8px 20px;
    border: 1px solid var(--border); border-radius: 100px;
    color: var(--text-primary); text-decoration: none;
    font-size: 0.7rem; font-weight: 500; text-transform: uppercase;
    letter-spacing: 1.5px; transition: all 0.3s var(--ease-organic);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* Visual blocks */
.visual-block {
    width: 100%; border-radius: 12px; overflow: hidden;
    margin: 3rem 0;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.visual-block img, .visual-block video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.visual-placeholder {
    width: 100%; aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--bg-card) 0%, #353330 100%);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 0.85rem;
    letter-spacing: 2px; text-transform: uppercase;
    border-radius: 12px;
}

/* Grid */
.split-grid {
    display: grid; grid-template-columns: 1fr; gap: 4rem;
    align-items: center; margin: 4rem 0;
}
@media (min-width: 768px) {
    .split-grid { grid-template-columns: 1fr 1.2fr; }
    .split-grid.reverse { grid-template-columns: 1.2fr 1fr; }
}

/* Stats */
.stats-row {
    display: flex; justify-content: space-between; flex-wrap: wrap;
    gap: 2rem; padding: 4rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.stat-block .number {
    font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 300;
    color: var(--accent); line-height: 1; margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}
.stat-block .label {
    text-transform: uppercase; font-size: 0.7rem;
    letter-spacing: 3px; color: var(--text-secondary);
}

/* Sections */
.cs-section { padding: 5rem 0; }
.cs-section + .cs-section { border-top: 1px solid var(--border); }

/* CTA Banner */
.cs-cta {
    text-align: center; padding: 6rem 0;
    border-top: 1px solid var(--border);
}
.cs-cta-btn {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 1rem 2.5rem;
    border: 1px solid var(--accent); color: var(--accent);
    text-decoration: none; text-transform: uppercase;
    letter-spacing: 3px; font-size: 0.75rem; font-weight: 500;
    border-radius: 100px;
    transition: all 0.4s var(--ease-organic);
}
.cs-cta-btn .btn-dot { background: var(--accent); }
.cs-cta-btn:hover { background: var(--accent); color: var(--bg); }
.cs-cta-btn:hover .btn-dot { background: var(--bg); }

/* Gradient divider */
.gradient-divider {
    height: 1px; border: none;
    background: linear-gradient(90deg, transparent, rgba(142, 131, 114, 0.35), transparent);
    margin: 0 auto; max-width: 80%;
}

/* Reveal animation */
.reveal {
    opacity: 0; transform: translateY(28px);
    transition: all 0.8s var(--ease-organic);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Next/Prev case study */
.cs-next {
    display: flex; justify-content: space-between; align-items: center;
    padding: 3rem 0; border-top: 1px solid var(--border);
}
.cs-next a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px;
    transition: color 0.3s;
}
.cs-next a:hover { color: var(--accent); }
.cs-next .next-title {
    font-family: var(--font-heading); font-size: 1.2rem;
    color: var(--text-primary); font-weight: 400; margin-top: 4px;
}

@media (max-width: 768px) {
    .cs-nav-links { display: none; }
    .cs-mobile-btn { display: block; }
    .cs-hero { padding: 120px 0 60px 0; }
    .contained { padding: 0 6%; }
    .stats-row { flex-direction: column; }
}
