/* Custom colors based on the UseArazzo "Fork" mark for a cohesive look */
:root {
    --color-primary-dark: #17210D;
    --color-primary-light: #3A6B1F;
    --color-accent: #94C83D;
    --color-moss: #6BA543;
    --color-text-dark: #1F2937;
    --color-text-light: #4B5563;
    --color-bg-light: #F9FAFB;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
}

/* Smooth scroll for internal links */
html {
    scroll-behavior: smooth;
}

/* Offset anchor links for sticky header */
[id] {
    scroll-margin-top: 82px;
}

/* Sidebar nav: scroll when taller than viewport */
aside > nav.sticky {
    max-height: calc(100vh - 82px);
    overflow-y: auto;
}

/* Anchor link on heading hover */
.heading-anchor {
    opacity: 0;
    margin-left: 0.5rem;
    color: var(--color-primary-light);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.heading-anchor:hover {
    color: var(--color-primary-dark);
}

h1:hover .heading-anchor,
h2:hover .heading-anchor,
h3:hover .heading-anchor,
h4:hover .heading-anchor {
    opacity: 1;
}

/* Header colors */
.header-h1-color { color: var(--color-primary-light); }
.header-p-color { color: var(--color-primary-dark); }
.footer-background-color { background-color: var(--color-primary-dark); }
.text-primary-dark { color: var(--color-primary-dark); }
.text-primary-light { color: var(--color-primary-light); }
.bg-primary-dark { background-color: var(--color-primary-dark); }

.primary-cta {
    background-color: var(--color-primary-dark);
    transition: background-color 0.2s ease;
}

.primary-cta:hover {
    background-color: #2A3A18;
}

/* RSS subscribe button (blog index) — outline style; #C2410C keeps 4.5:1 text contrast on light backgrounds */
.rss-cta {
    border: 2px solid #C2410C;
    color: #C2410C;
    transition: background-color 0.2s ease;
}

.rss-cta:hover {
    background-color: #FFF7ED;
}

/* Navigation */
.nav-container {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.nav-link {
    color: var(--color-text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--color-primary-light);
}

.nav-link.active {
    color: var(--color-primary-light);
    border-bottom: 2px solid var(--color-primary-light);
}

/* Mobile menu */
.mobile-menu {
    display: none;
}

.mobile-menu.open {
    display: block;
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
    }

    .nav-links.open .nav-link {
        padding: 0.75rem 1.5rem;
        border-bottom: none;
    }
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #E5E7EB;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.product-card-title {
    color: var(--color-primary-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-card-description {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.product-card-link {
    display: inline-flex;
    align-items: center;
    color: var(--color-primary-light);
    font-weight: 600;
    transition: color 0.2s ease;
}

.product-card-link:hover {
    color: var(--color-primary-dark);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #F0F5E7 0%, #FFFFFF 100%);
    padding: 4rem 1rem;
}

.hero-title {
    color: var(--color-primary-dark);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-subtitle {
    color: var(--color-text-light);
    font-size: 1.25rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

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

/* Feature Cards */
.feature-card {
    background: var(--color-bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.feature-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.feature-card-title {
    color: var(--color-primary-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* Code blocks */
.code-block {
    background: #1F2937;
    color: #F9FAFB;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    max-width: 100%;
    word-break: break-all;
}

.code-block code {
    color: #A3D977;
}

/* Terminal window (CLI output preview) */
.terminal {
    background: #1F2937;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -8px rgba(23, 33, 13, 0.35);
    max-width: 100%;
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #111827;
    border-bottom: 1px solid #374151;
}

.terminal-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 9999px;
}

.terminal-dot-red { background: #FF5F56; }
.terminal-dot-yellow { background: #FFBD2E; }
.terminal-dot-green { background: #27C93F; }

.terminal-title {
    margin-left: 0.4rem;
    color: #9CA3AF;
    font-size: 0.75rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

.terminal-body {
    margin: 0;
    padding: 1rem 1.25rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
    line-height: 1.65;
    color: #E5E7EB;
    white-space: pre;
    overflow-x: auto;
}

.terminal-prompt { color: #A3D977; }
.t-file { color: #FFFFFF; font-weight: 700; }
.t-loc { color: #AEB6C2; }
.t-error { color: #F87171; }
.t-code { color: #3DD6EE; }
.t-msg { color: #E5E7EB; }
.t-fail { color: #F87171; font-weight: 700; }
.t-ok { color: #A3D977; font-weight: 700; }

/* Tables */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.spec-table th {
    background: var(--color-primary-light);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

.spec-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.spec-table tr:hover td {
    background: #F0F5E7;
}

/* Support marks: green for yes, muted for no, so the column scans at a glance */
.spec-yes {
    color: var(--color-primary-light);
    font-weight: 600;
}

.spec-partial {
    color: var(--color-moss);
    font-weight: 600;
}

.spec-no {
    color: #9CA3AF;
}

/* Architecture diagram */
.architecture-box {
    border: 2px solid var(--color-primary-dark);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    background: white;
}

.architecture-box-highlight {
    border-color: var(--color-primary-light);
    background: linear-gradient(135deg, #F0F5E7 0%, #FFFFFF 100%);
}

.architecture-arrow {
    color: var(--color-primary-dark);
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: var(--color-primary-light);
    color: white;
}

.badge-secondary {
    background: #E5E7EB;
    color: var(--color-text-dark);
}

/* Team cards */
.team-card {
    text-align: center;
    padding: 2rem;
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
}

/* Dropdown menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text-dark);
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--color-bg-light);
    color: var(--color-primary-light);
}

.dropdown-label {
    display: block;
    padding: 0.5rem 1rem;
    color: #9CA3AF;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Utility classes */
.section-padding {
    padding: 4rem 1rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 6rem 2rem;
    }
}

/* Trusted logo popover */
.trusted-logo-wrapper {
    position: relative;
    display: inline-block;
}

.trusted-logo-popover {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #1F2937;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.813rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 0.5rem;
}

.trusted-logo-wrapper:hover .trusted-logo-popover {
    opacity: 1;
    visibility: visible;
}

/* Quick Start */
.quick-start-content {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Blog post content (rendered from Markdown) */
.post-content {
    color: #374151;
    line-height: 1.75;
}

.post-content h2 {
    color: var(--color-primary-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
}

.post-content h3 {
    color: var(--color-primary-dark);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
}

.post-content h4 {
    color: var(--color-primary-dark);
    font-size: 1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content a {
    color: var(--color-primary-light);
    text-decoration: underline;
}

.post-content a:hover {
    text-decoration: none;
}

.post-content ul,
.post-content ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

.post-content ul {
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--color-primary-light);
    background: #F0F5E7;
    padding: 1rem 1.25rem;
    margin: 0 0 1.25rem;
    color: #374151;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content code {
    background: #F3F4F6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875em;
}

.post-content .post-callout {
    background: #F0F5E7;
    border-left: 4px solid var(--color-primary-light);
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1rem 1.25rem 0.25rem;
    margin: 0 0 1.5rem;
}

.post-content .post-callout h3 {
    margin-top: 0;
}

.post-content .post-callout code {
    background: #E1E9D3;
}

.post-content pre {
    border-radius: 0.5rem;
    margin: 0 0 1.25rem;
    overflow-x: auto;
    max-width: 100%;
}

.post-content :not(pre) > code[class*="language-"] {
    /* Prism's tomorrow theme paints inline code dark; kramdown adds
       language-plaintext to every inline <code>, so win on specificity. */
    background: #F3F4F6;
    color: #17210D;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-shadow: none;
    white-space: normal;
}

.post-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 0 auto 1.25rem;
}

.post-content hr {
    border: 0;
    border-top: 1px solid #E5E7EB;
    margin: 2.5rem 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.25rem;
}

.post-content table th {
    background: var(--color-primary-dark);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

.post-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #E5E7EB;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    display: block;
    border-radius: 0.5rem;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--color-primary-light);
}

.lightbox-trigger {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.lightbox-trigger:hover {
    opacity: 0.9;
}
