/* =====================================================================
   CycloNet · "Así construimos": escenas animadas de lo que hacemos
   Cada escena arranca cuando su panel recibe .is-on (las animaciones se
   reinician al reactivarlo). Con "reducir movimiento" quedan quietas.
   ===================================================================== */
.studio { padding-top: clamp(40px, 6vw, 80px); }
.studio__box { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; padding: 14px; border-radius: 30px; background: #fff; box-shadow: var(--shadow-hi); }
.studio__tabs { display: grid; gap: 6px; align-content: start; }
.studio__tabs button { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-radius: 18px; cursor: pointer; text-align: left; font: 600 15px var(--font-d); color: var(--muted); background: transparent; overflow: hidden; transition: background .3s, color .3s; }
.studio__tabs button i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 20px; color: var(--blue); background: var(--bg); transition: background .3s, color .3s; }
.studio__tabs button:hover, .studio__tabs button.is-on { color: var(--ink); background: var(--bg); }
.studio__tabs button.is-on i { color: #fff; background: var(--grad-deep); }
.studio__tabs em { position: absolute; left: 16px; right: 16px; bottom: 6px; height: 3px; border-radius: 3px; background: var(--grad-deep); transform-origin: 0 50%; transform: scaleX(0); }
.studio__tabs .is-on em { animation: tabfill var(--sdur, 7s) linear forwards; }
.studio.is-paused .studio__tabs .is-on em { animation-play-state: paused; }
@keyframes tabfill { to { transform: scaleX(1); } }
.studio__screen { position: relative; min-height: 440px; border-radius: 22px; overflow: hidden; background: radial-gradient(600px 300px at 80% 0%, rgba(112, 198, 233, .25), transparent 60%), linear-gradient(160deg, #eef3ff, #f7f9fe); }
.studio__screen::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(12, 79, 202, .12) 1px, transparent 1.4px); background-size: 20px 20px; }
.sc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 26px; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s; }
.sc.is-on { opacity: 1; visibility: visible; }
.sc__notes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sc__notes li { display: flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font: 600 12.5px var(--font-d); color: var(--blue-d); background: #fff; box-shadow: 0 8px 18px -14px rgba(7, 22, 64, .5); opacity: 0; }
.sc.is-on .sc__notes li { animation: up .5s var(--ease) both; }
.sc.is-on .sc__notes li:nth-child(1) { animation-delay: 2.2s; }
.sc.is-on .sc__notes li:nth-child(2) { animation-delay: 2.5s; }
.sc.is-on .sc__notes li:nth-child(3) { animation-delay: 2.8s; }
.sc__notes i { color: #1f9a62; font-size: 16px; }
@keyframes up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ventana */
.win { position: relative; width: min(560px, 100%); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -30px rgba(7, 22, 64, .45), 0 0 0 1px rgba(12, 79, 202, .08); }
.win__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f1f4fa; }
.win__bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff6b6b; }
.win__bar i:nth-child(2) { background: #ffc44d; }
.win__bar i:nth-child(3) { background: #3ddc97; }
.win__bar span { margin-left: 10px; padding: 3px 12px; border-radius: 8px; font: 500 12px 'JetBrains Mono', ui-monospace, monospace; color: var(--muted); background: #fff; }
.win--dark { background: #0d1530; }
.win--dark .win__bar { background: #0a1128; }
.win--dark .win__bar span { color: #8fa3d6; background: #141d3d; }

/* 1. diseño web: el wireframe se pinta */
.web { padding: 16px; display: grid; gap: 14px; }
.web__nav { display: flex; align-items: center; gap: 10px; }
.web__nav b { width: 70px; height: 14px; border-radius: 6px; }
.web__nav span { width: 38px; height: 8px; border-radius: 4px; }
.web__nav em { margin-left: auto; width: 64px; height: 22px; border-radius: 999px; }
.web__hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; align-items: center; }
.web__hero b { display: block; height: 18px; border-radius: 6px; margin-bottom: 8px; }
.web__hero .w1 { width: 90%; }
.web__hero .w2 { width: 60%; }
.web__hero p { height: 8px; border-radius: 4px; margin: 6px 0; width: 95%; }
.web__hero p.s { width: 70%; }
.web__btn { display: inline-block; margin-top: 10px; padding: 8px 14px; border-radius: 999px; font: 600 11px var(--font-d); color: transparent; }
.web__img { height: 120px; border-radius: 14px; }
.web__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.web__cards div { height: 64px; border-radius: 12px; }
.web__nav b, .web__nav span, .web__nav em, .web__hero b, .web__hero p, .web__btn, .web__img, .web__cards div { background: #eef2f8; outline: 1.5px dashed #c5cfe2; outline-offset: -1.5px; }
.sc--web.is-on .web__nav b { animation: paint .5s .5s both; --c: linear-gradient(90deg, #0c4fca, #4a6cf7); }
.sc--web.is-on .web__nav span { animation: paint .5s .7s both; --c: #cfd8ea; }
.sc--web.is-on .web__nav em { animation: paint .5s .8s both; --c: #14213d; }
.sc--web.is-on .web__hero b { animation: paint .5s 1s both; --c: #14213d; }
.sc--web.is-on .web__hero p { animation: paint .5s 1.2s both; --c: #c9d2e3; }
.sc--web.is-on .web__btn { animation: paint .5s 1.4s both, btnText .3s 1.6s both; --c: linear-gradient(90deg, #0c4fca, #4a6cf7); }
.sc--web.is-on .web__img { animation: paint .6s 1.3s both; --c: radial-gradient(circle at 30% 30%, #8fe1ff, transparent 50%), linear-gradient(135deg, #4a6cf7, #1d1680); }
.sc--web.is-on .web__cards div { animation: paint .5s both; --c: linear-gradient(160deg, #fff, #eef3ff); box-shadow: 0 10px 20px -14px rgba(7, 22, 64, .4); }
.sc--web.is-on .web__cards div:nth-child(1) { animation-delay: 1.6s; }
.sc--web.is-on .web__cards div:nth-child(2) { animation-delay: 1.75s; }
.sc--web.is-on .web__cards div:nth-child(3) { animation-delay: 1.9s; }
@keyframes paint { to { background: var(--c); outline-color: transparent; } }
@keyframes btnText { to { color: #fff; } }
.cursor { position: absolute; left: 80%; top: 85%; width: 18px; height: 18px; background: #14213d; clip-path: polygon(0 0, 0 100%, 30% 72%, 50% 100%, 64% 94%, 46% 66%, 82% 66%); }
.sc--web.is-on .cursor { animation: cur 3.2s 1.6s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes cur { 0% { left: 80%; top: 85%; } 45%, 100% { left: 14%; top: 58%; } 55% { transform: scale(.8); } 62% { transform: none; } }

/* 2. código que se escribe solo */
.code { margin: 0; padding: 18px 20px 10px; font: 500 13px/1.75 'JetBrains Mono', ui-monospace, monospace; color: #c8d4f5; white-space: pre; overflow: hidden; }
.code .ln { display: block; width: 0; overflow: hidden; }
.code .k { color: #c792ea; font-weight: 500; }
.code .f { color: #82aaff; font-weight: 500; }
.code .s { color: #c3e88d; font-weight: 500; }
.sc--code.is-on .ln { animation: type .55s steps(40, end) forwards; animation-delay: calc(var(--n) * .45s); }
@keyframes type { to { width: 100%; } }
.term { display: grid; gap: 4px; padding: 12px 20px 16px; border-top: 1px solid #1d2850; font: 500 12.5px 'JetBrains Mono', ui-monospace, monospace; color: #8fa3d6; }
.term span { opacity: 0; }
.term b { color: #3ddc97; }
.sc--code.is-on .t1 { animation: up .3s 3.2s both; }
.sc--code.is-on .t2 { animation: up .3s 3.9s both; }
.sc--code.is-on .t3 { animation: up .3s 4.5s both; }

/* 3. app */
.phone { width: 230px; height: 400px; padding: 10px; border-radius: 38px; background: #14213d; box-shadow: 0 30px 60px -24px rgba(7, 22, 64, .6); }
.phone__scr { position: relative; height: 100%; border-radius: 30px; overflow: hidden; background: #f5f7fb; padding: 18px 12px; }
.ap__head b { display: block; font: 700 16px var(--font-d); color: var(--ink); }
.ap__head small { font-size: 11px; color: var(--muted); }
.ap__kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ap__kpi div { padding: 10px; border-radius: 14px; background: var(--grad-deep); color: #fff; }
.ap__kpi div + div { background: #fff; color: var(--ink); box-shadow: 0 8px 16px -12px rgba(7, 22, 64, .4); }
.ap__kpi small { display: block; font-size: 10px; opacity: .8; }
.ap__kpi b { font: 700 13px var(--font-d); }
.ap__list { display: grid; gap: 8px; margin-top: 12px; }
.ap__list div { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; background: #fff; box-shadow: 0 8px 16px -14px rgba(7, 22, 64, .5); opacity: 0; }
.ap__list i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-style: normal; font-size: 14px; }
.ap__list span { font: 600 11px var(--font-d); color: var(--ink); }
.ap__list small { display: block; font: 500 10px var(--font-b); color: var(--muted); }
.ap__list em { margin-left: auto; font: 600 11px var(--font-d); font-style: normal; color: var(--ink); }
.sc--app.is-on .ap__head, .sc--app.is-on .ap__kpi { animation: up .5s .3s both; }
.sc--app.is-on .ap__list div { animation: up .5s both; }
.sc--app.is-on .ap__list div:nth-child(1) { animation-delay: .8s; }
.sc--app.is-on .ap__list div:nth-child(2) { animation-delay: 1s; }
.sc--app.is-on .ap__list div:nth-child(3) { animation-delay: 1.2s; }
.ap__toast { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 16px 30px -12px rgba(7, 22, 64, .5); transform: translateY(-130%); }
.ap__toast i { font-style: normal; }
.ap__toast b { display: block; font: 700 11.5px var(--font-d); }
.ap__toast small { font-size: 10.5px; color: var(--muted); }
.sc--app.is-on .ap__toast { animation: drop 3s 2s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes drop { 0% { transform: translateY(-130%); } 15%, 80% { transform: none; } 100% { transform: translateY(-130%); } }
.ap__tab { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; justify-content: space-around; align-items: center; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 8px 16px -12px rgba(7, 22, 64, .4); }
.ap__tab i { width: 16px; height: 16px; border-radius: 5px; background: #dfe6f3; }
.ap__tab b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: #fff; background: var(--grad-deep); }

/* 4. automatización: paquetes viajando entre nodos */
.flow-box { position: relative; flex: none; width: calc(640px * var(--k, 1)); height: calc(300px * var(--k, 1)); }
.flow { position: absolute; left: 0; top: 0; width: 640px; height: 300px; transform: scale(var(--k, 1)); transform-origin: 0 0; }
.flow svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow path { fill: none; stroke: url(#fl); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 8; opacity: .55; }
.sc--auto.is-on .flow path { animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.node { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: #fff; font: 600 13px var(--font-d); color: var(--ink); white-space: nowrap; transform: translate(-50%, -50%); box-shadow: 0 14px 30px -16px rgba(7, 22, 64, .5); opacity: 0; }
.node i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; font-size: 20px; color: #fff; background: var(--grad-deep); }
.node--ai i { background: linear-gradient(135deg, #8b5cf6, #4a6cf7); }
.sc--auto.is-on .node { animation: nodeIn .5s cubic-bezier(.22, 1, .36, 1) both, glow 2.7s infinite; }
.sc--auto.is-on .node:nth-of-type(1) { animation-delay: .2s, .8s; }
.sc--auto.is-on .node:nth-of-type(2) { animation-delay: .4s, 1.7s; }
.sc--auto.is-on .node:nth-of-type(3) { animation-delay: .6s, 2.6s; }
.sc--auto.is-on .node:nth-of-type(4) { animation-delay: .8s, 2.6s; }
@keyframes nodeIn { from { opacity: 0; transform: translate(-50%, -40%) scale(.9); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes glow { 0%, 100% { box-shadow: 0 14px 30px -16px rgba(7, 22, 64, .5); } 10% { box-shadow: 0 0 0 6px rgba(74, 108, 247, .2), 0 14px 30px -16px rgba(7, 22, 64, .5); } }
.pk { position: absolute; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(74, 108, 247, .35), 0 0 16px #4a6cf7; offset-distance: 0%; offset-anchor: 50% 50%; opacity: 0; }
.sc--auto.is-on .pk { animation: pk 2.7s var(--d) linear infinite; }
@keyframes pk { 0% { offset-distance: 0%; opacity: 0; } 6% { opacity: 1; } 30% { offset-distance: 100%; opacity: 1; } 34%, 100% { offset-distance: 100%; opacity: 0; } }
.flow__count { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); text-align: center; }
.flow__count b { display: block; font: 700 30px var(--font-d); color: var(--blue); }
.flow__count small { font-size: 12px; color: var(--muted); }

/* 5. IA: lee un documento y responde */
.chat { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; align-items: center; width: min(620px, 100%); }
.doc { position: relative; padding: 16px; border-radius: 14px; background: #fff; box-shadow: 0 20px 40px -20px rgba(7, 22, 64, .5); overflow: hidden; transform: rotate(-3deg); }
.doc b { font: 700 13px var(--font-d); color: var(--ink); }
.doc span { display: block; height: 7px; margin-top: 9px; border-radius: 4px; background: #e3e9f5; }
.doc span.s { width: 60%; }
.doc em { display: block; margin-top: 14px; font: 700 15px var(--font-d); font-style: normal; color: var(--blue); }
.doc .scan { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #3ddc97; box-shadow: 0 0 14px 4px rgba(61, 220, 151, .6); opacity: 0; }
.sc--ia.is-on .scan { animation: scan 1.4s .3s ease-in-out 2 both; }
@keyframes scan { 0% { top: 0; opacity: 1; } 50% { top: 100%; opacity: 1; } 100% { top: 0; opacity: 0; } }
.bubbles { display: grid; gap: 10px; }
.b { margin: 0; max-width: 92%; padding: 11px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; opacity: 0; }
.b--me { justify-self: end; color: #fff; background: var(--grad-deep); border-bottom-right-radius: 6px; }
.b--ai { background: #fff; color: var(--ink); border-bottom-left-radius: 6px; box-shadow: 0 10px 22px -16px rgba(7, 22, 64, .5); }
.b--typing { display: flex; gap: 4px; width: max-content; background: #fff; }
.b--typing i { width: 7px; height: 7px; border-radius: 50%; background: #a5b0c6; animation: bounce 1s infinite; }
.b--typing i:nth-child(2) { animation-delay: .15s; }
.b--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 50% { transform: translateY(-4px); } }
.sc--ia.is-on .b--me { animation: up .4s .6s both; }
.sc--ia.is-on .b--typing { animation: typingShow 1.4s 1.2s both; }
@keyframes typingShow { 0% { opacity: 0; } 10%, 85% { opacity: 1; } 100% { opacity: 0; height: 0; padding: 0; margin: -10px 0 0; } }
.sc--ia.is-on .b--ai { animation: up .4s 2.6s both; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 5px 10px; border-radius: 999px; font: 600 11.5px var(--font-d); color: #1f7a52; background: #eafaf2; opacity: 0; }
.sc--ia.is-on .chips span { animation: up .4s both; }
.sc--ia.is-on .chips span:nth-child(1) { animation-delay: 3.4s; }
.sc--ia.is-on .chips span:nth-child(2) { animation-delay: 3.6s; }
.sc--ia.is-on .chips span:nth-child(3) { animation-delay: 3.8s; }

/* llamado al cotizador */
.studio__cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 22px 26px; border-radius: 24px; color: #fff; background: radial-gradient(500px 200px at 100% 0%, #4a6cf7, transparent 70%), linear-gradient(150deg, var(--navy), #1d1680); }
.studio__cta b { display: block; font: 700 20px var(--font-d); }
.studio__cta span { display: block; margin-top: 4px; color: #c8d4f5; font-size: 15px; }
.studio__cta .btn { flex: none; }

/* trabaja con nosotros: las opciones llevan al cotizador */
.work__ask { margin-top: 24px; font: 600 15px var(--font-d); color: #fff; }
.offer { margin-top: 14px; }
.offer a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; color: #fff; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); font: 600 14.5px var(--font-d); transition: background .3s, transform .3s cubic-bezier(.22, 1, .36, 1); }
.offer a > i:first-child { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; font-size: 20px; color: var(--navy); background: var(--ice); }
.offer a:hover { background: rgba(255, 255, 255, .13); transform: translateY(-2px); color: #fff; }
.offer__go { margin-left: auto; font-size: 20px; opacity: .5; transition: transform .3s, opacity .3s; }
.offer a:hover .offer__go { transform: translateX(3px); opacity: 1; }

@media (max-width: 900px) {
  .studio__box { grid-template-columns: 1fr; padding: 10px; }
  .studio__tabs { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; }
  .studio__tabs::-webkit-scrollbar { display: none; }
  .studio__tabs button { padding: 10px 12px; font-size: 14px; }
  .studio__tabs button i { width: 32px; height: 32px; font-size: 18px; }
  .studio__screen { min-height: 480px; }
  .sc { padding: 18px 14px; }
  .chat { grid-template-columns: 1fr; }
  .doc { width: 160px; justify-self: center; }
  .studio__cta { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .sc .sc__notes li, .ap__list div, .node, .b--me, .b--ai, .chips span, .term span { opacity: 1 !important; }
  .code .ln { width: 100% !important; }
  .b--typing { display: none !important; }
}

/* celular: flujo vertical, código más compacto y chat sin documento */
.flow-m { display: none; }
@media (max-width: 640px) {
  .flow-box { display: none; }
  .flow-m { position: relative; display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; width: 100%; max-width: 300px; }
  .flow-m::before { content: ""; position: absolute; left: 27px; top: 20px; bottom: 20px; border-left: 3px dashed rgba(74, 108, 247, .45); }
  .flow-m::after { content: ""; position: absolute; left: 22px; top: 20px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(74, 108, 247, .35), 0 0 14px #4a6cf7; opacity: 0; }
  .sc--auto.is-on .flow-m::after { animation: flowDown 2.4s .6s linear infinite; }
  @keyframes flowDown { 0% { top: 20px; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { top: calc(100% - 30px); opacity: 0; } }
  .flow-m li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; background: #fff; font: 600 14px var(--font-d); color: var(--ink); box-shadow: 0 12px 26px -16px rgba(7, 22, 64, .5); opacity: 0; }
  .flow-m i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; font-size: 20px; color: #fff; background: var(--grad-deep); }
  .flow-m .ai i { background: linear-gradient(135deg, #8b5cf6, #4a6cf7); }
  .sc--auto.is-on .flow-m li { animation: up .45s both; }
  .sc--auto.is-on .flow-m li:nth-child(2) { animation-delay: .2s; }
  .sc--auto.is-on .flow-m li:nth-child(3) { animation-delay: .4s; }
  .sc--auto.is-on .flow-m li:nth-child(4) { animation-delay: .6s; }
  .code { font-size: 10.2px; padding: 14px 12px 8px; }
  .term { font-size: 11px; padding: 10px 12px 12px; }
  .doc { display: none; }
  .sc__notes li:nth-child(3) { display: none; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) { .flow-m li { opacity: 1 !important; } }
