/* ─── Reset & Variables ─── */
html {
    scroll-behavior: smooth;
}

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

:root {
    --bg: #000;
    --bg-secondary: #0d0d0d;
    --bg-card-border: rgba(255, 255, 255, 0.1);
    --text: #fff;
    --text-muted: rgba(255, 255, 255, 0.65);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ─── Nav ─── */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    height: 22px;
    width: auto;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ─── Hero Wrapper ─── */
.hero-wrapper {
    position: relative;
    overflow: hidden;
}

.hero-wrapper canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 55%, var(--bg) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-wrapper nav,
.hero-wrapper .hero {
    position: relative;
    z-index: 2;
}

/* ─── Hero ─── */
.hero {
    text-align: center;
    padding: 190px 24px 360px;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-family: 'Satoshi', sans-serif;
    font-size: 50px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0em;
    margin-bottom: 24px;
    text-wrap: balance;
}

.hero > p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 40px;
    line-height: 1.5;
    text-wrap: balance;
}

/* ─── Button ─── */
.btn {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}

.btn-border {
    position: relative;
    background: rgb(59, 59, 59);
    border-radius: 6.4px;
    padding: 1.4px;
    overflow: hidden;
    transition: background 0.2s ease;
}

/* Top-right glow */
.btn-border::before {
    content: '';
    position: absolute;
    top: -14px;
    right: -10px;
    width: 95px;
    height: 36px;
    background: rgb(255, 255, 255);
    filter: blur(8px);
    z-index: 0;
}

/* Bottom-left glow */
.btn-border::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -6px;
    width: 74px;
    height: 41px;
    background: rgb(230, 230, 230);
    filter: blur(8px);
    z-index: 0;
}

.btn-inner {
    position: relative;
    z-index: 1;
    background: var(--bg-secondary);
    border-radius: 5px;
    padding: 8px 24px;
    overflow: hidden;
    transition: background 0.2s ease;
}

/* Inner glow — bottom-left */
.btn-glow-1 {
    position: absolute;
    bottom: -6px;
    left: -10px;
    width: 77px;
    height: 41px;
    background: radial-gradient(50% 50% at 50% 50%, rgb(163, 163, 163) 0%, transparent 100%);
    filter: blur(10px);
    opacity: 0.41;
    border-radius: 999px;
    pointer-events: none;
}

/* Inner glow — top-right */
.btn-glow-2 {
    position: absolute;
    top: -6px;
    right: -10px;
    width: 92px;
    height: 40px;
    background: radial-gradient(50% 50% at 50% 50%, rgb(115, 115, 115) 0%, transparent 100%);
    filter: blur(10px);
    border-radius: 999px;
    pointer-events: none;
}

.btn-inner p {
    position: relative;
    z-index: 2;
    font-family: 'Inter Display', 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #fff;
    margin: 0;
    line-height: 1.5;
    white-space: nowrap;
}

.btn:hover .btn-border {
    background: rgb(80, 80, 80);
}

.btn:hover .btn-inner {
    background: #141414;
}

/* ─── Appear Animations ─── */
.hero-wrapper canvas {
    opacity: 0;
}

/* subtitle uses per-word animation via .anim-hero-words */

.hero .btn {
    opacity: 0;
    transform: translate3d(-12px, 0, 0);
}

/* Per-word hero animation — opacity + transform only (compositor-only, no repaints) */
.anim-hero-words span {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, 12px, 0);
    will-change: opacity, transform;
    animation: wordReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-hero-words span:nth-child(1) { animation-delay: 0.6s; }
.anim-hero-words span:nth-child(2) { animation-delay: 0.67s; }
.anim-hero-words span:nth-child(3) { animation-delay: 0.74s; }
.anim-hero-words span:nth-child(4) { animation-delay: 0.81s; }
.anim-hero-words span:nth-child(5) { animation-delay: 0.88s; }
.anim-hero-words span:nth-child(6) { animation-delay: 0.95s; }

/* Subtitle — same animation, offset timing */
.anim-hero-words-light span {
    transform: translate3d(0, 8px, 0);
    animation-duration: 0.7s;
}

.anim-hero-words-light span:nth-child(1) { animation-delay: 1.1s; }
.anim-hero-words-light span:nth-child(2) { animation-delay: 1.14s; }
.anim-hero-words-light span:nth-child(3) { animation-delay: 1.18s; }
.anim-hero-words-light span:nth-child(4) { animation-delay: 1.22s; }
.anim-hero-words-light span:nth-child(5) { animation-delay: 1.26s; }
.anim-hero-words-light span:nth-child(6) { animation-delay: 1.30s; }
.anim-hero-words-light span:nth-child(7) { animation-delay: 1.34s; }
.anim-hero-words-light span:nth-child(8) { animation-delay: 1.38s; }
.anim-hero-words-light span:nth-child(9) { animation-delay: 1.42s; }
.anim-hero-words-light span:nth-child(10) { animation-delay: 1.46s; }
.anim-hero-words-light span:nth-child(11) { animation-delay: 1.50s; }
.anim-hero-words-light span:nth-child(12) { animation-delay: 1.54s; }
.anim-hero-words-light span:nth-child(13) { animation-delay: 1.58s; }
.anim-hero-words-light span:nth-child(14) { animation-delay: 1.62s; }
.anim-hero-words-light span:nth-child(15) { animation-delay: 1.66s; }

@keyframes wordReveal {
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.anim-fade-in {
    animation: fadeIn 0.6s linear forwards;
}

.anim-hero-text {
    animation: fadeIn 0.6s linear 1.0s forwards;
}

.anim-hero-btn {
    animation: slideInLeft 0.6s cubic-bezier(0.25, 1, 0.5, 1) 1.9s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideInLeft {
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ─── Scroll Reveal ─── */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.27s; }
.reveal-delay-3 { transition-delay: 0.42s; }

/* ─── Services ─── */
.services {
    padding: 200px 40px 100px;
    max-width: 1100px;
    margin: 0 auto;
}

.services-intro {
    text-align: center;
    margin-bottom: 100px;
}

.services-intro h2 {
    font-family: 'Satoshi', sans-serif;
    font-size: 42px;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 24px;
    text-wrap: balance;
}

.services-intro > p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.5;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.card {
    padding: 28px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 4px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.card-icon {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    flex-shrink: 0;
    padding: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.card h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
    text-wrap: balance;
}

.card p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

/* ─── Section Dividers ─── */
.services::after {
    content: '';
    display: block;
    width: 200px;
    height: 1px;
    margin: 80px auto 0;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.12), transparent);
}

/* ─── Backed By ─── */
.backed {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.backed h4 {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 40px;
    text-transform: none;
}

.backed-logos {
    display: flex;
    align-items: center;
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
    mask-image: linear-gradient(to right, transparent 0%, #000 25%, #000 75%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 25%, #000 75%, transparent 100%);
}

.backed-logos-track {
    display: flex;
    align-items: center;
    gap: 67px;
    animation: marquee 20s linear infinite;
    flex-shrink: 0;
}

.backed-logos-track img {
    width: auto;
    opacity: 0.7;
    flex-shrink: 0;
}

.backed-logos-track img[alt="Chalfen Ventures"] { height: 32px; }
.backed-logos-track img[alt="TSIC"] { height: 30px; }
.backed-logos-track img[alt="helloworld"] { height: 22px; }
.backed-logos-track img[alt="Seedcamp"] { height: 18px; }

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

/* ─── CTA ─── */
.cta {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 100px 24px 0;
}

.cta canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--bg) 0%, transparent 30%);
    z-index: 1;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto 80px;
}

.cta h2 {
    font-family: 'Satoshi', sans-serif;
    font-size: 42px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0em;
    margin-bottom: 20px;
    text-wrap: balance;
}

.cta-content > p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.5;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.cta .btn {
    margin-top: 28px;
}

/* ─── Footer ─── */
footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 32px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-left {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    letter-spacing: -0.02em;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-size: 15px;
}

.footer-right a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-right a:hover {
    color: var(--text);
}

/* ─── Legal Page ─── */
.legal-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 80px 24px 100px;
}

.legal-content h1 {
    font-family: 'Satoshi', sans-serif;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 400;
    margin-bottom: 32px;
}

.legal-content h2 {
    font-family: 'Satoshi', sans-serif;
    font-size: 22px;
    font-weight: 500;
    margin-top: 40px;
    margin-bottom: 16px;
}

.legal-content p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-content p strong {
    color: var(--text);
}

.legal-content a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content a:hover {
    color: var(--text-muted);
}

.legal-meta {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--bg-card-border);
    padding-bottom: 32px;
}

/* ─── 404 Page ─── */
.not-found {
    text-align: center;
    padding: 120px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.not-found h1 {
    font-family: 'Satoshi', sans-serif;
    font-size: clamp(36px, 5vw, 50px);
    font-weight: 400;
    margin-bottom: 16px;
}

.not-found p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.5;
}

/* ─── Section Divider — Backed By ─── */
.backed::after {
    content: '';
    display: block;
    width: 200px;
    height: 1px;
    margin: 80px auto 0;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.12), transparent);
}

/* ─── Case Studies (Homepage) ─── */
.case-studies {
    padding: 120px 40px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.cs-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 6px 16px;
    margin-bottom: 40px;
}

.cs-card {
    display: block;
    text-align: left;
    padding: 48px;
    border-radius: 16px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(130, 96, 75, 0.08), transparent 60%),
        rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.cs-card:hover {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.cs-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.cs-card-tag {
    display: inline-block;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.cs-card-headline {
    font-family: 'Satoshi', sans-serif;
    font-size: 32px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 16px;
    text-wrap: balance;
}

.cs-card-desc {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.5;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
}

.cs-card-metrics {
    display: flex;
    gap: 48px;
    margin-bottom: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 32px;
    margin-top: 8px;
}

.cs-card-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-card-metric-value {
    font-family: 'Satoshi', sans-serif;
    font-size: 32px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: rgba(255, 255, 255, 0.95);
}

.cs-card-metric-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.cs-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.02em;
    transition: gap 0.2s ease, color 0.2s ease;
}

.cs-card:hover .cs-card-link {
    gap: 10px;
    color: rgba(255, 255, 255, 1);
}

/* ─── Case Studies Listing Page ─── */
.cs-listing {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 40px 120px;
}

.cs-listing-intro {
    text-align: center;
    margin-bottom: 64px;
}

.cs-listing-intro h1 {
    font-family: 'Satoshi', sans-serif;
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 16px;
}

.cs-listing-intro p {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.5;
}

.cs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

/* ─── Case Study Detail Page ─── */
.cs-detail-hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px 80px;
    text-align: left;
    background: radial-gradient(ellipse at 50% 30%, rgba(130, 96, 75, 0.06), transparent 70%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cs-detail-back {
    display: inline-block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 48px;
    transition: color 0.2s;
}

.cs-detail-back:hover {
    color: var(--text);
}

.cs-detail-hero .cs-card-tags {
    margin-bottom: 16px;
}

.cs-detail-hero h1 {
    font-family: 'Satoshi', sans-serif;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 16px;
    text-wrap: balance;
}

.cs-detail-hero .cs-card-desc {
    font-size: 18px;
    margin-bottom: 0;
}

.cs-detail-hero .cs-card-metrics {
    margin-bottom: 0;
    padding: 32px 0;
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-detail-hero .cs-card-metric-value {
    font-size: 36px;
}

.cs-detail-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

.cs-detail-content section {
    margin-bottom: 80px;
}

.cs-detail-content section:last-child {
    margin-bottom: 0;
}

.cs-detail-content section + section {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 80px;
}

.cs-detail-content h2 {
    font-family: 'Satoshi', sans-serif;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 24px;
}

.cs-detail-content p {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.cs-detail-content p:last-child {
    margin-bottom: 0;
}

.cs-detail-content blockquote {
    border-left: 3px solid rgba(130, 96, 75, 0.6);
    padding: 32px 40px;
    margin: 0;
    font-size: 18px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    background: rgba(130, 96, 75, 0.04);
    border-radius: 0 12px 12px 0;
}

/* ─── Responsive ─── */
@media (min-width: 810px) and (max-width: 1199px) {
    .hero h1 {
        font-size: 74px;
    }
}

@media (max-width: 809px) {
    nav {
        padding: 20px 24px;
    }

    .hero {
        padding: 100px 24px 160px;
    }

    .hero h1 {
        font-size: 44px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        gap: 32px;
    }

    .footer-right {
        align-items: flex-start;
    }

    .case-studies {
        padding: 80px 24px;
    }

    .cs-card {
        padding: 32px;
    }

    .cs-card-headline {
        font-size: 24px;
    }

    .cs-card-metrics {
        flex-wrap: wrap;
        gap: 24px;
    }

    .cs-card-metric-value {
        font-size: 24px;
    }

    .cs-listing {
        padding: 60px 24px 80px;
    }

    .cs-detail-hero {
        padding: 40px 24px 60px;
    }

    .cs-detail-hero .cs-card-metrics {
        flex-wrap: wrap;
        gap: 24px;
    }

    .cs-detail-content {
        padding: 0 24px 80px;
    }

    .cs-detail-content section {
        margin-bottom: 56px;
    }

    .cs-detail-content blockquote {
        padding: 24px 24px;
    }

    .cs-detail-hero .cs-card-metric-value {
        font-size: 28px;
    }

    .cs-detail-content section + section {
        padding-top: 56px;
    }

    .cta {
        padding: 80px 24px 0;
    }
}
