/* ═══════════════════════════════════════════════════════════════
   SolarCRM - Custom Styles
   Modern SaaS landing page (Stripe/Linear inspired)
   ═══════════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(249, 115, 22, 0.15);
    color: #7c2d12;
}


/* ── Navbar ───────────────────────────────────────────────────── */
#navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}


/* ── Animations ───────────────────────────────────────────────── */

/* Fade in */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Fade in up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse glow */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(249, 115, 22, 0.15); }
    50% { box-shadow: 0 0 30px rgba(249, 115, 22, 0.3); }
}

/* Float */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Hero animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.animation-delay-100 {
    animation-delay: 0.1s;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}


/* ── Scroll reveal ────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Staggered children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.15s; }
.reveal:nth-child(5) { transition-delay: 0.2s; }
.reveal:nth-child(6) { transition-delay: 0.25s; }


/* ── FAQ ──────────────────────────────────────────────────────── */
.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease, border-top 0.2s ease;
    line-height: 1.75;
}


/* ── Pricing toggle ───────────────────────────────────────────── */
.price-yearly {
    display: none;
}

.pricing-yearly .price-monthly {
    display: none;
}

.pricing-yearly .price-yearly {
    display: inline;
}


/* ── Counter animation ────────────────────────────────────────── */
[data-count] {
    font-variant-numeric: tabular-nums;
}


/* ── Form success ─────────────────────────────────────────────── */
#form-success {
    animation: fadeInUp 0.5s ease-out;
}


/* ── Gradient text fix for Safari ─────────────────────────────── */
.bg-clip-text {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem !important;
        line-height: 1.15 !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    /* Reset scale on mobile for pricing */
    .scale-\[1\.02\] {
        transform: scale(1) !important;
    }
}


/* ── Smooth scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}


/* ── Misc ─────────────────────────────────────────────────────── */

/* Link hover underline effect */
.footer-link {
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

/* Button press effect */
a[href="#contact"]:active,
button[type="submit"]:active {
    transform: scale(0.98);
}

/* Focus ring */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Gradient border on hover for cards */
.group:hover {
    background-image: linear-gradient(to bottom, rgba(249, 115, 22, 0.03), transparent);
}

/* Nav logo text - adapts on dark hero backgrounds */
.nav-logo-text {
    color: #0f172a;
    transition: color 0.3s ease;
}
