/* ==========================================================
   CLEMIX · Agente de IA para WhatsApp
   ========================================================== */
:root {
    --wa-bg: #0b141a;
    --wa-out: #005c4b;
    --wa-in: #202c33;
    --wa-bar: #202c33;
    --radius: 10px;
}

.agent-wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; }

/* Hero */
.agent-hero {
    padding: 170px 0 110px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-soft);
}
.agent-hero::before {
    content: "";
    position: absolute;
    top: 10%; right: -10%;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(201,169,97,0.13) 0%, transparent 65%);
    pointer-events: none;
}
.agent-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 60px;
    align-items: center;
    position: relative;
}
.agent-hero .eyebrow { margin-bottom: 26px; }
.agent-hero h1 {
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 200;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 26px;
}
.agent-lead {
    font-size: clamp(16px, 1.5vw, 19px);
    color: var(--text-muted);
    max-width: 46ch;
    line-height: 1.7;
    margin-bottom: 40px;
}
.agent-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.agent-note { margin-top: 22px; font-size: 13.5px; color: var(--text-subtle); max-width: 48ch; }

/* Teléfono */
.phone-wrap { display: flex; justify-content: center; }
.phone {
    width: 330px;
    background: #050505;
    border: 1px solid rgba(201,169,97,0.35);
    border-radius: 36px;
    padding: 10px;
    box-shadow: 0 40px 80px -30px rgba(0,0,0,0.9), 0 0 0 6px rgba(201,169,97,0.05);
}
.screen {
    background: var(--wa-bg);
    border-radius: 27px;
    overflow: hidden;
    height: 600px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.screen::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05) 0 1px, transparent 1.5px),
        radial-gradient(circle at 70% 60%, rgba(255,255,255,0.05) 0 1px, transparent 1.5px),
        radial-gradient(circle at 40% 85%, rgba(255,255,255,0.05) 0 1px, transparent 1.5px);
    background-size: 90px 90px, 120px 120px, 70px 70px;
    pointer-events: none;
}
.wa-bar {
    background: var(--wa-bar);
    color: #e9edef;
    padding: 30px 14px 12px;
    display: flex; align-items: center; gap: 12px;
    position: relative; z-index: 1;
}
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--gold); color: var(--bg);
    display: grid; place-items: center;
    font-weight: 600; font-size: 14px;
}
.wa-bar .name { font-weight: 500; font-size: 15px; line-height: 1.2; }
.wa-bar .status { font-size: 12px; opacity: 0.7; }
.chat {
    flex: 1;
    padding: 14px 12px;
    display: flex; flex-direction: column; gap: 8px;
    overflow: hidden;
    position: relative; z-index: 1;
    justify-content: flex-end;
}
.msg {
    max-width: 82%;
    padding: 8px 10px 6px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.4;
    color: #e9edef;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.msg.show { opacity: 1; transform: translateY(0); }
.msg.in { background: var(--wa-in); align-self: flex-start; border-top-left-radius: 0; }
.msg.out { background: var(--wa-out); align-self: flex-end; border-top-right-radius: 0; }
.msg .time { display: block; text-align: right; font-size: 10.5px; color: rgba(233,237,239,0.6); margin-top: 3px; }
.msg.ia .tag { display: inline-block; font-size: 10px; font-weight: 600; color: var(--gold-light); margin-bottom: 3px; letter-spacing: 0.04em; }
.typing {
    align-self: flex-end;
    background: var(--wa-out);
    border-radius: 8px; border-top-right-radius: 0;
    padding: 10px 12px;
    display: none; gap: 4px;
}
.typing.show { display: flex; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(233,237,239,0.7); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.wa-input {
    background: var(--wa-bar);
    padding: 8px 10px;
    display: flex; gap: 8px; align-items: center;
    position: relative; z-index: 1;
}
.wa-input div {
    flex: 1; background: #2a3942; border-radius: 20px; height: 34px;
    padding: 0 14px; display: flex; align-items: center; font-size: 13px; color: #8696a0;
}
.wa-input span { width: 34px; height: 34px; border-radius: 50%; background: #00a884; }

/* Franja de credenciales */
.agent-strip { background: var(--bg-alt); border-bottom: 1px solid var(--border-soft); padding: 44px 0; }
.agent-strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.strip-num { display: block; font-size: clamp(24px, 2.6vw, 34px); font-weight: 200; color: var(--gold); letter-spacing: -0.02em; line-height: 1.1; }
.strip-lbl { display: block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-subtle); margin-top: 10px; }

/* Secciones */
.agent-section { padding: 120px 0; }
.agent-section--alt { background: var(--bg-alt); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.agent-section .eyebrow { margin-bottom: 20px; }
.section-title {
    font-size: clamp(30px, 3.8vw, 48px);
    font-weight: 200;
    letter-spacing: -0.03em;
    line-height: 1.12;
    max-width: 22ch;
    margin-bottom: 18px;
}
.section-lead {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 58ch;
    margin-bottom: 56px;
    line-height: 1.7;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border-soft); border: 1px solid var(--border-soft); }
.item { background: var(--bg); padding: 44px 36px; transition: background 0.4s var(--ease); }
.item:hover { background: var(--bg-soft); }
.item .mark { width: 36px; height: 2px; background: var(--gold); margin-bottom: 24px; }
.item h3 { font-size: 20px; font-weight: 400; margin-bottom: 12px; }
.item p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); }
.step { padding: 40px 34px; border-right: 1px solid var(--border-soft); background: var(--bg); }
.step:last-child { border-right: none; }
.step .n { font-size: 42px; font-weight: 200; color: var(--gold); line-height: 1; margin-bottom: 20px; letter-spacing: -0.03em; }
.step h3 { font-size: 19px; font-weight: 400; margin-bottom: 10px; }
.step p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }

/* Panel */
.panel-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.panel-text .section-lead { margin-bottom: 0; }
.panel-text ul { list-style: none; margin-top: 30px; display: grid; gap: 14px; }
.panel-text li { padding-left: 22px; position: relative; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.panel-text li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.panel-mock { border: 1px solid var(--border); background: var(--bg-alt); font-size: 13px; overflow: hidden; }
.panel-mock .top { border-bottom: 1px solid var(--border-soft); padding: 14px 18px; display: flex; gap: 22px; color: var(--text-subtle); font-weight: 400; overflow-x: auto; white-space: nowrap; }
.panel-mock .top b { color: var(--text); font-weight: 500; border-bottom: 1px solid var(--gold); padding-bottom: 12px; margin-bottom: -15px; }
.table-scroll { overflow-x: auto; }
.panel-mock table { width: 100%; border-collapse: collapse; }
.panel-mock th, .panel-mock td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; color: var(--text-muted); }
.panel-mock td:first-child { color: var(--text); }
.panel-mock th { color: var(--text-subtle); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.pill { display: inline-block; padding: 3px 9px; font-size: 11.5px; font-weight: 500; }
.pill.ok { background: rgba(74,222,128,0.12); color: #6fd39a; }
.pill.wait { background: rgba(201,169,97,0.14); color: var(--gold-light); }

/* Casos */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.case { border: 1px solid var(--border-soft); background: var(--bg); padding: 32px 30px; transition: border-color 0.3s var(--ease); }
.case:hover { border-color: var(--border); }
.case h3 { font-size: 18px; font-weight: 400; margin-bottom: 8px; color: var(--gold-light); }
.case p { color: var(--text-muted); font-size: 15px; line-height: 1.65; }

@media (prefers-reduced-motion: reduce) {
    .msg { transition: none; }
    .typing i { animation: none; }
}
@media (max-width: 980px) {
    .agent-wrap { padding: 0 24px; }
    .agent-hero { padding: 130px 0 80px; }
    .agent-hero-grid, .panel-grid { grid-template-columns: 1fr; gap: 50px; }
    .grid-3, .steps, .cases { grid-template-columns: 1fr; }
    .step { border-right: none; border-bottom: 1px solid var(--border-soft); }
    .step:last-child { border-bottom: none; }
    .agent-strip-grid { grid-template-columns: repeat(2, 1fr); }
    .agent-section { padding: 90px 0; }
    .phone { width: 300px; }
    .screen { height: 540px; }
}
