/* =========================================================
   ai.css — Rioba the Robot + AI assistants & automation
   ========================================================= */

.page-ai{
    --accent:#00AAFF;
    --glow:rgba(0,170,255,.18);
    --bot-line:rgba(0,170,255,.22);
}

.page-ai .showcase-main{
    padding:35px 18px 40px;
}

.page-ai .hero-section{
    margin-bottom:24px;
}

/* ---------- Chat window ---------- */

.bot{
    max-width:760px;
    margin:0 auto 70px;
    display:flex;
    flex-direction:column;
    height:clamp(520px,72vh,680px);
    border:1px solid var(--bot-line);
}

.bot-head{
    display:flex;
    align-items:center;
    gap:14px;
    padding:16px 20px;
    border-bottom:1px solid rgba(255,255,255,.08);
    background:linear-gradient(180deg, rgba(0,170,255,.10), rgba(0,170,255,0));
}

.bot-title{ flex:1; min-width:0; }

.bot-title h2{
    color:#fff;
    font-size:1.1rem;
    font-weight:600;
    line-height:1.2;
}

.bot-status{
    display:flex;
    align-items:center;
    gap:7px;
    margin-top:3px;
    color:#9fb3c8;
    font-size:.75rem;
}

.status-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:#34D399;
    box-shadow:0 0 0 3px rgba(52,211,153,.18);
}

.bot-reset{
    flex:none;
    padding:7px 14px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.18);
    background:transparent;
    color:#cfe3f5;
    font-size:.75rem;
    cursor:pointer;
    transition:border-color .2s ease, color .2s ease;
}

.bot-reset:hover{
    border-color:var(--accent);
    color:#fff;
}

/* ---------- The robot ---------- */

.robot{
    flex:none;
    width:58px;
    height:58px;
    overflow:visible;
}

.robot-head{ fill:#E8F1FA; }
.robot-ear{ fill:#9DB4CB; }
.robot-neck{ fill:#9DB4CB; }
.robot-visor{ fill:#0A1A2B; }
.robot-eye{ fill:var(--accent); }
.robot-stroke{ stroke:#9DB4CB; stroke-width:4; stroke-linecap:round; }
.robot-mouth{ fill:none; stroke:var(--accent); stroke-width:3; stroke-linecap:round; }
.robot-bulb{ fill:#9DB4CB; transition:fill .2s ease; }

.robot-eyes{
    transition:transform .15s ease-out;
}

.robot-eye{
    transform-box:fill-box;
    transform-origin:center;
    animation:blink 5.5s infinite;
}

.robot.is-thinking .robot-bulb{
    fill:var(--accent);
    animation:bulb .7s ease-in-out infinite alternate;
}

.robot.is-thinking .robot-mouth{
    d:path("M53 72 h14");
}

@keyframes blink{
    0%,93%,100%{ transform:scaleY(1); }
    95%{ transform:scaleY(.1); }
}

@keyframes bulb{
    from{ filter:drop-shadow(0 0 0 var(--accent)); opacity:.6; }
    to{ filter:drop-shadow(0 0 6px var(--accent)); opacity:1; }
}

/* ---------- Messages ---------- */

.chat-box{
    flex:1;
    overflow-y:auto;
    padding:20px;
    display:flex;
    flex-direction:column;
    gap:14px;
    scroll-behavior:smooth;
    overscroll-behavior:contain;
}

.chat-box::-webkit-scrollbar{ width:8px; }
.chat-box::-webkit-scrollbar-thumb{ background:rgba(0,170,255,.3); border-radius:8px; }
.chat-box::-webkit-scrollbar-track{ background:transparent; }

.msg{
    flex:none;
    display:flex;
    gap:10px;
    max-width:88%;
    animation:msgIn .25s ease-out;
}

.msg.from-user{
    align-self:flex-end;
    flex-direction:row-reverse;
}

.msg-avatar{
    flex:none;
    width:30px;
    height:30px;
    margin-top:2px;
}

.bubble{
    padding:11px 15px;
    font-size:.86rem;
    line-height:1.65;
    color:#eaf2fa;
    word-break:break-word;
}

.msg.from-bot .bubble{
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.09);
    border-radius:4px 16px 16px 16px;
}

.msg.from-user .bubble{
    background:var(--accent);
    color:#04121f;
    font-weight:500;
    border-radius:16px 4px 16px 16px;
}

.bubble p + p,
.bubble p + ul,
.bubble ul + p{
    margin-top:8px;
}

.bubble ul{
    padding-left:18px;
}

.bubble li{
    margin:2px 0;
}

.bubble li::marker{
    color:var(--accent);
}

.bubble strong{
    color:#fff;
    font-weight:600;
}

.bubble a.inline{
    color:#7fd3ff;
    text-decoration:underline;
    text-underline-offset:2px;
}

.bubble-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:12px;
}

.bubble-actions a{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:7px 13px;
    border-radius:999px;
    font-size:.78rem;
    font-weight:500;
    color:#fff;
    background:rgba(0,170,255,.14);
    border:1px solid rgba(0,170,255,.35);
    transition:background .2s ease, border-color .2s ease;
}

.bubble-actions a:hover{
    background:rgba(0,170,255,.28);
    border-color:var(--accent);
}

.bubble-actions a.wa{
    background:rgba(37,211,102,.15);
    border-color:rgba(37,211,102,.45);
}

.bubble-actions a.wa:hover{
    background:rgba(37,211,102,.3);
}

.bubble-actions svg{
    width:14px;
    height:14px;
    fill:currentColor;
}

.typing{
    display:inline-flex;
    gap:5px;
    padding:4px 2px;
}

.typing span{
    width:7px;
    height:7px;
    border-radius:50%;
    background:#8fb8d8;
    animation:dot 1s infinite ease-in-out;
}

.typing span:nth-child(2){ animation-delay:.15s; }
.typing span:nth-child(3){ animation-delay:.3s; }

@keyframes dot{
    0%,60%,100%{ transform:translateY(0); opacity:.5; }
    30%{ transform:translateY(-4px); opacity:1; }
}

@keyframes msgIn{
    from{ opacity:0; transform:translateY(6px); }
    to{ opacity:1; transform:none; }
}

/* ---------- Suggestion chips ---------- */

.chips{
    display:flex;
    gap:8px;
    padding:10px 20px 2px;
    overflow-x:auto;
    scrollbar-width:none;
    -webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);
            mask-image:linear-gradient(90deg,#000 88%,transparent);
}

.chips::-webkit-scrollbar{ display:none; }

.chip{
    flex:none;
    padding:7px 13px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.16);
    background:rgba(255,255,255,.04);
    color:#d7e6f3;
    font-size:.76rem;
    cursor:pointer;
    white-space:nowrap;
    transition:border-color .2s ease, background .2s ease, color .2s ease;
}

.chip:hover{
    border-color:var(--accent);
    background:rgba(0,170,255,.12);
    color:#fff;
}

/* ---------- Input ---------- */

.bot-input{
    display:flex;
    gap:10px;
    padding:12px 20px 10px;
}

#user-input{
    flex:1;
    min-width:0;
    height:48px;
    padding:0 18px;
    border-radius:999px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.12);
    color:#fff;
    font:inherit;
    font-size:.9rem;
    outline:none;
    transition:border-color .2s ease, box-shadow .2s ease;
}

#user-input::placeholder{ color:#8a9bb0; }

#user-input:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(0,170,255,.15);
}

#send-btn{
    flex:none;
    width:48px;
    height:48px;
    border-radius:50%;
    border:none;
    background:var(--accent);
    color:#04121f;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:background .2s ease, transform .2s ease;
}

#send-btn svg{
    width:20px;
    height:20px;
    fill:currentColor;
}

#send-btn:hover{
    background:#33bbff;
    transform:scale(1.05);
}

#send-btn:disabled{
    opacity:.5;
    cursor:default;
    transform:none;
}

.bot-note{
    padding:0 20px 14px;
    color:#7f93a8;
    font-size:.7rem;
    text-align:center;
}

/* ---------- What I build ---------- */

.offer{
    max-width:860px;
    margin:0 auto;
    color:#fff;
}

.offer-intro{
    max-width:640px;
    margin:0 auto 30px;
    text-align:center;
}

.offer-intro h2{
    font-size:1.45rem;
    line-height:1.3;
    margin-bottom:10px;
}

.offer-intro p{
    color:#d3dde8;
    font-size:.88rem;
    line-height:1.7;
}

.offer-list{
    list-style:none;
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:2px;
    background:rgba(0,170,255,.18);
    border:1px solid rgba(0,170,255,.18);
    overflow:hidden;
}

.offer-list li{
    display:flex;
    gap:16px;
    padding:22px;
    background:rgba(10,18,30,.82);
}

.offer-list li:last-child{
    grid-column:1 / -1;
}

.offer-icon{
    flex:none;
    width:42px;
    height:42px;
    border-radius:var(--radius-ui);
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(0,170,255,.12);
}

.offer-icon svg{
    width:22px;
    height:22px;
    fill:none;
    stroke:var(--accent);
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.offer-list h3{
    font-size:.95rem;
    font-weight:600;
    margin-bottom:4px;
}

.offer-list p{
    color:#c7d3df;
    font-size:.82rem;
    line-height:1.65;
}

/* ---------- Automation flow ---------- */

.flow{
    margin:50px auto 0;
    padding:26px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.1);
}

.flow h3{
    text-align:center;
    font-size:1.1rem;
    margin-bottom:22px;
}

.flow-steps{
    list-style:none;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
    counter-reset:step;
}

.flow-steps li{
    position:relative;
    padding:16px 14px 14px;
    border-top:2px solid var(--accent);
    background:rgba(0,170,255,.06);
}

.flow-steps li:not(:last-child)::after{
    content:"";
    position:absolute;
    top:-7px;
    right:-11px;
    width:12px;
    height:12px;
    border-top:2px solid var(--accent);
    border-right:2px solid var(--accent);
    transform:rotate(45deg);
    background:transparent;
    z-index:1;
}

.flow-steps strong{
    display:block;
    color:var(--accent);
    font-size:.8rem;
    font-weight:600;
    margin-bottom:4px;
}

.flow-steps span{
    color:#dbe5ee;
    font-size:.8rem;
    line-height:1.55;
}

.flow-link{
    display:table;
    margin:20px auto 0;
    color:#7fd3ff;
    font-size:.85rem;
    text-decoration:underline;
    text-underline-offset:3px;
}

.flow-link:hover{ color:#fff; }

/* ---------- CTA ---------- */

.page-ai .explore-services{
    margin-top:60px;
}

/* ---------- Mobile ---------- */

@media (max-width:768px){

    .page-ai .showcase-main{
        padding:65px 10px 40px;
    }

    .bot{
        height:calc(100svh - 150px);
        min-height:460px;
        max-height:640px;
        margin-bottom:50px;
    }

    .bot-head{ padding:12px 14px; gap:10px; }
    .robot{ width:48px; height:48px; }
    .bot-title h2{ font-size:1rem; }

    .chat-box{ padding:14px; }
    .msg{ max-width:94%; }
    .bubble{ font-size:.84rem; }

    .chips{ padding:8px 14px 2px; }
    .bot-input{ padding:10px 14px 8px; gap:8px; }
    #user-input{ height:46px; font-size:16px; }
    #send-btn{ width:46px; height:46px; }
    .bot-note{ padding:0 14px 12px; }

    .offer-intro h2{ font-size:1.2rem; }
    .offer-list{ grid-template-columns:1fr; }
    .offer-list li{ padding:18px 16px; }

    .flow{ padding:20px 16px; }
    .flow-steps{ grid-template-columns:1fr; gap:0; }
    .flow-steps li{
        border-top:none;
        border-left:2px solid var(--accent);
        margin-left:6px;
        padding:12px 14px;
        background:transparent;
    }
    .flow-steps li:not(:last-child)::after{ display:none; }
    .flow-steps li::before{
        content:"";
        position:absolute;
        left:-7px;
        top:16px;
        width:12px;
        height:12px;
        border-radius:50%;
        background:var(--accent);
    }
}

@media (prefers-reduced-motion:reduce){
    .robot-eye{ animation:none; }
    .robot-eyes{ transition:none; }
}
