/* Custom Styles for Flash API Landing Page */

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

body {
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Theme helpers (SaaS mint + deep green) */
:root {
    --saas-shadow: 0 24px 80px rgba(4, 40, 28, 0.10);
    --saas-shadow-hover: 0 28px 92px rgba(4, 40, 28, 0.14);
    --brand-900: #0b1f16;
    --brand-800: #0b3d2e;
    --brand-700: #164e3b;
    --brand-100: #e5f6ee;
    --text-strong: #0b1f16;
    --text-inverse: #ffffff;
}

/* Ensure primary action buttons always have visible label color */
.btn-primary {
    background: var(--brand-800) !important;
    color: var(--text-inverse) !important;
    border-color: var(--brand-800) !important;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--brand-700) !important;
    color: var(--text-inverse) !important;
}

.brand-text {
    color: var(--brand-800) !important;
}

.cta-shell {
    background: linear-gradient(135deg, var(--brand-800), var(--brand-700)) !important;
    color: var(--text-inverse) !important;
}

.footer-shell {
    background: var(--brand-900) !important;
    color: var(--text-inverse) !important;
}

.footer-shell a,
.footer-shell span,
.footer-shell p,
.footer-shell h4,
.footer-shell .footer-muted {
    color: rgba(255, 255, 255, 0.78) !important;
}

.footer-shell a:hover {
    color: var(--text-inverse) !important;
}

.footer-shell .footer-title,
.footer-shell .footer-brand {
    color: var(--text-inverse) !important;
}

/* Glassmorphism Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(11, 61, 46, 0.08);
}

/* Enhanced Glass Effect for Hero and Code Sections */
section .glass-card {
    background: rgba(255, 255, 255, 0.56);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
}

/* Soft elevation for key cards */
.soft-elev {
    box-shadow: var(--saas-shadow);
    transition: transform 250ms cubic-bezier(0.2, 0, 0, 1), box-shadow 250ms cubic-bezier(0.2, 0, 0, 1);
}

.soft-elev:hover {
    transform: translateY(-6px);
    box-shadow: var(--saas-shadow-hover);
}

/* Flat badges for models/features */
.flat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.06);
    color: rgba(11, 31, 22, 0.85);
    border: 1px solid rgba(11, 61, 46, 0.10);
    font-size: 0.75rem;
    line-height: 1.1;
    white-space: nowrap;
}

/* Editor-like code box */
.editor {
    background: rgba(6, 12, 10, 0.92);
    color: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 30px 90px rgba(2, 12, 8, 0.30);
    overflow: hidden;
}

.editor__bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor__dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.25);
}

.editor__dot--red { background: rgba(244, 63, 94, 0.85); }
.editor__dot--yellow { background: rgba(250, 204, 21, 0.85); }
.editor__dot--green { background: rgba(34, 197, 94, 0.85); }

.editor__title {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.70);
}

.editor pre {
    margin: 0;
    padding: 1.1rem 1.2rem;
    overflow: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* FAQ accordion */
.faq-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 260ms cubic-bezier(0.2, 0, 0, 1);
}

.faq-icon {
    transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

/* Typewriter Effect */
.cursor {
    animation: blink 1s infinite;
    color: #0B3D2E;
    font-weight: normal;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.typewriter-text {
    border-right: 2px solid transparent;
}

/* Code Block Styling */
.code-block {
    display: none;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

.code-block.active {
    display: block;
}

.code-block code {
    white-space: pre;
}

/* Language Tab Styling */
.lang-tab {
    color: rgba(11, 31, 22, 0.55);
    background: transparent;
    border: none;
    cursor: pointer;
}

.lang-tab.active {
    color: #0B3D2E;
    border-bottom: 2px solid #0B3D2E;
}

.lang-tab:hover {
    color: #0B3D2E;
    background: rgba(11, 61, 46, 0.06);
}

/* Copy Button */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Filter Button Active State */
.filter-btn.active {
    background: #0B3D2E !important;
    color: white !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(11, 61, 46, 0.06);
}

::-webkit-scrollbar-thumb {
    background: rgba(11, 61, 46, 0.70);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(11, 61, 46, 0.85);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .code-block {
        font-size: 0.75rem;
        padding: 1rem;
    }
    
    .glass-card {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    /* Better mobile spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hero section mobile adjustments */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    /* Button adjustments for mobile */
    .glass-card .flex.flex-col.sm\:flex-row {
        gap: 0.75rem;
    }
    
    /* Hero container width consistency */
    .glass-card.rounded-\[48px\] {
        border-radius: 24px;
        padding: 1.5rem !important;
    }
    
    /* Mobile typewriter cursor */
    .cursor {
        font-size: 0.9em;
    }
}

@media (max-width: 640px) {
    /* Extra small screens */
    .glass-card {
        margin: 0 0.5rem;
        padding: 1.5rem !important;
    }
    
    /* Navigation adjustments */
    nav .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Hero title size for very small screens */
    h1 {
        font-size: 1.75rem !important;
    }
    
    /* Model cards mobile optimization */
    .model-card {
        padding: 1rem !important;
    }
    
    /* Filter buttons mobile */
    .filter-btn, .group-btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #0B3D2E;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Prevent Layout Shift */
img {
    max-width: 100%;
    height: auto;
}

/* Animation for Page Load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.6s ease-out;
}
