/* ===========================================================
   Softvalley Solution — custom layer on top of Tailwind CDN
   =========================================================== */

:root {
    --brand: #38bdf8;
    --accent: #8b5cf6;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #05060f; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--brand), var(--accent));
    border-radius: 999px;
    border: 2px solid #05060f;
}

/* ---- ambient grid ---- */
.bg-grid {
    background-image:
        linear-gradient(to right, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 50%, transparent 100%);
            mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 50%, transparent 100%);
}

/* ---- header scrolled state ---- */
#site-header.scrolled {
    background: rgba(10, 12, 27, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- nav links ---- */
.nav-link {
    position: relative;
    padding: 0.5rem 0.85rem;
    border-radius: 0.6rem;
    color: #cbd5e1;
    transition: color .2s ease, background-color .2s ease;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-active { color: #fff; }
.nav-active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 2px;
    transform: translateX(-50%);
    width: 18px; height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}

.mobile-link {
    display: block;
    padding: 0.7rem 0.9rem;
    border-radius: 0.7rem;
    color: #e2e8f0;
    font-weight: 500;
    transition: background-color .2s ease;
}
.mobile-link:hover { background: rgba(255, 255, 255, 0.05); }
.mobile-sublink {
    display: block;
    padding: 0.5rem 0.9rem;
    border-radius: 0.6rem;
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color .2s ease, background-color .2s ease;
}
.mobile-sublink:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }

/* ---- buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 0.8rem;
    font-weight: 600;
    color: #05060f;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 10px 30px -8px rgba(56, 189, 248, 0.5);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 16px 40px -10px rgba(139, 92, 246, 0.6); }
.btn-primary svg { transition: transform .2s ease; }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }

/* ---- badge / chip ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #bae6fd;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

/* ---- gradient text ---- */
.text-gradient {
    background: linear-gradient(120deg, #7dd3fc 0%, #a78bfa 50%, #f0abfc 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---- glass card ---- */
.card {
    position: relative;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 20, 42, 0.55);
    backdrop-filter: blur(8px);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 24px 50px -20px rgba(56, 189, 248, 0.35);
}

/* gradient ring on hover for feature cards */
.card-glow::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(56,189,248,.5), rgba(139,92,246,.5));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity .3s ease;
}
.card-glow:hover::before { opacity: 1; }

/* ---- footer ---- */
.footer-heading {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.footer-link { color: #94a3b8; transition: color .2s ease; }
.footer-link:hover { color: var(--brand); }
.social-link {
    display: grid;
    place-items: center;
    width: 2.5rem; height: 2.5rem;
    border-radius: 0.7rem;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    transition: all .2s ease;
}
.social-link:hover { color: #05060f; background: linear-gradient(135deg, var(--brand), var(--accent)); transform: translateY(-3px); }

/* ---- prose for blog body ---- */
.prose-body p { margin-bottom: 1.25rem; line-height: 1.85; color: #cbd5e1; }
.prose-body p:first-of-type::first-letter {
    font-size: 3rem;
    font-weight: 700;
    float: left;
    line-height: 1;
    padding-right: 0.6rem;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Space Grotesk', sans-serif;
}

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .animate-float, .animate-glow { animation: none !important; }
}

/* ---- marquee ---- */
.marquee { display: flex; gap: 4rem; width: max-content; animation: scroll-x 28s linear infinite; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---- form ---- */
.field {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field::placeholder { color: #64748b; }
.field:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}
.field-label { display: block; font-size: 0.85rem; font-weight: 500; color: #cbd5e1; margin-bottom: 0.4rem; }
