/* ============================================
   incerto Website Styles
   ============================================ */

/* ============================================
   CSS Variables for Theme
   ============================================ */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Light theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-tertiary: #6c757d;
    --border-color: #dee2e6;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #dbeafe;
    --code-bg: #f6f8fa;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #c9d1d9;
    --text-tertiary: #8b949e;
    --border-color: #30363d;
    --accent-primary: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-light: #1e3a8a;
    --code-bg: #161b22;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

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

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.nav-brand:hover {
    opacity: 0.8;
}

.brand-icon {
    width: 36px;
    height: 36px;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent-primary);
    background-color: var(--bg-secondary);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: currentColor;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-primary);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background-color: var(--accent-light);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.btn {
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

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

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

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

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

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

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

/* ============================================
   Section Styles
   ============================================ */
section {
    padding: 3.5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* ============================================
   Features Grid
   ============================================ */
.features {
    background-color: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.75rem;
}

.feature-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    text-align: center;
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Icon adjustments for dark mode */
[data-theme="dark"] .feature-icon img,
[data-theme="dark"] .brand-icon img {
    filter: invert(1) hue-rotate(0deg) brightness(1) contrast(1);
}

.feature-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
    color: var(--text-primary);
}

.feature-card > p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    text-align: left;
}

.feature-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.feature-list li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.feature-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

/* ============================================
   Installation Section
   ============================================ */
.install-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    margin-bottom: 2.5rem;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 900px) {
    .install-cards {
        grid-template-columns: 1fr;
    }
}

.install-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    min-width: 0;
    max-width: 100%;
}

.install-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.requirements {
    text-align: center;
    padding: 1.75rem;
    background-color: var(--bg-secondary);
    border-radius: 12px;
}

.requirements h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.req-badges {
    display: flex;
    justify-content: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.45rem 0.9rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   Code Blocks
   ============================================ */
.code-block {
    position: relative;
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.code-block:hover .copy-btn {
    opacity: 1;
}

.code-block pre {
    margin: 0;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

.copy-btn {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    width: 32px;
    height: 32px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
}

.copy-btn:hover {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   Examples Tabs
   ============================================ */
.examples {
    background-color: var(--bg-secondary);
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-panel {
    display: none;
}

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

.example-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background-color: var(--bg-primary);
    border-left: 3px solid var(--accent-primary);
    border-radius: 4px;
}

/* ============================================
   Why Section
   ============================================ */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.why-item {
    text-align: center;
    padding: 1.5rem;
}

.why-icon {
    font-size: 2.75rem;
    margin-bottom: 0.875rem;
}

.why-item h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.65rem;
    color: var(--text-primary);
}

.why-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    background-color: var(--bg-secondary);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.875rem;
    color: var(--text-primary);
}

.cta-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 1.75rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 1.75rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.brand .brand-icon {
    width: 36px;
    height: 36px;
}

.brand .brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    display: contents;
}

.footer-column h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
    color: var(--text-primary);
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--accent-primary);
}

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

.footer-bottom p {
    margin: 0.2rem 0;
}

.footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--accent-primary);
}

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

    section {
        padding: 2.5rem 0;
    }

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

    .hero-title {
        font-size: 1.85rem;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        gap: 1.75rem;
        flex-wrap: wrap;
    }

    .nav-brand {
        font-size: 1.25rem;
    }

    .brand-icon {
        width: 30px;
        height: 30px;
    }

    /* Hamburger menu for mobile */
    .hamburger {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        gap: 0.5rem;
        display: none;
        box-shadow: var(--shadow);
    }

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

    .nav-links a {
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: left;
    }

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

    .install-card {
        padding: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 1.85rem;
    }

    .code-block pre {
        font-size: 0.8rem;
        padding: 1rem;
    }

    .tab-buttons {
        flex-wrap: nowrap;
    }

    .brand {
        font-size: 1.25rem;
    }

    .brand .brand-icon {
        width: 30px;
        height: 30px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
