/* SchemaLang Documentation Site Styles */

:root {
    --bg: #0a0a0a;
    --surface: #111111;
    --surface-alt: #161616;
    --text: #d4d4d4;
    --text-dim: #808080;
    --text-faded: #4a4a4a;
    --accent: #48b07a;
    --accent-dim: rgba(72, 176, 122, 0.12);
    --border: #222222;
    --border-hover: #333333;
    --code-bg: #0d0d0d;
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* Typography */
h1 { font-size: 2.5rem; margin-bottom: 1rem; font-weight: 600; }
h2 { font-size: 1.8rem; margin: 2rem 0 1rem; font-weight: 600; }
h3 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; font-weight: 600; }
h4 { font-size: 1.1rem; margin: 1rem 0 0.5rem; font-weight: 600; }

p { margin-bottom: 1rem; }
.lead { font-size: 1.15rem; color: var(--text-dim); margin-bottom: 2rem; }

a { color: var(--text); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

code {
    background: var(--surface);
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border);
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.85em;
}

pre {
    background: var(--code-bg);
    color: #d4d4d4;
    padding: 1.5rem;
    border: 1px solid var(--border);
    overflow-x: auto;
    margin: 1rem 0;
}
pre code { background: none; padding: 0; color: inherit; border: none; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    background: var(--surface);
    color: var(--text);
}

.btn:hover {
    border-color: var(--border-hover);
    background: var(--surface-alt);
    color: #fff;
}

.btn-primary {
    background: #fff;
    color: #0a0a0a;
    border-color: #fff;
}

.btn-primary:hover {
    background: #e0e0e0;
    color: #0a0a0a;
    border-color: #e0e0e0;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--border-hover);
    color: #fff;
}

.btn-large {
    padding: 0.9rem 2rem;
    font-size: 0.9rem;
}

/* Header */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.logo-icon { font-size: 1.4rem; }

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #fff;
}

/* Hero Section */
.hero {
    padding: 5rem 2rem 4rem;
    border-bottom: 1px solid var(--border);
}

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

.hero-badge {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(72, 176, 122, 0.2);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 1.4rem;
    color: var(--text-dim);
    font-weight: 400;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    color: var(--text-faded);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-code {
    max-width: 760px;
    margin: 3rem auto 0;
}

.code-window {
    background: var(--code-bg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.code-header {
    background: var(--surface);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-faded);
}

.code-dot:nth-child(2) { background: var(--text-faded); }
.code-dot:nth-child(3) { background: var(--text-faded); }

.code-title {
    margin-left: auto;
    color: var(--text-faded);
    font-size: 0.8rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Features Section */
.features, .targets, .example, .use-cases {
    padding: 4rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.features h2, .targets h2, .example h2, .use-cases h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 0.5rem;
}

.features h2::after, .targets h2::after, .example h2::after, .use-cases h2::after {
    content: '';
    display: block;
    width: 30px;
    height: 1px;
    background: var(--text-faded);
    margin: 1rem auto 2.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    background: var(--border);
}

.feature-card {
    padding: 2rem;
    background: var(--bg);
    transition: background 0.2s;
}

.feature-card:hover {
    background: var(--surface);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    filter: grayscale(1);
}

.feature-card h3 {
    font-size: 1rem;
    color: #fff;
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 0;
}

/* Targets Section */
.targets {
    border-top: 1px solid var(--border);
}

.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1px;
    background: var(--border);
}

.target-category {
    background: var(--bg);
    padding: 2rem;
}

.target-category h3 {
    font-size: 0.95rem;
    color: #fff;
    margin: 0 0 1rem;
}

.target-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.target-item {
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-left: 2px solid var(--border);
}

.target-item strong { color: #fff; }
.target-item p { font-size: 0.85rem; color: var(--text-dim); margin: 0.25rem 0 0; }

.status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.status-stable {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(72, 176, 122, 0.2);
}

.status-beta {
    background: rgba(200, 170, 60, 0.1);
    color: #c8aa3c;
    border: 1px solid rgba(200, 170, 60, 0.2);
}

.status-planned {
    background: rgba(128,128,128,0.1);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

/* Example Section */
.example-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}

.example-input, .example-outputs {
    background: var(--bg);
    padding: 1.5rem;
}

.example-input h3, .example-outputs h3 {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 0 0 1rem;
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-faded);
    transition: all 0.2s;
}

.tab-btn.active {
    color: #fff;
    border-bottom-color: #fff;
}

.tab-btn:hover { color: var(--text-dim); }

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Use Cases */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    background: var(--border);
}

.use-case-card {
    padding: 2rem;
    background: var(--bg);
}

.use-case-card h3 {
    font-size: 1rem;
    color: #fff;
    margin: 0 0 0.5rem;
    filter: grayscale(1);
}

.use-case-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 0;
}

/* CTA Section */
.cta {
    background: #fff;
    color: #0a0a0a;
    text-align: center;
    padding: 4rem 2rem;
}

.cta h2 {
    color: #0a0a0a;
    font-size: 1.8rem;
}

.cta h2::after {
    background: #ccc;
}

.cta p {
    color: #555;
}

.cta .btn-primary {
    background: #0a0a0a;
    color: #fff;
    border-color: #0a0a0a;
}

.cta .btn-primary:hover {
    background: #222;
    border-color: #222;
}

.cta .btn-secondary {
    color: #0a0a0a;
    border-color: #ccc;
}

.cta .btn-secondary:hover {
    background: #f0f0f0;
    border-color: #aaa;
}

/* Docs Page Layout */
.docs-page {
    display: grid;
    grid-template-columns: 220px 1fr;
    max-width: 1100px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

.docs-sidebar {
    background: var(--bg);
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.docs-nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-section h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-faded);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.nav-link {
    display: block;
    padding: 0.4rem 0.75rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-bottom: 0.15rem;
}

.nav-link:hover {
    color: #fff;
    background: var(--surface);
}

.nav-link.active {
    color: #fff;
    background: var(--surface);
    border-left: 2px solid #fff;
}

.docs-content {
    padding: 3rem;
}

.docs-content section {
    margin-bottom: 3rem;
}

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.docs-table thead {
    background: var(--surface);
}

.docs-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.docs-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

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

/* Info Boxes */
.info-box {
    background: var(--surface);
    border-left: 2px solid var(--text-dim);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.warning-box {
    background: rgba(200, 170, 60, 0.05);
    border-left: 2px solid #c8aa3c;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

/* Next Steps Grid */
.next-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    background: var(--border);
    margin: 2rem 0;
}

.next-step-card {
    padding: 1.5rem;
    background: var(--bg);
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.next-step-card:hover {
    background: var(--surface);
}

.next-step-card h3 {
    margin-top: 0;
    color: #fff;
    font-size: 1rem;
}

.next-step-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Footer */
.site-footer {
    background: var(--surface);
    color: var(--text);
    padding: 3rem 2rem 1.5rem;
    margin-top: 0;
    border-top: 1px solid var(--border);
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.footer-section p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin: 0.4rem 0;
}

.footer-section a {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    text-align: center;
    color: var(--text-faded);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 968px) {
    .hero h1 { font-size: 2.2rem; }
    .docs-page { grid-template-columns: 1fr; }
    .docs-sidebar { position: relative; top: 0; height: auto; }
    .example-container { grid-template-columns: 1fr; }
    .target-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .hero-stats { flex-direction: column; gap: 1.5rem; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .main-nav { gap: 1rem; font-size: 0.8rem; }
    .feature-grid { grid-template-columns: 1fr; }
}
