/* ==========================================================================
   Deeployd Design System
   ========================================================================== */

:root {
    /* Colors - Dark theme with cyan/violet accents */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;
    --bg-card: #141416;
    --bg-card-hover: #1a1a1d;
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    
    --accent-cyan: #06b6d4;
    --accent-cyan-dark: #0891b2;
    --accent-violet: #8b5cf6;
    --accent-violet-dark: #7c3aed;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    
    --gradient-primary: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);
    
    /* Typography */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

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

ul, ol {
    list-style: none;
}

/* ==========================================================================
   Background Effects
   ========================================================================== */

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 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;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 800px;
}

section {
    padding: var(--space-5xl) 0;
    position: relative;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
}

.text-mono {
    font-family: var(--font-mono);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-tertiary {
    color: var(--text-tertiary);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-base);
}

.nav.scrolled {
    background: rgba(10, 10, 11, 0.95);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--space-sm);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    color: var(--text-primary);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
}

.btn-small {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.85rem;
}

.btn-icon {
    padding: var(--space-sm);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-fast);
}

.input::placeholder {
    color: var(--text-tertiary);
}

.input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.input-group {
    display: flex;
    gap: var(--space-sm);
}

.input-group .input {
    flex: 1;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.card-highlight {
    position: relative;
    overflow: hidden;
}

.card-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card-highlight:hover::before {
    opacity: 1;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
}

.card-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--gradient-subtle);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-emerald);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.protocol-badge {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.protocol-badge-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.65rem;
    color: white;
}

.protocol-badge-icon.mcp {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-cyan-dark));
}

.protocol-badge-icon.a2a {
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-violet-dark));
}

.protocol-badge-icon.check {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-emerald);
}

/* ==========================================================================
   Section Components
   ========================================================================== */

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
    max-width: 700px;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: var(--space-3xl);
    line-height: 1.7;
}

.section-dark {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.section-gradient {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* ==========================================================================
   Code Block
   ========================================================================== */

.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
    box-shadow: var(--shadow-xl);
}

.code-block-header {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.code-block-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-block-dot.red { background: #ff5f57; }
.code-block-dot.yellow { background: #febc2e; }
.code-block-dot.green { background: #28c840; }

.code-line { display: block; }
.code-comment { color: var(--text-tertiary); }
.code-keyword { color: var(--accent-violet); }
.code-function { color: var(--accent-cyan); }
.code-string { color: var(--accent-emerald); }
.code-number { color: var(--accent-amber); }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.table th,
.table td {
    padding: var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 0.9rem;
}

.table th:first-child {
    width: 30%;
}

.table td {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.table tr:last-child td {
    border-bottom: none;
}

.table .highlight-col {
    background: rgba(6, 182, 212, 0.05);
}

.table th.highlight-col {
    background: var(--gradient-primary);
    color: white;
}

.check-icon { color: var(--accent-emerald); }
.cross-icon { color: var(--text-tertiary); }

/* ==========================================================================
   Pricing
   ========================================================================== */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    align-items: start;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
    position: relative;
}

.pricing-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.pricing-card.featured {
    border-color: var(--accent-cyan);
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.05) 0%, var(--bg-card) 100%);
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
}

.pricing-tier {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-tertiary);
}

.pricing-desc {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.pricing-features {
    margin-bottom: var(--space-xl);
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.pricing-features li svg {
    flex-shrink: 0;
    color: var(--accent-emerald);
    margin-top: 2px;
}

.pricing-card .btn {
    width: 100%;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

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

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-links a {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

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

.footer-copy {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mx-auto { margin-left: auto; margin-right: auto; }

.hidden { display: none !important; }
.visible { display: block !important; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* ==========================================================================
   Animations
   ========================================================================== */

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

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

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade {
    animation: fadeIn 0.4s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: var(--space-3xl) 0;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: block;
    }
    
    .pricing-grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .table th,
    .table td {
        padding: var(--space-md);
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
}
