/* =============================================================
   Strayven — Custom CSS
   (Extends TailwindCSS CDN, no build step required)
   ============================================================= */

/* ─── Smooth scroll ─────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 4rem; /* offset for fixed navbar */
}

/* ─── Alpine.js: hide until initialized ─────────────────────── */
[x-cloak] { display: none !important; }

/* ─── Hero animated gradient ────────────────────────────────── */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 35%, #312e81 65%, #1e1b4b 100%);
    background-size: 300% 300%;
    animation: gradient-shift 12s ease infinite;
}

@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ─── Card hover lift ───────────────────────────────────────── */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ─── Scroll-triggered animations ──────────────────────────── */
.animate-on-scroll {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Stagger delays for grid children */
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* ─── Focus ring consistency ────────────────────────────────── */
:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── Selection color ───────────────────────────────────────── */
::selection {
    background: #6366f1;
    color: white;
}

/* ─── Nav backdrop blur support ─────────────────────────────── */
@supports (backdrop-filter: blur(8px)) {
    nav[class*="backdrop-blur"] {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

/* ─── Pricing card featured badge position fix ──────────────── */
.plan-featured-wrapper {
    position: relative;
}

/* ─── Contact form textarea resize ──────────────────────────── */
textarea {
    resize: vertical;
    min-height: 120px;
}

/* ─── Lazy image fade-in ────────────────────────────────────── */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}

/* ─── Scrollbar styling (WebKit) ────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ─── Admin: sidebar @apply (Tailwind v3 CDN limitation workaround) */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
    color: #94a3b8;
}
.sidebar-link:hover {
    background-color: #334155;
    color: #ffffff;
}
.sidebar-link.active {
    background-color: #4f46e5;
    color: #ffffff;
}

/* ─── Print styles ──────────────────────────────────────────── */
@media print {
    nav, footer, #cta-final, #hero .animate-bounce { display: none !important; }
}
