/* Theme variables bridged to the Tradik Design System
   (css/tradik-tokens.css, vendored from designstyles.tradik.com).
   Radius and shadow scales come straight from the token file. */
:root {
    --primary-color: var(--color-fg-accent);
    --primary-dark: var(--color-accent-bgHover);
    --secondary-color: var(--color-fg-muted);
    --accent-color: var(--color-palette-signal-info);
    --success-color: var(--color-palette-signal-success);
    --bg-color: var(--color-bg-canvas);
    --bg-secondary: var(--color-bg-subtle);
    --bg-tertiary: var(--color-bg-sunken);
    --text-primary: var(--color-fg-primary);
    --text-secondary: var(--color-fg-secondary);
    --text-muted: var(--color-fg-muted);
    --border-color: var(--color-border-default);
    --code-bg: var(--color-bg-inverse);
    --code-text: var(--color-palette-ink-200);
    --shadow-xl: var(--shadow-lg);
    --transition: all var(--motion-duration-base) var(--motion-easing-standard);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Accessibility */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
}

.skip-to-main:focus {
    left: 1rem;
    top: 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Tradik Design System: serif display face for headline levels */
h1, h2 {
    font-family: var(--font-family-display);
    font-weight: var(--font-weight-regular);
    letter-spacing: var(--letter-spacing-tight);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* Anchor Links */
.anchor-link {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75em;
    opacity: 0;
    margin-left: 0.25em;
    transition: opacity 0.2s ease, color 0.2s ease;
    text-decoration: none;
    vertical-align: middle;
}

h2:hover .anchor-link,
.example-tab:hover .anchor-link,
.anchor-link:focus {
    opacity: 1;
}

.anchor-link:hover {
    color: var(--primary-color);
    opacity: 1;
}

.example-tab .anchor-link {
    font-size: 0.8em;
    font-weight: 400;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

.logo {
    font-size: 2rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
}

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

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

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section — brand photo background with design-system typography */
.hero {
    padding: 8rem 0 4rem;
    background:
        linear-gradient(135deg, rgba(15, 20, 40, 0.72) 0%, rgba(30, 15, 60, 0.68) 100%),
        url("/images/hero.webp") center/cover no-repeat;
    color: white;
    text-align: center;
    margin-top: 60px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-eyebrow {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-caps);
    color: rgba(255, 255, 255, 0.75);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-3);
}

/* AI Integrations Strip */
.ai-strip {
    background: var(--text-primary);
    padding: 1rem 0;
    text-align: center;
}

.ai-strip .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.ai-strip-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.ai-strip-logos {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.ai-strip-logos span {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.ai-strip-logos span:hover {
    color: white;
}

.hero-content h1 {
    font-size: var(--font-size-5xl);
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.6s ease 0.1s both;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.hero-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.badge {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
}

.badge-new {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-block;
}

.btn-primary {
    background: var(--color-accent-bg);
    color: var(--color-accent-fg);
    text-decoration: none;
    text-shadow: none;
}

.btn-primary:hover {
    background: var(--color-accent-bgHover);
    color: var(--color-accent-fg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-color);
}

.features h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-lead {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 3.5rem;
}

/* Hero features — alternating rows */
.feat-hero {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-bottom: 3.5rem;
}

.feat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.feat-row-reverse {
    direction: rtl;
}

.feat-row-reverse > * {
    direction: ltr;
}

.feat-text .feat-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-fg-accent);
    background: var(--color-palette-accent-50);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.feat-text h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.feat-text p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.feat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.feat-tags li {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
}

/* Feature visuals */
.feat-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 2rem;
}

/* MCP orbit diagram */
.feat-diagram {
    position: relative;
    width: 220px;
    height: 220px;
}

.feat-node {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    white-space: nowrap;
}

.feat-node-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 1;
}

.feat-node-orbit {
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    animation: orbitPulse 3s ease-in-out infinite;
}

.feat-node-orbit.n1 { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.feat-node-orbit.n2 { top: 20%; right: 0; animation-delay: 0.5s; }
.feat-node-orbit.n3 { bottom: 20%; right: 0; animation-delay: 1s; }
.feat-node-orbit.n4 { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 1.5s; }
.feat-node-orbit.n5 { top: 50%; left: 0; transform: translateY(-50%); animation-delay: 2s; }

@keyframes orbitPulse {
    0%, 100% { box-shadow: var(--shadow-sm); }
    50% { box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25); border-color: var(--primary-color); }
}

/* Search stack */
.feat-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.feat-stack-layer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.feat-stack-layer span {
    background: white;
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feat-stack-layer.l1 span { border-color: #667eea; color: #667eea; }
.feat-stack-layer.l2 span { border-color: #28a745; color: #28a745; }
.feat-stack-layer.l3 span {
    background: linear-gradient(135deg, var(--color-palette-accent-400), var(--color-palette-accent-600));
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.feat-stack-plus, .feat-stack-eq {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* Protocol boxes */
.feat-protocol {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.feat-proto-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    min-width: 100px;
}

.feat-proto-box small {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.85;
}

.feat-proto-box.rest { background: #3b82f6; }
.feat-proto-box.grpc { background: #10b981; }
.feat-proto-box.gql { background: #e535ab; }
.feat-proto-box.ws { background: #f59e0b; }

/* Format pipeline */
.feat-formats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    align-items: center;
}

.feat-file {
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    background: white;
}

.feat-file.f-md { border-color: #3b82f6; color: #3b82f6; }
.feat-file.f-txt { border-color: #6b7280; color: #6b7280; }
.feat-file.f-html { border-color: #f97316; color: #f97316; }
.feat-file.f-pdf { border-color: #ef4444; color: #ef4444; }
.feat-file.f-docx { border-color: #2563eb; color: #2563eb; }
.feat-file.f-url { border-color: #8b5cf6; color: #8b5cf6; }
.feat-file.f-out {
    background: linear-gradient(135deg, var(--color-palette-accent-400), var(--color-palette-accent-600));
    color: white;
    border: none;
    padding: 0.55rem 1.2rem;
}

.feat-arrow-down {
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.feat-arrow-down::after {
    content: '↓';
}

/* Compact feature strip */
.feat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.feat-chip {
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.feat-chip strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    font-size: 0.88rem;
}

/* Quick Start Section */
.quick-start {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.quick-start h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-btn:hover {
    border-color: var(--primary-color);
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 0;
}

code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Download Section */
.download {
    padding: 5rem 0;
    background: var(--bg-color);
}

.download h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.download-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.download-card h3 {
    margin-bottom: 1rem;
}

.version {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.release-date {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.download-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.download-link:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.platform {
    font-weight: 600;
    color: var(--text-primary);
}

.size {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.package-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.package-link {
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.package-link:hover {
    border-color: var(--primary-color);
}

.pkg-section {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pkg-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pkg-section:first-child {
    padding-top: 0;
}

.pkg-label {
    font-weight: 600;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pkg-platform {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.pkg-section pre {
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.pkg-section .package-link {
    display: inline;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    text-align: left;
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pkg-section .package-link:hover {
    border-color: transparent;
    box-shadow: none;
    opacity: 0.8;
}

.release-notes {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.release-notes h3 {
    margin-bottom: 1rem;
}

.release-notes ul {
    list-style: none;
    margin-bottom: 1rem;
}

.release-notes li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

/* Documentation Section */
.documentation {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.documentation h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.docs-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.docs-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.docs-col .docs-group-title:not(:first-child) {
    margin-top: 2rem;
}

.docs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-list li {
    padding: 0.6rem 0;
    line-height: 1.5;
    border-bottom: 1px solid var(--border-color);
}

.docs-list li a {
    display: inline;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
}

.docs-list li a:hover {
    color: var(--primary-color);
}

.docs-desc {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.docs-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Examples Section */
.examples {
    padding: 5rem 0;
    background: var(--bg-color);
}

.examples h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.example-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.example-tab {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    color: var(--text-secondary);
}

.example-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.example-content {
    max-width: 800px;
    margin: 0 auto;
}

.example-pane {
    display: none;
}

.example-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Terminal styling */
.terminal {
    max-width: 720px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    background: #1e1e2e;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #313244;
    border-bottom: 1px solid #45475a;
}

.terminal-dots {
    display: flex;
    gap: 6px;
    margin-right: 1rem;
}

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

.terminal-dot.red { background: #f38ba8; }
.terminal-dot.yellow { background: #f9e2af; }
.terminal-dot.green { background: #a6e3a1; }

.terminal-title {
    color: #6c7086;
    font-size: 0.8rem;
    flex: 1;
    text-align: center;
}

.terminal pre {
    border-radius: 0;
    margin: 0;
    padding: 1rem 1.25rem;
    background: #1e1e2e;
    overflow-x: auto;
}

.terminal code {
    font-family: var(--font-family-mono);
    font-size: 0.82rem;
    line-height: 1.5;
    color: #cdd6f4;
    white-space: pre;
}

.terminal .line {
    display: block;
    white-space: pre;
    min-height: 1.5em;
    opacity: 0;
    animation: termLine 0.12s ease forwards;
}

.terminal .line.comment {
    color: #6a9955;
}

.terminal .line.command {
    color: #cdd6f4;
}

.terminal .line.command::before {
    content: '$ ';
    color: #a6e3a1;
    font-weight: bold;
}

.terminal .line.continuation {
    color: #cdd6f4;
}

.terminal .line.json {
    color: #ce9178;
}

.terminal .line.output {
    color: #89b4fa;
}

.terminal .cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #cdd6f4;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

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

/* Use Cases Section */
.use-cases {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.use-cases h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 2rem;
}

.use-case {
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.use-case h3 {
    margin-bottom: 1rem;
}

.use-case p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Community Section */
.community {
    padding: 5rem 0;
    background: var(--bg-color);
}

.community h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 2rem;
}

.community-card {
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
    display: block;
}

.community-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.community-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.community-card h3 {
    margin-bottom: 0.5rem;
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: var(--text-muted);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-muted);
}

.footer-section a:hover {
    color: white;
}

.footer-version {
    color: var(--primary-color);
    font-weight: 600;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .feat-row, .feat-row-reverse {
        grid-template-columns: 1fr;
    }

    .feat-row-reverse {
        direction: ltr;
    }

    .feat-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .feat-protocol {
        flex-direction: column;
        align-items: center;
    }

    .docs-columns,
    .use-cases-grid,
    .community-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tabs,
    .example-tabs {
        flex-direction: column;
    }

    .tab-btn,
    .example-tab {
        width: 100%;
    }

    .feat-strip {
        grid-template-columns: 1fr;
    }
}


/* Mobile overflow guards: long code lines and grid items must never widen
   the page beyond the viewport (grid/flex children default to min-width:auto). */
.feat-row > *, .download-grid > *, [class*="grid"] > * { min-width: 0; }
pre { max-width: 100%; }
:not(pre) > code { overflow-wrap: anywhere; }
body { overflow-x: hidden; }
