/* =============================================
   YayaAgent Theme — Screen Stylesheet
   Ghost CMS 首页主题：AI Agents & Automation
   ============================================= */

/* --- Tailwind CDN (loaded via default.hbs) --- */

/* --- Premium light navigation --- */
.glass-nav {
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
}

/* --- Premium light card transitions with elegant shadows --- */
.luxury-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.luxury-card:hover {
    background: #ffffff;
    border: 1px solid rgba(79, 70, 229, 0.2);
    box-shadow: 
        0 20px 40px rgba(79, 70, 229, 0.08),
        0 8px 30px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(79, 70, 229, 0.05);
    transform: translateY(-2px);
}

/* Teal variant for comparison cards */
.luxury-card-teal:hover {
    background: #ffffff;
    border: 1px solid rgba(8, 145, 178, 0.2);
    box-shadow: 
        0 20px 40px rgba(8, 145, 178, 0.08),
        0 8px 30px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(8, 145, 178, 0.05);
}

/* --- Keyframes from Tailwind config (used by hero-nodes, glow, card hover) --- */
@keyframes nodeFlow {
    0%, 100% { transform: translateX(-100px) translateY(-50px); opacity: 0; }
    50% { transform: translateX(100px) translateY(50px); opacity: 0.3; }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 20px rgba(79, 70, 229, 0.05); }
    100% { box-shadow: 0 0 40px rgba(79, 70, 229, 0.12); }
}

@keyframes cardHover {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-4px) scale(1.02); }
}

/* --- Hero background animation - subtle automation nodes --- */
.hero-nodes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.3;
}

.hero-nodes::before,
.hero-nodes::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: linear-gradient(45deg, #4f46e5, #0891b2);
    border-radius: 50%;
    animation: nodeFlow 8s ease-in-out infinite;
}

.hero-nodes::before {
    top: 20%;
    left: 10%;
    animation-delay: -2s;
}

.hero-nodes::after {
    top: 60%;
    right: 15%;
    animation-delay: -5s;
    animation-direction: reverse;
}

/* --- Premium button with clean shadows --- */
.btn-premium {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    box-shadow: 
        0 4px 16px rgba(79, 70, 229, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-premium:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 
        0 8px 24px rgba(79, 70, 229, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* --- Mobile-first responsive table with scroll-snap --- */
.responsive-comparison {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.responsive-comparison::-webkit-scrollbar {
    height: 4px;
}

.responsive-comparison::-webkit-scrollbar-track {
    background: rgba(79, 70, 229, 0.05);
    border-radius: 2px;
}

.responsive-comparison::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.3);
    border-radius: 2px;
}

/* Comparison table columns snap */
.comparison-col {
    scroll-snap-align: start;
    min-width: 120px;
}

@media (max-width: 768px) {
    .comparison-col {
        min-width: 140px;
    }
}

/* --- Trust badge clean effect --- */
.trust-badge {
    background: rgba(8, 145, 178, 0.05);
    border: 1px solid rgba(8, 145, 178, 0.15);
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.08);
}

/* --- Newsletter card light styling --- */
.newsletter-card {
    background: linear-gradient(135deg, #ffffff 0%, rgba(79, 70, 229, 0.02) 100%);
    border: 1px solid rgba(79, 70, 229, 0.1);
    box-shadow: 
        0 12px 40px rgba(79, 70, 229, 0.06),
        0 4px 16px rgba(0, 0, 0, 0.04);
}

/* --- Focus states for accessibility --- */
.focus-premium:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* --- Selection styling --- */
::selection {
    background: rgba(79, 70, 229, 0.1);
    color: #0f172a;
}

/* =============================================
   REFACTORED STYLES — no !important, pure specificity
   ============================================= */

/* 1. Nav hover — target only items inside the glass-nav */
.glass-nav ul.nav a:hover {
    color: #7c3aed;
}

/* 1b. "Try It Live" keeps its teal color on hover (overrides purple) */
.glass-nav ul.nav .nav-try-it-live a:hover {
    color: #0f766e;
}

/* 2. H1 gradient text — scope to hero section */
.hero-section h1 .bg-clip-text,
.hero-section h1 [class*="text-transparent"] {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, #7c3aed, #2563eb);
}

/* 3. Section background resets — scope by parent */
body section {
    background-color: revert;
}
body section.bg-gray-50 {
    background-color: #f9fafb;
}
body section.bg-white {
    background-color: #ffffff;
}

/* 4. Badge colors — scope to luxury-card context */
.luxury-card .text-blue-400 {
    color: #1d4ed8;
}
.luxury-card [class*="bg-gradient"],
.glass-nav [class*="bg-gradient"],
.hero-section [class*="bg-gradient"],
.newsletter-card [class*="bg-gradient"] {
    background-image: linear-gradient(to right, #7c3aed, #2563eb);
}

/* 5. Playground preview link colors */
#playground-preview a {
    color: #ffffff;
    text-shadow: none;
    opacity: 1;
}
#playground-preview a:hover {
    color: #ffffff;
    opacity: 0.9;
}

/* =============================================
   NEW: Try It Live nav item special styling
   ============================================= */

/* Desktop: nav-try-it-live with animated dot */
.glass-nav ul.nav .nav-try-it-live a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #0891b2;
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.glass-nav ul.nav .nav-try-it-live a::before {
    content: '';
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #0891b2;
    position: relative;
    animation: nav-dot-pulse 2s ease-in-out infinite;
}

@keyframes nav-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* Mobile: same treatment for nav-try-it-live */
#mobile-menu .nav-try-it-live a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #0891b2;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
}
#mobile-menu .nav-try-it-live a:hover {
    background-color: rgba(8, 145, 178, 0.05);
}
#mobile-menu .nav-try-it-live a::before {
    content: '';
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #0891b2;
    animation: nav-dot-pulse 2s ease-in-out infinite;
}

/* --- Ghost nav list styling: Desktop --- */
.glass-nav ul.nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.glass-nav ul.nav li {
    margin: 0;
    padding: 0;
}
.glass-nav ul.nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

/* --- Ghost nav list styling: Mobile --- */
#mobile-menu ul.nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
#mobile-menu ul.nav li {
    margin: 0;
    padding: 0;
}
#mobile-menu ul.nav a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
}
#mobile-menu ul.nav a:hover {
    color: #7c3aed;
    background-color: rgba(249, 250, 251, 1);
}
/* Ghost Koenig Editor Required Classes */
.kg-width-wide { margin: 0 -4vw; }
.kg-width-full { margin: 0 calc(50% - 50vw); width: 100vw; }
