/* =========================================================
   AI section (home) - loaded after modern.css
   ========================================================= */
.ai-section {
    position: relative; overflow: hidden; color: #fff;
    padding: clamp(72px, 9vw, 120px) 0 0;
    background:
        radial-gradient(60% 50% at 80% 0%, rgba(59, 130, 246, 0.25), transparent 60%),
        radial-gradient(50% 50% at 0% 100%, rgba(123, 45, 142, 0.45), transparent 60%),
        #140B20;
}
.ai-section::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 80%);
            mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 80%);
}
.ai-orb { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; animation: floatUpDown 9s ease-in-out infinite; }
.ai-orb-1 { width: 380px; height: 380px; background: rgba(236, 72, 153, 0.28); top: -80px; left: 30%; }
.ai-orb-2 { width: 320px; height: 320px; background: rgba(59, 130, 246, 0.30); bottom: 80px; right: -60px; animation-delay: -4s; }
.ai-section .container { position: relative; z-index: 1; }

.ai-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 992px) { .ai-grid { grid-template-columns: 1.05fr 1fr; } }

.ai-badge { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #E9D5FF; }
.ai-copy h2 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; margin: 18px 0 16px; }
.ai-copy > p { color: rgba(255, 255, 255, 0.72); font-size: 1.08rem; max-width: 560px; }
.ai-points { list-style: none; margin: 26px 0 32px; display: grid; gap: 12px; }
.ai-points li { display: flex; gap: 10px; align-items: center; color: rgba(255, 255, 255, 0.88); }
.ai-points i { color: var(--ph-accent); font-size: 1.15rem; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.ai-btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
.ai-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* Assistant mock window */
.ai-demo { position: relative; padding: 24px 0; }
.ai-window {
    background: rgba(255, 255, 255, 0.06); backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--radius-xl);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(168, 85, 247, 0.15) inset;
    overflow: hidden;
}
.ai-window-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.ai-window-bar span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.ai-window-bar span:nth-child(1) { background: #F87171; }
.ai-window-bar span:nth-child(2) { background: #FBBF24; }
.ai-window-bar span:nth-child(3) { background: #4ADE80; }
.ai-window-bar em { margin-left: 10px; font-style: normal; font-size: 0.82rem; color: rgba(255, 255, 255, 0.7); display: flex; gap: 6px; align-items: center; }
.ai-chat { padding: 22px; display: flex; flex-direction: column; gap: 14px; min-height: 360px; }
.ai-msg {
    max-width: 86%; padding: 12px 16px; border-radius: 18px; font-size: 0.94rem; line-height: 1.5;
    opacity: 0; transform: translateY(10px);
}
.ai-live .ai-msg { animation: aiMsgIn 0.6s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
.ai-msg-user { align-self: flex-end; background: var(--gradient-primary); border-bottom-right-radius: 6px; }
.ai-msg-bot { align-self: flex-start; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.12); border-bottom-left-radius: 6px; color: rgba(255, 255, 255, 0.92); }
.ai-msg-bot b { color: var(--ph-accent-light); }
.ai-typing { display: inline-flex; gap: 5px; padding: 14px 18px; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); animation: aiDot 1.2s ease-in-out infinite; }
.ai-typing i:nth-child(2) { animation-delay: 0.15s; }
.ai-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiMsgIn { to { opacity: 1; transform: none; } }
@keyframes aiDot { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-5px); opacity: 1; } }

.ai-float {
    position: absolute; display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-radius: 18px;
    background: rgba(20, 11, 32, 0.8); backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.6);
    animation: floatUpDown 6s ease-in-out infinite;
}
.ai-float i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--gradient-accent); color: #fff; }
.ai-float b { display: block; font-family: var(--font-heading); font-size: 1.15rem; line-height: 1.1; }
.ai-float span { font-size: 0.75rem; color: rgba(255, 255, 255, 0.65); }
.ai-float-1 { top: -4px; right: -10px; }
.ai-float-2 { bottom: 0; left: -14px; animation-delay: -3s; }
@media (max-width: 575px) { .ai-float-1 { right: 0; } .ai-float-2 { left: 0; } }

/* Capability cards */
.ai-caps { display: grid; gap: 20px; margin-top: 72px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ai-cap {
    padding: 28px; border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.45s var(--ease-out), background 0.3s ease, border-color 0.3s ease;
}
.ai-cap:hover { transform: translateY(-8px); background: rgba(255, 255, 255, 0.09); border-color: rgba(192, 132, 252, 0.5); }
.ai-cap-icon {
    width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.4rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(59, 130, 246, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.15); margin-bottom: 18px; color: #fff;
}
.ai-cap h4 { color: #fff; font-size: 1.1rem; margin-bottom: 8px; }
.ai-cap p { color: rgba(255, 255, 255, 0.65); font-size: 0.93rem; line-height: 1.6; margin: 0; }

/* Tech marquee */
.ai-marquee {
    margin-top: 72px; padding: 22px 0; overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ai-marquee-track { display: flex; gap: 14px; width: max-content; animation: aiMarquee 38s linear infinite; }
.ai-marquee:hover .ai-marquee-track { animation-play-state: paused; }
.ai-chip {
    padding: 9px 20px; border-radius: var(--radius-full); white-space: nowrap; font-weight: 600; font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
}
@keyframes aiMarquee { to { transform: translateX(calc(-50% - 7px)); } }

@media (prefers-reduced-motion: reduce) {
    .ai-msg { opacity: 1; transform: none; animation: none; }
    .ai-marquee-track, .ai-float, .ai-orb, .ai-typing i { animation: none; }
}
