:root {
    --background: oklch(0.99 0 0);
    --foreground: oklch(0.145 0 0);
    --primary: oklch(0.205 0 0);
    --primary-foreground: oklch(0.985 0 0);
    --secondary: oklch(0.970 0 0);
    --muted: oklch(0.970 0 0);
    --muted-foreground: oklch(0.556 0 0);
    --border: oklch(0.922 0 0);
    --radius: 0.625rem;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --shadow-sm: 0 1px 2px 0 oklch(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 oklch(0 0 0 / 0.1), 0 1px 2px -1px oklch(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.1), 0 2px 4px -2px oklch(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.1), 0 4px 6px -4px oklch(0 0 0 / 0.1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-logo-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    height: 2.25rem;
    transition: opacity 0.2s ease;
}

.site-logo-link:hover {
    opacity: 0.82;
}

.site-logo-image {
    display: block;
    width: auto;
    height: 2rem;
    object-fit: contain;
}

.site-logo-link-compact {
    height: 2rem;
}

.site-logo-image-compact {
    height: 1.75rem;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hero-section {
    position: relative;
    overflow: hidden;
    margin-top: -5rem;
    padding: 10.25rem 0 5.25rem;
    background:
        radial-gradient(circle at 18% 18%, rgba(14, 165, 233, 0.22), transparent 18rem),
        radial-gradient(circle at 82% 16%, rgba(250, 204, 21, 0.20), transparent 19rem),
        radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.12), transparent 24rem),
        linear-gradient(135deg, #eef7ff 0%, #f8fbff 38%, #fffaf0 100%);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 3.5rem 3.5rem;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.26) 0%, rgba(0, 0, 0, 0.10) 52%, transparent 100%);
    pointer-events: none;
}

.hero-section::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -3.5rem;
    width: min(68rem, 88vw);
    height: 15rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0) 74%);
    pointer-events: none;
}

.hero-section > .container {
    position: relative;
    z-index: 1;
}

.clients-section {
    position: relative;
    overflow: hidden;
    padding: 5.75rem 0 4.5rem;
    background:
        linear-gradient(180deg, #ffffff 0%, #ffffff 72%, #fafcff 100%);
}

.clients-heading {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    max-width: 1536px;
    padding: 0 1rem;
    margin: 0 auto 4rem;
    text-align: center;
}

.clients-title-scene {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 8rem;
}

.clients-title-scene::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18rem;
    height: 7.5rem;
    border-radius: 999px;
    transform: translate(-50%, -52%);
    background: linear-gradient(180deg, rgba(226, 238, 255, 0.82), rgba(255, 255, 255, 0));
    filter: blur(1px);
}

.clients-title {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 2.75rem;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: 0;
    color: #14213d;
}

.clients-title span {
    display: inline-block;
}

.clients-title-line {
    line-height: 1.1;
}

.clients-title-subline {
    font-size: 1.35rem;
    line-height: 1.35;
    font-weight: 600;
    color: #475569;
}

.clients-title-count {
    min-width: 1.4em;
    color: #14213d;
}

.clients-star {
    position: absolute;
    z-index: 2;
    display: block;
    background: #ffd24a;
    clip-path: polygon(50% 0, 61% 37%, 100% 50%, 61% 63%, 50% 100%, 39% 63%, 0 50%, 39% 37%);
}

.clients-star-large {
    top: 0.15rem;
    left: 8.4rem;
    width: 2.75rem;
    height: 2.75rem;
}

.clients-star-small {
    width: 0.95rem;
    height: 0.95rem;
}

.clients-star-left {
    top: 2.95rem;
    left: 7.6rem;
}

.clients-star-right {
    top: 2.55rem;
    right: 4.35rem;
}

.clients-marquee {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1536px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

.client-marquee-stack {
    display: flex;
    flex-direction: column;
    gap: 1.45rem;
}

.client-marquee-row {
    overflow: hidden;
}

.client-marquee-track {
    display: flex;
    width: max-content;
    animation: client-marquee var(--marquee-duration, 46s) linear infinite;
    will-change: transform;
}

.client-marquee-row-reverse .client-marquee-track {
    animation-direction: reverse;
}

.client-marquee-group {
    display: flex;
    flex: 0 0 auto;
    gap: 1.55rem;
    padding-right: 1.55rem;
}

.client-logo-card {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 11.75rem;
    height: 5.25rem;
    padding: 0.85rem 1.35rem;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.client-logo-card img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.client-logo-card-text {
    flex-direction: column;
    gap: 0.25rem;
}

.client-wordmark {
    max-width: 100%;
    overflow: hidden;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-wordmark-long {
    font-size: 1.05rem;
}

.client-industry {
    max-width: 100%;
    overflow: hidden;
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-logo-tone-0 .client-wordmark { color: #ef4444; }
.client-logo-tone-1 .client-wordmark { color: #2563eb; }
.client-logo-tone-2 .client-wordmark { color: #16a34a; }
.client-logo-tone-3 .client-wordmark { color: #0f172a; }
.client-logo-tone-4 .client-wordmark { color: #e11d48; }
.client-logo-tone-5 .client-wordmark { color: #0891b2; }
.client-logo-tone-6 .client-wordmark { color: #7c3aed; }
.client-logo-tone-7 .client-wordmark { color: #f97316; }

.clients-empty {
    padding: 2.5rem 1rem;
    text-align: center;
}

@keyframes client-marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.btn-primary {
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.case-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.75rem;
}

.case-filter-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: 7rem;
    height: 3rem;
    padding: 0 1.35rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #8b93a4;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.case-filter-button:hover {
    color: #111216;
    background: #f4f6f8;
}

.case-filter-button.active {
    color: #ffffff;
    background: #1c1c20;
    box-shadow: 0 16px 34px rgba(17, 18, 22, 0.16);
}

.case-filter-button:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.28);
    outline-offset: 3px;
}

.case-filter-icon {
    width: 1.15rem;
    height: 1.15rem;
    stroke-width: 2.5;
}

.case-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}

.pagination-btn.active {
    border-color: #6366f1;
    background: #6366f1;
    color: #ffffff;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tag-finance {
    background-color: oklch(0.96 0.03 250);
    color: oklch(0.45 0.15 250);
}

.tag-retail {
    background-color: oklch(0.96 0.03 120);
    color: oklch(0.45 0.15 120);
}

.tag-manufacturing {
    background-color: oklch(0.96 0.03 50);
    color: oklch(0.45 0.15 50);
}

.tag-healthcare {
    background-color: oklch(0.96 0.03 340);
    color: oklch(0.45 0.15 340);
}

.tag-education {
    background-color: oklch(0.96 0.03 200);
    color: oklch(0.45 0.15 200);
}

.evidence-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.evidence-image:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .hero-section {
        margin-top: -5rem;
        padding: 9rem 0 4rem;
        background:
            radial-gradient(circle at 14% 16%, rgba(14, 165, 233, 0.18), transparent 11rem),
            radial-gradient(circle at 86% 12%, rgba(250, 204, 21, 0.17), transparent 12rem),
            radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.10), transparent 18rem),
            linear-gradient(135deg, #eef7ff 0%, #f8fbff 40%, #fffaf0 100%);
    }

    .hero-section::before {
        background-size: 2.4rem 2.4rem;
    }

    .hero-section::after {
        top: -2.25rem;
        height: 10rem;
    }

    .clients-section {
        padding: 4.25rem 0 3.5rem;
    }

    .case-filter-bar {
        justify-content: flex-start;
        gap: 0.7rem;
        margin-bottom: 2rem;
        padding-bottom: 0.8rem;
    }

    .case-filter-button {
        min-width: auto;
        height: 2.65rem;
        padding: 0 1rem;
        font-size: 0.95rem;
    }

    .clients-heading {
        margin-bottom: 2.75rem;
    }

    .clients-title-scene {
        min-height: 6.25rem;
    }

    .clients-title-scene::before {
        width: 13rem;
        height: 5.75rem;
    }

    .clients-title {
        font-size: 2rem;
    }

    .clients-title-subline {
        font-size: 1rem;
        line-height: 1.45;
        max-width: 15em;
    }

    .clients-star-large {
        left: 2.15rem;
        width: 2rem;
        height: 2rem;
    }

    .clients-star-left {
        left: 1.6rem;
        top: 2.6rem;
    }

    .clients-star-right {
        right: 1.4rem;
        top: 2.25rem;
    }

    .clients-marquee {
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
    }

    .client-marquee-stack {
        gap: 0.9rem;
    }

    .client-marquee-group {
        gap: 0.85rem;
        padding-right: 0.85rem;
    }

    .client-logo-card {
        width: 8.75rem;
        height: 4.2rem;
        padding: 0.65rem 0.9rem;
    }

    .client-wordmark {
        font-size: 1.05rem;
    }

    .client-wordmark-long {
        font-size: 0.88rem;
    }

    .mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }
    
    .mobile-menu.active {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .client-marquee-track {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
    }
}

.result-stat {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

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

.result-stat:nth-child(1) { animation-delay: 0.1s; }
.result-stat:nth-child(2) { animation-delay: 0.2s; }
.result-stat:nth-child(3) { animation-delay: 0.3s; }

.chat-message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.loader {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #6366f1;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rich-text {
    line-height: 1.8;
}

.rich-text p {
    margin-bottom: 1rem;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.rich-text h1 { font-size: 2rem; }
.rich-text h2 { font-size: 1.5rem; }
.rich-text h3 { font-size: 1.25rem; }
.rich-text h4 { font-size: 1.125rem; }

.rich-text ul,
.rich-text ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.rich-text ul {
    list-style-type: disc;
}

.rich-text ol {
    list-style-type: decimal;
}

.rich-text li {
    margin-bottom: 0.5rem;
}

.rich-text blockquote {
    border-left: 4px solid #6366f1;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #6b7280;
}

.rich-text code {
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.rich-text pre {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.rich-text a {
    color: #6366f1;
    text-decoration: underline;
}

.rich-text a:hover {
    color: #4f46e5;
}

.rich-text img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.rich-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.rich-text th,
.rich-text td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    text-align: left;
}

.rich-text th {
    background-color: #f9fafb;
    font-weight: 600;
}

.rich-text hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

.rich-text strong {
    font-weight: 600;
}

.rich-text em {
    font-style: italic;
}

.rich-text del {
    text-decoration: line-through;
}

.rich-text sup {
    vertical-align: super;
    font-size: 0.75rem;
}

.rich-text sub {
    vertical-align: sub;
    font-size: 0.75rem;
}

@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.animate-pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}
