/* ===== RICO ZHAO · LEGAL AI — Vanta-Inspired Dark Enterprise ===== */
/* Design: Inter + Space Grotesk | Dark Glassmorphism | Purple Accent */

/* --- Typography --- */
.font-heading { font-family: 'Space Grotesk', sans-serif; }
.font-body { font-family: 'Inter', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* --- Dark Background --- */
.bg-dark {
    background-color: #0B0014;
    background-image:
        radial-gradient(at 20% 0%, rgba(172,85,255,0.08) 0, transparent 50%),
        radial-gradient(at 80% 100%, rgba(172,85,255,0.05) 0, transparent 50%);
}

.bg-grid-dot {
    background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, #AC55FF, #E8CBFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-subtle {
    background: linear-gradient(135deg, #c4c0cc, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Dark Cards --- */
.card-dark {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-dark:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(172, 85, 255, 0.2);
    box-shadow: 0 0 40px rgba(172, 85, 255, 0.06);
}

.card-dark-static {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

/* --- Hero Card --- */
.hero-card {
    background: linear-gradient(135deg, rgba(172,85,255,0.08), rgba(172,85,255,0.02));
    border: 1px solid rgba(172, 85, 255, 0.12);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
.hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(172,85,255,0.4), transparent);
}

/* --- Bento Grid Layout --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.bento-featured {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-wide {
    grid-column: span 2;
}

.bento-tall {
    grid-row: span 2;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-featured {
        grid-column: span 2;
        grid-row: span 1;
    }
    .bento-wide {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-featured,
    .bento-wide,
    .bento-tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* --- Glass Card (for content pages) --- */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(172, 85, 255, 0.15);
}

/* --- Purple glow border on hover --- */
.glow-hover {
    position: relative;
    overflow: hidden;
}
.glow-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(172,85,255,0.4), rgba(172,85,255,0.1), rgba(172,85,255,0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.glow-hover:hover::before {
    opacity: 1;
}

/* --- Chips (filters) --- */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 18px;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.03);
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none;
}
.chip:hover {
    color: rgba(255,255,255,0.9);
    border-color: rgba(172,85,255,0.3);
    background: rgba(172,85,255,0.08);
}
.chip-active {
    color: #fff;
    background: #AC55FF;
    border-color: #AC55FF;
    box-shadow: 0 4px 20px rgba(172,85,255,0.3);
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.badge-us { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.15); }
.badge-cn { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.15); }
.badge-eu { background: rgba(234,179,8,0.12); color: #facc15; border: 1px solid rgba(234,179,8,0.15); }
.badge-law { background: rgba(172,85,255,0.12); color: #c084fc; border: 1px solid rgba(172,85,255,0.15); }
.badge-news { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.15); }

/* --- Nav --- */
.nav-link {
    color: rgba(255,255,255,0.4);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
    text-decoration: none;
}
.nav-link:hover { color: #ffffff; }

/* --- Accent glow line --- */
.accent-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(172,85,255,0.3), transparent);
}

/* --- Accent Bar --- */
.accent-bar {
    width: 28px; height: 3px; border-radius: 2px;
    background: linear-gradient(135deg, #AC55FF, #E8CBFF);
}

/* --- Pulse Dot --- */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}
.pulse-dot { animation: pulse-dot 2.5s ease-in-out infinite; }

/* --- Shimmer Text --- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.shimmer-text {
    background: linear-gradient(90deg, #AC55FF 0%, #E8CBFF 25%, #ffffff 50%, #E8CBFF 75%, #AC55FF 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 5s linear infinite;
}

/* --- Floating orbs (dark variant) --- */
@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10px, -15px) scale(1.02); }
    66% { transform: translate(-8px, 8px) scale(0.98); }
}
@keyframes float-medium {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-12px, -10px); }
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.orb-1 {
    width: 350px; height: 350px;
    background: rgba(172,85,255,0.15);
    top: -80px; right: -60px;
    animation: float-slow 10s ease-in-out infinite;
}
.orb-2 {
    width: 280px; height: 280px;
    background: rgba(172,85,255,0.08);
    bottom: -60px; left: -50px;
    animation: float-medium 12s ease-in-out infinite;
}

/* --- Accent underline --- */
.accent-underline {
    text-decoration: none;
    background-image: linear-gradient(135deg, #AC55FF, #E8CBFF);
    background-size: 0 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
}
.accent-underline:hover { background-size: 100% 1px; }

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #AC55FF;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(172,85,255,0.25);
}
.btn-primary:hover {
    background: #b968ff;
    box-shadow: 0 6px 30px rgba(172,85,255,0.35);
    transform: translateY(-1px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}
.btn-ghost:hover {
    color: #fff;
    border-color: rgba(172,85,255,0.3);
    background: rgba(172,85,255,0.08);
}

/* --- Article Content --- */
.article-content h1 { font-family: 'Space Grotesk', sans-serif; font-size: 1.875rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: #f1f5f9; }
.article-content h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 600; margin: 1.25rem 0 0.5rem; color: #e2e8f0; }
.article-content h3 { font-size: 1.1rem; font-weight: 600; margin: 1rem 0 0.5rem; color: #cbd5e1; }
.article-content p { margin: 0.75rem 0; line-height: 1.85; color: rgba(255,255,255,0.55); }
.article-content ul, .article-content ol { margin: 0.75rem 0; padding-left: 1.5rem; color: rgba(255,255,255,0.55); }
.article-content li { margin: 0.25rem 0; line-height: 1.85; }
.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }
.article-content a { color: #AC55FF; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(172,85,255,0.3); }
.article-content a:hover { text-decoration-color: #AC55FF; }
.article-content blockquote {
    border-left: 3px solid #AC55FF;
    padding-left: 1.25rem; margin: 1.25rem 0;
    color: rgba(255,255,255,0.4); font-style: italic;
}
.article-content code {
    background: rgba(172,85,255,0.1);
    padding: 0.15rem 0.4rem; border-radius: 5px;
    font-size: 0.85rem; font-family: 'JetBrains Mono', monospace; color: #c084fc;
}
.article-content pre {
    background: rgba(0,0,0,0.4); color: #e2e8f0;
    padding: 1.25rem; border-radius: 12px; overflow-x: auto; margin: 1.25rem 0;
    border: 1px solid rgba(255,255,255,0.06);
}
.article-content pre code { background: none; padding: 0; color: inherit; }

/* --- Line Clamp --- */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Animations --- */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fade-in-up 0.7s ease-out forwards; opacity: 0; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-fade-in { animation: fade-in 0.5s ease-out forwards; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .animate-fade-in-up, .animate-fade-in, .orb, .shimmer-text, .pulse-dot { animation: none; opacity: 1; }
}

/* --- Divider --- */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}

/* --- Focus Visible --- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #AC55FF;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* --- Selection --- */
::selection {
    background: rgba(172,85,255,0.3);
    color: #fff;
}

/* --- Geometric decoration --- */
.geo-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* --- Top glow line for cards --- */
.top-glow {
    position: relative;
}
.top-glow::after {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(172,85,255,0.3), transparent);
    pointer-events: none;
}

/* --- Stat number --- */
.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff, rgba(255,255,255,0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Logo mark --- */
.logo-mark {
    width: 32px; height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #AC55FF, #7C3AED);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 2px 12px rgba(172,85,255,0.3);
}
