:root {
    /* Premium Dark Theme variables optimized for Meta traffic flow */
    --bg-base: #0a0a0c;
    --bg-surface: #111114;
    --bg-surface-elevated: #1a1a1e;
    --border-color: #27272a;
    --border-highlight: #3f3f46;

    --primary: #ffffff;
    --secondary: #a1a1aa;
    --accent: #2563eb;
    /* Trustworthy, performance-focused blue */
    --accent-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.2);
    --success: #10b981;
    --danger: #ef4444;

    --font-heading: 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --transition: all 0.2s ease;
    --container-max: 1100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Background Effect */
.glow-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Navbar */
.navbar {
    padding: 1.25rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 10, 12, 0.8);
}

.nav-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -1px;
    display: block;
    text-decoration: none;
    color: inherit;
}

.logo .dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    font-family: inherit;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
}

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

.btn-secondary:hover {
    border-color: var(--border-highlight);
    background-color: rgba(255, 255, 255, 0.03);
}

/* Hero Section */
.hero {
    padding: 10rem 0 6rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--secondary);
    margin: 0 auto 3rem;
    max-width: 600px;
}

/* Case Study Grid */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    padding-bottom: 8rem;
}

@media (max-width: 768px) {
    .case-grid {
        grid-template-columns: 1fr;
    }
}

.case-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    animation: reveal 0.8s ease backwards;
}

.case-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-highlight);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: var(--bg-surface-elevated);
}

.case-header {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.case-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.case-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.case-payout {
    font-size: 0.85rem;
    color: var(--secondary);
}

.case-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.metric-item .label {
    display: block;
    font-size: 0.7rem;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.metric-item .value {
    font-size: 1.1rem;
    font-weight: 700;
}

.metric-item.highlight .value {
    color: var(--success);
}

.case-body {
    padding: 2rem;
    flex-grow: 1;
}

.case-story h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.case-story p {
    font-size: 0.95rem;
    color: #e4e4e7;
    margin-bottom: 1.5rem;
}

.winning-insights {
    background: var(--bg-surface-elevated);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.winning-insights h5 {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.insights-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.insight-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 4px;
    color: #93c5fd;
}

.case-footer {
    padding: 1.5rem 2rem 2rem;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--secondary);
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    width: 100%;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    text-align: center;
}

.cta-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.cta-box h2 {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
}

.cta-box p {
    color: var(--secondary);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-copy {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--secondary);
}

/* Animations */
@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.case-card {
    animation-delay: 0.1s;
}

.case-card:nth-child(2) {
    animation-delay: 0.2s;
}

.case-card:nth-child(3) {
    animation-delay: 0.3s;
}

.case-card:nth-child(4) {
    animation-delay: 0.4s;
}
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

/* Premium Case Study Body Typography */
.study-content {
    background: rgba(17, 17, 20, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4rem;
    max-width: 850px;
    margin: 0 auto;
    color: #d4d4d8;
    line-height: 1.8;
    font-size: 1.15rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
}
.study-content h1, 
.study-content h2, 
.study-content h3 {
    color: var(--primary);
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}
.study-content h1 { font-size: 2.2rem; }
.study-content h2 { font-size: 1.8rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; margin-top: 3.5rem; }
.study-content h3 { font-size: 1.4rem; color: var(--accent); }
.study-content ul, .study-content ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}
.study-content li { margin-bottom: 0.75rem; }
.study-content li strong { color: #fff; }
.study-content p { margin-bottom: 1.5rem; }
.study-content p strong { color: #fff; }
.study-content em { color: var(--secondary); font-style: italic; }
.study-content a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px dashed var(--accent);
}
.study-content a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}
.study-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2.5rem 0;
    border: 1px solid var(--border-highlight);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.study-content table {
    width: 100%;
    margin: 2.5rem 0;
    border-collapse: collapse;
    background: rgba(26, 26, 30, 0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.study-content table th, .study-content table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.study-content table th {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}
.study-content table td {
    font-size: 1.05rem;
}
.study-content table tr:last-child td {
    border-bottom: none;
}
.study-content hr {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 3.5rem 0;
}
.study-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

@media (max-width: 768px) {
    .study-content {
        padding: 2rem 1.5rem;
        font-size: 1.05rem;
    }
    .study-content h1 { font-size: 1.8rem; }
    .study-content h2 { font-size: 1.5rem; }
    .study-content h3 { font-size: 1.25rem; }
    .study-content table th, .study-content table td {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}
