/* ===== AI Hub Common Styles ===== */
/* Shared across all pages: index.html, sdk-download.html, sdks.html */

/* ===== CSS VARIABLES ===== */
:root {
    --color-bg-primary: #f8fafc;
    --color-bg-secondary: #f1f5f9;
    --color-bg-card: rgba(255, 255, 255, 0.85);
    --color-bg-glass: rgba(0, 0, 0, 0.03);
    --color-accent-primary: #3b82f6;
    --color-accent-secondary: #8b5cf6;
    --color-accent-success: #10b981;
    --color-accent-warning: #f59e0b;
    --color-accent-danger: #ef4444;
    --color-text-primary: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(6, 182, 212, 0.1) 50%, rgba(139, 92, 246, 0.15) 100%);
    --font-heading: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
    --font-body: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius-card: 1rem;
    --radius-button: 0.5rem;
    --transition-default: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== UTILITIES ===== */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 0; position: relative; }
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.glass-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: var(--transition-default);
}
.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-border {
    position: relative;
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-card);
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-button);
    cursor: pointer;
    transition: var(--transition-default);
    border: none;
    font-family: inherit;
}
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}
.btn-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid rgba(0, 0, 0, 0.15);
}
.btn-secondary:hover {
    border-color: var(--color-accent-primary);
    background: rgba(59, 130, 246, 0.08);
}
.btn-outline {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px dashed rgba(0, 0, 0, 0.15);
}
.btn-outline:hover {
    border-color: var(--color-accent-secondary);
    color: var(--color-text-primary);
}
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
    50% { opacity: 0.8; box-shadow: 0 0 40px rgba(245, 158, 11, 0.5); }
}
@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--color-accent-primary); }
}
.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition-default);
}
.nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
}
.nav-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-brand-logo {
    height: 32px;
    width: auto;
    display: block;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-links a {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-text-primary); }
.nav-cta { padding: 0.625rem 1.5rem; font-size: 0.9375rem; }
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: var(--transition-default);
}

/* ===== HERO (Base) ===== */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--color-accent-primary);
    margin-bottom: 1.5rem;
}
.hero-title {
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}
.hero-subtitle {
    color: var(--color-text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== CTA ===== */
.cta {
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}
.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}
.cta-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}
.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}
.cta-trust {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.cta-trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}
.cta-trust-item svg {
    width: 18px;
    height: 18px;
    color: var(--color-accent-success);
}

/* ===== FOOTER ===== */
.footer {
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid;
    border-image: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent) 1;
    padding: 4rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.footer-desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}
.footer-column h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}
.footer-column a {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    padding: 0.375rem 0;
    transition: color 0.2s;
}
.footer-column a:hover { color: var(--color-accent-primary); }
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ===== CS MODAL ===== */
.cs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cs-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.cs-modal {
    background: var(--color-bg-card);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}
.cs-modal-overlay.active .cs-modal {
    transform: scale(1) translateY(0);
}
.cs-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    transition: background 0.2s ease;
}
.cs-modal-close:hover {
    background: rgba(0, 0, 0, 0.15);
}
.cs-modal-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 0.5rem;
    margin: 0 auto 1rem;
    display: block;
}
.cs-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}
.cs-modal-desc {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .nav-toggle { display: flex; }
    .footer-grid { grid-template-columns: 1fr; }
}
