/* ════════════════════════════════════════════════════════════════
   /funciones (2026-10-26) — landing propia, mismo lenguaje que la portada:
   titulares en Inter, poco texto, una ilustración animada por función.
   Todo va bajo .fx para no tocar el resto de las landings.
   ════════════════════════════════════════════════════════════════ */
.fx {
    --fx-bg: #0f0f23;
    --fx-ink: #f5f6ff;
    --fx-muted: #a5a9c9;
    --fx-line: rgba(167, 139, 250, .16);
    --fx-card: linear-gradient(160deg, rgba(30, 27, 75, .55), rgba(15, 15, 35, .55));
    --fx-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-family: var(--fx-sans);
    color: var(--fx-ink);
    overflow-x: hidden;
}

.fx-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
    box-sizing: border-box;
}

/* ── Tipografía ── */
.fx-eyebrow, .fx-kicker {
    margin: 0 0 1.1rem;
    font: 600 .76rem/1 var(--fx-sans);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #c7d2fe;
}
.fx-kicker i { color: #67e8f9; margin-right: .45rem; }
.fx-h1 {
    margin: 0;
    font: 700 clamp(2.4rem, 5vw, 4.2rem)/1.04 var(--fx-sans);
    letter-spacing: -.035em;
    text-wrap: balance;
}
.fx-h2 {
    margin: 0;
    font: 700 clamp(1.9rem, 3.2vw, 2.8rem)/1.08 var(--fx-sans);
    letter-spacing: -.03em;
    text-wrap: balance;
}
.fx-grad {
    background: linear-gradient(100deg, #a5b4fc 0%, #c4b5fd 45%, #67e8f9 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}
.fx-lead, .fx-p {
    margin: 1.2rem 0 0;
    max-width: 32em;
    font: 400 clamp(1rem, 1.2vw, 1.15rem)/1.6 var(--fx-sans);
    color: var(--fx-muted);
}
.fx-center { text-align: center; }

/* ── Botones (mismos que la portada) ── */
.fx-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.fx-ctas-center { justify-content: center; }
.fx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    height: 52px;
    padding: 0 1.6rem;
    border-radius: 14px;
    font: 600 1rem/1 var(--fx-sans);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.fx-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 10px 30px -8px rgba(99, 102, 241, .7), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.fx-btn-primary i { font-size: .85rem; transition: transform .2s ease; }
.fx-btn-primary:hover { color: #fff; transform: translateY(-1px); }
.fx-btn-primary:hover i { transform: translateX(3px); }
.fx-btn-ghost {
    color: #e0e7ff;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(199, 210, 254, .22);
}
.fx-btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(199, 210, 254, .4); }
.fx-btn:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 3px; }

/* ── Hero ── */
.fx-hero { padding: clamp(7rem, 14vh, 9rem) 0 clamp(4rem, 8vh, 6rem); }
.fx-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

/* Maqueta de la respuesta */
.fx-mock {
    border-radius: 20px;
    background: var(--fx-card);
    border: 1px solid rgba(167, 139, 250, .22);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 60px -10px rgba(99, 102, 241, .35);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
    overflow: hidden;
    transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
    animation: fxFlota 8s ease-in-out infinite;
}
@keyframes fxFlota {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -10px; }
}
.fx-mock-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--fx-line);
    font: 600 .78rem/1 var(--fx-sans);
    color: var(--fx-muted);
}
.fx-mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.fx-mock-bar span { margin-left: .5rem; }
.fx-mock-body { padding: 1.3rem; display: grid; gap: 1rem; }
.fx-q {
    justify-self: end;
    max-width: 85%;
    padding: .8rem 1rem;
    border-radius: 14px 14px 4px 14px;
    background: rgba(99, 102, 241, .22);
    border: 1px solid rgba(129, 140, 248, .3);
    font-size: .88rem;
    line-height: 1.5;
}
.fx-a {
    padding: 1rem 1.1rem;
    border-radius: 14px 14px 14px 4px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--fx-line);
    font-size: .88rem;
    line-height: 1.6;
    color: #dfe2f7;
}
.fx-a p { margin: .55rem 0 0; }
.fx-a b { color: #fff; }
.fx-a sup {
    margin-left: .2rem;
    padding: 0 .3rem;
    border-radius: 4px;
    background: rgba(27, 95, 168, .45);
    color: #bfdbfe;
    font: 700 .62rem/1.5 var(--fx-sans);
}
.fx-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    font: 600 .74rem/1 var(--fx-sans);
}
.fx-chip-calc { background: rgba(34, 197, 94, .14); color: #86efac; border: 1px solid rgba(74, 222, 128, .35); }
.fx-sources { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.fx-sources span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--fx-line);
    font: 600 .72rem/1 var(--fx-sans);
    color: #c7cae6;
}
.fx-sources img { border-radius: 4px; }

/* ── Funciones estrella ── */
.fx-feature { padding: clamp(3.5rem, 8vh, 6rem) 0; border-top: 1px solid var(--fx-line); }
.fx-feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}
.fx-feature-rev .fx-feature-text { order: 2; }
.fx-list { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: .7rem; }
.fx-list li {
    position: relative;
    padding-left: 1.7rem;
    font: 500 .95rem/1.45 var(--fx-sans);
    color: #d6d9f2;
}
.fx-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .3em;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: rgba(99, 102, 241, .25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%23c7d2fe' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/70% no-repeat;
}

.fx-visual {
    position: relative;
    min-height: 320px;
    border-radius: 24px;
    background:
        radial-gradient(ellipse 70% 60% at 50% 40%, rgba(99, 102, 241, .22), transparent 70%),
        var(--fx-card);
    border: 1px solid var(--fx-line);
    overflow: hidden;
}

/* Visual 1: fuentes apiladas con el fragmento resaltado */
.fx-vis-sources { display: grid; place-items: center; }
.fx-doc {
    position: absolute;
    width: 62%;
    padding: 1rem 1.1rem 1.2rem;
    border-radius: 14px;
    background: rgba(22, 20, 52, .92);
    border: 1px solid rgba(167, 139, 250, .25);
    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .8);
}
.fx-doc-1 { top: 12%; left: 8%; rotate: -5deg; }
.fx-doc-2 { top: 26%; left: 22%; rotate: 2deg; }
.fx-doc-3 { top: 42%; left: 32%; rotate: -1deg; }
.fx-doc-head { display: flex; align-items: center; gap: .45rem; margin-bottom: .8rem; font: 600 .78rem/1 var(--fx-sans); color: #c7cae6; }
.fx-doc-head img { border-radius: 4px; }
.fx-line { height: 7px; margin-top: .5rem; border-radius: 4px; background: rgba(255, 255, 255, .1); }
.fx-line.s { width: 60%; }
.fx-hl { background: linear-gradient(90deg, rgba(56, 189, 248, .55), rgba(129, 140, 248, .55)); animation: fxResalta 3.2s ease-in-out infinite; }
.fx-doc-2 .fx-hl { animation-delay: 1s; }
.fx-doc-3 .fx-hl { animation-delay: 2s; }
@keyframes fxResalta { 0%, 100% { opacity: .35; } 40% { opacity: 1; } }
.fx-cite {
    position: absolute;
    right: 9%;
    top: 14%;
    padding: .35rem .6rem;
    border-radius: 8px;
    background: #1b5fa8;
    color: #fff;
    font: 700 .8rem/1 var(--fx-sans);
    box-shadow: 0 0 24px rgba(27, 95, 168, .8);
    animation: fxFlota 5s ease-in-out infinite;
}

/* Visual 2: pasos del agente que se completan */
.fx-vis-agent { display: grid; place-items: center; padding: 2rem; }
.fx-steps { margin: 0; padding: 0; list-style: none; width: 100%; max-width: 380px; display: grid; gap: .8rem; }
.fx-steps li {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--fx-line);
    font: 600 .88rem/1.2 var(--fx-sans);
    opacity: .35;
    animation: fxPaso 8s ease-in-out infinite;
}
.fx-steps li em { margin-left: auto; font: 500 .74rem/1 var(--fx-sans); font-style: normal; color: var(--fx-muted); }
.fx-steps li:nth-child(2) { animation-delay: 1.2s; }
.fx-steps li:nth-child(3) { animation-delay: 2.4s; }
.fx-steps li:nth-child(4) { animation-delay: 3.6s; }
.fx-step-ico {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .6), rgba(56, 189, 248, .45));
    font-size: .78rem;
}
@keyframes fxPaso {
    0%, 8%    { opacity: .35; border-color: var(--fx-line); }
    14%, 80%  { opacity: 1; border-color: rgba(129, 140, 248, .45); }
    92%, 100% { opacity: .35; border-color: var(--fx-line); }
}

/* Visual 3: tarjeta de escala */
.fx-vis-calc { display: grid; place-items: center; padding: 2rem; }
.fx-score {
    width: 100%;
    max-width: 360px;
    padding: 1.3rem 1.4rem;
    border-radius: 16px;
    background: rgba(22, 20, 52, .92);
    border: 1px solid rgba(167, 139, 250, .25);
}
.fx-score-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; font: 700 .9rem/1 var(--fx-sans); letter-spacing: .08em; color: #c7cae6; }
.fx-score-top b { font-size: 2.4rem; letter-spacing: -.03em; color: #fff; }
.fx-bars { display: grid; gap: .55rem; }
.fx-bars div { display: grid; grid-template-columns: 7.5rem 1fr 1rem; align-items: center; gap: .7rem; font: 500 .78rem/1 var(--fx-sans); color: var(--fx-muted); }
.fx-bars i { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .08); position: relative; overflow: hidden; }
.fx-bars i::after {
    content: '';
    position: absolute;
    inset: 0;
    width: calc(var(--v) * 100%);
    border-radius: inherit;
    background: linear-gradient(90deg, #6366f1, #38bdf8);
    transform-origin: left;
    animation: fxBarra 1.4s cubic-bezier(.2, .8, .2, 1) both;
}
.fx-bars b { color: #fff; text-align: right; }
@keyframes fxBarra { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.fx-score-foot { margin: 1.1rem 0 0; font: 500 .76rem/1 var(--fx-sans); color: #86efac; }
.fx-score-foot i { margin-right: .35rem; }

/* Visual 4: voz */
.fx-vis-voice { display: grid; place-items: center; }
.fx-orb {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #c4b5fd, #6366f1 45%, #1e1b4b 80%);
    box-shadow: 0 0 80px rgba(99, 102, 241, .6), inset 0 0 30px rgba(255, 255, 255, .15);
    animation: fxLatido 2.6s ease-in-out infinite;
}
@keyframes fxLatido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.fx-wave { position: absolute; bottom: 14%; display: flex; align-items: center; gap: 5px; height: 40px; }
.fx-wave i { width: 4px; height: 100%; border-radius: 3px; background: linear-gradient(180deg, #67e8f9, #818cf8); animation: fxOnda 1.1s ease-in-out infinite; }
.fx-wave i:nth-child(odd) { animation-delay: -.4s; }
.fx-wave i:nth-child(3n) { animation-delay: -.7s; }
.fx-wave i:nth-child(4n) { animation-delay: -.2s; }
@keyframes fxOnda { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }

/* ── Y además ── */
.fx-more { padding: clamp(3.5rem, 8vh, 6rem) 0; border-top: 1px solid var(--fx-line); }
.fx-more-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 2.5rem;
    border-radius: 20px;
    overflow: hidden;
    background: var(--fx-line);
    border: 1px solid var(--fx-line);
}
.fx-mini { padding: 1.8rem 1.6rem; background: var(--fx-bg); transition: background-color .25s ease; }
.fx-mini:hover { background: #15143a; }
.fx-mini i { font-size: 1.15rem; color: #a5b4fc; }
.fx-mini h3 { margin: 1rem 0 .4rem; font: 600 1.02rem/1.3 var(--fx-sans); color: #fff; }
.fx-mini p { margin: 0; font: 400 .9rem/1.5 var(--fx-sans); color: var(--fx-muted); }

/* ── Cierre ── */
.fx-final { padding: 0 0 clamp(4rem, 9vh, 6rem); }
.fx-final-box {
    padding-top: clamp(3rem, 7vh, 4.5rem);
    padding-bottom: clamp(3rem, 7vh, 4.5rem);
    border-radius: 28px;
    text-align: center;
    background:
        radial-gradient(ellipse 60% 80% at 50% 0%, rgba(139, 92, 246, .35), transparent 70%),
        linear-gradient(160deg, rgba(49, 46, 129, .55), rgba(15, 15, 35, .6));
    border: 1px solid rgba(167, 139, 250, .25);
}

/* ── Entrada al hacer scroll ── */
.fx-oculto { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.fx-oculto.fx-in { opacity: 1; transform: none; }
.fx-oculto:not(.fx-in) .fx-bars i::after { animation-play-state: paused; }

/* ── Tablet ── */
@media (max-width: 980px) {
    .fx-hero-grid, .fx-feature-grid { grid-template-columns: minmax(0, 1fr); }
    .fx-hero-text, .fx-feature-text { text-align: center; }
    .fx-lead, .fx-p { margin-left: auto; margin-right: auto; }
    .fx-ctas { justify-content: center; }
    .fx-list { justify-content: center; text-align: left; }
    .fx-feature-rev .fx-feature-text { order: 0; }
    .fx-mock { transform: none; max-width: 560px; margin: 0 auto; width: 100%; }
    .fx-visual { max-width: 560px; margin: 0 auto; width: 100%; }
    .fx-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Móvil ── */
@media (max-width: 600px) {
    .fx-hero { padding-top: 6rem; }
    .fx-ctas { flex-direction: column; }
    .fx-btn { width: 100%; }
    .fx-visual { min-height: 270px; }
    .fx-doc { width: 74%; }
    .fx-doc-1 { left: 4%; } .fx-doc-2 { left: 13%; } .fx-doc-3 { left: 22%; }
    .fx-bars div { grid-template-columns: 6.3rem 1fr 1rem; }
    .fx-more-grid { grid-template-columns: minmax(0, 1fr); }
    .fx-mini { padding: 1.4rem 1.3rem; }
    .fx-final-box { padding-left: 1.2rem; padding-right: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .fx-mock, .fx-cite, .fx-hl, .fx-steps li, .fx-orb, .fx-wave i, .fx-bars i::after { animation: none !important; }
    .fx-steps li { opacity: 1; }
    .fx-oculto { opacity: 1; transform: none; transition: none; }
}

/* ════════════════════════════════════════════════════════════════
   Recuadros con video (2026-10-26): foto real animada (Grok Imagine)
   de fondo y, encima, una tarjeta de cristal con el detalle del producto.
   ════════════════════════════════════════════════════════════════ */
.fx-visual {
    display: block;
    min-height: 0;
    aspect-ratio: 3 / 2;
    padding: 0;
    background: #14123a;
    box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .85), 0 0 0 1px rgba(167, 139, 250, .18);
}
.fx-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fx-visual::after {   /* oscurece el borde para que la tarjeta se lea */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(10, 9, 30, .65) 100%);
    pointer-events: none;
}
.fx-glass {
    position: absolute;
    z-index: 2;
    padding: .9rem 1rem;
    border-radius: 14px;
    background: rgba(17, 15, 45, .62);
    border: 1px solid rgba(199, 210, 254, .22);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
            backdrop-filter: blur(14px) saturate(1.3);
}
.fx-g-bl { left: 4.5%; bottom: 6%; }
.fx-g-br { right: 4.5%; bottom: 6%; }

/* Biblioteca */
.fx-vis-sources .fx-glass { width: min(60%, 300px); }
.fx-vis-sources .fx-doc-head { margin-bottom: .6rem; }
.fx-vis-sources .fx-cite { z-index: 2; top: 7%; right: 5%; }

/* Agente */
.fx-vis-agent .fx-steps { width: min(66%, 320px); max-width: none; gap: .45rem; padding: .7rem; }
.fx-vis-agent .fx-steps li { padding: .55rem .65rem; font-size: .78rem; background: rgba(255, 255, 255, .05); }
.fx-vis-agent .fx-step-ico { width: 24px; height: 24px; border-radius: 7px; font-size: .68rem; }
.fx-vis-agent .fx-steps li:nth-child(3) { animation-delay: 2.4s; }

/* Escalas */
.fx-vis-calc .fx-score { width: min(56%, 270px); max-width: none; padding: .9rem 1rem; }
.fx-vis-calc .fx-score-top { margin-bottom: .6rem; font-size: .76rem; }
.fx-vis-calc .fx-score-top b { font-size: 1.7rem; }
.fx-vis-calc .fx-bars { gap: .38rem; }
.fx-vis-calc .fx-bars div { grid-template-columns: 5.6rem 1fr .8rem; gap: .5rem; font-size: .68rem; }
.fx-vis-calc .fx-score-foot { margin-top: .7rem; font-size: .66rem; }

/* Voz */
.fx-voice-pill {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1rem;
    border-radius: 999px;
    font: 600 .82rem/1 var(--fx-sans);
    color: #e0e7ff;
}
.fx-rec { width: 9px; height: 9px; border-radius: 50%; background: #f87171; box-shadow: 0 0 10px #f87171; animation: fxLatido 1.4s ease-in-out infinite; }
.fx-voice-pill .fx-wave { position: static; height: 18px; gap: 3px; }
.fx-voice-pill .fx-wave i { width: 3px; }

@media (max-width: 600px) {
    .fx-glass { padding: .65rem .75rem; border-radius: 11px; }
    .fx-g-bl { left: 3.5%; bottom: 4.5%; }
    .fx-g-br { right: 3.5%; bottom: 4.5%; }
    .fx-vis-sources .fx-glass { width: 62%; }
    .fx-vis-agent .fx-steps { width: 78%; padding: .5rem; gap: .3rem; }
    .fx-vis-agent .fx-steps li { padding: .4rem .5rem; font-size: .68rem; }
    .fx-vis-agent .fx-steps li em { display: none; }
    .fx-vis-calc .fx-score { width: 62%; padding: .6rem .7rem; }
    .fx-vis-calc .fx-bars div { grid-template-columns: 4.6rem 1fr .7rem; font-size: .6rem; }
    .fx-vis-calc .fx-bars div:nth-child(n+4) { display: none; }
    .fx-vis-calc .fx-score-foot { display: none; }
    .fx-voice-pill { font-size: .72rem; padding: .55rem .8rem; }
}
@media (prefers-reduced-motion: reduce) {
    .fx-rec { animation: none; }
}
@media (min-width: 601px) {
    .fx-vis-agent .fx-steps { width: min(50%, 270px); }
    .fx-vis-agent .fx-steps li { font-size: .72rem; }
    .fx-vis-agent .fx-steps li em { display: none; }
}
@media (max-width: 600px) {
    .fx-vis-agent .fx-steps { width: 60%; }
    .fx-vis-agent .fx-steps li:nth-child(3) { display: none; }
}
