@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #ffffff;
    --bg-soft: #ecf0f5;
    --ink: #08090a;
    --muted: #5c626e;
    --hairline: rgba(8, 12, 24, 0.08);
    --soft: rgba(8, 12, 24, 0.04);
    --soft2: rgba(8, 12, 24, 0.06);
    --pill: #f8f9fb;
    --pill2: #f1f3f6;
    --primary: #3e5bf2;
    --primary-bg: rgba(62, 91, 242, 0.08);
    --shadow: 0 10px 30px -10px rgba(8, 12, 24, 0.1);
    --shadow2: 0 20px 40px -15px rgba(8, 12, 24, 0.15);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-pill: 999px;
    --max: 1200px;

    /* Typography */
    --h1: clamp(36px, 4.5vw, 56px);
    --h2: clamp(32px, 3vw, 42px);
    --p: 16px;
}

[data-theme="dark"] {
    --bg: #08090a;
    --bg-soft: #111418;
    --ink: #ffffff;
    --muted: #a1a1aa;
    --hairline: rgba(255, 255, 255, 0.1);
    --soft: rgba(255, 255, 255, 0.05);
    --soft2: rgba(255, 255, 255, 0.08);
    --pill: #1a1c1e;
    --pill2: #27272a;
    --primary: #60a5fa;
    --primary-bg: rgba(96, 165, 250, 0.15);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.case-study-hero {
    padding: 120px 0 80px;
    text-align: center;
}

.case-study-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.case-study-hero .hero-sub {
    margin-left: auto;
    margin-right: auto;
}

.about-brand {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--hairline);
}

.about-brand h3 {
    margin-top: 0;
}

.brand-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.brand-pill {
    background: var(--pill);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--hairline);
}

.case-image {
    width: 100%;
    border-radius: 24px;
    border: 1px solid var(--hairline);
    margin: 40px 0;
}

.case-logo {
    width: 100%;
    max-width: 400px;
    display: block;
    margin: 60px auto;
    opacity: 0.8;
}

.cta-banner {
    background: var(--bg-soft);
    padding: 48px;
    border-radius: 32px;
    text-align: center;
    margin-top: 80px;
}

.cta-banner h2 {
    margin-bottom: 24px;
}

main.case-main,
.main-content.case-main {
    display: block;
    align-items: initial;
    justify-content: initial;
    padding: 0;
    width: 100%;
}

.case-study-hero .stat-highlight {
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.04em;
    margin: 24px 0;
    background: linear-gradient(135deg, #2563eb, #a855f7, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.case-study-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

.case-study-content h3 {
    font-size: 24px;
    margin: 48px 0 16px;
}

.case-study-content p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 40px;
    transition: color 0.2s;
}

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

/* Timeline Components */
.timeline-wrapper {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 100px 0; /* Match .built padding */
    overflow: hidden; /* Prevent parent from scrolling vertically */
    position: relative;
    z-index: 5;
}

.timeline-container {
    display: flex;
    gap: 40px; /* Match track gap */
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 60px 8%; /* Center cards vertically and show peek */
    -ms-overflow-style: none; /* Hide scrollbars */
    scrollbar-width: none;
    align-items: flex-start;
    position: relative;
    min-height: 500px; /* Ensure enough room for 360px cards + labels */
}

.timeline-container::-webkit-scrollbar {
    display: none;
}

.timeline-line {
    position: absolute;
    top: 76px; /* Align with the node-dot badges in the new flow */
    left: 0;
    right: 0;
    height: 1px;
    background: var(--hairline);
    z-index: 1;
    opacity: 0.15;
}

.timeline-node {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 360px; /* Standardize card width to match index page */
    gap: 24px; /* Space between dot and card */
}

.node-dot {
    width: 80px;
    height: 32px;
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.timeline-node:hover .node-dot {
    transform: scale(1.15);
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 10px var(--primary-bg);
}

.timeline-card {
    flex: 0 0 360px;
    width: 360px;
    height: 360px; /* Exact match with .result-card */
    background: var(--bg);
    border: 1px solid var(--hairline);
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.timeline-card-media {
    width: 100%;
    height: 45%;
    background: var(--bg-soft);
    overflow: hidden;
    border-bottom: 1px solid var(--hairline);
    position: relative;
}

.timeline-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.timeline-node:hover .timeline-card-media img {
    transform: scale(1.15);
}

/* Gradient media placeholder used when no real image is available */
.media-gradient {
    width: 100%;
    height: 100%;
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.45), transparent 55%),
        radial-gradient(circle at 80% 60%, rgba(168, 85, 247, 0.55), transparent 60%),
        radial-gradient(circle at 60% 90%, rgba(245, 158, 11, 0.45), transparent 55%),
        #0b0b14;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.timeline-node:hover .media-gradient {
    transform: scale(1.08);
}

.media-gradient.alt-1 {
    background:
        radial-gradient(circle at 70% 30%, rgba(168, 85, 247, 0.55), transparent 55%),
        radial-gradient(circle at 30% 70%, rgba(96, 165, 250, 0.45), transparent 60%),
        #0b0b14;
}

.media-gradient.alt-2 {
    background:
        radial-gradient(circle at 30% 30%, rgba(245, 158, 11, 0.40), transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.55), transparent 55%),
        #0b0b14;
}

.media-gradient.alt-3 {
    background:
        radial-gradient(circle at 50% 20%, rgba(96, 165, 250, 0.45), transparent 55%),
        radial-gradient(circle at 50% 90%, rgba(245, 158, 11, 0.45), transparent 55%),
        #0b0b14;
}

.media-gradient .stage-label {
    position: absolute;
    bottom: 14px;
    left: 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.timeline-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.timeline-node:hover .timeline-card {
    opacity: 1;
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

.timeline-card.up {
    bottom: 50px; /* More space between node and card */
    --offset-hover: -15px;
}

.timeline-card.down {
    top: 50px; /* More space between node and card */
    --offset-hover: 15px;
}

.milestone-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    margin-top: 16px;
    text-transform: uppercase;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.012em;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
.brand {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.03em;
}

/* Header */
.nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hairline);
    z-index: 50;
}

.nav-inner {
    height: 68px;
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.1rem;
}

.logo-svg {
    width: 26px;
    height: 26px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    width: 100%;
}

.hero-wrap {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.hero-title {
    font-size: var(--h1);
    line-height: 1.1;
    font-weight: 700;
    margin: 0 0 16px;
}

.hero-sub {
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 auto 40px;
    max-width: 44ch;
}

/* New Elements */
.eyebrow {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 16px;
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-bg);
    border-radius: var(--radius-pill);
}

.hero-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    font-size: 14px;
    font-weight: 500;
}

.status-ticker {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    background: #fff;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--hairline);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.pulsing-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
}

.pulsing-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0.6;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.limit-badge {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Form Styling */
.opt-in-container {
    background: var(--pill);
    border: 1px solid var(--hairline);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.signup-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 480px) {
    .signup-form .input-group {
        flex-direction: row;
        background: #fff;
        border: 1px solid var(--hairline);
        padding: 6px;
        border-radius: var(--radius-pill);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    }
}

.email-input {
    flex: 1;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-pill);
    padding: 14px 24px;
    font-size: 16px;
    font-family: inherit;
    width: 100%;
    outline: none;
    transition: all 0.2s ease;
    background: #fff;
}

@media (min-width: 480px) {
    .email-input {
        border: none;
        background: transparent;
        padding: 12px 20px;
    }
}

.email-input:focus {
    border-color: var(--primary);
}

.cta-button {
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cta-button:hover {
    background: #1a1c1f;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.privacy-text {
    margin-top: 16px;
    font-size: 14px;
    color: var(--muted);
    opacity: 0.8;
}

/* Success Message */
.success_message {
    color: #10b981;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.1);
    padding: 16px;
    border-radius: 12px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.success_message::before {
    font-weight: bold;
}

/* Footer */
.footer {
    border-top: 1px solid var(--hairline);
    padding: 60px 24px;
    background: #fafafa;
    margin-top: auto;
}

.footer-content {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--muted);
}

.logo-svg.small {
    width: 20px;
    height: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s;
}

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

.copyright {
    color: var(--muted);
    font-size: 13px;
    opacity: 0.7;
}

/* GATED LANDING PAGE STYLES */

body.is-locked {
    overflow: hidden !important;
    height: 100vh;
}

body.is-locked .content-reveal,
body.is-locked .footer {
    display: none !important;
}

#main-nav.hidden-nav {
    display: none;
}

.gate-hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at 70% 30%, #fef9f3 0%, #fff 100%);
    overflow: hidden;
    padding: 24px;
}

.hero-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.gate-hero .hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.gate-hero .hero-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 24px;
    color: var(--ink);
}

.gate-hero .hero-sub {
    font-size: 20px;
    max-width: 60ch;
    margin-bottom: 48px;
}

.gate-input-wrap {
    max-width: 540px;
    margin: 0 auto;
}

.url-input-container {
    display: flex;
    background: #fff;
    padding: 8px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    gap: 8px;
}

.gate-input {
    flex: 1;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: var(--ink);
}

.unlock-button {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.unlock-button:hover {
    background: #0056b3;
    transform: scale(1.02);
}

.hero-trust {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}

.trust-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted);
    font-size: 13px;
    opacity: 0.6;
}

.pulse-arrow {
    font-size: 24px;
    margin-top: 8px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* Feature Blocks (Alternating) */
.feature-block {
    padding: 120px 24px;
}

.feature-block.alt-bg {
    background: #f7fbff;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.feature-grid.reverse {
    direction: rtl;
}

.feature-grid.reverse .feature-header {
    direction: ltr;
}

.feature-text h2 {
    font-size: clamp(32px, 4vw, 48px);
    margin: 16px 0 24px;
    line-height: 1.1;
}

.feature-text p {
    font-size: 18px;
    color: var(--muted);
    line-height: 1.6;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 32px;
}

.feature-list li {
    padding-left: 28px;
    position: relative;
    margin-bottom: 12px;
    font-weight: 500;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 900;
}

/* Visual Cards */
.visual-card {
    background: #fff;
    border-radius: 24px;
    border: 1px solid var(--hairline);
    padding: 40px;
    box-shadow: var(--shadow2);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.visual-card.dark {
    background: var(--ink);
    color: #fff;
}

.visual-label {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-top: 24px;
}

/* Mock Graphics */
.chart-mock {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 180px;
    width: 100%;
}

.bar {
    flex: 1;
    background: var(--soft2);
    border-radius: 4px 4px 0 0;
}

.bar.highlight {
    background: linear-gradient(to top, #2563eb, #a855f7);
}

.flow-mock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 180px;
}

.flow-node {
    padding: 12px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-size: 14px;
}

.flow-node.highlight {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

.flow-node.success {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* Logo Section */
.logo-section {
    padding: 80px 24px;
    border-bottom: 1px solid var(--hairline);
    background: #fff;
}

.section-label {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 40px;
}

.logo-track {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    opacity: 0.6;
}

.client-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

/* Results Section */
.results-section {
    padding: 120px 24px;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
    max-width: var(--max);
    margin-left: auto;
    margin-right: auto;
}

.result-stat h3 {
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 12px;
}

/* Final CTA Box */
.cta-box {
    background: var(--ink);
    color: #fff;
    padding: clamp(60px, 8vw, 100px) 40px;
    border-radius: 40px;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.final-form {
    display: flex;
    max-width: 500px;
    margin: 40px auto 0;
    background: rgba(255,255,255,0.08);
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
}

.final-form input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 24px;
    color: #fff;
    outline: none;
    font-size: 16px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.4s; }
.fade-in:nth-child(4) { animation-delay: 0.6s; }

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

/* Responsive */
@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .feature-grid.reverse {
        direction: ltr;
    }
    .results-grid {
        grid-template-columns: 1fr;
    }
    .final-form {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 16px;
    }
    .final-form input {
        background: rgba(255,255,255,0.08);
        border-radius: 999px;
        width: 100%;
    }
}