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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
    background: #FFFFFF;
    color: #0F172A;
    overflow-x: hidden;
}

/* 动态背景渐变 */
.gradient-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg,
        #EEF2FF 0%,
        #F0F9FF 25%,
        #FFFFFF 50%,
        #F0FDFA 75%,
        #EEF2FF 100%);
    background-size: 400% 400%;
    animation: gradient-flow 15s ease infinite;
    z-index: 0;
}

@keyframes gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 浮动渐变球 */
.floating-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #818CF8, #C084FC);
    top: -100px;
    left: -100px;
    animation: float-1 20s ease-in-out infinite;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #06B6D4, #10B981);
    bottom: -80px;
    right: -80px;
    animation: float-2 25s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #F472B6, #FB923C);
    top: 50%;
    left: 50%;
    animation: float-3 30s ease-in-out infinite;
}

@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 80px) scale(1.1); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-80px, -60px) scale(1.15); }
}

@keyframes float-3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(calc(-50% + 60px), calc(-50% - 40px)) scale(1.05); }
}

/* 交互线条发光背景 */
.grid-glow-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.9;
}
@media (max-width: 768px) {
    .grid-glow-canvas { display: none; }
}

/* 网格点阵背景 */
.dot-pattern {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, #CBD5E1 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.4;
    z-index: 0;
}

/* 容器 */
.container {
    position: relative;
    z-index: 10;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px) saturate(180%);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 24px;
    font-weight: 700;
    color: #1E293B;
    text-decoration: none;
    margin-left: -8px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #fff;
}

.logo-container {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
}

.logo-subtitle {
    font-size: 17px;
    font-weight: 600;
    background: linear-gradient(90deg, #4F46E5, #06B6D4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nav-link-bento {
    color: #4991e5 !important;
}

.nav-link-enterprise {
    color: #3bd4cb !important;
}

.btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    padding: 10px 24px;
    background: white;
    color: #4F46E5;
    border: 2px solid #E0E7FF;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #F5F3FF;
    border-color: #C7D2FE;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: white;
    border: 1px solid #E0E7FF;
    border-radius: 24px;
    color: #4F46E5;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
    animation: badge-pulse 3s ease infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1); }
    50% { box-shadow: 0 4px 16px rgba(79, 70, 229, 0.2); }
}

.hero-title {
    font-size: 68px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -2px;
    color: #0F172A;
}

.gradient-text {
    background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 50%, #10B981 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 26px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 16px;
}

.hero-description {
    font-size: 18px;
    color: #64748B;
    margin-bottom: 40px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 80px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #F1F5F9;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-value {
    font-size: 44px;
    font-weight: 800;
    background: linear-gradient(135deg, #4F46E5, #10B981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #64748B;
    font-weight: 500;
}

/* Section */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-badge {
    display: inline-block;
    padding: 4px 14px;
    background: #EEF2FF;
    border: 1px solid #E0E7FF;
    border-radius: 16px;
    color: #4F46E5;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #0F172A;
}

.section-description {
    font-size: 18px;
    color: #64748B;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.feature-card {
    background: white;
    border: 1px solid #F1F5F9;
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4F46E5, #06B6D4);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: #E0E7FF;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #EEF2FF, #DBEAFE);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1E293B;
}

.feature-description {
    color: #64748B;
    line-height: 1.6;
    font-size: 15px;
}

/* Demo Section */
.demo-container {
    background: white;
    border: 1px solid #F1F5F9;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.demo-preview {
    background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
}

.demo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

/* Use Cases */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

.use-case-card {
    background: white;
    border: 1px solid #F1F5F9;
    border-radius: 20px;
    padding: 36px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.use-case-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #EEF2FF, transparent);
    border-radius: 0 20px 0 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: #E0E7FF;
}

.use-case-card:hover::after {
    opacity: 1;
}

.use-case-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.use-case-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #1E293B;
}

.use-case-description {
    color: #64748B;
    line-height: 1.7;
    margin-bottom: 24px;
}

.use-case-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #F1F5F9;
}

.use-case-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #4F46E5;
    margin-bottom: 4px;
}

.use-case-stat-label {
    font-size: 13px;
    color: #64748B;
}

/* Technology Stack */
.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.tech-item {
    background: white;
    border: 1px solid #F1F5F9;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s ease;
}

.tech-item:hover {
    border-color: #E0E7FF;
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.tech-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #EEF2FF, #DBEAFE);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.tech-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1E293B;
}

.tech-description {
    font-size: 13px;
    color: #64748B;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #EEF2FF 0%, #DBEAFE 100%);
    border: 1px solid #E0E7FF;
    border-radius: 28px;
    padding: 64px 48px;
    text-align: center;
    margin: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(79, 70, 229, 0.05), transparent);
    animation: shine 3s ease infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.cta-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #0F172A;
    position: relative;
    z-index: 1;
}

.cta-description {
    font-size: 18px;
    color: #475569;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Footer */
.footer {
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1E293B;
}

.footer-description {
    color: #64748B;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 14px;
}

.footer-section-title {
    font-weight: 700;
    margin-bottom: 16px;
    color: #1E293B;
    font-size: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #64748B;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 14px;
}

.footer-links a:hover {
    color: #4F46E5;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid #E2E8F0;
    text-align: center;
    color: #64748B;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-title { font-size: 42px; }
    .hero-subtitle { font-size: 20px; }
    .stats-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 32px; }
    .features-grid, .use-cases-grid, .tech-stack-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }
    .cta-title { font-size: 32px; }
}

/* =========================================
   ICD Hero Styles (Integrated)
   ========================================= */
#hero-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0a0e14;
    color: #fff;
    margin-top: -80px; /* Counteract navbar padding if needed */
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#hero-content-3d {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    padding: 0 40px;
    pointer-events: none;
}

.hero-label-3d {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6a9adf;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.hero-title-3d {
    font-size: clamp(32px, 5vw, 72px);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.7s forwards;
    color: white;
}

.hero-title-line {
    display: block;
}

.hero-title-devin {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    justify-content: center;
}

.bracket {
    color: #6a9adf;
    font-size: 1.1em;
}

.devin-text {
    background: linear-gradient(135deg, #6a9adf 0%, #aee8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.hero-subtitle-3d {
    font-size: clamp(14px, 2vw, 18px);
    color: #8ab4ff;
    font-weight: 400;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.9s forwards;
}

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

/* Loading indicator */
#loading {
    position: fixed;
    inset: 0;
    background: #0a0e14;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    font-size: 14px;
    color: #6a9adf;
    letter-spacing: 0.1em;
}

/* ICD Codes Display */
#icd-codes-overlay {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: none;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
}

.icd-codes-label {
    font-size: 12px;
    color: #6a9adf;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
}

.icd-codes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 90vw;
    padding: 0 20px;
}

.icd-code-item {
    background: rgba(106, 154, 223, 0.1);
    border: 1px solid rgba(106, 154, 223, 0.3);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: #8ab4ff;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease-out backwards;
}

.icd-code-item:hover {
    background: rgba(106, 154, 223, 0.2);
    border-color: rgba(106, 154, 223, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 154, 223, 0.3);
}

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

/* Stagger animation delays */
.icd-code-item:nth-child(n) {
    animation-delay: calc(1.5s + var(--delay) * 0.03s);
}

/* Floating codes background effect */
#floating-codes {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-code {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: rgba(106, 154, 223, 0.15);
    white-space: nowrap;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Polished Hero Styles */
#hero-section {
    padding: 0;
    background: #0a0e14;
    overflow: hidden;
}

#hero-section .hero-cta {
    margin-top: 40px;
    justify-content: center;
    position: relative;
    z-index: 10;
}

#hero-section .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}
