/* Base Reset & Page Styles for OrgCockpit.com */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-canvas);
    color: var(--text-body);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    transition: background-color 0.2s ease, color 0.2s ease;
}

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

code,
pre,
kbd,
.mono {
    font-family: var(--font-mono);
}

a {
    color: var(--brand-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--brand-light);
    outline-offset: 2px;
}

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

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

.section {
    padding: 88px 0;
}

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

.section-header {
    max-width: 740px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-light);
    background: var(--brand-soft);
    border: 1px solid rgba(59, 130, 246, 0.28);
    margin-bottom: 14px;
}

.section-title {
    margin: 0 0 14px;
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.section-subtitle {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* Sticky Navbar */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 68px;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.nav-brand:hover {
    text-decoration: none;
}

.nav-brand-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-light);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--text-primary);
    background: var(--bg-muted);
    text-decoration: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 11px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
    border-color: var(--brand);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.mobile-menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    padding: 0;
}

/* Mobile Nav Drawer */
.mobile-nav {
    display: none;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 16px 24px 20px;
}

.mobile-nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav .nav-link {
    display: block;
    padding: 10px 12px;
}

.mobile-nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.2;
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 13px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-light);
    border-color: rgba(96, 165, 250, 0.38);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--brand-light);
}

[data-theme='light'] .btn-secondary {
    background: #eff6ff;
    color: var(--brand);
    border-color: rgba(1, 118, 211, 0.35);
}

[data-theme='light'] .btn-secondary:hover {
    background: #dbeafe;
    border-color: var(--brand);
}

.btn-ghost {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--brand);
    background: var(--bg-hover);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 76px 0 56px;
    overflow: hidden;
    background-image:
        radial-gradient(ellipse 75% 55% at 50% -10%, rgba(59, 130, 246, 0.22), transparent 70%),
        radial-gradient(circle at 85% 20%, rgba(52, 211, 153, 0.1), transparent 45%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(148, 163, 184, 0.16) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 85%);
    pointer-events: none;
}

[data-theme='light'] .hero::before {
    background-image: radial-gradient(rgba(15, 23, 42, 0.11) 1px, transparent 1px);
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: var(--shadow-card);
    margin-bottom: 22px;
}

.hero-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-strong);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.hero-title {
    margin: 0 0 20px;
    font-size: clamp(2.2rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--text-primary);
}

.hero-title-accent {
    background: linear-gradient(120deg, var(--brand-light) 0%, var(--api-cyan) 50%, var(--success-strong) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    margin: 0 auto 30px;
    max-width: 720px;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    color: var(--text-muted);
    line-height: 1.62;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-cli-bar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 8px 10px 8px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-code);
    border: 1px solid var(--border);
    color: #e2e8f0;
    font-size: 0.82rem;
    margin-bottom: 30px;
}

.hero-cli-bar code {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.hero-cli-bar code::-webkit-scrollbar {
    display: none;
}

.copy-mini-btn {
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid #334155;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.copy-mini-btn:hover {
    background: #334155;
}

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    padding-top: 8px;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
}

.trust-item svg {
    color: var(--success-strong);
    flex-shrink: 0;
}

.oss-trust-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.oss-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.oss-pill:hover {
    text-decoration: none;
    border-color: var(--brand-light);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.oss-pill svg {
    color: #fbbf24;
    flex-shrink: 0;
}

[data-theme='light'] .oss-pill svg {
    color: #d97706;
}

.oss-ci-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success-strong);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22);
    flex-shrink: 0;
}

/* Comparison Matrix */
.table-scroll {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    box-shadow: var(--shadow-card);
}

.compare-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9375rem;
}

.compare-table th,
.compare-table td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.compare-table thead th {
    background: var(--bg-muted);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

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

.compare-table tbody tr:hover td {
    background: var(--bg-hover);
}

.col-highlight {
    background: rgba(59, 130, 246, 0.08);
    font-weight: 600;
    color: var(--text-primary);
}

.compare-table thead th.col-highlight {
    background: rgba(59, 130, 246, 0.18);
    color: var(--brand-light);
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-tag.good {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.status-tag.warn {
    background: var(--warn-bg);
    color: var(--warn-text);
    border: 1px solid var(--warn-border);
}

.status-tag.bad {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
}

/* 9-Module Feature Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand);
}

.feature-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-light);
    border: 1px solid rgba(59, 130, 246, 0.25);
    flex-shrink: 0;
}

.feature-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--bg-muted);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.feature-card h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-card p {
    margin: 0 0 14px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.feature-points {
    margin: auto 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--border-subtle);
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feature-points li {
    position: relative;
    padding-left: 16px;
    font-size: 0.835rem;
    color: var(--text-secondary);
}

.feature-points li::before {
    content: '›';
    position: absolute;
    left: 2px;
    color: var(--brand-light);
    font-weight: 800;
}

/* Security Architecture Section */
.security-diagram-card {
    padding: 28px;
    border-radius: var(--radius-xl);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    margin-bottom: 28px;
}

.security-diagram-caption {
    margin: 14px 0 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.security-pillar {
    padding: 20px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.security-pillar-num {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success-text);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.security-pillar h3 {
    margin: 0 0 8px;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
}

.security-pillar p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Install Section */
.install-card {
    border-radius: var(--radius-xl);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 32px;
}

.install-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    background: var(--bg-muted);
    padding: 8px 12px 0;
    gap: 6px;
}

.install-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.install-tab:hover {
    color: var(--text-primary);
}

.install-tab.is-active {
    color: var(--brand-light);
    background: var(--bg-surface);
    border-bottom-color: var(--brand);
}

.install-panel {
    display: none;
    padding: 28px;
}

.install-panel.is-active {
    display: block;
}

.install-panel h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.install-panel p {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.code-block-wrap {
    position: relative;
    border-radius: var(--radius-md);
    background: var(--bg-code);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 14px;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid #1e293b;
    color: #94a3b8;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.code-block-wrap pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.65;
}

.post-install-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.setup-step {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.setup-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.82rem;
    margin-bottom: 12px;
}

.setup-step h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--text-primary);
}

.setup-step p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* FAQ Accordion */
.faq-list {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    padding: 18px 22px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--brand-light);
    flex-shrink: 0;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item[open] summary {
    border-bottom: 1px solid var(--border-subtle);
}

.faq-answer {
    padding: 16px 22px 20px;
    font-size: 0.94rem;
    color: var(--text-muted);
    line-height: 1.68;
}

.faq-answer p {
    margin: 0;
}

/* Open Source CTA Banner */
.cta-banner {
    padding: 48px 36px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16) 0%, rgba(15, 23, 42, 0.9) 60%, rgba(5, 150, 105, 0.14) 100%);
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: var(--shadow-card);
}

[data-theme='light'] .cta-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 55%, #ecfdf5 100%);
}

.cta-banner h2 {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 3vw, 2.15rem);
    font-weight: 800;
    color: var(--text-primary);
}

.cta-banner p {
    margin: 0 auto 26px;
    max-width: 640px;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 42px 0 48px;
    background: var(--bg-canvas);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 0.9rem;
    font-weight: 600;
}

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

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

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    font-size: 0.82rem;
    color: var(--text-subtle);
}

/* Toast Notification */
.site-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 120;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--success-border);
    box-shadow: var(--shadow-popover);
    font-size: 0.875rem;
    font-weight: 600;
    visibility: hidden;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.site-toast.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
    .security-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 860px) {
    .nav-links,
    .nav-actions .desktop-only {
        display: none;
    }

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

    .post-install-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .section {
        padding: 64px 0;
    }

    .hero {
        padding: 52px 0 40px;
    }

    .bento-grid,
    .security-grid {
        grid-template-columns: 1fr;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .install-panel {
        padding: 20px;
    }

    .cta-banner {
        padding: 36px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
