/* ZedLicense — Vercel-inspired design system */

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

:root {
    --bg: #000000;
    --bg-elevated: #0a0a0a;
    --bg-card: #111111;
    --border: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(255, 255, 255, 0.28);
    --text: #ededed;
    --text-secondary: #888888;
    --text-muted: #666666;
    --accent: #0070f3;
    --accent-glow: rgba(0, 112, 243, 0.35);
    --grid-color: rgba(255, 255, 255, 0.04);
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-w: 1200px;
    --nav-h: 64px;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --code-bg: #0d0d0d;
}

body.light-mode {
    --bg: #ffffff;
    --bg-elevated: #fafafa;
    --bg-card: #ffffff;
    --border: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.25);
    --text: #171717;
    --text-secondary: #666666;
    --text-muted: #999999;
    --grid-color: rgba(0, 0, 0, 0.04);
    --code-bg: #f4f4f5;
}

html { scroll-behavior: smooth; }

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

/* Background */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg);
}
.page-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}
.page-bg::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px;
    height: 500px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
}
body.light-mode .nav { background: rgba(255, 255, 255, 0.85); }

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem 1rem;
}

.nav-logo {
    grid-column: 1;
    flex-shrink: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo-mark {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}
body.light-mode .nav-logo-mark { background: #000; }
.nav-logo-mark i { font-size: 10px; color: #000; }
body.light-mode .nav-logo-mark i { color: #fff; }

.nav-links {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    min-width: 0;
}
.nav-links li {
    display: flex;
    flex-shrink: 0;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    transition: color 0.15s;
    white-space: nowrap;
    line-height: 1.25;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-actions {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
}
.nav-actions .btn {
    font-size: 0.8125rem;
    padding: 0 0.75rem;
    height: 34px;
}
.nav-actions .btn-primary {
    padding: 0 0.85rem;
}

.nav-toggler {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 24px 1.5rem;
    z-index: 99;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0 1rem;
    height: 36px;
    border-radius: var(--radius);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: inherit;
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.04); }
body.light-mode .btn-ghost:hover { background: rgba(0,0,0,0.04); }

.btn-primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
body.light-mode .btn-primary { background: #000; color: #fff; border-color: #000; }

.btn-lg { height: 48px; padding: 0 1.5rem; font-size: 0.9375rem; }

.lang-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
.theme-toggle:hover { border-color: var(--border-hover); color: var(--text); }

/* Cards */
.vc-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    padding: 1.75rem;
}

/* Forms */
.vc-input,
.form-control-modern {
    width: 100%;
    height: 44px;
    padding: 0 0.875rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.vc-input:focus,
.form-control-modern:focus {
    outline: none;
    border-color: var(--border-hover);
}
textarea.vc-input,
textarea.form-control-modern { height: auto; min-height: 100px; padding: 0.75rem; resize: vertical; }

.vc-label,
.form-label-modern {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Alerts */
.vc-alert {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.vc-alert-success { border-color: rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.08); color: var(--success); }
.vc-alert-warning { border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.08); color: var(--warning); }
.vc-alert-danger { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.08); color: var(--danger); }
.vc-alert-info { border-color: rgba(0, 112, 243, 0.3); background: rgba(0, 112, 243, 0.08); color: var(--accent); }

/* Tables */
.vc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.vc-table th,
.vc-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
html[dir="rtl"] .vc-table th,
html[dir="rtl"] .vc-table td { text-align: right; }
.vc-table th { color: var(--text-muted); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.vc-table td { color: var(--text-secondary); }
.vc-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Terminal */
.terminal {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    overflow: hidden;
    text-align: left;
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.terminal-body {
    padding: 1.25rem 1.5rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}
.terminal-body .cmd { color: var(--text); }
.terminal-body .ok { color: var(--success); }
.terminal-body .key { color: #79b8ff; }

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-brand p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; margin-top: 0.75rem; max-width: 280px; }
.footer-col h5 { font-size: 0.8125rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { font-size: 0.8125rem; color: var(--text-secondary); text-decoration: none; transition: color 0.15s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.footer-bottom a { color: var(--text-secondary); text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }

/* Sections */
.section-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.section-desc {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
}

/* Animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Bootstrap overrides for public pages */
.dropdown-menu { background: var(--bg-card); border: 1px solid var(--border); }
.dropdown-item { color: var(--text); font-size: 0.875rem; }
.dropdown-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }

@media (max-width: 1200px) {
    .nav-buy { display: none !important; }
    .nav-docs { display: none !important; }
}
@media (max-width: 992px) {
    .nav-links, .nav-actions .btn-ghost:not(.nav-login) { display: none; }
    .nav-toggler { display: block; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 576px) {
    .footer-grid { grid-template-columns: 1fr; }
}
