﻿/* ============================================================
   Yanex Square - Custom Styles
   Layered on top of Tailwind CSS for fine-grained control
   ============================================================ */

:root {
    --yx-primary:    #1e1b4b;
    --yx-indigo:     #4f46e5;
    --yx-blue:       #3b82f6;
    --yx-cyan:       #06b6d4;
    --yx-gold:       #f59e0b;
    --yx-bg:         #f8fafc;
    --yx-text:       #0f172a;
    --yx-muted:      #64748b;
}

* { scroll-behavior: smooth; }

html, body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--yx-text);
    background: var(--yx-bg);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; font-weight: 700; }

/* ---------- Gradient Backgrounds ---------- */
.gradient-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 25%, #4f46e5 60%, #06b6d4 100%);
    position: relative;
    overflow: hidden;
}
.gradient-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(6,182,212,0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(245,158,11,0.25) 0%, transparent 40%);
    pointer-events: none;
}
.gradient-text {
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #f59e0b);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gradient-cta {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
}
.gradient-cta:hover {
    background: linear-gradient(135deg, #4338ca 0%, #0891b2 100%);
}

/* ---------- Glassmorphism Cards ---------- */
.glass {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.18);
}
.glass-light {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 10px 30px rgba(30,27,75,0.08);
}

/* ---------- Service Card Hover ---------- */
.service-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid transparent;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(79,70,229,0.35);
    border-color: rgba(6,182,212,0.4);
}
.service-card .icon-wrap {
    transition: all 0.4s ease;
}
.service-card:hover .icon-wrap {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
    transform: rotate(-5deg) scale(1.1);
}

/* ---------- Floating Blob Animation ---------- */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: blob-float 12s ease-in-out infinite;
    pointer-events: none;
}
@keyframes blob-float {
    0%,100% { transform: translate(0,0) scale(1); }
    33%     { transform: translate(40px,-30px) scale(1.1); }
    66%     { transform: translate(-30px,40px) scale(0.95); }
}

/* ---------- Animated Underline Link ---------- */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}
.nav-link::after {
    content: '';
    position: absolute; left: 0; bottom: 0;
    height: 2px; width: 0;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* ---------- Buttons ---------- */
.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex; align-items: center; gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(79,70,229,0.5);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(79,70,229,0.6);
}
.btn-outline {
    background: transparent;
    color: white;
    padding: 0.85rem 2rem;
    border: 2px solid white;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    background: white; color: var(--yx-primary);
}

/* ---------- Typewriter Cursor ---------- */
.cursor::after {
    content: '|';
    color: #06b6d4;
    animation: blink 1s infinite;
    margin-left: 4px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Counter ---------- */
.counter { font-variant-numeric: tabular-nums; }

/* ---------- Section Padding ---------- */
.section-pad { padding: 5rem 0; }
@media (min-width: 768px) { .section-pad { padding: 7rem 0; } }

/* ---------- Floating WhatsApp ---------- */
.float-whatsapp {
    position: fixed; bottom: 24px; right: 24px;
    width: 60px; height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    box-shadow: 0 10px 30px rgba(37,211,102,0.5);
    z-index: 50;
    transition: transform 0.3s ease;
    animation: pulse 2s infinite;
}
.float-whatsapp:hover { transform: scale(1.1); }
@keyframes pulse {
    0%,100% { box-shadow: 0 10px 30px rgba(37,211,102,0.5); }
    50%     { box-shadow: 0 10px 30px rgba(37,211,102,0.9), 0 0 0 12px rgba(37,211,102,0.2); }
}

/* ---------- Testimonial Card ---------- */
.testimonial-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(30,27,75,0.06);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(30,27,75,0.12);
}

/* ---------- Form Inputs ---------- */
.form-input {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: white;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}
.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79,70,229,0.12);
}
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--yx-primary);
    font-size: 0.9rem;
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: white;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}
.faq-item.open {
    border-color: #4f46e5;
    box-shadow: 0 10px 30px rgba(79,70,229,0.1);
}
.faq-q {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 600;
    color: var(--yx-primary);
}
.faq-a {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    color: var(--yx-muted);
    padding: 0 1.5rem;
}
.faq-item.open .faq-a {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}
.faq-icon {
    transition: transform 0.3s ease;
    color: #4f46e5;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ---------- Portfolio Filter ---------- */
.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background: white;
    border: 2px solid #e2e8f0;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--yx-text);
}
.filter-btn.active, .filter-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
    border-color: transparent;
}

.portfolio-item {
    transition: all 0.4s ease;
}
.portfolio-item.hide { display: none; }
.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
}
.portfolio-card img {
    transition: transform 0.6s ease;
    width: 100%; height: 100%; object-fit: cover;
}
.portfolio-card:hover img { transform: scale(1.1); }
.portfolio-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(30,27,75,0.95) 100%);
    display: flex; align-items: flex-end;
    padding: 1.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }

/* ---------- Pricing Card ---------- */
.pricing-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    border: 2px solid #e2e8f0;
    transition: all 0.4s ease;
    position: relative;
}
.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(30,27,75,0.12);
    border-color: #4f46e5;
}
.pricing-card.featured {
    background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 100%);
    color: white;
    transform: scale(1.05);
    border-color: transparent;
    box-shadow: 0 25px 50px rgba(79,70,229,0.4);
}
.pricing-card.featured:hover { transform: scale(1.05) translateY(-8px); }
.pricing-card.featured .pricing-check { color: #06b6d4; }
.pricing-check { color: #10b981; margin-right: 0.5rem; }

/* ---------- Toast Flash Messages ---------- */
.flash {
    position: fixed; top: 100px; right: 24px;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 15px 40px rgba(30,27,75,0.2);
    border-left: 4px solid #4f46e5;
    z-index: 60;
    animation: slide-in 0.4s ease;
    max-width: 380px;
}
.flash.success { border-color: #10b981; }
.flash.error   { border-color: #ef4444; }
.flash.warning { border-color: #f59e0b; }
@keyframes slide-in {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ---------- AOS-like reveal (no library needed for basic) ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Mobile Menu ---------- */
.mobile-menu {
    position: fixed; top: 0; right: 0;
    height: 100vh; width: 280px;
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 5rem 2rem 2rem;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-overlay.open { opacity: 1; pointer-events: auto; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4f46e5, #06b6d4);
    border-radius: 5px;
}

/* ---------- Selection ---------- */
::selection { background: #4f46e5; color: white; }
