/* ========== TECH CANVAS BACKGROUND ========== */
#techCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

nav, section, footer, header, main {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    #techCanvas { display: none; }
}

/* ========== ANIMATIONS ========== */

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

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -20px) scale(1.05); }
    50% { transform: translate(-10px, 15px) scale(0.95); }
    75% { transform: translate(15px, 10px) scale(1.02); }
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 200%; }
}

@keyframes growUp {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg); }
    to { transform: rotate(360deg) translateX(var(--orbit-radius)) rotate(-360deg); }
}

@keyframes typing {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Animation Classes */
.animate-fade-in { animation: fadeIn 0.8s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-blob { animation: blob 8s ease-in-out infinite; }

/* Animation Delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* ========== TEXT GRADIENT ========== */
.text-gradient-brand {
    background: linear-gradient(135deg, #EA580C, #F97316, #FB923C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== BUTTON SHINE ========== */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 3s ease-in-out infinite;
}

/* ========== REVEAL ON SCROLL ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 100ms; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 200ms; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 300ms; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 400ms; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 500ms; opacity: 1; transform: none; }

/* ========== NAVBAR ========== */
#navbar {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* ========== HERO GRID PATTERN ========== */
.hero-grid {
    background-image:
        linear-gradient(rgba(234, 88, 12, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234, 88, 12, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 30% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 50%, black 20%, transparent 70%);
}

.hero-grid-dark {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ========== BENTO GRID ========== */
.bento-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(200px, auto);
    }
    .bento-card-tall {
        grid-row: span 2;
    }
    .bento-card-wide {
        grid-column: span 2;
    }
}

/* Bento card styling */
.bento-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid #e5e7eb;
    background: white;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.bento-card:hover {
    border-color: #FDBA74;
    box-shadow: 0 20px 40px -12px rgba(249, 115, 22, 0.08);
    transform: translateY(-4px);
}

.bento-card .bento-visual {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 1rem;
}

/* ========== ECOSYSTEM DIAGRAM ========== */
.ecosystem-container {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto;
}

.ecosystem-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.ecosystem-orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed #e5e7eb;
    border-radius: 50%;
}

.ecosystem-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.ecosystem-node:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.15);
    border-color: #FB923C;
}

/* ========== SCROLLBAR ========== */
/* scroll-behavior handled by JS smooth scroll in main.js */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #FFF7ED; }
::-webkit-scrollbar-thumb { background: #FDBA74; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #FB923C; }

/* ========== MISC ========== */
::selection {
    background: rgba(249, 115, 22, 0.15);
    color: #431407;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid #F97316;
    outline-offset: 2px;
    border-radius: 8px;
}

/* Pricing toggle */
#pricing-toggle.active {
    background-color: #C2410C;
}

#pricing-toggle.active #toggle-dot {
    transform: translateX(28px);
}

/* Counter hover */
.counter-done:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ========== CRM TABS ========== */
.crm-tab-content {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.crm-tab-content.crm-tab-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Kanban card hover */
.kanban-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kanban-card:hover {
    transform: translateY(-2px);
}

/* Chart bar animation */
.chart-bar {
    animation: growUp 1s ease-out forwards;
    transform-origin: bottom;
}

/* ========== CODE SYNTAX HIGHLIGHT ========== */
.code-keyword { color: #c678dd; }
.code-string { color: #98c379; }
.code-comment { color: #5c6370; font-style: italic; }
.code-function { color: #61afef; }
.code-tag { color: #e06c75; }
.code-attr { color: #d19a66; }
.code-number { color: #d19a66; }

/* ========== FEATURE SECTION DECORATION ========== */
.feature-decoration {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
}
