@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700;900&family=Space+Mono&family=Sora:wght@600;700&display=swap');

:root {
    --bg: #ffffff;
    --bg-soft: #f4f6fb;
    --ink: #0b1020;
    --ink-soft: #4b5675;
    --ink-faint: #8a93ad;

    --dark: #080b1a;
    --dark-2: #0e1430;
    --dark-panel: #141b3d;
    --dark-line: rgba(255,255,255,0.09);

    --brand: #2f6bff;
    --brand-2: #6f5bff;
    --cyan: #21e6c1;
    --violet: #a855f7;
    --magenta: #ff5cc8;

    --grad: linear-gradient(120deg, #2f6bff 0%, #6f5bff 55%, #a855f7 100%);
    --grad-glow: linear-gradient(120deg, #21e6c1 0%, #2f6bff 50%, #a855f7 100%);

    --radius: 18px;
    --shadow-glow: 0 18px 50px -18px rgba(47,107,255,0.55);
    --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display { font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif; }

.mono { font-family: 'Space Mono', 'Space Grotesk', monospace; }

/* ===== Nav ===== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 68px;
    background: rgba(8,11,26,0.72);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--dark-line);
    z-index: 100;
}
.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-brand::before {
    content: '';
    width: 24px; height: 24px;
    border-radius: 7px;
    background: var(--grad);
    box-shadow: 0 0 18px rgba(111,91,255,0.7);
}
.nav-links { display: flex; gap: 34px; }
.nav-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--cyan); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, background .2s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 60px -16px rgba(111,91,255,0.75); }
.btn-ghost { background: rgba(255,255,255,0.06); color: #fff; border: 1.5px solid rgba(255,255,255,0.22); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-ghost.on-light { color: var(--brand); border-color: rgba(47,107,255,0.4); background: rgba(47,107,255,0.05); }
.btn-ghost.on-light:hover { border-color: var(--brand); background: rgba(47,107,255,0.1); color: var(--brand); }
.btn-sm { padding: 9px 20px; font-size: 13px; }
.btn-lg { padding: 17px 42px; font-size: 17px; }

/* ===== Hero ===== */
.hero {
    position: relative;
    background: var(--dark);
    color: #fff;
    overflow: hidden;
    padding: 150px 28px 100px;
}
.hero::before {
    /* gradient mesh glow orbs */
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(620px 480px at 78% 12%, rgba(111,91,255,0.42), transparent 60%),
        radial-gradient(560px 420px at 10% 85%, rgba(33,230,193,0.20), transparent 60%),
        radial-gradient(700px 520px at 92% 88%, rgba(168,85,247,0.28), transparent 62%);
    pointer-events: none;
}
.hero::after {
    /* grid overlay */
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 50% 35%, #000 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 50% 35%, #000 30%, transparent 78%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 2;
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 64px;
}
.hero-content { flex: 1; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 26px;
    font-weight: 500;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:.4;transform:scale(.7);} }
.hero h1 {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.hero h1 .grad-text {
    background: var(--grad-glow);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub { font-size: 18px; color: rgba(255,255,255,0.68); margin-bottom: 36px; line-height: 1.75; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 14px; }
.stat {
    display: flex; flex-direction: column;
    padding: 16px 22px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    flex: 1;
}
.stat-num {
    font-family: 'Sora', 'Space Grotesk', sans-serif;
    font-size: 26px; font-weight: 700;
    font-feature-settings: 'tnum' 1;
    background: var(--grad-glow);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { font-size: 12.5px; color: rgba(255,255,255,0.55); margin-top: 2px; }
.hero-visual { flex: 0 0 400px; position: relative; }
.engine-svg { width: 100%; height: auto; filter: drop-shadow(0 0 30px rgba(111,91,255,0.35)); }

/* floating game-icon chips around hero visual */
.float-chip {
    position: absolute;
    width: 52px; height: 52px;
    border-radius: 15px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.16);
    backdrop-filter: blur(8px);
    display: grid; place-items: center;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6);
    animation: bob 5s ease-in-out infinite;
}
.float-chip svg { width: 26px; height: 26px; }
.float-chip.c1 { top: -6px; left: 6px; animation-delay: 0s; }
.float-chip.c2 { top: 40%; right: -14px; animation-delay: .8s; }
.float-chip.c3 { bottom: 4px; left: -8px; animation-delay: 1.6s; }
@keyframes bob { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-12px); } }

/* ===== Section scaffolding ===== */
.section-header { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.eyebrow {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 12.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 14px;
}
.section-header h2 { font-size: 38px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.18; margin-bottom: 14px; }
.section-header p { font-size: 17px; color: var(--ink-soft); }

/* ===== Services ===== */
.services { max-width: var(--maxw); margin: 0 auto; padding: 100px 28px; }
.service-row {
    display: flex;
    align-items: center;
    gap: 72px;
    margin-bottom: 96px;
}
.service-row:last-child { margin-bottom: 0; }
.service-row.reverse { flex-direction: row-reverse; }
.service-text { flex: 1; }
.service-visual { flex: 0 0 360px; }
.service-tag {
    display: inline-flex;
    align-items: center;
    font-family: 'Space Mono', monospace;
    font-size: 12.5px; font-weight: 400;
    color: var(--brand);
    margin-bottom: 14px;
    letter-spacing: 0.06em;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(47,107,255,0.08);
    border: 1px solid rgba(47,107,255,0.18);
}
.service-text h3 { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 14px; }
.service-desc { font-size: 16.5px; color: var(--ink-soft); margin-bottom: 24px; }
.service-points { list-style: none; }
.service-points li { padding: 7px 0 7px 30px; position: relative; font-size: 15.5px; color: var(--ink); }
.service-points li::before {
    content: '';
    position: absolute; left: 0; top: 13px;
    width: 16px; height: 16px;
    border-radius: 5px;
    background: var(--grad);
    box-shadow: 0 0 10px rgba(111,91,255,0.4);
}
.service-points li::after {
    content: '';
    position: absolute; left: 5px; top: 17px;
    width: 4px; height: 7px;
    border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.service-panel {
    position: relative;
    border-radius: 22px;
    padding: 28px;
    background: linear-gradient(160deg, #0e1430, #141b3d);
    border: 1px solid var(--dark-line);
    overflow: hidden;
    box-shadow: 0 30px 60px -30px rgba(15,23,60,0.5);
}
.service-panel::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(380px 240px at 80% 0%, rgba(111,91,255,0.28), transparent 65%);
    pointer-events: none;
}
.service-panel svg { position: relative; width: 100%; height: auto; display: block; }
.panel-cap { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: rgba(255,255,255,0.5); font-family: 'Space Mono', monospace; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.panel-cap .dots { display: flex; gap: 5px; }
.panel-cap .dots i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ===== Why ===== */
.why-section {
    position: relative;
    background: var(--dark);
    color: #fff;
    padding: 100px 28px;
    overflow: hidden;
}
.why-section::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(600px 420px at 15% 10%, rgba(47,107,255,0.22), transparent 60%),
        radial-gradient(560px 420px at 88% 90%, rgba(168,85,247,0.22), transparent 60%);
    pointer-events: none;
}
.why-section .section-header h2 { color: #fff; }
.why-grid { position: relative; max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-card {
    position: relative;
    background: linear-gradient(165deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
    border-radius: var(--radius);
    padding: 32px 26px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform .25s, border-color .25s, box-shadow .25s;
    overflow: hidden;
}
.why-card::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--grad-glow);
    opacity: 0; transition: opacity .25s;
}
.why-card:hover { transform: translateY(-6px); border-color: rgba(33,230,193,0.4); box-shadow: 0 24px 50px -24px rgba(33,230,193,0.4); }
.why-card:hover::after { opacity: 1; }
.why-icon {
    width: 54px; height: 54px;
    border-radius: 14px;
    display: grid; place-items: center;
    background: rgba(47,107,255,0.16);
    border: 1px solid rgba(111,91,255,0.35);
    margin-bottom: 18px;
}
.why-icon svg { width: 28px; height: 28px; stroke: var(--cyan); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.why-card h4 { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: #fff; }
.why-card p { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.65; }

/* ===== Clients ===== */
.clients-section { max-width: var(--maxw); margin: 0 auto; padding: 100px 28px; }
.logo-wall { display: flex; justify-content: center; align-items: center; gap: 18px; margin-bottom: 56px; flex-wrap: wrap; }
.client-logo {
    display: grid; place-items: center;
    min-width: 150px; height: 64px;
    padding: 0 24px;
    border-radius: 14px;
    background: var(--bg-soft);
    border: 1px solid #e7ebf5;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600; font-size: 15px;
    color: var(--ink-soft);
    transition: transform .2s, border-color .2s, color .2s;
}
.client-logo:hover { transform: translateY(-3px); border-color: var(--brand); color: var(--brand); }
.client-logo.bili { color: #00a1d6; font-style: italic; }
.testimonial {
    position: relative;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
    padding: 44px 48px;
    border-radius: 24px;
    background: linear-gradient(160deg, #0e1430, #141b3d);
    color: #fff;
    overflow: hidden;
}
.testimonial::before {
    content: '"';
    position: absolute; top: 6px; left: 30px;
    font-family: 'Space Grotesk', serif;
    font-size: 120px; line-height: 1;
    color: rgba(111,91,255,0.3);
}
.testimonial::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(420px 240px at 85% 110%, rgba(168,85,247,0.3), transparent 60%);
    pointer-events: none;
}
.testimonial p { position: relative; font-size: 20px; font-weight: 500; line-height: 1.6; margin-bottom: 16px; }
.testimonial-author { position: relative; font-size: 14px; color: var(--cyan); }

/* ===== CTA ===== */
.cta-section {
    position: relative;
    text-align: center;
    padding: 120px 28px;
    background: var(--dark);
    color: #fff;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(700px 460px at 50% 120%, rgba(111,91,255,0.5), transparent 60%),
        radial-gradient(520px 360px at 12% 0%, rgba(33,230,193,0.22), transparent 60%);
    pointer-events: none;
}
.cta-inner { position: relative; max-width: 760px; margin: 0 auto; }
.cta-section h2 { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 16px; }
.cta-section p { font-size: 17px; color: rgba(255,255,255,0.7); margin-bottom: 36px; }

/* ===== Footer ===== */
.footer { background: var(--dark); border-top: 1px solid var(--dark-line); padding: 40px 28px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 700; color: #fff; }
.footer-links { font-size: 13px; color: rgba(255,255,255,0.6); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.4); }

/* ===== Case Study ===== */
.case-hero {
    position: relative;
    padding: 150px 28px 80px;
    text-align: center;
    background: var(--dark);
    color: #fff;
    overflow: hidden;
}
.case-hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(620px 440px at 80% 0%, rgba(111,91,255,0.4), transparent 60%),
        radial-gradient(560px 420px at 8% 100%, rgba(33,230,193,0.2), transparent 60%);
    pointer-events: none;
}
.case-hero::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(circle at 50% 30%, #000 25%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 25%, transparent 75%);
    pointer-events: none;
}
.case-hero-inner { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; }
.case-hero .service-tag { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); color: var(--cyan); }
.case-hero h1 { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.18; margin-bottom: 16px; }
.case-hero .hero-sub { font-size: 17px; color: rgba(255,255,255,0.7); margin-bottom: 40px; }
.case-hero .hero-stats { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.case-hero .stat { flex: 0 1 170px; }

.case-capabilities { padding: 100px 28px; }
.section-inner { max-width: var(--maxw); margin: 0 auto; }

/* light cards (capabilities) */
.case-capabilities .why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.case-capabilities .why-card {
    background: #fff;
    border: 1px solid #e7ebf5;
    box-shadow: 0 18px 40px -28px rgba(15,23,60,0.3);
}
.case-capabilities .why-card:hover { border-color: var(--brand); box-shadow: 0 24px 50px -24px rgba(47,107,255,0.35); }
.case-capabilities .why-card::after { background: var(--grad); }
.case-capabilities .why-icon { background: rgba(47,107,255,0.1); border-color: rgba(47,107,255,0.2); }
.case-capabilities .why-icon svg { stroke: var(--brand); }
.case-capabilities .why-card h4 { color: var(--ink); }
.case-capabilities .why-card p { color: var(--ink-soft); }

.case-framework { padding: 100px 28px; background: var(--bg-soft); }
.case-findings { padding: 100px 28px; }
.case-prediction { padding: 100px 28px; background: var(--bg-soft); }
.framework-visual, .findings-timeline {
    background: linear-gradient(160deg, #0e1430, #141b3d);
    border-radius: 22px;
    padding: 36px;
    border: 1px solid var(--dark-line);
    overflow-x: auto;
    box-shadow: 0 30px 60px -30px rgba(15,23,60,0.5);
}
.framework-svg, .findings-svg { width: 100%; min-width: 700px; height: auto; display: block; }
.case-prediction .service-row { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 72px; }
.case-prediction .service-visual { flex: 0 0 320px; }

/* ===== Scroll reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
    will-change: opacity, transform;
}
.reveal.left  { transform: translateX(-40px); }
.reveal.right { transform: translateX(40px); }
.reveal.scale { transform: scale(.94); }
.reveal.in { opacity: 1; transform: none; }

/* hero entrance */
.hero-content > * { opacity: 0; transform: translateY(22px); animation: heroIn .8s cubic-bezier(.22,.61,.36,1) forwards; }
.hero-content > *:nth-child(1) { animation-delay: .05s; }
.hero-content > *:nth-child(2) { animation-delay: .15s; }
.hero-content > *:nth-child(3) { animation-delay: .25s; }
.hero-content > *:nth-child(4) { animation-delay: .35s; }
.hero-content > *:nth-child(5) { animation-delay: .45s; }
.hero-visual { opacity: 0; animation: visualIn 1s cubic-bezier(.22,.61,.36,1) .35s forwards; }
@keyframes heroIn { to { opacity: 1; transform: none; } }
@keyframes visualIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .reveal, .hero-content > *, .hero-visual { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .hero-inner { flex-direction: column; }
    .hero-visual { flex: none; width: 100%; max-width: 360px; }
    .hero h1 { font-size: 40px; }
    .service-row, .service-row.reverse { flex-direction: column; }
    .service-visual { flex: none; width: 100%; max-width: 360px; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .case-capabilities .why-grid { grid-template-columns: 1fr; }
    .case-prediction .service-row { flex-direction: column; }
    .nav-links { display: none; }
}
@media (max-width: 600px) {
    .hero h1 { font-size: 32px; }
    .section-header h2, .cta-section h2 { font-size: 28px; }
    .hero-stats { flex-wrap: wrap; }
    .stat { flex: 1 1 40%; }
    .why-grid { grid-template-columns: 1fr; }
    .logo-wall { gap: 12px; }
}
